# Use Parallel with Cuba library?

Posted 12 days ago
84 Views
|
0 Replies
|
0 Total Likes
|
 Hello, is possible use Parallel with Cuba ?i have some integrals like this, Subscript[xm, G00][m_] := Nc/fk*\!$$\*SubsuperscriptBox[\(\[Sum]$$, $$a = 1$$, $$2$$]$$\*SubsuperscriptBox[\(\[Sum]$$, $$i = 1$$, $$2$$]$$\*SubsuperscriptBox[\(\[Sum]$$, $$b = 1$$, $$2$$]$$\*SubsuperscriptBox[\(\[Sum]$$, $$j = 1$$, $$2$$]Sz[kmais]* Sz[kmenos]*$$( \*SubscriptBox[\(U$$, $$G00$$] - \*SubscriptBox[$$U$$, $$G01$$] - \*SubscriptBox[$$U$$, $$G02$$])\)* \*SuperscriptBox[ SubscriptBox[$$\[CapitalLambda]$$, $$G0$$], $$2* \*SubscriptBox[\(n$$, $$G00$$]\)]*Vegas[Re[\ \[Rho][\[Alpha], \*SubscriptBox[$$\[Nu]$$, $$G00$$]]* \*SuperscriptBox[$$x1$$, $$\*SubscriptBox[\(n$$, $$G00$$] - 1\)]* \*FractionBox[$$\*SuperscriptBox[\((\(-1$$)\), $$m + 1$$] \*SuperscriptBox[$$f[\[Alpha], x1, x2]$$, $$m - 1$$]\), $$18* \*SuperscriptBox[\((4*\[Pi])$$, $$2$$]\)]*$$( \*FractionBox[\(4*\((m - \((\((3 + m)$$* \*SuperscriptBox[$$f[\[Alpha], x1, x2]$$, $$2$$])\))\)\), SuperscriptBox[$$\(\*SubscriptBox[\(\[CapitalDelta]$$, $$G0$$]\)[P2, Sm, \[Alpha], x1, x2, \*SubscriptBox[$$\[CapitalLambda]$$, $$G0$$]]\), $$\*SubscriptBox[\(n$$, $$G00$$] - 1\)]] + \*FractionBox[$$9* \*SuperscriptBox[\(f[\[Alpha], x1, x2]$$, $$2$$]*$$(\(-4$$*Sm[kmais]*\ Sm[kmenos] + P2*$$(2 - \*SuperscriptBox[\(f[\[Alpha], x1, x2]$$, $$2$$])\))\)\), SuperscriptBox[$$\(\*SubscriptBox[\(\[CapitalDelta]$$, $$G0$$]\)[P2, Sm, \[Alpha], x1, x2, \*SubscriptBox[$$\[CapitalLambda]$$, $$G0$$]]\), SubscriptBox[$$n$$, $$G00$$]]])\)\[IndentingNewLine]], {\[Alpha], \ $$-1$$, 1}, {x1, 0, 1}, {x2, 0, 1 - x1}, Verbose -> 0]\)\)\)\) // Quiet where f[\[Alpha]_, x1_, x2_] ,[Rho][[Alpha], [Nu]] and Subscript[[CapitalDelta], G0][P2, Sm, [Alpha], x1, x2, Subscript[[CapitalLambda], G0] are a functions, f[\[Alpha]_, x1_, x2_] := (1 - 2*x2 - (1 - \[Alpha])*x1); \[Rho][\[Alpha]_, \[Nu]_] := Gamma[\[Nu] + 3/2]/( Gamma[\[Nu] + 1]*Gamma[1/2])*(1 - \[Alpha]^2)^\[Nu]; Subscript[\[CapitalDelta], G0][P2, Sm, \[Alpha], x1, x2, Subscript[\[CapitalLambda], G0]] = -P2/4* f[\[Alpha], x1, x2]^2 + (1 - x1)*(P2 + Sm[kmais]^2) + (Sm[kmenos]^2 - Sm[kmais]^2)*x2 + Subscript[\[CapitalLambda], G0]^2 *x1; and Sz[kmais] = Subscript[zx, {a, i}]; Sz[kmenos] = Subscript[zy, {b, j}]; Sm[kmais] = Subscript[mx, {a, i}]; Sm[kmenos] = Subscript[my, {b, j}]; `is a sum.The other values like U00 or lambda is paramters.I need to calculate this integral for m = 1 , 2 , 3 ,4 .....50, but the time spent to calculate is very large, would it be possible to use the parallel in the cuba to be using the 4 cores of the processor and optimizing the calculation time?Thanks Attachments:
Community posts can be styled and formatted using the Markdown syntax.