39 : fEquation(equation), fnvar(nvar), fsteps(steps)
43 G4Exception(
"G4ModifiedMidpoint::G4ModifiedMidpoint()",
45 "Invalid number of variables; must be greater than zero!");
63 y1[i] = yIn[i] + h * dydyIn[i];
77 y1[j] = y0[j] + h2 * dydx[j];
88 yOut[i] = 0.5 * (y0[i] + y1[i] + h * dydx[i]);
109 y1[i] = y0[i] + h * dydxIn[i];
128 y1[j] = y0[j] + h2 * derivs[i-1][j];
133 if(i == fsteps / 2 - 1 )
145 yOut[i] = 0.5 * (y0[i] + y1[i] + h * derivs[fsteps-1][i]);
Float_t y1[n_points_granero]
G4EquationOfMotion * fEquation
void DoStep(const G4double yIn[], const G4double dydxIn[], G4double yOut[], G4double hstep) const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
void copy(G4double dst[], const G4double src[]) const
void RightHandSide(const G4double y[], G4double dydx[]) const
G4ModifiedMidpoint(G4EquationOfMotion *equation, G4int nvar=6, G4int steps=2)