|
Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
|
G4VFSALIntegrationStepper is a class similar to G4VMagIntegratorStepper, but for steppers which estimate the value of the derivative at the projected endpoint of integration, at each successful step. This ability is known as 'First Same As Last' (FSAL). It reduces the number of required calls to the equation's RightHandSide method, and, as such the number of calls to the (potentially expensive) field evaluation methods. More...
#include <G4VFSALIntegrationStepper.hh>
Public Member Functions | |
| G4VFSALIntegrationStepper (G4EquationOfMotion *Equation, G4int numIntegrationVariables, G4int numStateVariables=12) | |
| virtual | ~G4VFSALIntegrationStepper ()=default |
| G4VFSALIntegrationStepper (const G4VFSALIntegrationStepper &)=delete | |
| G4VFSALIntegrationStepper & | operator= (const G4VFSALIntegrationStepper &)=delete |
| virtual void | Stepper (const G4double y[], const G4double dydx[], G4double h, G4double yout[], G4double yerr[], G4double lastDydx[])=0 |
| virtual G4double | DistChord () const =0 |
| void | NormaliseTangentVector (G4double vec[6]) |
| void | NormalisePolarizationVector (G4double vec[12]) |
| void | RightHandSide (const double y[], double dydx[]) |
| G4int | GetNumberOfVariables () const |
| G4int | GetNumberOfStateVariables () const |
| virtual G4int | IntegratorOrder () const =0 |
| G4EquationOfMotion * | GetEquationOfMotion () |
| void | SetEquationOfMotion (G4EquationOfMotion *newEquation) |
| G4int | GetfNoRHSCalls () |
| void | increasefNORHSCalls () |
| void | ResetfNORHSCalls () |
G4VFSALIntegrationStepper is a class similar to G4VMagIntegratorStepper, but for steppers which estimate the value of the derivative at the projected endpoint of integration, at each successful step. This ability is known as 'First Same As Last' (FSAL). It reduces the number of required calls to the equation's RightHandSide method, and, as such the number of calls to the (potentially expensive) field evaluation methods.
Definition at line 59 of file G4VFSALIntegrationStepper.hh.
| G4VFSALIntegrationStepper::G4VFSALIntegrationStepper | ( | G4EquationOfMotion * | Equation, |
| G4int | numIntegrationVariables, | ||
| G4int | numStateVariables = 12 ) |
Constructor for G4VFSALIntegrationStepper.
| [in] | Equation | Pointer to the provided equation of motion. |
| [in] | numStateVariables | The number of state variables. |
Definition at line 36 of file G4VFSALIntegrationStepper.cc.
Referenced by G4FSALBogackiShampine45::G4FSALBogackiShampine45(), G4FSALDormandPrince745::G4FSALDormandPrince745(), G4VFSALIntegrationStepper(), and operator=().
|
virtualdefault |
Default Destructor.
|
delete |
Copy constructor and assignment operator not allowed.
|
pure virtual |
Returns an estimate of the maximum distance of a chord from the true path over the segment last integrated.
Implemented in G4FSALBogackiShampine45, and G4FSALDormandPrince745.
|
inline |
Returns a pointer to the equation of motion. As some steppers (e.g. RKG3) require other methods of Eq_Rhs, this function allows for access to them.
|
inline |
Methods for debug use.
Definition at line 155 of file G4VFSALIntegrationStepper.hh.
|
inline |
Returns the number of variables of state variables (>= above, integration)
Referenced by G4FSALBogackiShampine45::G4FSALBogackiShampine45().
|
inline |
Returns the number of variables that the stepper will integrate over.
Referenced by G4FSALDormandPrince745::Interpolate(), G4FSALBogackiShampine45::interpolate(), G4FSALDormandPrince745::interpolate(), G4FSALDormandPrince745::SetupInterpolate(), G4FSALBogackiShampine45::Stepper(), and G4FSALDormandPrince745::Stepper().
| void G4VFSALIntegrationStepper::increasefNORHSCalls | ( | ) |
Definition at line 46 of file G4VFSALIntegrationStepper.cc.
Referenced by RightHandSide().
|
pure virtual |
Returns the order of the integrator, i.e. its error behaviour is of the order O(h^order).
Implemented in G4FSALBogackiShampine45, and G4FSALDormandPrince745.
|
inline |
Simple utility function to (re)normalise 'unit spin' vector.
|
inline |
Simple utility function to (re)normalise 'unit velocity' vector.
|
delete |
|
inline |
Definition at line 157 of file G4VFSALIntegrationStepper.hh.
| void G4VFSALIntegrationStepper::RightHandSide | ( | const double | y[], |
| double | dydx[] ) |
Utility method to supply the standard Evaluation of the Right Hand side of the associated equation.
Definition at line 51 of file G4VFSALIntegrationStepper.cc.
Referenced by G4FSALBogackiShampine45::interpolate(), G4FSALDormandPrince745::SetupInterpolate(), G4FSALBogackiShampine45::Stepper(), and G4FSALDormandPrince745::Stepper().
|
inline |
Setter for the equation of motion.
|
pure virtual |
The stepper for the Runge Kutta integration. The stepsize is fixed, with the step size given by 'h'. Integrates ODE starting values yInput[0 to 6]. Outputs yout[] and its estimated error yerr[].
| [in] | y | Starting values array of integration variables. |
| [in] | dydx | Derivatives array. |
| [in] | h | The given step size. |
| [out] | yout | Integration output. |
| [out] | yerr | The estimated error. |
| [out] | lastDydx | Last derivative. |
Implemented in G4FSALBogackiShampine45, and G4FSALDormandPrince745.