Geant4-11
Data Structures | Public Member Functions | Protected Member Functions | Static Protected Attributes | Private Types | Private Member Functions | Private Attributes
G4InterpolationDriver< T > Class Template Reference

#include <G4InterpolationDriver.hh>

Inheritance diagram for G4InterpolationDriver< T >:
G4RKIntegrationDriver< T > G4VIntegrationDriver

Data Structures

struct  InterpStepper
 

Public Member Functions

virtual G4bool AccurateAdvance (G4FieldTrack &track, G4double hstep, G4double eps, G4double hinitial=0) override
 
virtual G4double AdvanceChordLimited (G4FieldTrack &track, G4double hstep, G4double eps, G4double chordDistance) override
 
virtual G4double ComputeNewStepSize (G4double errMaxNorm, G4double hstepCurrent) override final
 
virtual G4bool DoesReIntegrate () const override
 
 G4InterpolationDriver (const G4InterpolationDriver &)=delete
 
 G4InterpolationDriver (G4double hminimum, T *stepper, G4int numberOfComponents=6, G4int statisticsVerbosity=0)
 
virtual void GetDerivatives (const G4FieldTrack &track, G4double dydx[]) const override
 
virtual void GetDerivatives (const G4FieldTrack &track, G4double dydx[], G4double field[]) const override
 
virtual G4EquationOfMotionGetEquationOfMotion () override
 
G4int GetMaxNoSteps () const
 
G4double GetPgrow () const
 
G4double GetPshrnk () const
 
G4double GetSafety () const
 
G4double GetSmallestFraction () const
 
virtual const T * GetStepper () const override
 
virtual T * GetStepper () override
 
virtual G4int GetVerboseLevel () const override
 
virtual void OnComputeStep () override
 
virtual void OnStartTracking () override
 
const G4InterpolationDriveroperator= (const G4InterpolationDriver &)=delete
 
virtual G4bool QuickAdvance (G4FieldTrack &, const G4double[], G4double, G4double &, G4double &)
 
virtual void RenewStepperAndAdjust (G4MagIntegratorStepper *stepper) override
 
void ReSetParameters (G4double safety=0.9)
 
virtual void SetEquationOfMotion (G4EquationOfMotion *equation) override
 
void SetMaxNoSteps (G4int val)
 
void SetSafety (G4double valS)
 
void SetSmallestFraction (G4double val)
 
virtual void SetVerboseLevel (G4int level) override
 
virtual void StreamInfo (std::ostream &os) const override
 
virtual ~G4InterpolationDriver () override
 

Protected Member Functions

G4double GrowStepSize (G4double h, G4double error) const
 
G4double GrowStepSize2 (G4double h, G4double error2) const
 
G4double ShrinkStepSize (G4double h, G4double error) const
 
G4double ShrinkStepSize2 (G4double h, G4double error2) const
 
void UpdateErrorConstraints ()
 

Static Protected Attributes

static constexpr G4double max_stepping_decrease = 0.1
 
static constexpr G4double max_stepping_increase = 5
 

Private Types

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

Private Member Functions

void AccumulateStatistics (G4int noTrials)
 
G4double CalcChordStep (G4double stepTrialOld, G4double dChordStep, G4double fDeltaChord)
 
void CheckState () 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)
 
void Interpolate (G4double curveLength, field_utils::State &y) const
 
void InterpolateImpl (G4double curveLength, ConstStepperIterator it, field_utils::State &y) const
 
G4double OneGoodStep (StepperIterator it, field_utils::State &y, field_utils::State &dydx, G4double &hstep, G4double eps, G4double curveLength)
 
void PrintState () const
 
void RenewStepperAndAdjustImpl (T *stepper)
 

Private Attributes

G4double errorConstraintGrow
 
G4double errorConstraintShrink
 
G4double fChordStepEstimate = DBL_MAX
 
field_utils::State fdydx
 
G4bool fFirstStep = true
 
const G4double fFractionNextEstimate = 0.98
 
G4double fhnext = DBL_MAX
 
G4bool fKeepLastStepper = false
 
StepperIterator fLastStepper
 
G4int fMaxNoSteps
 
G4int fMaxStepBase
 
const G4int fMaxTrials = 100
 
G4int fmaxTrials = 0
 
G4double fMinimumStep
 
G4int fNoCalls = 0
 
const G4double fSmallestCurveFraction = 0.01
 
std::vector< InterpStepperfSteppers
 
G4int fTotalNoTrials = 0
 
G4int fTotalStepsForTrack = 0
 
G4int fVerboseLevel
 
G4double pgrow
 
T * pIntStepper = nullptr
 
G4double pshrnk
 
G4double safety
 

Detailed Description

template<class T>
class G4InterpolationDriver< T >

Definition at line 47 of file G4InterpolationDriver.hh.

Member Typedef Documentation

◆ Base

template<class T >
using G4InterpolationDriver< T >::Base = G4RKIntegrationDriver<T>
private

Definition at line 165 of file G4InterpolationDriver.hh.

◆ ConstStepperIterator

template<class T >
using G4InterpolationDriver< T >::ConstStepperIterator = typename std::vector<InterpStepper>::const_iterator
private

Definition at line 96 of file G4InterpolationDriver.hh.

◆ StepperIterator

template<class T >
using G4InterpolationDriver< T >::StepperIterator = typename std::vector<InterpStepper>::iterator
private

Definition at line 95 of file G4InterpolationDriver.hh.

Constructor & Destructor Documentation

◆ G4InterpolationDriver() [1/2]

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

◆ ~G4InterpolationDriver()

template<class T >
virtual G4InterpolationDriver< T >::~G4InterpolationDriver ( )
overridevirtual

◆ G4InterpolationDriver() [2/2]

template<class T >
G4InterpolationDriver< T >::G4InterpolationDriver ( const G4InterpolationDriver< T > &  )
delete

Member Function Documentation

◆ AccumulateStatistics()

template<class T >
void G4InterpolationDriver< T >::AccumulateStatistics ( G4int  noTrials)
private

◆ AccurateAdvance()

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

Implements G4VIntegrationDriver.

◆ AdvanceChordLimited()

template<class T >
virtual G4double G4InterpolationDriver< T >::AdvanceChordLimited ( G4FieldTrack track,
G4double  hstep,
G4double  eps,
G4double  chordDistance 
)
overridevirtual

Implements G4VIntegrationDriver.

◆ CalcChordStep()

template<class T >
G4double G4InterpolationDriver< T >::CalcChordStep ( G4double  stepTrialOld,
G4double  dChordStep,
G4double  fDeltaChord 
)
private

◆ CheckState()

template<class T >
void G4InterpolationDriver< T >::CheckState ( ) const
private

◆ ComputeNewStepSize()

template<class T >
virtual G4double G4RKIntegrationDriver< T >::ComputeNewStepSize ( G4double  errMaxNorm,
G4double  hstepCurrent 
)
finaloverridevirtualinherited

Implements G4VIntegrationDriver.

◆ DistChord()

template<class T >
G4double G4InterpolationDriver< T >::DistChord ( const field_utils::State yBegin,
G4double  curveLengthBegin,
const field_utils::State yEnd,
G4double  curveLengthEnd 
) const
private

◆ DoesReIntegrate()

template<class T >
virtual G4bool G4InterpolationDriver< T >::DoesReIntegrate ( ) const
inlineoverridevirtual

Implements G4VIntegrationDriver.

Definition at line 68 of file G4InterpolationDriver.hh.

68{ return false; }

◆ FindNextChord()

template<class T >
G4double G4InterpolationDriver< T >::FindNextChord ( const field_utils::State yBegin,
G4double  curveLengthBegin,
field_utils::State yEnd,
G4double  curveLengthEnd,
G4double  dChord,
G4double  maxChordDistance 
)
private

◆ GetDerivatives() [1/2]

template<class T >
virtual void G4RKIntegrationDriver< T >::GetDerivatives ( const G4FieldTrack track,
G4double  dydx[] 
) const
overridevirtualinherited

Implements G4VIntegrationDriver.

◆ GetDerivatives() [2/2]

template<class T >
virtual void G4RKIntegrationDriver< T >::GetDerivatives ( const G4FieldTrack track,
G4double  dydx[],
G4double  field[] 
) const
overridevirtualinherited

Implements G4VIntegrationDriver.

◆ GetEquationOfMotion()

template<class T >
virtual G4EquationOfMotion * G4RKIntegrationDriver< T >::GetEquationOfMotion ( )
overridevirtualinherited

Implements G4VIntegrationDriver.

◆ GetMaxNoSteps()

template<class T >
G4int G4RKIntegrationDriver< T >::GetMaxNoSteps ( ) const
inherited

◆ GetPgrow()

template<class T >
G4double G4RKIntegrationDriver< T >::GetPgrow ( ) const
inherited

◆ GetPshrnk()

template<class T >
G4double G4RKIntegrationDriver< T >::GetPshrnk ( ) const
inherited

◆ GetSafety()

template<class T >
G4double G4RKIntegrationDriver< T >::GetSafety ( ) const
inherited

◆ GetSmallestFraction()

template<class T >
G4double G4RKIntegrationDriver< T >::GetSmallestFraction ( ) const
inherited

◆ GetStepper() [1/2]

template<class T >
virtual const T * G4RKIntegrationDriver< T >::GetStepper ( ) const
overridevirtualinherited

Implements G4VIntegrationDriver.

◆ GetStepper() [2/2]

template<class T >
virtual T * G4RKIntegrationDriver< T >::GetStepper ( )
overridevirtualinherited

Implements G4VIntegrationDriver.

◆ GetVerboseLevel()

template<class T >
virtual G4int G4InterpolationDriver< T >::GetVerboseLevel ( ) const
overridevirtual

Implements G4VIntegrationDriver.

◆ GrowStepSize()

template<class T >
G4double G4RKIntegrationDriver< T >::GrowStepSize ( G4double  h,
G4double  error 
) const
protectedinherited

◆ GrowStepSize2()

template<class T >
G4double G4RKIntegrationDriver< T >::GrowStepSize2 ( G4double  h,
G4double  error2 
) const
protectedinherited

◆ Interpolate()

template<class T >
void G4InterpolationDriver< T >::Interpolate ( G4double  curveLength,
field_utils::State y 
) const
private

◆ InterpolateImpl()

template<class T >
void G4InterpolationDriver< T >::InterpolateImpl ( G4double  curveLength,
ConstStepperIterator  it,
field_utils::State y 
) const
private

◆ OnComputeStep()

template<class T >
virtual void G4InterpolationDriver< T >::OnComputeStep ( )
overridevirtual

Implements G4VIntegrationDriver.

◆ OneGoodStep()

template<class T >
G4double G4InterpolationDriver< T >::OneGoodStep ( StepperIterator  it,
field_utils::State y,
field_utils::State dydx,
G4double hstep,
G4double  eps,
G4double  curveLength 
)
private

◆ OnStartTracking()

template<class T >
virtual void G4InterpolationDriver< T >::OnStartTracking ( )
overridevirtual

Implements G4VIntegrationDriver.

◆ operator=()

template<class T >
const G4InterpolationDriver & G4InterpolationDriver< T >::operator= ( const G4InterpolationDriver< T > &  )
delete

◆ PrintState()

template<class T >
void G4InterpolationDriver< T >::PrintState ( ) const
private

◆ QuickAdvance()

virtual G4bool G4VIntegrationDriver::QuickAdvance ( G4FieldTrack ,
const  G4double[],
G4double  ,
G4double ,
G4double  
)
inlinevirtualinherited

◆ RenewStepperAndAdjust()

template<class T >
virtual void G4RKIntegrationDriver< T >::RenewStepperAndAdjust ( G4MagIntegratorStepper stepper)
overridevirtualinherited

Reimplemented from G4VIntegrationDriver.

◆ RenewStepperAndAdjustImpl()

template<class T >
void G4RKIntegrationDriver< T >::RenewStepperAndAdjustImpl ( T *  stepper)
inlineprivateinherited

◆ ReSetParameters()

template<class T >
void G4RKIntegrationDriver< T >::ReSetParameters ( G4double  safety = 0.9)
inherited

◆ SetEquationOfMotion()

template<class T >
virtual void G4RKIntegrationDriver< T >::SetEquationOfMotion ( G4EquationOfMotion equation)
overridevirtualinherited

Implements G4VIntegrationDriver.

◆ SetMaxNoSteps()

template<class T >
void G4RKIntegrationDriver< T >::SetMaxNoSteps ( G4int  val)
inherited

◆ SetSafety()

template<class T >
void G4RKIntegrationDriver< T >::SetSafety ( G4double  valS)
inherited

◆ SetSmallestFraction()

template<class T >
void G4RKIntegrationDriver< T >::SetSmallestFraction ( G4double  val)
inherited

◆ SetVerboseLevel()

template<class T >
virtual void G4InterpolationDriver< T >::SetVerboseLevel ( G4int  level)
overridevirtual

Implements G4VIntegrationDriver.

◆ ShrinkStepSize()

template<class T >
G4double G4RKIntegrationDriver< T >::ShrinkStepSize ( G4double  h,
G4double  error 
) const
protectedinherited

◆ ShrinkStepSize2()

template<class T >
G4double G4RKIntegrationDriver< T >::ShrinkStepSize2 ( G4double  h,
G4double  error2 
) const
protectedinherited

◆ StreamInfo()

template<class T >
virtual void G4InterpolationDriver< T >::StreamInfo ( std::ostream &  os) const
overridevirtual

Reimplemented from G4RKIntegrationDriver< T >.

◆ UpdateErrorConstraints()

template<class T >
void G4RKIntegrationDriver< T >::UpdateErrorConstraints ( )
protectedinherited

Field Documentation

◆ errorConstraintGrow

template<class T >
G4double G4RKIntegrationDriver< T >::errorConstraintGrow
privateinherited

Definition at line 122 of file G4RKIntegrationDriver.hh.

◆ errorConstraintShrink

template<class T >
G4double G4RKIntegrationDriver< T >::errorConstraintShrink
privateinherited

Definition at line 121 of file G4RKIntegrationDriver.hh.

◆ fChordStepEstimate

template<class T >
G4double G4InterpolationDriver< T >::fChordStepEstimate = DBL_MAX
private

Definition at line 148 of file G4InterpolationDriver.hh.

◆ fdydx

template<class T >
field_utils::State G4InterpolationDriver< T >::fdydx
private

Definition at line 154 of file G4InterpolationDriver.hh.

◆ fFirstStep

template<class T >
G4bool G4InterpolationDriver< T >::fFirstStep = true
private

Definition at line 155 of file G4InterpolationDriver.hh.

◆ fFractionNextEstimate

template<class T >
const G4double G4InterpolationDriver< T >::fFractionNextEstimate = 0.98
private

Definition at line 149 of file G4InterpolationDriver.hh.

◆ fhnext

template<class T >
G4double G4InterpolationDriver< T >::fhnext = DBL_MAX
private

Definition at line 143 of file G4InterpolationDriver.hh.

◆ fKeepLastStepper

template<class T >
G4bool G4InterpolationDriver< T >::fKeepLastStepper = false
private

Definition at line 141 of file G4InterpolationDriver.hh.

◆ fLastStepper

template<class T >
StepperIterator G4InterpolationDriver< T >::fLastStepper
private

Definition at line 140 of file G4InterpolationDriver.hh.

◆ fMaxNoSteps

template<class T >
G4int G4RKIntegrationDriver< T >::fMaxNoSteps
privateinherited

Definition at line 107 of file G4RKIntegrationDriver.hh.

◆ fMaxStepBase

template<class T >
G4int G4RKIntegrationDriver< T >::fMaxStepBase
privateinherited

Definition at line 109 of file G4RKIntegrationDriver.hh.

◆ fMaxTrials

template<class T >
const G4int G4InterpolationDriver< T >::fMaxTrials = 100
private

Definition at line 157 of file G4InterpolationDriver.hh.

◆ fmaxTrials

template<class T >
G4int G4InterpolationDriver< T >::fmaxTrials = 0
private

Definition at line 163 of file G4InterpolationDriver.hh.

◆ fMinimumStep

template<class T >
G4double G4InterpolationDriver< T >::fMinimumStep
private

Definition at line 146 of file G4InterpolationDriver.hh.

◆ fNoCalls

template<class T >
G4int G4InterpolationDriver< T >::fNoCalls = 0
private

Definition at line 162 of file G4InterpolationDriver.hh.

◆ fSmallestCurveFraction

template<class T >
const G4double G4InterpolationDriver< T >::fSmallestCurveFraction = 0.01
private

Definition at line 150 of file G4InterpolationDriver.hh.

◆ fSteppers

template<class T >
std::vector<InterpStepper> G4InterpolationDriver< T >::fSteppers
private

Definition at line 139 of file G4InterpolationDriver.hh.

◆ fTotalNoTrials

template<class T >
G4int G4InterpolationDriver< T >::fTotalNoTrials = 0
private

Definition at line 161 of file G4InterpolationDriver.hh.

◆ fTotalStepsForTrack

template<class T >
G4int G4InterpolationDriver< T >::fTotalStepsForTrack = 0
private

Definition at line 158 of file G4InterpolationDriver.hh.

◆ fVerboseLevel

template<class T >
G4int G4InterpolationDriver< T >::fVerboseLevel
private

Definition at line 152 of file G4InterpolationDriver.hh.

◆ max_stepping_decrease

constexpr G4double G4VIntegrationDriver::max_stepping_decrease = 0.1
staticconstexprprotectedinherited

◆ max_stepping_increase

constexpr G4double G4VIntegrationDriver::max_stepping_increase = 5
staticconstexprprotectedinherited

◆ pgrow

template<class T >
G4double G4RKIntegrationDriver< T >::pgrow
privateinherited

Definition at line 117 of file G4RKIntegrationDriver.hh.

◆ pIntStepper

template<class T >
T* G4RKIntegrationDriver< T >::pIntStepper = nullptr
privateinherited

Definition at line 124 of file G4RKIntegrationDriver.hh.

◆ pshrnk

template<class T >
G4double G4RKIntegrationDriver< T >::pshrnk
privateinherited

Definition at line 116 of file G4RKIntegrationDriver.hh.

◆ safety

template<class T >
G4double G4RKIntegrationDriver< T >::safety
privateinherited

Definition at line 115 of file G4RKIntegrationDriver.hh.


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