48 G4int noIntegrationVariables,
51 fLastStepLength(0.), fAuxStepper(0)
53 const G4int numberOfVariables =
55 ( ( (noIntegrationVariables-1)/4 + 1 ) * 4 ) );
132 b31 = 3.0/40.0 , b32 = 9.0/40.0 ,
133 b41 = 0.3 , b42 = -0.9 , b43 = 1.2 ,
135 b51 = -11.0/54.0 , b52 = 2.5 , b53 = -70.0/27.0 ,
138 b61 = 1631.0/55296.0 , b62 = 175.0/512.0 ,
139 b63 = 575.0/13824.0 , b64 = 44275.0/110592.0 ,
142 c1 = 37.0/378.0 , c3 = 250.0/621.0 , c4 = 125.0/594.0 ,
144 dc5 = -277.0/14336.0 ;
146 const G4double dc1 =
c1 - 2825.0/27648.0 , dc3 = c3 - 18575.0/48384.0 ,
147 dc4 = c4 - 13525.0/55296.0 , dc6 = c6 - 0.25 ;
159 for(i=0;i<numberOfVariables;i++)
165 for(i=0;i<numberOfVariables;i++)
167 yTemp[i] =
yIn[i] + b21*Step*dydx[i] ;
171 for(i=0;i<numberOfVariables;i++)
173 yTemp[i] =
yIn[i] + Step*(b31*dydx[i] + b32*
ak2[i]) ;
177 for(i=0;i<numberOfVariables;i++)
179 yTemp[i] =
yIn[i] + Step*(b41*dydx[i] + b42*
ak2[i] + b43*
ak3[i]) ;
183 for(i=0;i<numberOfVariables;i++)
190 for(i=0;i<numberOfVariables;i++)
193 b64*
ak4[i] + b65*
ak5[i]) ;
197 for(i=0;i<numberOfVariables;i++)
201 yOut[i] =
yIn[i] + Step*(
c1*dydx[i] + c3*
ak3[i] + c4*
ak4[i] + c6*
ak6[i]) ;
206 yErr[i] = Step*(dc1*dydx[i] + dc3*
ak3[i] + dc4*
ak4[i] +
207 dc5*
ak5[i] + dc6*
ak6[i]) ;
233 G4Exception(
"G4CashKarpRKF45::StepWithEst()",
"GeomField0001",
262 if (initialPoint != finalPoint)
265 distChord = distLine;
269 distChord = (midPoint-initialPoint).mag();
T max(const T t1, const T t2)
brief Return the largest of the two arguments
G4double * fLastInitialVector
CLHEP::Hep3Vector G4ThreeVector
static G4double Distline(const G4ThreeVector &OtherPnt, const G4ThreeVector &LinePntA, const G4ThreeVector &LinePntB)
G4CashKarpRKF45 * fAuxStepper
G4CashKarpRKF45(G4EquationOfMotion *EqRhs, G4int numberOfVariables=6, G4bool primary=true)
void StepWithEst(const G4double yIn[], const G4double dydx[], G4double Step, G4double yOut[], G4double &alpha2, G4double &beta2, const G4double B1[], G4double B2[])
G4int GetNumberOfStateVariables() const
void RightHandSide(const double y[], double dydx[]) const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4double * fLastFinalVector
G4double DistChord() const
void Stepper(const G4double y[], const G4double dydx[], G4double h, G4double yout[], G4double yerr[])
G4int GetNumberOfVariables() const