|
Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
|
The G4BorisScheme class implements of the Boris algorithm for advancing charged particles in an electromagnetic field. More...
#include <G4BorisScheme.hh>
Public Member Functions | |
| G4BorisScheme ()=default | |
| G4BorisScheme (G4EquationOfMotion *equation, G4int nvar=6) | |
| ~G4BorisScheme ()=default | |
| void | DoStep (G4double restMass, G4double charge, const G4double yIn[], G4double yOut[], G4double hstep) const |
| void | StepWithErrorEstimate (const G4double yIn[], G4double restMass, G4double charge, G4double hstep, G4double yOut[], G4double yErr[]) const |
| void | StepWithMidAndErrorEstimate (const G4double yIn[], G4double restMass, G4double charge, G4double hstep, G4double yMid[], G4double yOut[], G4double yErr[]) const |
| G4EquationOfMotion * | GetEquationOfMotion () const |
| G4int | GetNumberOfVariables () const |
The G4BorisScheme class implements of the Boris algorithm for advancing charged particles in an electromagnetic field.
Definition at line 49 of file G4BorisScheme.hh.
|
default |
Default Constructor.
| G4BorisScheme::G4BorisScheme | ( | G4EquationOfMotion * | equation, |
| G4int | nvar = 6 ) |
Constructor for the equation of motion.
| [in] | equation | Pointer to the equation of motion algorithm. |
| [in] | nvar | The number of integration variables. |
Definition at line 41 of file G4BorisScheme.cc.
|
default |
Default Destructor.
| void G4BorisScheme::DoStep | ( | G4double | restMass, |
| G4double | charge, | ||
| const G4double | yIn[], | ||
| G4double | yOut[], | ||
| G4double | hstep ) const |
Does one step, updating velocity and position.
| [in] | restMass | Particle mass. |
| [in] | charge | Particle charge. |
| [in] | yIn | Initial position. |
| [out] | yOut | Updated position. |
| [in] | hstep | Proposed step. |
Definition at line 52 of file G4BorisScheme.cc.
Referenced by StepWithMidAndErrorEstimate().
|
inline |
Auxiliary methods returning a pointer to the equation of motion and the number of integration variables.
|
inline |
| void G4BorisScheme::StepWithErrorEstimate | ( | const G4double | yIn[], |
| G4double | restMass, | ||
| G4double | charge, | ||
| G4double | hstep, | ||
| G4double | yOut[], | ||
| G4double | yErr[] ) const |
Adopts the Boris Scheme Stepping to estimate the integration error. Uses two half-steps (comparing to a full step) to obtain output and error estimate.
| [in] | yIn | Initial position. |
| [in] | restMass | Particle mass. |
| [in] | charge | Particle charge. |
| [in] | hstep | Proposed step. |
| [out] | yOut | Updated position. |
| [out] | yErr | The estimated error. |
Definition at line 166 of file G4BorisScheme.cc.
| void G4BorisScheme::StepWithMidAndErrorEstimate | ( | const G4double | yIn[], |
| G4double | restMass, | ||
| G4double | charge, | ||
| G4double | hstep, | ||
| G4double | yMid[], | ||
| G4double | yOut[], | ||
| G4double | yErr[] ) const |
Adopts the Boris Scheme Stepping to estimate the integration error. Uses two half-steps (comparing to a full step) to obtain output and error estimate. Same as above, but also returns the mid-point evaluation.
| [in] | yIn | Initial position. |
| [in] | restMass | Particle mass. |
| [in] | charge | Particle charge. |
| [in] | hstep | Proposed step. |
| [out] | yMid | tThe mid-point evaluation. |
| [out] | yOut | Updated position. |
| [out] | yErr | The estimated error. |
Definition at line 180 of file G4BorisScheme.cc.
Referenced by StepWithErrorEstimate().