54template <
class T_Equation,
unsigned int N>
63 G4TSimpleHeum(T_Equation* EqRhs,
unsigned int numberOfVariables = 6);
71 fEquation_Rhs->T_Equation::RightHandSide(y, dydx);
82 G4int fNumberOfVariables;
90 T_Equation* fEquation_Rhs;
93template <
class T_Equation,
unsigned int N >
95 unsigned int numberOfVariables )
97 EqRhs, numberOfVariables)
98 , fNumberOfVariables(numberOfVariables)
99 , fEquation_Rhs(EqRhs)
101 assert(fNumberOfVariables ==
N);
104 G4Exception(
"G4TSimpleHeum: constructor",
"GeomField0001",
109template <
class T_Equation,
unsigned int N >
115 for(
unsigned int i = 0; i <
N; ++i)
117 yTemp[i] = yIn[i] + (1.0 / 3.0) * h * dydx[i];
120 this->RightHandSide(yTemp, dydxTemp);
122 for(
unsigned int i = 0; i <
N; ++i)
124 yTemp2[i] = yIn[i] + (2.0 / 3.0) * h * dydxTemp[i];
127 this->RightHandSide(yTemp2, dydxTemp2);
129 for(
unsigned int i = 0; i <
N; ++i)
131 yOut[i] = yIn[i] + h * (0.25 * dydx[i] + 0.75 * dydxTemp2[i]);
134 if(fNumberOfVariables == 12)
136 this->NormalisePolarizationVector(yOut);
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
static constexpr double IntegratorCorrection
G4TSimpleHeum(T_Equation *EqRhs, unsigned int numberOfVariables=6)
G4int IntegratorOrder() const
void DumbStepper(const G4double yIn[], const G4double dydx[], G4double h, G4double yOut[])
static constexpr unsigned int gIntegratorOrder
void RightHandSide(G4double y[], G4double dydx[])