38 : fEquation(equation), fnvar(nvar), fsteps(steps)
42 G4Exception(
"G4ModifiedMidpoint::G4ModifiedMidpoint()",
44 "Invalid number of variables; must be greater than zero!");
54 setValue(yIn, Value1D::LabTime, y0, y1, yTemp, yOut);
65 y1[i] = yIn[i] + h * dydyIn[i];
80 y1[j] = y0[j] + h2 * dydx[j];
92 yOut[i] = 0.5 * (y0[i] + y1[i] + h * dydx[i]);
103 setValue(yIn, Value1D::LabTime, y0, y1, yTemp, yMid, yOut);
114 y1[i] = y0[i] + h * dydxIn[i];
135 y1[j] = y0[j] + h2 * derivs[i-1][j];
153 yOut[i] = 0.5 * (y0[i] + y1[i] + h * derivs[
fsteps-1][i]);
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
void RightHandSide(const G4double y[], G4double dydx[]) const
G4EquationOfMotion * fEquation
G4ModifiedMidpoint(G4EquationOfMotion *equation, G4int nvar=6, G4int steps=2)
void DoStep(const G4double yIn[], const G4double dydxIn[], G4double yOut[], G4double hstep) const
void copy(G4double dst[], const G4double src[]) const
void setValue(const SourceArray &src, Value1D value, TargetArray &trg)