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

G4BogackiShampine23 is an integrator of particle's equation of motion based on the Bogacki-Shampine non-FSAL implementation. More...

#include <G4BogackiShampine23.hh>

Inheritance diagram for G4BogackiShampine23:

Public Member Functions

 G4BogackiShampine23 (G4EquationOfMotion *EqRhs, G4int numberOfVariables=6)
 ~G4BogackiShampine23 () override=default
 G4BogackiShampine23 (const G4BogackiShampine23 &)=delete
G4BogackiShampine23operator= (const G4BogackiShampine23 &)=delete
void Stepper (const G4double yInput[], const G4double dydx[], G4double hstep, G4double yOutput[], G4double yError[]) override
void Stepper (const G4double yInput[], const G4double dydx[], G4double hstep, G4double yOutput[], G4double yError[], G4double dydxOutput[])
G4double DistChord () const override
G4int IntegratorOrder () const override
G4StepperType StepperType () 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

G4BogackiShampine23 is an integrator of particle's equation of motion based on the Bogacki-Shampine non-FSAL implementation.

Definition at line 55 of file G4BogackiShampine23.hh.

Constructor & Destructor Documentation

◆ G4BogackiShampine23() [1/2]

G4BogackiShampine23::G4BogackiShampine23 ( G4EquationOfMotion * EqRhs,
G4int numberOfVariables = 6 )

Constructor for G4BogackiShampine23.

Parameters
[in]EqRhsPointer to the provided equation of motion.
[in]numberOfVariablesThe number of integration variables.

Definition at line 55 of file G4BogackiShampine23.cc.

57 : G4MagIntegratorStepper(EqRhs, integrationVariables)
58{
60 SetFSAL(true);
61}
G4MagIntegratorStepper(G4EquationOfMotion *Equation, G4int numIntegrationVariables, G4int numStateVariables=12, G4bool isFSAL=false)
void SetIntegrationOrder(G4int order)
void SetFSAL(G4bool flag=true)

Referenced by G4BogackiShampine23(), and operator=().

◆ ~G4BogackiShampine23()

G4BogackiShampine23::~G4BogackiShampine23 ( )
overridedefault

Default Destructor.

◆ G4BogackiShampine23() [2/2]

G4BogackiShampine23::G4BogackiShampine23 ( const G4BogackiShampine23 & )
delete

Copy constructor and assignment operator not allowed.

Member Function Documentation

◆ DistChord()

G4double G4BogackiShampine23::DistChord ( ) const
overridevirtual

Returns the distance from chord line.

Implements G4MagIntegratorStepper.

Definition at line 148 of file G4BogackiShampine23.cc.

149{
151 makeStep(fyIn, fdydx, fhstep / 2., yMid);
152
153 const G4ThreeVector begin = makeVector(fyIn, Value3D::Position);
154 const G4ThreeVector mid = makeVector(yMid, Value3D::Position);
155 const G4ThreeVector end = makeVector(fyOut, Value3D::Position);
156
157 return G4LineSection::Distline(mid, begin, end);
158}
CLHEP::Hep3Vector G4ThreeVector
double G4double
Definition G4Types.hh:83
static G4double Distline(const G4ThreeVector &OtherPnt, const G4ThreeVector &LinePntA, const G4ThreeVector &LinePntB)
G4ThreeVector makeVector(const ArrayType &array, Value3D value)

◆ IntegratorOrder()

G4int G4BogackiShampine23::IntegratorOrder ( ) const
inlineoverridevirtual

Returns the order, 3, of integration.

Implements G4MagIntegratorStepper.

Definition at line 119 of file G4BogackiShampine23.hh.

119{ return 3; }

◆ operator=()

G4BogackiShampine23 & G4BogackiShampine23::operator= ( const G4BogackiShampine23 & )
delete

◆ Stepper() [1/2]

void G4BogackiShampine23::Stepper ( const G4double yInput[],
const G4double dydx[],
G4double hstep,
G4double yOutput[],
G4double yError[] )
overridevirtual

The stepper for the Runge Kutta integration. The stepsize is fixed, with the step size given by 'hstep'. Integrates ODE starting values yInput[0 to 6]. Outputs yOutput[] and its estimated error yError[].

Parameters
[in]yInputStarting values array of integration variables.
[in]dydxDerivatives array.
[in]hstepThe given step size.
[out]yOutputIntegration output.
[out]yErrorThe estimated error.

Implements G4MagIntegratorStepper.

Definition at line 116 of file G4BogackiShampine23.cc.

121{
122 copy(fyIn, yInput);
123 copy(fdydx, dydx);
124 fhstep = hstep;
125
126 makeStep(fyIn, fdydx, fhstep, fyOut, fdydxOut, yError);
127
128 copy(yOutput, fyOut);
129}
void copy(G4double dst[], const G4double src[], std::size_t size=G4FieldTrack::ncompSVEC)

◆ Stepper() [2/2]

void G4BogackiShampine23::Stepper ( const G4double yInput[],
const G4double dydx[],
G4double hstep,
G4double yOutput[],
G4double yError[],
G4double dydxOutput[] )

Same as the Stepper() function above, with dydx also in ouput.

Parameters
[in]yInputStarting values array of integration variables.
[in]dydxDerivatives array.
[in]hstepThe given step size.
[out]yOutputIntegration output.
[out]yErrorThe estimated error.
[out]dydxOutputdydx in output.

Definition at line 131 of file G4BogackiShampine23.cc.

137{
138 copy(fyIn, yInput);
139 copy(fdydx, dydx);
140 fhstep = hstep;
141
142 makeStep(fyIn, fdydx, fhstep, fyOut, fdydxOut, yError);
143
144 copy(yOutput, fyOut);
145 copy(dydxOutput, fdydxOut);
146}

◆ StepperType()

G4StepperType G4BogackiShampine23::StepperType ( ) const
inlineoverridevirtual

Returns the stepper type-ID, "kBogackiShampine23".

Reimplemented from G4MagIntegratorStepper.

Definition at line 124 of file G4BogackiShampine23.hh.

124{ return kBogackiShampine23; }
@ kBogackiShampine23
G4BogackiShampine23.

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