Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4ExplicitEuler Class Reference

#include <G4ExplicitEuler.hh>

+ Inheritance diagram for G4ExplicitEuler:

Public Member Functions

 G4ExplicitEuler (G4EquationOfMotion *EqRhs, G4int numberOfVariables=6)
 
 ~G4ExplicitEuler ()
 
void DumbStepper (const G4double y[], const G4double dydx[], G4double h, G4double yout[])
 
G4int IntegratorOrder () const
 
- Public Member Functions inherited from G4MagErrorStepper
 G4MagErrorStepper (G4EquationOfMotion *EqRhs, G4int numberOfVariables, G4int numStateVariables=12)
 
virtual ~G4MagErrorStepper ()
 
void Stepper (const G4double y[], const G4double dydx[], G4double h, G4double yout[], G4double yerr[])
 
virtual void DumbStepper (const G4double y[], const G4double dydx[], G4double h, G4double yout[])=0
 
G4double DistChord () const
 
- Public Member Functions inherited from G4MagIntegratorStepper
 G4MagIntegratorStepper (G4EquationOfMotion *Equation, G4int numIntegrationVariables, G4int numStateVariables=12)
 
virtual ~G4MagIntegratorStepper ()
 
virtual void Stepper (const G4double y[], const G4double dydx[], G4double h, G4double yout[], G4double yerr[])=0
 
virtual G4double DistChord () const =0
 
virtual void ComputeRightHandSide (const G4double y[], G4double dydx[])
 
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
 
G4EquationOfMotionGetEquationOfMotion ()
 
void SetEquationOfMotion (G4EquationOfMotion *newEquation)
 

Detailed Description

Definition at line 48 of file G4ExplicitEuler.hh.

Constructor & Destructor Documentation

◆ G4ExplicitEuler()

G4ExplicitEuler::G4ExplicitEuler ( G4EquationOfMotion EqRhs,
G4int  numberOfVariables = 6 
)

Definition at line 45 of file G4ExplicitEuler.cc.

47 : G4MagErrorStepper(EqRhs, numberOfVariables)
48{
49}

◆ ~G4ExplicitEuler()

G4ExplicitEuler::~G4ExplicitEuler ( )

Definition at line 56 of file G4ExplicitEuler.cc.

57{
58}

Member Function Documentation

◆ DumbStepper()

void G4ExplicitEuler::DumbStepper ( const G4double  y[],
const G4double  dydx[],
G4double  h,
G4double  yout[] 
)
virtual

Implements G4MagErrorStepper.

Definition at line 66 of file G4ExplicitEuler.cc.

70{
71 const G4int numberOfVariables= GetNumberOfVariables();
72
73 // Initialise time to t0, needed when it is not updated by the integration.
74 // yOut[7] = yIn[7]; // Better to set it to NaN; // TODO
75
76 G4int i;
77
78 for(i=0;i< numberOfVariables;i++)
79 {
80 yOut[i] = yIn[i] + h*dydx[i] ; // 1st and only Step
81 }
82
83 return ;
84}
int G4int
Definition: G4Types.hh:66
G4int GetNumberOfVariables() const

◆ IntegratorOrder()

G4int G4ExplicitEuler::IntegratorOrder ( ) const
inlinevirtual

Implements G4MagIntegratorStepper.

Definition at line 63 of file G4ExplicitEuler.hh.

63{ return 1; }

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