Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4TSimpleRunge< T_Equation, N > Class Template Reference

#include <G4TSimpleRunge.hh>

+ Inheritance diagram for G4TSimpleRunge< T_Equation, N >:

Public Member Functions

 G4TSimpleRunge (T_Equation *EqRhs, G4int numberOfVariables=6)
 
 ~G4TSimpleRunge ()
 
void RightHandSide (G4double y[], G4double dydx[])
 
void DumbStepper (const G4double yIn[], const G4double dydx[], G4double h, G4double yOut[])
 
G4int IntegratorOrder () const
 
- Public Member Functions inherited from G4TMagErrorStepper< G4TSimpleRunge< T_Equation, N >, T_Equation, N >
 G4TMagErrorStepper (T_Equation *EqRhs, G4int numberOfVariables, G4int numStateVariables=12)
 
virtual ~G4TMagErrorStepper ()
 
void RightHandSide (G4double y[], G4double dydx[])
 
void Stepper (const G4double yInput[], const G4double dydx[], G4double hstep, G4double yOutput[], G4double yError[]) override final
 
G4double DistChord () const override final
 
- Public Member Functions inherited from G4MagIntegratorStepper
 G4MagIntegratorStepper (G4EquationOfMotion *Equation, G4int numIntegrationVariables, G4int numStateVariables=12, G4bool isFSAL=false)
 
virtual ~G4MagIntegratorStepper ()=default
 
 G4MagIntegratorStepper (const G4MagIntegratorStepper &)=delete
 
G4MagIntegratorStepperoperator= (const G4MagIntegratorStepper &)=delete
 
virtual void Stepper (const G4double y[], const G4double dydx[], G4double h, G4double yout[], G4double yerr[])=0
 
virtual G4double DistChord () const =0
 
void NormaliseTangentVector (G4double vec[6])
 
void NormalisePolarizationVector (G4double vec[12])
 
void RightHandSide (const G4double y[], G4double dydx[]) const
 
void RightHandSide (const G4double y[], G4double dydx[], G4double field[]) const
 
G4int GetNumberOfVariables () const
 
G4int GetNumberOfStateVariables () const
 
virtual G4int IntegratorOrder () const =0
 
G4int IntegrationOrder ()
 
G4EquationOfMotionGetEquationOfMotion ()
 
const G4EquationOfMotionGetEquationOfMotion () const
 
void SetEquationOfMotion (G4EquationOfMotion *newEquation)
 
unsigned long GetfNoRHSCalls ()
 
void ResetfNORHSCalls ()
 
G4bool IsFSAL () const
 

Static Public Attributes

static constexpr double IntegratorCorrection = 1. / ((1 << 2) - 1)
 

Additional Inherited Members

- Protected Member Functions inherited from G4MagIntegratorStepper
void SetIntegrationOrder (G4int order)
 
void SetFSAL (G4bool flag=true)
 

Detailed Description

template<class T_Equation, int N>
class G4TSimpleRunge< T_Equation, N >

Definition at line 45 of file G4TSimpleRunge.hh.

Constructor & Destructor Documentation

◆ G4TSimpleRunge()

template<class T_Equation , int N>
G4TSimpleRunge< T_Equation, N >::G4TSimpleRunge ( T_Equation *  EqRhs,
G4int  numberOfVariables = 6 
)
inline

Definition at line 51 of file G4TSimpleRunge.hh.

53 EqRhs, numberOfVariables)
54 , fNumberOfVariables(numberOfVariables)
55 , fEquation_Rhs(EqRhs)
56
57 {
58 // default GetNumberOfStateVariables() == 12
59 assert(this->GetNumberOfStateVariables() <= 12);
60 }
G4int GetNumberOfStateVariables() const

◆ ~G4TSimpleRunge()

template<class T_Equation , int N>
G4TSimpleRunge< T_Equation, N >::~G4TSimpleRunge ( )
inline

Definition at line 62 of file G4TSimpleRunge.hh.

62{ ; }

Member Function Documentation

◆ DumbStepper()

template<class T_Equation , int N>
void G4TSimpleRunge< T_Equation, N >::DumbStepper ( const G4double  yIn[],
const G4double  dydx[],
G4double  h,
G4double  yOut[] 
)
inline

Definition at line 70 of file G4TSimpleRunge.hh.

73 {
74 // Initialise time to t0, needed when it is not updated by the integration.
75 yTemp[7] = yOut[7] = yIn[7]; // Better to set it to NaN; // TODO
76
77 for(G4int i = 0; i < N; ++i)
78 {
79 yTemp[i] = yIn[i] + 0.5 * h * dydx[i];
80 }
81
82 this->RightHandSide(yTemp, dydxTemp);
83
84 for(G4int i = 0; i < N; ++i)
85 {
86 yOut[i] = yIn[i] + h * (dydxTemp[i]);
87 }
88 }
int G4int
Definition: G4Types.hh:85
void RightHandSide(G4double y[], G4double dydx[])

◆ IntegratorOrder()

template<class T_Equation , int N>
G4int G4TSimpleRunge< T_Equation, N >::IntegratorOrder ( ) const
inlinevirtual

Implements G4MagIntegratorStepper.

Definition at line 91 of file G4TSimpleRunge.hh.

91{ return 2; }

◆ RightHandSide()

template<class T_Equation , int N>
void G4TSimpleRunge< T_Equation, N >::RightHandSide ( G4double  y[],
G4double  dydx[] 
)
inline

Definition at line 64 of file G4TSimpleRunge.hh.

66 {
67 fEquation_Rhs->T_Equation::RightHandSide(y, dydx);
68 }

Referenced by G4TSimpleRunge< T_Equation, N >::DumbStepper().

Member Data Documentation

◆ IntegratorCorrection

template<class T_Equation , int N>
constexpr double G4TSimpleRunge< T_Equation, N >::IntegratorCorrection = 1. / ((1 << 2) - 1)
staticconstexpr

Definition at line 49 of file G4TSimpleRunge.hh.


The documentation for this class was generated from the following file: