0
$\begingroup$

Consider a table:

Step1[\[Theta]_] = 
 Max[3, IntegerPart[Sqrt[125^2 + Min[200^2/Sin[\[Theta]]^2, 3500^2]]/
   100]]
\[Theta]values = 
 N[{10^-4, 10^-3, 10^-2, 5*10^-2, 10^-1, 3*10^-1, 5*10^-1, 1, 1.5, 2,
     3.1}]
Table2[m_] := 
 Table[{\[Theta], ES, 
   NIntegrate[
    Exp[-ES/125*m^0.4*x*(Cos[\[Theta]]^4 + 0.01)], {x, 0, 1}, 
    Method -> "AdaptiveMonteCarlo"]}, {\[Theta], \[Theta]values}, {ES,
    m, 10000, Step1[\[Theta]]}]

How to parallelize it?

$\endgroup$
  • $\begingroup$ Use Table2[m_] := ParallelTable[{\[Theta], ES, NIntegrate[ Exp[-ES/125*m^0.4*x*(Cos[\[Theta]]^4 + 0.01)], {x, 0, 1}, Method -> "AdaptiveMonteCarlo", AccuracyGoal -> 2, PrecisionGoal -> 2]}, {\[Theta], \[Theta]values}, {ES, m, 10000, Step1[\[Theta]]}] $\endgroup$ – Alex Trounev Jul 2 at 13:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.