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

#include <G4TSimpleHeum.hh>

+ Inheritance diagram for G4TSimpleHeum< T_Equation, N >:

Public Member Functions

 G4TSimpleHeum (T_Equation *EqRhs, unsigned int numberOfVariables=6)
 
 ~G4TSimpleHeum ()
 
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< G4TSimpleHeum< 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
 
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
 
G4int IntegrationOrder ()
 
G4EquationOfMotionGetEquationOfMotion ()
 
const G4EquationOfMotionGetEquationOfMotion () const
 
void SetEquationOfMotion (G4EquationOfMotion *newEquation)
 
unsigned long GetfNoRHSCalls ()
 
void ResetfNORHSCalls ()
 
G4bool IsFSAL () const
 
G4bool isQSS () const
 
void SetIsQSS (G4bool val)
 

Static Public Attributes

static constexpr unsigned int gIntegratorOrder = 3
 
static constexpr double IntegratorCorrection
 

Additional Inherited Members

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

Detailed Description

template<class T_Equation, unsigned int N>
class G4TSimpleHeum< T_Equation, N >

Definition at line 55 of file G4TSimpleHeum.hh.

Constructor & Destructor Documentation

◆ G4TSimpleHeum()

template<class T_Equation , unsigned int N>
G4TSimpleHeum< T_Equation, N >::G4TSimpleHeum ( T_Equation * EqRhs,
unsigned int numberOfVariables = 6 )

Definition at line 94 of file G4TSimpleHeum.hh.

97 EqRhs, numberOfVariables)
98 , fNumberOfVariables(numberOfVariables)
99 , fEquation_Rhs(EqRhs)
100{
101 assert(fNumberOfVariables == N);
102 if( dynamic_cast<G4EquationOfMotion*>(EqRhs) == nullptr )
103 {
104 G4Exception("G4TSimpleHeum: constructor", "GeomField0001",
105 FatalException, "Equation is not an G4EquationOfMotion.");
106 }
107}
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
#define N
Definition crc32.c:57

◆ ~G4TSimpleHeum()

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

Definition at line 65 of file G4TSimpleHeum.hh.

65{ ; }

Member Function Documentation

◆ DumbStepper()

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

Definition at line 111 of file G4TSimpleHeum.hh.

114{
115 for(unsigned int i = 0; i < N; ++i)
116 {
117 yTemp[i] = yIn[i] + (1.0 / 3.0) * h * dydx[i];
118 }
119
120 this->RightHandSide(yTemp, dydxTemp);
121
122 for(unsigned int i = 0; i < N; ++i)
123 {
124 yTemp2[i] = yIn[i] + (2.0 / 3.0) * h * dydxTemp[i];
125 }
126
127 this->RightHandSide(yTemp2, dydxTemp2);
128
129 for(unsigned int i = 0; i < N; ++i)
130 {
131 yOut[i] = yIn[i] + h * (0.25 * dydx[i] + 0.75 * dydxTemp2[i]);
132 }
133
134 if(fNumberOfVariables == 12)
135 {
136 this->NormalisePolarizationVector(yOut);
137 }
138}
void NormalisePolarizationVector(G4double vec[12])
void RightHandSide(G4double y[], G4double dydx[])

◆ IntegratorOrder()

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

Implements G4MagIntegratorStepper.

Definition at line 79 of file G4TSimpleHeum.hh.

79{ return gIntegratorOrder; }
static constexpr unsigned int gIntegratorOrder

◆ RightHandSide()

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

Definition at line 68 of file G4TSimpleHeum.hh.

70 {
71 fEquation_Rhs->T_Equation::RightHandSide(y, dydx);
72 }

Member Data Documentation

◆ gIntegratorOrder

template<class T_Equation , unsigned int N>
unsigned int G4TSimpleHeum< T_Equation, N >::gIntegratorOrder = 3
staticconstexpr

Definition at line 59 of file G4TSimpleHeum.hh.

Referenced by G4TSimpleHeum< T_Equation, N >::IntegratorOrder().

◆ IntegratorCorrection

template<class T_Equation , unsigned int N>
double G4TSimpleHeum< T_Equation, N >::IntegratorCorrection
staticconstexpr
Initial value:
= 1.0 /
((1<<gIntegratorOrder) - 1)

Definition at line 60 of file G4TSimpleHeum.hh.


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