64 G4int noIntegrationVariables,
69 const G4int numberOfVariables = noIntegrationVariables;
111 delete[]
ak2;
ak2=
nullptr;
112 delete[]
ak3;
ak3=
nullptr;
113 delete[]
ak4;
ak4=
nullptr;
114 delete[]
ak5;
ak5=
nullptr;
115 delete[]
ak6;
ak6=
nullptr;
116 delete[]
ak7;
ak7=
nullptr;
117 delete[]
ak8;
ak8=
nullptr;
118 delete[]
ak9;
ak9=
nullptr;
121 delete[]
yIn;
yIn=
nullptr;
155 b31 = 3.0/40.0, b32 = 9.0/40.0 ,
157 b41 = 44.0/45.0, b42 = -56.0/15.0, b43 = 32.0/9.0,
159 b51 = 19372.0/6561.0, b52 = -25360.0/2187.0, b53 = 64448.0/6561.0,
162 b61 = 9017.0/3168.0 , b62 = -355.0/33.0,
163 b63 = 46732.0/5247.0 , b64 = 49.0/176.0 ,
164 b65 = -5103.0/18656.0 ,
166 b71 = 35.0/384.0, b72 = 0.,
167 b73 = 500.0/1113.0, b74 = 125.0/192.0,
168 b75 = -2187.0/6784.0, b76 = 11.0/84.0,
175 dc1 = b71 - 5179.0/57600.0,
177 dc3 = b73 - 7571.0/16695.0,
178 dc4 = b74 - 393.0/640.0,
179 dc5 = b75 + 92097.0/339200.0,
180 dc6 = b76 - 187.0/2100.0,
188 for(i=0;i<numberOfVariables;i++)
194 yOut[7] =
yTemp[7] = yInput[7];
199 for(i=0;i<numberOfVariables;i++)
205 for(i=0;i<numberOfVariables;i++)
211 for(i=0;i<numberOfVariables;i++)
217 for(i=0;i<numberOfVariables;i++)
224 for(i=0;i<numberOfVariables;i++)
227 b64*
ak4[i] + b65*
ak5[i]) ;
231 for(i=0;i<numberOfVariables;i++)
238 for(i=0;i<numberOfVariables;i++)
249 nextDydx[i] =
ak7[i];
285 if (initialPoint != finalPoint)
288 distChord = distLine;
292 distChord = (midPoint-initialPoint).mag();
305 bf1, bf2, bf3, bf4, bf5, bf6, bf7;
315 for(
int i=0;i<numberOfVariables;i++)
325 bf1 = (157015080.0*tau_4 - 13107642775.0*tau_3+ 34969693132.0*tau_2- 32272833064.0*tau
326 + 11282082432.0)/11282082432.0,
328 bf3 = - 100.0*tau*(15701508.0*tau_3 - 914128567.0*tau_2 + 2074956840.0*tau
329 - 1323431896.0)/32700410799.0,
330 bf4 = 25.0*tau*(94209048.0*tau_3- 1518414297.0*tau_2+ 2460397220.0*tau - 889289856.0)/5641041216.0 ,
331 bf5 = -2187.0*tau*(52338360.0*tau_3 - 451824525.0*tau_2 + 687873124.0*tau - 259006536.0)/199316789632.0 ,
332 bf6 = 11.0*tau*(106151040.0*tau_3- 661884105.0*tau_2 + 946554244.0*tau - 361440756.0)/2467955532.0 ,
333 bf7 = tau*(1.0 - tau)*(8293050.0*tau_2 - 82437520.0*tau + 44764047.0)/ 29380423.0 ;
336 for(
int i=0; i<numberOfVariables; i++){
337 yOut[i] =
yIn[i] + Step*tau*(bf1*dydx[i] + bf2*
ak2[i] + bf3*
ak3[i] + bf4*
ak4[i]
338 + bf5*
ak5[i] + bf6*
ak6[i] + bf7*
ak7[i] ) ;
351 b81 = 6245.0/62208.0 ,
353 b83 = 8875.0/103032.0 ,
354 b84 = -125.0/1728.0 ,
355 b85 = 801.0/13568.0 ,
356 b86 = -13519.0/368064.0 ,
357 b87 = 11105.0/368064.0 ,
359 b91 = 632855.0/4478976.0 ,
361 b93 = 4146875.0/6491016.0 ,
362 b94 = 5490625.0/14183424.0 ,
363 b95 = -15975.0/108544.0 ,
364 b96 = 8295925.0/220286304.0 ,
365 b97 = -1779595.0/62938944.0 ,
366 b98 = -805.0/4104.0 ;
371 for(
int i=0;i<numberOfVariables;i++)
379 for(
int i=0;i<numberOfVariables;i++)
381 yTemp[i] =
yIn[i] + Step*( b81*dydx[i] + b82*
ak2[i] + b83*
ak3[i] +
387 for(
int i=0;i<numberOfVariables;i++)
389 yTemp[i] =
yIn[i] + Step * ( b91*dydx[i] + b92*
ak2[i] + b93*
ak3[i] +
391 b97*
ak7[i] + b98*
ak8[i] );
412 bi[1][1] = -38039.0/7040.0 ,
413 bi[1][2] = 125923.0/10560.0 ,
414 bi[1][3] = -19683.0/1760.0 ,
415 bi[1][4] = 3303.0/880.0 ,
428 bi[3][1] = -12500.0/4081.0 ,
429 bi[3][2] = 205000.0/12243.0 ,
430 bi[3][3] = -90000.0/4081.0 ,
431 bi[3][4] = 36000.0/4081.0 ,
436 bi[4][1] = -3125.0/704.0 ,
437 bi[4][2] = 25625.0/1056.0 ,
438 bi[4][3] = -5625.0/176.0 ,
439 bi[4][4] = 1125.0/88.0 ,
444 bi[5][1] = 164025.0/74624.0 ,
445 bi[5][2] = -448335.0/37312.0 ,
446 bi[5][3] = 295245.0/18656.0 ,
447 bi[5][4] = -59049.0/9328.0 ,
452 bi[6][1] = -25.0/28.0 ,
453 bi[6][2] = 205.0/42.0 ,
454 bi[6][3] = -45.0/7.0 ,
455 bi[6][4] = 18.0/7.0 ,
460 bi[7][1] = -2.0/11.0 ,
461 bi[7][2] = 73.0/55.0 ,
462 bi[7][3] = -171.0/55.0 ,
463 bi[7][4] = 108.0/55.0 ,
468 bi[8][1] = 189.0/22.0 ,
469 bi[8][2] = -1593.0/55.0 ,
470 bi[8][3] = 3537.0/110.0 ,
471 bi[8][4] = -648.0/55.0 ,
476 bi[9][1] = 351.0/110.0 ,
477 bi[9][2] = -999.0/55.0 ,
478 bi[9][3] = 2943.0/110.0 ,
479 bi[9][4] = -648.0/55.0 ;
484 for(
G4int i = 0; i< numberOfVariables; i++)
490 for(
int i=1; i<=9; i++){
493 for(
int j=0; j<=4; j++){
494 b[i] += bi[i][j]*tau;
499 for(
int i=0; i<numberOfVariables; i++){
500 yOut[i] =
yIn[i] + Step*tau0*(b[1]*dydx[i] + b[2]*
ak2[i] + b[3]*
ak3[i] +
501 b[4]*
ak4[i] + b[5]*
ak5[i] + b[6]*
ak6[i] +
502 b[7]*
ak7[i] + b[8]*
ak8[i] + b[9]*
ak9[i] );
CLHEP::Hep3Vector G4ThreeVector
static G4double Distline(const G4ThreeVector &OtherPnt, const G4ThreeVector &LinePntA, const G4ThreeVector &LinePntB)
void RightHandSide(const double y[], double dydx[])
G4int GetNumberOfVariables() const
G4double DistChord() const
void SetupInterpolate(const G4double yInput[], const G4double dydx[], const G4double Step)
G4double * fLastFinalVector
void Interpolate(const G4double yInput[], const G4double dydx[], const G4double Step, G4double yOut[], G4double tau)
G4FSALDormandPrince745 * fAuxStepper
void interpolate(const G4double yInput[], const G4double dydx[], G4double yOut[], G4double Step, G4double tau)
G4FSALDormandPrince745(G4EquationOfMotion *EqRhs, G4int numberOfVariables=6, G4bool primary=true)
~G4FSALDormandPrince745()
G4double * pseudoDydx_for_DistChord
void Stepper(const G4double y[], const G4double dydx[], G4double h, G4double yout[], G4double yerr[], G4double nextDydx[])
G4double * fLastInitialVector