112 for (
G4int i = 0; i < fnvar; ++i)
114 y1[i] = y0[i] + h * dydxIn[i];
125 fEquation->RightHandSide(y1, derivs[0]);
130 for (
G4int i = 1; i < fsteps; ++i)
133 for (
G4int j = 0; j < fnvar; ++j)
135 y1[j] = y0[j] + h2 * derivs[i-1][j];
140 if(i == fsteps / 2 - 1 )
145 fEquation->RightHandSide(y1, derivs[i]);
151 for (
G4int i = 0; i < fnvar; ++i)
153 yOut[i] = 0.5 * (y0[i] + y1[i] + h * derivs[fsteps-1][i]);