I have a ParametricNDsolve
solution for a differential equation for a huge system given by s1
. I have no problem in evaluating the value using the solution. It's, in fact, speeding up the process using Parallel cores.
I have represented the variables by a, b, c
and d
, some of which are indexed by j
, and the parameters are g, n1
and n2
.
My attempt is to create a table of all the required variables and replace s1
to them as in Tab1
and finally evaluate t
shown by Tab2
Tab1 = Table[ Table[Table[{a[j, t][g, n1, n2], b[j, t][g, n1, n2],
c[g, n1, n2][t], d[g, n1, n2][t]}, {j, 1, 2}], {g, 1, 3, 1}], {n1, 1, 4}, {n2, 1, 4}] /. s1; (*first step*)
Tab2=Tab1/.t->12 (say)
So,Tab1
is only a replacement of the solution s1
to the given variables a, b, c
and d
, which takes me more time to evaluate than Tab2
. Is there any way I can parallel map or parallelEvaluate Tab1 using all cores available such that s1
is mapped to the table of variables simultaneously in parallel
Tab1 = Table[{a[j, t][g, n1, n2], b[j, t][g, n1, n2], c[g, n1, n2][t], d[g, n1, n2][t]}, {n1, 1, 4}, {n2, 1, 4}, {g, 1, 3, 1}, {j, 1, 2}];
$\endgroup$