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

G4RK547FEq3 is an implementation of the 7 stage embedded Runge-Kutta 4,5 pair. More...

#include <G4RK547FEq3.hh>

Inheritance diagram for G4RK547FEq3:

Public Member Functions

 G4RK547FEq3 (G4EquationOfMotion *EqRhs, G4int integrationVariables=6)
 ~G4RK547FEq3 () override=default
 G4RK547FEq3 (const G4RK547FEq3 &)=delete
G4RK547FEq3operator= (const G4RK547FEq3 &)=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

G4RK547FEq3 is an implementation of the 7 stage embedded Runge-Kutta 4,5 pair.

Definition at line 49 of file G4RK547FEq3.hh.

Constructor & Destructor Documentation

◆ G4RK547FEq3() [1/2]

G4RK547FEq3::G4RK547FEq3 ( G4EquationOfMotion * EqRhs,
G4int integrationVariables = 6 )

Constructor for G4RK547FEq1.

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

Definition at line 51 of file G4RK547FEq3.cc.

52 : G4MagIntegratorStepper(EqRhs, integrationVariables)
53{
54}
G4MagIntegratorStepper(G4EquationOfMotion *Equation, G4int numIntegrationVariables, G4int numStateVariables=12, G4bool isFSAL=false)

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

◆ ~G4RK547FEq3()

G4RK547FEq3::~G4RK547FEq3 ( )
overridedefault

Default Destructor.

◆ G4RK547FEq3() [2/2]

G4RK547FEq3::G4RK547FEq3 ( const G4RK547FEq3 & )
delete

Copy constructor and assignment operator not allowed.

Member Function Documentation

◆ DistChord()

G4double G4RK547FEq3::DistChord ( ) const
overridevirtual

Returns the distance from chord line.

Implements G4MagIntegratorStepper.

Definition at line 181 of file G4RK547FEq3.cc.

182{
184 makeStep(fyIn, fdydx, fhstep / 2., yMid);
185
186 const G4ThreeVector begin = makeVector(fyIn, Value3D::Position);
187 const G4ThreeVector mid = makeVector(yMid, Value3D::Position);
188 const G4ThreeVector end = makeVector(fyOut, Value3D::Position);
189
190 return G4LineSection::Distline(mid, begin, end);
191}
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 G4RK547FEq3::IntegratorOrder ( ) const
inlineoverridevirtual

Returns the order, 4, of integration.

Implements G4MagIntegratorStepper.

Definition at line 113 of file G4RK547FEq3.hh.

113{ return 4; }

◆ operator=()

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

◆ Stepper() [1/2]

void G4RK547FEq3::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 149 of file G4RK547FEq3.cc.

154{
155 copy(fyIn, yInput);
156 copy(fdydx, dydx);
157 fhstep = hstep;
158
159 makeStep(fyIn, fdydx, fhstep, fyOut, fdydxOut, yError);
160
161 copy(yOutput, fyOut);
162}
void copy(G4double dst[], const G4double src[], std::size_t size=G4FieldTrack::ncompSVEC)

◆ Stepper() [2/2]

void G4RK547FEq3::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 164 of file G4RK547FEq3.cc.

170{
171 copy(fyIn, yInput);
172 copy(fdydx, dydx);
173 fhstep = hstep;
174
175 makeStep(fyIn, fdydx, fhstep, fyOut, fdydxOut, yError);
176
177 copy(yOutput, fyOut);
178 copy(dydxOutput, fdydxOut);
179}

◆ StepperType()

G4StepperType G4RK547FEq3::StepperType ( ) const
inlineoverridevirtual

Returns the stepper type-ID, "kRK547FEq3".

Reimplemented from G4MagIntegratorStepper.

Definition at line 118 of file G4RK547FEq3.hh.

118{ return kRK547FEq3; }
@ kRK547FEq3
G4RK547FEq3.

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