72 G4int noIntegrationVariables,
75 fLastStepLength( -1.0 ), fAuxStepper( nullptr )
77 const G4int numberOfVariables = noIntegrationVariables;
171 b31 = 2.0/27.0 , b32 = 4.0/27.0,
173 b41 = 183.0/1372.0 , b42 = -162.0/343.0, b43 = 1053.0/1372.0,
175 b51 = 68.0/297.0, b52 = -4.0/11.0,
176 b53 = 42.0/143.0, b54 = 1960.0/3861.0,
178 b61 = 597.0/22528.0, b62 = 81.0/352.0,
179 b63 = 63099.0/585728.0, b64 = 58653.0/366080.0,
180 b65 = 4617.0/20480.0,
182 b71 = 174197.0/959244.0, b72 = -30942.0/79937.0,
183 b73 = 8152137.0/19744439.0, b74 = 666106.0/1039181.0,
184 b75 = -29421.0/29068.0, b76 = 482048.0/414219.0,
186 b81 = 587.0/8064.0, b82 = 0.0,
187 b83 = 4440339.0/15491840.0, b84 = 24353.0/124800.0,
188 b85 = 387.0/44800.0, b86 = 2152.0/5985.0,
189 b87 = 7267.0/94080.0,
207 dc1 = b81 - 2479.0/34992.0 ,
209 dc3 = b83 - 123.0/416.0 ,
210 dc4 = b84 - 612941.0/3411720.0,
211 dc5 = b85 - 43.0/1440.0,
212 dc6 = b86 - 2272.0/6561.0,
213 dc7 = b87 - 79937.0/1113912.0,
214 dc8 = -3293.0/556956.0;
223 for(i=0;i<numberOfVariables;i++)
233 for(i=0;i<numberOfVariables;i++)
239 for(i=0;i<numberOfVariables;i++)
245 for(i=0;i<numberOfVariables;i++)
251 for(i=0;i<numberOfVariables;i++)
258 for(i=0;i<numberOfVariables;i++)
261 b64*
ak4[i] + b65*
ak5[i]) ;
265 for(i=0;i<numberOfVariables;i++)
272 for(i=0;i<numberOfVariables;i++)
274 yOut[i] =
yIn[i] + Step*(b81*
DyDx[i] + b82*
ak2[i] + b83*
ak3[i] +
281 for(i=0;i<numberOfVariables;i++)
284 yErr[i] = Step*(dc1*
DyDx[i] + dc2*
ak2[i] + dc3*
ak3[i] + dc4*
ak4[i] +
289 nextDydx[i] =
ak8[i];
333 if (initialPoint != finalPoint)
336 distChord = distLine;
340 distChord = (midPoint-initialPoint).mag();
354 for(
int i=1; i<12; i++){
355 for(
int j=1; j<7; j++){
360 bi[1][6] = -12134338393.0/1050809760.0 ,
361 bi[1][5] = -1620741229.0/50038560.0 ,
362 bi[1][4] = -2048058893.0/59875200.0 ,
363 bi[1][3] = -87098480009.0/5254048800.0 ,
364 bi[1][2] = -11513270273.0/3502699200.0 ,
366 bi[3][6] = -33197340367.0/1218433216.0 ,
367 bi[3][5] = -539868024987.0/6092166080.0 ,
368 bi[3][4] = -39991188681.0/374902528.0 ,
369 bi[3][3] = -69509738227.0/1218433216.0 ,
370 bi[3][2] = -29327744613.0/2436866432.0 ,
372 bi[4][6] = -284800997201.0/19905339168.0 ,
373 bi[4][5] = -7896875450471.0/165877826400.0 ,
374 bi[4][4] = -333945812879.0/5671036800.0 ,
375 bi[4][3] = -16209923456237.0/497633479200.0 ,
376 bi[4][2] = -2382590741699.0/331755652800.0 ,
378 bi[5][6] = -540919.0/741312.0 ,
379 bi[5][5] = -103626067.0/43243200.0 ,
380 bi[5][4] = -633779.0/211200.0 ,
381 bi[5][3] = -32406787.0/18532800.0 ,
382 bi[5][2] = -36591193.0/86486400.0 ,
384 bi[6][6] = 7157998304.0/374350977.0 ,
385 bi[6][5] = 30405842464.0/623918295.0 ,
386 bi[6][4] = 183022264.0/5332635.0 ,
387 bi[6][3] = -3357024032.0/1871754885.0 ,
388 bi[6][2] = -611586736.0/89131185.0 ,
390 bi[7][6] = -138073.0/9408.0 ,
391 bi[7][5] = -719433.0/15680.0 ,
392 bi[7][4] = -1620541.0/31360.0 ,
393 bi[7][3] = -385151.0/15680.0 ,
394 bi[7][2] = -65403.0/15680.0 ,
396 bi[8][6] = 1245.0/64.0 ,
397 bi[8][5] = 3991.0/64.0 ,
398 bi[8][4] = 4715.0/64.0 ,
399 bi[8][3] = 2501.0/64.0 ,
400 bi[8][2] = 149.0/16.0 ,
403 bi[9][6] = 55.0/3.0 ,
406 bi[9][3] = 199.0/3.0 ,
409 bi[10][6] = -1774004627.0/75810735.0 ,
410 bi[10][5] = -1774004627.0/25270245.0 ,
411 bi[10][4] = -26477681.0/359975.0 ,
412 bi[10][3] = -11411880511.0/379053675.0 ,
413 bi[10][2] = -423642896.0/126351225.0 ,
434 a93 = 10256301.0/35409920.0 ,
435 a94 = 2307361.0/17971200.0 ,
436 a95 = -387.0/102400.0 ,
438 a97 = -7267.0/215040.0 ,
441 a101 = -837888343715.0/13176988637184.0 ,
442 a102 = 30409415.0/52955362.0 ,
443 a103 = -48321525963.0/759168069632.0 ,
444 a104 = 8530738453321.0/197654829557760.0 ,
445 a105 = 1361640523001.0/1626788720640.0 ,
446 a106 = -13143060689.0/38604458898.0 ,
447 a107 = 18700221969.0/379584034816.0 ,
448 a108 = -5831595.0/847285792.0 ,
449 a109 = -5183640.0/26477681.0 ,
451 a111 = 98719073263.0/1551965184000.0 ,
452 a112 = 1307.0/123552.0 ,
453 a113 = 4632066559387.0/70181753241600.0 ,
454 a114 = 7828594302389.0/382182512025600.0 ,
455 a115 = 40763687.0/11070259200.0 ,
456 a116 = 34872732407.0/224610586200.0 ,
457 a117 = -2561897.0/30105600.0 ,
460 a1110 = -1403317093.0/11371610250.0 ;
465 for(
int i=0;i<numberOfVariables;i++)
474 for(
int i=0; i<numberOfVariables; i++){
477 a97*
ak7[i] + a98*
ak8[i] );
482 for(
int i=0; i<numberOfVariables; i++){
483 yTemp[i] =
yIn[i] + Step*(a101*dydx[i] + a102*
ak2[i] + a103*
ak3[i] +
484 a104*
ak4[i] + a105*
ak5[i] + a106*
ak6[i] +
485 a107*
ak7[i] + a108*
ak8[i] + a109*
ak9[i] );
490 for(
int i=0; i<numberOfVariables; i++){
491 yTemp[i] =
yIn[i] + Step*(a111*dydx[i] + a112*
ak2[i] + a113*
ak3[i] +
492 a114*
ak4[i] + a115*
ak5[i] + a116*
ak6[i] +
493 a117*
ak7[i] + a118*
ak8[i] + a119*
ak9[i] +
501 for(
int i=1; i<=11; i++){
504 for(
int j=1; j<=6; j++){
505 b[i] +=
bi[i][j]*tau;
510 for(
int i=0; i<numberOfVariables; i++){
511 yOut[i] =
yIn[i] + Step*(
b[1]*dydx[i] +
b[2]*
ak2[i] +
b[3]*
ak3[i] +
T max(const T t1, const T t2)
brief Return the largest of the two arguments
CLHEP::Hep3Vector G4ThreeVector
static G4double Distline(const G4ThreeVector &OtherPnt, const G4ThreeVector &LinePntA, const G4ThreeVector &LinePntB)
void RightHandSide(const double y[], double dydx[])
G4FSALBogackiShampine45 * fAuxStepper
G4int GetNumberOfVariables() const
G4double * fLastInitialVector
G4double * fLastFinalVector
~G4FSALBogackiShampine45()
void interpolate(const G4double yInput[], const G4double dydx[], G4double yOut[], G4double Step, G4double tau)
G4double DistChord() const
void Stepper(const G4double y[], const G4double dydx[], G4double h, G4double yout[], G4double yerr[], G4double nextDydx[])
G4FSALBogackiShampine45(G4EquationOfMotion *EqRhs, G4int numberOfVariables=6, G4bool primary=true)
static G4double bi[12][7]
static bool fPreparedConstants
G4double * pseudoDydx_for_DistChord
G4int GetNumberOfStateVariables() const