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

#include <G4TExplicitEuler.hh>

+ Inheritance diagram for G4TExplicitEuler< T_Equation, N >:

Public Member Functions

 G4TExplicitEuler (T_Equation *EqRhs, G4int numberOfVariables=N)
 
 ~G4TExplicitEuler ()
 
void DumbStepper (const G4double yIn[], const G4double dydx[], G4double h, G4double yOut[])
 
G4int IntegratorOrder () const
 
- Public Member Functions inherited from G4TMagErrorStepper< G4TExplicitEuler< 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 double IntegratorCorrection = 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 G4TExplicitEuler< T_Equation, N >

Definition at line 56 of file G4TExplicitEuler.hh.

Constructor & Destructor Documentation

◆ G4TExplicitEuler()

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

Definition at line 62 of file G4TExplicitEuler.hh.

64 EqRhs, numberOfVariables)
65 , fEquation_Rhs(EqRhs)
66 {
67 if( numberOfVariables != N ){
69 msg << "Equation has an incompatible number of variables." ;
70 msg << " template N = " << N << " equation-Nvar= "
71 << numberOfVariables;
72 G4Exception("G4TExplicitEuler: constructor", "GeomField0003",
74 }
75 }
@ FatalErrorInArgument
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
#define N
Definition crc32.c:57

◆ ~G4TExplicitEuler()

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

Definition at line 77 of file G4TExplicitEuler.hh.

77{ ; }

Member Function Documentation

◆ DumbStepper()

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

Definition at line 79 of file G4TExplicitEuler.hh.

82 {
83 // Initialise time to t0, needed when it is not updated by the integration.
84 // yOut[7] = yIn[7]; // Better to set it to NaN; // TODO
85
86 for(G4int i = 0; i < N; ++i)
87 {
88 yOut[i] = yIn[i] + h * dydx[i]; // 1st and only Step
89 }
90
91 return;
92 }
int G4int
Definition G4Types.hh:85

◆ IntegratorOrder()

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

Implements G4MagIntegratorStepper.

Definition at line 95 of file G4TExplicitEuler.hh.

95{ return 1; }

Member Data Documentation

◆ IntegratorCorrection

template<class T_Equation , int N>
double G4TExplicitEuler< T_Equation, N >::IntegratorCorrection = 1.
staticconstexpr

Definition at line 60 of file G4TExplicitEuler.hh.


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