Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4IntegrationDriver< G4BulirschStoer > Class Reference

G4IntegrationDriver<G4BulirschStoer> is a concrete driver class using the Bulirsch-Stoer method to integrate the equation of motion. More...

#include <G4BulirschStoerDriver.hh>

Inheritance diagram for G4IntegrationDriver< G4BulirschStoer >:

Public Member Functions

 G4IntegrationDriver (G4double hminimum, G4BulirschStoer *stepper, G4int numberOfComponents=6, G4int statisticsVerbosity=1)
 ~G4IntegrationDriver ()=default
 G4IntegrationDriver (const G4IntegrationDriver &)=delete
G4IntegrationDriveroperator= (const G4IntegrationDriver &)=delete
G4double AdvanceChordLimited (G4FieldTrack &track, G4double hstep, G4double eps, G4double chordDistance) override
void OnStartTracking () override
void OnComputeStep (const G4FieldTrack *track=nullptr) override
G4bool DoesReIntegrate () const override
G4bool AccurateAdvance (G4FieldTrack &track, G4double stepLen, G4double eps, G4double beginStep=0) override
G4bool QuickAdvance (G4FieldTrack &y_val, const G4double dydx[], G4double hstep, G4double &missDist, G4double &dyerr) override
void OneGoodStep (G4double y[], const G4double dydx[], G4double &curveLength, G4double htry, G4double eps, G4double &hdid, G4double &hnext)
void GetDerivatives (const G4FieldTrack &track, G4double dydx[]) const override
void GetDerivatives (const G4FieldTrack &track, G4double dydx[], G4double field[]) const override
void SetVerboseLevel (G4int level) override
G4int GetVerboseLevel () const override
G4double ComputeNewStepSize (G4double errMaxNorm, G4double hstepCurrent) override
G4EquationOfMotionGetEquationOfMotion () override
const G4EquationOfMotionGetEquationOfMotion () const
void SetEquationOfMotion (G4EquationOfMotion *equation) override
const G4MagIntegratorStepperGetStepper () const override
G4MagIntegratorStepperGetStepper () override
void StreamInfo (std::ostream &os) const override
G4double GetMinimumStep () const
void SetMinimumStep (G4double newval)
G4double GetSmallestFraction () const
void SetSmallestFraction (G4double val)
Public Member Functions inherited from G4RKIntegrationDriver< T >
 G4RKIntegrationDriver (T *stepper)
 G4RKIntegrationDriver (const G4RKIntegrationDriver &)=delete
G4RKIntegrationDriveroperator= (const G4RKIntegrationDriver &)=delete
void GetDerivatives (const G4FieldTrack &track, G4double dydx[]) const override
void GetDerivatives (const G4FieldTrack &track, G4double dydx[], G4double field[]) const override
G4double ComputeNewStepSize (G4double errMaxNorm, G4double hstepCurrent) final
G4EquationOfMotionGetEquationOfMotion () override
void SetEquationOfMotion (G4EquationOfMotion *equation) override
const T * GetStepper () const override
T * GetStepper () override
void StreamInfo (std::ostream &os) const override
G4double GetSafety () const
G4double GetPshrnk () const
G4double GetPgrow () const
void RenewStepperAndAdjust (G4MagIntegratorStepper *stepper) override
void ReSetParameters (G4double safety=0.9)
void SetSafety (G4double valS)
G4int GetMaxNoSteps () const
void SetMaxNoSteps (G4int val)
G4double GetSmallestFraction () const
void SetSmallestFraction (G4double val)
Public Member Functions inherited from G4VIntegrationDriver
virtual ~G4VIntegrationDriver ()=default
Public Member Functions inherited from G4ChordFinderDelegate< G4IntegrationDriver< G4BulirschStoer > >
virtual ~G4ChordFinderDelegate ()
G4double AdvanceChordLimitedImpl (G4FieldTrack &track, G4double hstep, G4double eps, G4double chordDistance)
void ResetStepEstimate ()
G4double GetLastStepEstimateUnc ()
void SetLastStepEstimateUnc (G4double stepEst)
G4int GetNoCalls ()
G4int GetNoTrials ()
G4int GetNoMaxTrials ()
void SetFractions_Last_Next (G4double fractLast=0.90, G4double fractNext=0.95)
void SetFirstFraction (G4double fractFirst)
G4double GetFirstFraction ()
G4double GetFractionLast ()
G4double GetFractionNextEstimate ()
void StreamDelegateInfo (std::ostream &os) const
void TestChordPrint (G4int noTrials, G4int lastStepTrial, G4double dChordStep, G4double fDeltaChord, G4double nextStepTrial)

Protected Member Functions

void IncrementQuickAdvanceCalls ()
Protected Member Functions inherited from G4RKIntegrationDriver< T >
G4double ShrinkStepSize (G4double h, G4double error) const
G4double GrowStepSize (G4double h, G4double error) const
G4double ShrinkStepSize2 (G4double h, G4double error2) const
G4double GrowStepSize2 (G4double h, G4double error2) const
void UpdateErrorConstraints ()

Additional Inherited Members

Static Protected Attributes inherited from G4VIntegrationDriver
static constexpr G4double max_stepping_increase = 5
static constexpr G4double max_stepping_decrease = 0.1

Detailed Description

G4IntegrationDriver<G4BulirschStoer> is a concrete driver class using the Bulirsch-Stoer method to integrate the equation of motion.

Definition at line 48 of file G4BulirschStoerDriver.hh.

Constructor & Destructor Documentation

◆ G4IntegrationDriver() [1/2]

G4IntegrationDriver< G4BulirschStoer >::G4IntegrationDriver ( G4double hminimum,
G4BulirschStoer * stepper,
G4int numberOfComponents = 6,
G4int statisticsVerbosity = 1 )

Constructor for the concrete G4IntegrationDriver.

Parameters
[in]hminimumThe minumum allowed step..
[in]BorisPointer to the Bulirsch-Stoer motion algorithm.
[in]numberOfComponentsThe number of integration variables.
[in]verbosityFlag for verbosity.

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

◆ ~G4IntegrationDriver()

Default Destructor.

◆ G4IntegrationDriver() [2/2]

G4IntegrationDriver< G4BulirschStoer >::G4IntegrationDriver ( const G4IntegrationDriver< G4BulirschStoer > & )
delete

Copy constructor and assignment operator not allowed.

Member Function Documentation

◆ AccurateAdvance()

G4bool G4IntegrationDriver< G4BulirschStoer >::AccurateAdvance ( G4FieldTrack & track,
G4double stepLen,
G4double eps,
G4double beginStep = 0 )
overridevirtual

Advances integration accurately by relative accuracy better than 'eps'.

Parameters
[in,out]trackThe current track in field.
[in]stepLenProposed step length.
[in]epsRequested accuracy, y_err/hstep.
[in]beginStepInitial minimum integration step.
Returns
true if integration succeeds.

Implements G4VIntegrationDriver.

◆ AdvanceChordLimited()

G4double G4IntegrationDriver< G4BulirschStoer >::AdvanceChordLimited ( G4FieldTrack & track,
G4double hstep,
G4double eps,
G4double chordDistance )
overridevirtual

Computes the step to take, based on chord limits.

Parameters
[in,out]trackThe current track in field.
[in]hstepProposed step length.
[in]epsRequested accuracy, y_err/hstep.
[in]chordDistanceMaximum sagitta distance.
Returns
The length of step taken.

Implements G4VIntegrationDriver.

◆ ComputeNewStepSize()

G4double G4IntegrationDriver< G4BulirschStoer >::ComputeNewStepSize ( G4double errMaxNorm,
G4double hstepCurrent )
overridevirtual

Computes the new step size .

Parameters
[in]errMaxNormThe normalised error.
[in]hstepCurrentThe current step size.
Returns
The new step size.

Implements G4VIntegrationDriver.

◆ DoesReIntegrate()

G4bool G4IntegrationDriver< G4BulirschStoer >::DoesReIntegrate ( ) const
overridevirtual

The driver does not implement re-integration. Returns false.

Implements G4VIntegrationDriver.

◆ GetDerivatives() [1/2]

void G4IntegrationDriver< G4BulirschStoer >::GetDerivatives ( const G4FieldTrack & track,
G4double dydx[] ) const
overridevirtual

Getters for derivatives.

Implements G4VIntegrationDriver.

◆ GetDerivatives() [2/2]

void G4IntegrationDriver< G4BulirschStoer >::GetDerivatives ( const G4FieldTrack & track,
G4double dydx[],
G4double field[] ) const
overridevirtual

Implements G4VIntegrationDriver.

◆ GetEquationOfMotion() [1/2]

const G4EquationOfMotion * G4IntegrationDriver< G4BulirschStoer >::GetEquationOfMotion ( ) const

◆ GetEquationOfMotion() [2/2]

G4EquationOfMotion * G4IntegrationDriver< G4BulirschStoer >::GetEquationOfMotion ( )
overridevirtual

Getters and setter for the equation of motion.

Implements G4VIntegrationDriver.

◆ GetMinimumStep()

G4double G4IntegrationDriver< G4BulirschStoer >::GetMinimumStep ( ) const
inline

Getter and Setter for minimum allowed step.

◆ GetSmallestFraction()

G4double G4IntegrationDriver< G4BulirschStoer >::GetSmallestFraction ( ) const
inline

Getter and Setter for smallest fraction.

◆ GetStepper() [1/2]

const G4MagIntegratorStepper * G4IntegrationDriver< G4BulirschStoer >::GetStepper ( ) const
overridevirtual

Getters for the stepper.

Implements G4VIntegrationDriver.

◆ GetStepper() [2/2]

G4MagIntegratorStepper * G4IntegrationDriver< G4BulirschStoer >::GetStepper ( )
overridevirtual

Implements G4VIntegrationDriver.

◆ GetVerboseLevel()

G4int G4IntegrationDriver< G4BulirschStoer >::GetVerboseLevel ( ) const
overridevirtual

Implements G4VIntegrationDriver.

◆ IncrementQuickAdvanceCalls()

void G4IntegrationDriver< G4BulirschStoer >::IncrementQuickAdvanceCalls ( )
inlineprotected

Increments the counter for the number of calls to QuickAdvance().

◆ OnComputeStep()

void G4IntegrationDriver< G4BulirschStoer >::OnComputeStep ( const G4FieldTrack * track = nullptr)
overridevirtual

Dispatch interface method for computing step. Does nothing here.

Implements G4VIntegrationDriver.

◆ OneGoodStep()

void G4IntegrationDriver< G4BulirschStoer >::OneGoodStep ( G4double y[],
const G4double dydx[],
G4double & curveLength,
G4double htry,
G4double eps,
G4double & hdid,
G4double & hnext )

Takes one Step that is as large as possible while satisfying the accuracy criterion.

Parameters
[in,out]yThe current track state, y.
[in]dydxdydx array.
[in,out]curveLengthStep start, x.
[in]htryStep to attempt.
[in]epsThe relative accuracy.
[out]hdidStep achieved.
[out]hnextProposed next step.

◆ OnStartTracking()

void G4IntegrationDriver< G4BulirschStoer >::OnStartTracking ( )
overridevirtual

Dispatch interface method for initialisation/reset of driver.

Implements G4VIntegrationDriver.

◆ operator=()

◆ QuickAdvance()

G4bool G4IntegrationDriver< G4BulirschStoer >::QuickAdvance ( G4FieldTrack & y_val,
const G4double dydx[],
G4double hstep,
G4double & missDist,
G4double & dyerr )
overridevirtual

Attempts one integration step, and returns estimated error 'dyerr'. It does not ensure accuracy.

Parameters
[in,out]y_valThe current track in field.
[in]dydxdydx array.
[in]hstepProposed step length.
[out]missDistEstimated sagitta distance.
[out]dyerrEstimated error.
Returns
true if integration succeeds.

Reimplemented from G4VIntegrationDriver.

◆ SetEquationOfMotion()

void G4IntegrationDriver< G4BulirschStoer >::SetEquationOfMotion ( G4EquationOfMotion * equation)
overridevirtual

Setter and getter for the equation of motion.

Implements G4VIntegrationDriver.

◆ SetMinimumStep()

void G4IntegrationDriver< G4BulirschStoer >::SetMinimumStep ( G4double newval)
inline

◆ SetSmallestFraction()

void G4IntegrationDriver< G4BulirschStoer >::SetSmallestFraction ( G4double val)
inline

◆ SetVerboseLevel()

void G4IntegrationDriver< G4BulirschStoer >::SetVerboseLevel ( G4int level)
overridevirtual

Setter and getter for verbosity.

Implements G4VIntegrationDriver.

◆ StreamInfo()

void G4IntegrationDriver< G4BulirschStoer >::StreamInfo ( std::ostream & os) const
overridevirtual

Writes out to stream the parameters/state of the driver.

Implements G4VIntegrationDriver.


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