Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4InterpolationDriver< T, StepperCachesDchord > Class Template Reference

#include <G4InterpolationDriver.hh>

+ Inheritance diagram for G4InterpolationDriver< T, StepperCachesDchord >:

Classes

struct  InterpStepper
 

Public Member Functions

 G4InterpolationDriver (G4double hminimum, T *stepper, G4int numberOfComponents=6, G4int statisticsVerbosity=0)
 
 ~G4InterpolationDriver () override
 
 G4InterpolationDriver (const G4InterpolationDriver &)=delete
 
const G4InterpolationDriveroperator= (const G4InterpolationDriver &)=delete
 
G4double AdvanceChordLimited (G4FieldTrack &track, G4double hstep, G4double eps, G4double chordDistance) override
 
void OnStartTracking () override
 
void OnComputeStep (const G4FieldTrack *=nullptr) override
 
G4bool DoesReIntegrate () const override
 
G4bool AccurateAdvance (G4FieldTrack &track, G4double hstep, G4double eps, G4double hinitial=0) override
 
void SetVerboseLevel (G4int level) override
 
G4int GetVerboseLevel () const override
 
void StreamInfo (std::ostream &os) const override
 
- 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
 
virtual G4bool QuickAdvance (G4FieldTrack &, const G4double[], G4double, G4double &, G4double &)
 

Protected Types

using StepperIterator = typename std::vector<InterpStepper>::iterator
 
using ConstStepperIterator = typename std::vector<InterpStepper>::const_iterator
 
using Base = G4RKIntegrationDriver<T>
 

Protected Member Functions

virtual G4double OneGoodStep (StepperIterator it, field_utils::State &y, field_utils::State &dydx, G4double &hstep, G4double eps, G4double curveLength, G4FieldTrack *track=nullptr)
 
void Interpolate (G4double curveLength, field_utils::State &y) const
 
void InterpolateImpl (G4double curveLength, ConstStepperIterator it, field_utils::State &y) const
 
G4double DistChord (const field_utils::State &yBegin, G4double curveLengthBegin, const field_utils::State &yEnd, G4double curveLengthEnd) const
 
G4double FindNextChord (const field_utils::State &yBegin, G4double curveLengthBegin, field_utils::State &yEnd, G4double curveLengthEnd, G4double dChord, G4double maxChordDistance)
 
G4double CalcChordStep (G4double stepTrialOld, G4double dChordStep, G4double fDeltaChord)
 
void PrintState () const
 
void CheckState () const
 
void AccumulateStatistics (G4int noTrials)
 
- 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 ()
 

Protected Attributes

std::vector< InterpStepperfSteppers
 
StepperIterator fLastStepper
 
G4bool fKeepLastStepper = false
 
G4double fhnext = DBL_MAX
 
G4double fMinimumStep
 
G4double fChordStepEstimate = DBL_MAX
 
const G4double fFractionNextEstimate = 0.98
 
const G4double fSmallestCurveFraction = 0.01
 
G4int fVerboseLevel
 
field_utils::State fdydx
 
G4bool fFirstStep = true
 
G4int fMaxTrials = 100
 
G4int fTotalStepsForTrack = 0
 
G4int fTotalNoTrials = 0
 
G4int fNoCalls = 0
 
G4int fmaxTrials = 0
 

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

template<class T, G4bool StepperCachesDchord = true>
class G4InterpolationDriver< T, StepperCachesDchord >

Definition at line 46 of file G4InterpolationDriver.hh.

Member Typedef Documentation

◆ Base

template<class T , G4bool StepperCachesDchord = true>
using G4InterpolationDriver< T, StepperCachesDchord >::Base = G4RKIntegrationDriver<T>
protected

Definition at line 166 of file G4InterpolationDriver.hh.

◆ ConstStepperIterator

template<class T , G4bool StepperCachesDchord = true>
using G4InterpolationDriver< T, StepperCachesDchord >::ConstStepperIterator = typename std::vector<InterpStepper>::const_iterator
protected

Definition at line 95 of file G4InterpolationDriver.hh.

◆ StepperIterator

template<class T , G4bool StepperCachesDchord = true>
using G4InterpolationDriver< T, StepperCachesDchord >::StepperIterator = typename std::vector<InterpStepper>::iterator
protected

Definition at line 94 of file G4InterpolationDriver.hh.

Constructor & Destructor Documentation

◆ G4InterpolationDriver() [1/2]

template<class T , G4bool StepperCachesDchord = true>
G4InterpolationDriver< T, StepperCachesDchord >::G4InterpolationDriver ( G4double hminimum,
T * stepper,
G4int numberOfComponents = 6,
G4int statisticsVerbosity = 0 )

◆ ~G4InterpolationDriver()

template<class T , G4bool StepperCachesDchord = true>
G4InterpolationDriver< T, StepperCachesDchord >::~G4InterpolationDriver ( )
override

◆ G4InterpolationDriver() [2/2]

template<class T , G4bool StepperCachesDchord = true>
G4InterpolationDriver< T, StepperCachesDchord >::G4InterpolationDriver ( const G4InterpolationDriver< T, StepperCachesDchord > & )
delete

Member Function Documentation

◆ AccumulateStatistics()

template<class T , G4bool StepperCachesDchord = true>
void G4InterpolationDriver< T, StepperCachesDchord >::AccumulateStatistics ( G4int noTrials)
protected

◆ AccurateAdvance()

template<class T , G4bool StepperCachesDchord = true>
G4bool G4InterpolationDriver< T, StepperCachesDchord >::AccurateAdvance ( G4FieldTrack & track,
G4double hstep,
G4double eps,
G4double hinitial = 0 )
overridevirtual

Implements G4VIntegrationDriver.

◆ AdvanceChordLimited()

template<class T , G4bool StepperCachesDchord = true>
G4double G4InterpolationDriver< T, StepperCachesDchord >::AdvanceChordLimited ( G4FieldTrack & track,
G4double hstep,
G4double eps,
G4double chordDistance )
overridevirtual

Implements G4VIntegrationDriver.

Reimplemented in G4QSSDriver< T >.

◆ CalcChordStep()

template<class T , G4bool StepperCachesDchord = true>
G4double G4InterpolationDriver< T, StepperCachesDchord >::CalcChordStep ( G4double stepTrialOld,
G4double dChordStep,
G4double fDeltaChord )
protected

◆ CheckState()

template<class T , G4bool StepperCachesDchord = true>
void G4InterpolationDriver< T, StepperCachesDchord >::CheckState ( ) const
protected

◆ DistChord()

template<class T , G4bool StepperCachesDchord = true>
G4double G4InterpolationDriver< T, StepperCachesDchord >::DistChord ( const field_utils::State & yBegin,
G4double curveLengthBegin,
const field_utils::State & yEnd,
G4double curveLengthEnd ) const
protected

◆ DoesReIntegrate()

template<class T , G4bool StepperCachesDchord = true>
G4bool G4InterpolationDriver< T, StepperCachesDchord >::DoesReIntegrate ( ) const
inlineoverridevirtual

Implements G4VIntegrationDriver.

Definition at line 67 of file G4InterpolationDriver.hh.

67{ return false; }

◆ FindNextChord()

template<class T , G4bool StepperCachesDchord = true>
G4double G4InterpolationDriver< T, StepperCachesDchord >::FindNextChord ( const field_utils::State & yBegin,
G4double curveLengthBegin,
field_utils::State & yEnd,
G4double curveLengthEnd,
G4double dChord,
G4double maxChordDistance )
protected

◆ GetVerboseLevel()

template<class T , G4bool StepperCachesDchord = true>
G4int G4InterpolationDriver< T, StepperCachesDchord >::GetVerboseLevel ( ) const
overridevirtual

Implements G4VIntegrationDriver.

◆ Interpolate()

template<class T , G4bool StepperCachesDchord = true>
void G4InterpolationDriver< T, StepperCachesDchord >::Interpolate ( G4double curveLength,
field_utils::State & y ) const
protected

◆ InterpolateImpl()

template<class T , G4bool StepperCachesDchord = true>
void G4InterpolationDriver< T, StepperCachesDchord >::InterpolateImpl ( G4double curveLength,
ConstStepperIterator it,
field_utils::State & y ) const
protected

◆ OnComputeStep()

template<class T , G4bool StepperCachesDchord = true>
void G4InterpolationDriver< T, StepperCachesDchord >::OnComputeStep ( const G4FieldTrack * = nullptr)
overridevirtual

Implements G4VIntegrationDriver.

Reimplemented in G4QSSDriver< T >.

◆ OneGoodStep()

template<class T , G4bool StepperCachesDchord = true>
virtual G4double G4InterpolationDriver< T, StepperCachesDchord >::OneGoodStep ( StepperIterator it,
field_utils::State & y,
field_utils::State & dydx,
G4double & hstep,
G4double eps,
G4double curveLength,
G4FieldTrack * track = nullptr )
protectedvirtual

◆ OnStartTracking()

template<class T , G4bool StepperCachesDchord = true>
void G4InterpolationDriver< T, StepperCachesDchord >::OnStartTracking ( )
overridevirtual

Implements G4VIntegrationDriver.

Reimplemented in G4QSSDriver< T >.

◆ operator=()

template<class T , G4bool StepperCachesDchord = true>
const G4InterpolationDriver & G4InterpolationDriver< T, StepperCachesDchord >::operator= ( const G4InterpolationDriver< T, StepperCachesDchord > & )
delete

◆ PrintState()

template<class T , G4bool StepperCachesDchord = true>
void G4InterpolationDriver< T, StepperCachesDchord >::PrintState ( ) const
protected

◆ SetVerboseLevel()

template<class T , G4bool StepperCachesDchord = true>
void G4InterpolationDriver< T, StepperCachesDchord >::SetVerboseLevel ( G4int level)
overridevirtual

Implements G4VIntegrationDriver.

◆ StreamInfo()

template<class T , G4bool StepperCachesDchord = true>
void G4InterpolationDriver< T, StepperCachesDchord >::StreamInfo ( std::ostream & os) const
overridevirtual

Implements G4VIntegrationDriver.

Member Data Documentation

◆ fChordStepEstimate

template<class T , G4bool StepperCachesDchord = true>
G4double G4InterpolationDriver< T, StepperCachesDchord >::fChordStepEstimate = DBL_MAX
protected

Definition at line 149 of file G4InterpolationDriver.hh.

◆ fdydx

template<class T , G4bool StepperCachesDchord = true>
field_utils::State G4InterpolationDriver< T, StepperCachesDchord >::fdydx
protected

Definition at line 155 of file G4InterpolationDriver.hh.

◆ fFirstStep

template<class T , G4bool StepperCachesDchord = true>
G4bool G4InterpolationDriver< T, StepperCachesDchord >::fFirstStep = true
protected

Definition at line 156 of file G4InterpolationDriver.hh.

◆ fFractionNextEstimate

template<class T , G4bool StepperCachesDchord = true>
const G4double G4InterpolationDriver< T, StepperCachesDchord >::fFractionNextEstimate = 0.98
protected

Definition at line 150 of file G4InterpolationDriver.hh.

◆ fhnext

template<class T , G4bool StepperCachesDchord = true>
G4double G4InterpolationDriver< T, StepperCachesDchord >::fhnext = DBL_MAX
protected

Definition at line 143 of file G4InterpolationDriver.hh.

◆ fKeepLastStepper

template<class T , G4bool StepperCachesDchord = true>
G4bool G4InterpolationDriver< T, StepperCachesDchord >::fKeepLastStepper = false
protected

Definition at line 141 of file G4InterpolationDriver.hh.

◆ fLastStepper

template<class T , G4bool StepperCachesDchord = true>
StepperIterator G4InterpolationDriver< T, StepperCachesDchord >::fLastStepper
protected

Definition at line 140 of file G4InterpolationDriver.hh.

◆ fMaxTrials

template<class T , G4bool StepperCachesDchord = true>
G4int G4InterpolationDriver< T, StepperCachesDchord >::fMaxTrials = 100
protected

Definition at line 158 of file G4InterpolationDriver.hh.

◆ fmaxTrials

template<class T , G4bool StepperCachesDchord = true>
G4int G4InterpolationDriver< T, StepperCachesDchord >::fmaxTrials = 0
protected

Definition at line 164 of file G4InterpolationDriver.hh.

◆ fMinimumStep

template<class T , G4bool StepperCachesDchord = true>
G4double G4InterpolationDriver< T, StepperCachesDchord >::fMinimumStep
protected

Definition at line 146 of file G4InterpolationDriver.hh.

◆ fNoCalls

template<class T , G4bool StepperCachesDchord = true>
G4int G4InterpolationDriver< T, StepperCachesDchord >::fNoCalls = 0
protected

Definition at line 163 of file G4InterpolationDriver.hh.

◆ fSmallestCurveFraction

template<class T , G4bool StepperCachesDchord = true>
const G4double G4InterpolationDriver< T, StepperCachesDchord >::fSmallestCurveFraction = 0.01
protected

Definition at line 151 of file G4InterpolationDriver.hh.

◆ fSteppers

template<class T , G4bool StepperCachesDchord = true>
std::vector<InterpStepper> G4InterpolationDriver< T, StepperCachesDchord >::fSteppers
protected

Definition at line 139 of file G4InterpolationDriver.hh.

◆ fTotalNoTrials

template<class T , G4bool StepperCachesDchord = true>
G4int G4InterpolationDriver< T, StepperCachesDchord >::fTotalNoTrials = 0
protected

Definition at line 162 of file G4InterpolationDriver.hh.

◆ fTotalStepsForTrack

template<class T , G4bool StepperCachesDchord = true>
G4int G4InterpolationDriver< T, StepperCachesDchord >::fTotalStepsForTrack = 0
protected

Definition at line 159 of file G4InterpolationDriver.hh.

◆ fVerboseLevel

template<class T , G4bool StepperCachesDchord = true>
G4int G4InterpolationDriver< T, StepperCachesDchord >::fVerboseLevel
protected

Definition at line 153 of file G4InterpolationDriver.hh.


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