56void G4RK547FEq1::makeStep(
const G4double yInput[],
66 yOutput[i] = yTemp[i] = yInput[i];
76 b31 = 1./12., b32 = 1./4.,
77 b41 = 1./8., b42 = 0., b43 = 3./8.,
78 b51 = 91./500., b52 = -27./100.,
79 b53 = 78./125., b54 = 8./125.,
80 b61 = -11./20., b62 = 27./20., b63 = 12./5.,
81 b64 = -36./5., b65 = 5.,
82 b71 = 1./12., b72 = 0., b73 = 27./32.,
83 b74 = -4./3., b75 = 125./96., b76 = 5./48.;
96 yTemp[i] = yInput[i] + hstep * b21 * dydx[i];
102 yTemp[i] = yInput[i] + hstep * (b31 * dydx[i] + b32 * ak2[i]);
108 yTemp[i] = yInput[i] + hstep * (b41 * dydx[i] + b42 * ak2[i] +
115 yTemp[i] = yInput[i] + hstep * (b51 * dydx[i] + b52 * ak2[i] +
116 b53 * ak3[i] + b54 * ak4[i]);
122 yTemp[i] = yInput[i] + hstep * (b61 * dydx[i] + b62 * ak2[i] +
123 b63 * ak3[i] + b64 * ak4[i] +
130 yOutput[i] = yInput[i] + hstep * (b71 * dydx[i] + b72 * ak2[i] +
131 b73 * ak3[i] + b74 * ak4[i] +
132 b75 * ak5[i] + b76 * ak6[i]);
134 if ((dydxOutput !=
nullptr) && (yError !=
nullptr))
139 yError[i] = hstep * (dc1 * dydx[i] + dc2 * ak2[i] + dc3 * ak3[i] +
140 dc4 * ak4[i] + dc5 * ak5[i] + dc6 * ak6[i] +
141 dc7 * dydxOutput[i]);
156 makeStep(fyIn, fdydx, fhstep, fyOut, fdydxOut, yError);
158 copy(yOutput, fyOut);
172 makeStep(fyIn,fdydx, fhstep, fyOut, fdydxOut, yError);
174 copy(yOutput, fyOut);
175 copy(dydxOutput, fdydxOut);
181 makeStep(fyIn, fdydx, fhstep / 2., yMid);
static G4double Distline(const G4ThreeVector &OtherPnt, const G4ThreeVector &LinePntA, const G4ThreeVector &LinePntB)
G4int GetNumberOfVariables() const
void RightHandSide(const G4double y[], G4double dydx[]) const
G4int GetNumberOfStateVariables() const
void Stepper(const G4double yInput[], const G4double dydx[], G4double hstep, G4double yOutput[], G4double yError[]) override
G4RK547FEq1(G4EquationOfMotion *EqRhs, G4int integrationVariables=6)
G4double DistChord() const override
G4ThreeVector makeVector(const ArrayType &array, Value3D value)
void copy(G4double dst[], const G4double src[], std::size_t size=G4FieldTrack::ncompSVEC)