Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4EquationOfMotion Class Referenceabstract

G4EquationOfMotion is the abstract base class for the right hand size of the equation of motion of a particle in a field. More...

#include <G4EquationOfMotion.hh>

Inheritance diagram for G4EquationOfMotion:

Public Member Functions

 G4EquationOfMotion (G4Field *Field)
virtual ~G4EquationOfMotion ()=default
virtual void EvaluateRhsGivenB (const G4double y[], const G4double B[3], G4double dydx[]) const =0
virtual void SetChargeMomentumMass (G4ChargeState particleCharge, G4double MomentumXc, G4double MassXc2)=0
virtual G4EquationType GetEquationType () const
void RightHandSide (const G4double y[], G4double dydx[]) const
void EvaluateRhsReturnB (const G4double y[], G4double dydx[], G4double Field[]) const
void GetFieldValue (const G4double Point[4], G4double Field[]) const
const G4FieldGetFieldObj () const
G4FieldGetFieldObj ()
void SetFieldObj (G4Field *pField)

Detailed Description

G4EquationOfMotion is the abstract base class for the right hand size of the equation of motion of a particle in a field.

Definition at line 49 of file G4EquationOfMotion.hh.

Constructor & Destructor Documentation

◆ G4EquationOfMotion()

G4EquationOfMotion::G4EquationOfMotion ( G4Field * Field)

◆ ~G4EquationOfMotion()

virtual G4EquationOfMotion::~G4EquationOfMotion ( )
virtualdefault

Default virtual Destructor.

Member Function Documentation

◆ EvaluateRhsGivenB()

virtual void G4EquationOfMotion::EvaluateRhsGivenB ( const G4double y[],
const G4double B[3],
G4double dydx[] ) const
pure virtual

Calculates the value of the derivative, given the value of the field.

Parameters
[in]yCoefficients array.
[in]FieldField value.
[out]dydxDerivatives array.

Implemented in G4ErrorMag_UsualEqRhs, G4KM_NucleonEqRhs, G4KM_OpticalEqRhs, G4Mag_EqRhs, G4Mag_SpinEqRhs, and G4Mag_UsualEqRhs.

Referenced by G4RKG3_Stepper::StepNoErr(), and G4RKG3_Stepper::Stepper().

◆ EvaluateRhsReturnB()

void G4EquationOfMotion::EvaluateRhsReturnB ( const G4double y[],
G4double dydx[],
G4double Field[] ) const
inline

Calculates the value of the derivative 'dydx' at 'y' as above, but also returns the value of B.

Parameters
[in]yCoefficients array.
[out]dydxDerivatives array.
[out]FieldField value.

Referenced by G4BorisDriver::GetDerivatives(), and G4RKG3_Stepper::StepNoErr().

◆ GetEquationType()

virtual G4EquationType G4EquationOfMotion::GetEquationType ( ) const
inlinevirtual

Returns the equation type-ID, "kUserEquation".

Reimplemented in G4EqEMFieldWithEDM, G4EqEMFieldWithSpin, G4EqGravityField, G4EqMagElectricField, G4Mag_SpinEqRhs, G4Mag_UsualEqRhs, and G4MonopoleEq.

Definition at line 88 of file G4EquationOfMotion.hh.

88{ return kUserEquation; }
@ kUserEquation
User defined equation of motion.

◆ GetFieldObj() [1/2]

G4Field * G4EquationOfMotion::GetFieldObj ( )
inline

◆ GetFieldObj() [2/2]

const G4Field * G4EquationOfMotion::GetFieldObj ( ) const
inline

Accessors and modifier for the field.

◆ GetFieldValue()

void G4EquationOfMotion::GetFieldValue ( const G4double Point[4],
G4double Field[] ) const
inline

Returns the 'Field' value at the given time 'Point'.

Parameters
[in]PointThe time point (x,y,z,t).
[out]FieldThe returned field value.

◆ RightHandSide()

void G4EquationOfMotion::RightHandSide ( const G4double y[],
G4double dydx[] ) const
inline

Calculates the value of the derivative 'dydx' at 'y'. Calls the virtual function above.

Parameters
[in]yCoefficients array.
[out]dydxDerivatives array.

◆ SetChargeMomentumMass()

virtual void G4EquationOfMotion::SetChargeMomentumMass ( G4ChargeState particleCharge,
G4double MomentumXc,
G4double MassXc2 )
pure virtual

Sets the charge, momentum and mass of the current particle. Used to set the equation's coefficients.

Parameters
[in]particleChargeMagnetic charge and moments in e+ units.
[in]MomentumXcParticle momentum.
[in]massParticle mass.

Implemented in G4EqEMFieldWithEDM, G4EqEMFieldWithSpin, G4EqGravityField, G4EqMagElectricField, G4KM_NucleonEqRhs, G4KM_OpticalEqRhs, G4Mag_EqRhs, G4Mag_SpinEqRhs, G4Mag_UsualEqRhs, G4MonopoleEq, and G4RepleteEofM.

◆ SetFieldObj()

void G4EquationOfMotion::SetFieldObj ( G4Field * pField)
inline

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