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

#include <G4SimpleHeum.hh>

+ Inheritance diagram for G4SimpleHeum:

Public Member Functions

 G4SimpleHeum (G4EquationOfMotion *EqRhs, G4int num_variables=6)
 
 ~G4SimpleHeum () override
 
void DumbStepper (const G4double y[], const G4double dydx[], G4double h, G4double yout[]) override
 
G4int IntegratorOrder () const override
 
- Public Member Functions inherited from G4MagErrorStepper
 G4MagErrorStepper (G4EquationOfMotion *EqRhs, G4int numberOfVariables, G4int numStateVariables=12)
 
 ~G4MagErrorStepper () override
 
 G4MagErrorStepper (const G4MagErrorStepper &)=delete
 
G4MagErrorStepperoperator= (const G4MagErrorStepper &)=delete
 
void Stepper (const G4double y[], const G4double dydx[], G4double h, G4double yout[], G4double yerr[]) override
 
G4double DistChord () const override
 
- 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)
 

Additional Inherited Members

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

Detailed Description

Definition at line 44 of file G4SimpleHeum.hh.

Constructor & Destructor Documentation

◆ G4SimpleHeum()

G4SimpleHeum::G4SimpleHeum ( G4EquationOfMotion * EqRhs,
G4int num_variables = 6 )

Definition at line 38 of file G4SimpleHeum.cc.

39 : G4MagErrorStepper(EqRhs, num_variables),
40 fNumberOfVariables(num_variables)
41{
42 dydxTemp = new G4double[fNumberOfVariables] ;
43 dydxTemp2 = new G4double[fNumberOfVariables] ;
44 yTemp = new G4double[fNumberOfVariables] ;
45 yTemp2 = new G4double[fNumberOfVariables] ;
46}
double G4double
Definition G4Types.hh:83
G4MagErrorStepper(G4EquationOfMotion *EqRhs, G4int numberOfVariables, G4int numStateVariables=12)

◆ ~G4SimpleHeum()

G4SimpleHeum::~G4SimpleHeum ( )
override

Definition at line 52 of file G4SimpleHeum.cc.

53{
54 delete [] dydxTemp;
55 delete [] dydxTemp2;
56 delete [] yTemp;
57 delete [] yTemp2;
58}

Member Function Documentation

◆ DumbStepper()

void G4SimpleHeum::DumbStepper ( const G4double y[],
const G4double dydx[],
G4double h,
G4double yout[] )
overridevirtual

Implements G4MagErrorStepper.

Definition at line 65 of file G4SimpleHeum.cc.

69{
70 for( G4int i = 0; i < fNumberOfVariables; ++i )
71 {
72 yTemp[i] = yIn[i] + (1.0/3.0) * h * dydx[i] ;
73 }
74
75 RightHandSide(yTemp,dydxTemp);
76
77 for( G4int i = 0; i < fNumberOfVariables; ++i )
78 {
79 yTemp2[i] = yIn[i] + (2.0/3.0) * h * dydxTemp[i] ;
80 }
81
82 RightHandSide(yTemp2,dydxTemp2);
83
84 for( G4int i = 0; i < fNumberOfVariables; ++i )
85 {
86 yOut[i] = yIn[i] + h * (0.25 * dydx[i] + 0.75 * dydxTemp2[i]);
87 }
88
89 if ( fNumberOfVariables == 12 ) { NormalisePolarizationVector( yOut ); }
90}
int G4int
Definition G4Types.hh:85
void NormalisePolarizationVector(G4double vec[12])
void RightHandSide(const G4double y[], G4double dydx[]) const

◆ IntegratorOrder()

G4int G4SimpleHeum::IntegratorOrder ( ) const
inlineoverridevirtual

Implements G4MagIntegratorStepper.

Definition at line 57 of file G4SimpleHeum.hh.

57{ return 3; }

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