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

#include <G4HelixImplicitEuler.hh>

+ Inheritance diagram for G4HelixImplicitEuler:

Public Member Functions

 G4HelixImplicitEuler (G4Mag_EqRhs *EqRhs)
 
 ~G4HelixImplicitEuler ()
 
void DumbStepper (const G4double y[], G4ThreeVector Bfld, G4double h, G4double yout[])
 
G4int IntegratorOrder () const
 
- Public Member Functions inherited from G4MagHelicalStepper
 G4MagHelicalStepper (G4Mag_EqRhs *EqRhs)
 
virtual ~G4MagHelicalStepper ()
 
virtual void Stepper (const G4double y[], const G4double dydx[], G4double h, G4double yout[], G4double yerr[])
 
virtual void DumbStepper (const G4double y[], G4ThreeVector Bfld, 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)
 

Additional Inherited Members

- Protected Member Functions inherited from G4MagHelicalStepper
void LinearStep (const G4double yIn[], G4double h, G4double yHelix[]) const
 
void AdvanceHelix (const G4double yIn[], G4ThreeVector Bfld, G4double h, G4double yHelix[], G4double yHelix2[]=0)
 
void MagFieldEvaluate (const G4double y[], G4ThreeVector &Bfield)
 
G4double GetInverseCurve (const G4double Momentum, const G4double Bmag)
 
void SetAngCurve (const G4double Ang)
 
G4double GetAngCurve () const
 
void SetCurve (const G4double Curve)
 
G4double GetCurve () const
 
void SetRadHelix (const G4double Rad)
 
G4double GetRadHelix () const
 

Detailed Description

Definition at line 51 of file G4HelixImplicitEuler.hh.

Constructor & Destructor Documentation

◆ G4HelixImplicitEuler()

G4HelixImplicitEuler::G4HelixImplicitEuler ( G4Mag_EqRhs EqRhs)
inline

Definition at line 56 of file G4HelixImplicitEuler.hh.

◆ ~G4HelixImplicitEuler()

G4HelixImplicitEuler::~G4HelixImplicitEuler ( )
inline

Definition at line 59 of file G4HelixImplicitEuler.hh.

59{}

Member Function Documentation

◆ DumbStepper()

void G4HelixImplicitEuler::DumbStepper ( const G4double  y[],
G4ThreeVector  Bfld,
G4double  h,
G4double  yout[] 
)
virtual

Implements G4MagHelicalStepper.

Definition at line 46 of file G4HelixImplicitEuler.cc.

50{
51 const G4int nvar = 6 ;
52 G4double yTemp[6], yTemp2[6];
53 G4ThreeVector Bfld_endpoint;
54
55 G4int i;
56
57 // Step forward like in the explicit euler case
58 AdvanceHelix( yIn, Bfld, h, yTemp);
59
60 // now obtain the new field value at the new point
61 MagFieldEvaluate(yTemp, Bfld_endpoint);
62
63 // and also advance along a helix for this field value
64 AdvanceHelix( yIn, Bfld_endpoint, h, yTemp2);
65
66 // we take the average
67 for( i = 0; i < nvar; i++ )
68 yOut[i] = 0.5 * ( yTemp[i] + yTemp2[i] );
69
70 // NormaliseTangentVector( yOut );
71}
double G4double
Definition: G4Types.hh:64
int G4int
Definition: G4Types.hh:66
void AdvanceHelix(const G4double yIn[], G4ThreeVector Bfld, G4double h, G4double yHelix[], G4double yHelix2[]=0)
void MagFieldEvaluate(const G4double y[], G4ThreeVector &Bfield)

◆ IntegratorOrder()

G4int G4HelixImplicitEuler::IntegratorOrder ( ) const
inlinevirtual

Implements G4MagIntegratorStepper.

Definition at line 68 of file G4HelixImplicitEuler.hh.

68{ return 2; }

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