Import Geant4 11.4.0 source tree
This commit is contained in:
@@ -38,8 +38,8 @@
|
||||
//
|
||||
// The drivers' key mission is to insure that the error is below set values.
|
||||
|
||||
// Author: Dmitry Sorokin, Google Summer of Code 2017
|
||||
// Supervision: John Apostolakis, CERN
|
||||
// Author: Dmitry Sorokin (CERN, Google Summer of Code 2017), 20.10.2017
|
||||
// Supervision: John Apostolakis (CERN)
|
||||
// --------------------------------------------------------------------
|
||||
#ifndef G4VINTEGRATION_DRIVER_HH
|
||||
#define G4VINTEGRATION_DRIVER_HH
|
||||
@@ -54,32 +54,82 @@ class G4VIntegrationDriver
|
||||
{
|
||||
public:
|
||||
|
||||
/**
|
||||
* Default Destructor.
|
||||
*/
|
||||
virtual ~G4VIntegrationDriver() = default;
|
||||
|
||||
/**
|
||||
* Computes the step to take, based on chord limits.
|
||||
* @param[in,out] track The current track in field.
|
||||
* @param[in] hstep Proposed step length.
|
||||
* @param[in] eps Requested accuracy, y_err/hstep.
|
||||
* @param[in] chordDistance Maximum sagitta distance.
|
||||
* @returns The length of step taken.
|
||||
*/
|
||||
virtual G4double AdvanceChordLimited(G4FieldTrack& track,
|
||||
G4double hstep,
|
||||
G4double eps,
|
||||
G4double chordDistance) = 0;
|
||||
|
||||
/**
|
||||
* Advances integration accurately by relative accuracy better than 'eps'.
|
||||
* On output the track is replaced by the value at the end of interval.
|
||||
* @param[in,out] track The current track in field.
|
||||
* @param[in] hstep Proposed step length.
|
||||
* @param[in] eps Requested accuracy, y_err/hstep.
|
||||
* @param[in] hinitial Initial minimum integration step.
|
||||
* @returns true if integration succeeds.
|
||||
*/
|
||||
virtual G4bool AccurateAdvance(G4FieldTrack& track,
|
||||
G4double hstep,
|
||||
G4double eps, // Requested y_err/hstep
|
||||
G4double hinitial = 0 ) = 0;
|
||||
|
||||
/**
|
||||
* Setter and getter for the equation of motion.
|
||||
*/
|
||||
virtual void SetEquationOfMotion(G4EquationOfMotion* equation) = 0;
|
||||
virtual G4EquationOfMotion* GetEquationOfMotion() = 0;
|
||||
|
||||
/**
|
||||
* Method for compatibility -- relevant only for G4MagIntegratorDriver.
|
||||
*/
|
||||
virtual void RenewStepperAndAdjust(G4MagIntegratorStepper* pItsStepper);
|
||||
// Method for compatibility -- relevant only for G4MagIntegratorDriver
|
||||
|
||||
/**
|
||||
* Setter and getter for verbosity.
|
||||
*/
|
||||
virtual void SetVerboseLevel(G4int level) = 0;
|
||||
virtual G4int GetVerboseLevel() const = 0;
|
||||
|
||||
/**
|
||||
* Dispatch interface method for computing step.
|
||||
*/
|
||||
virtual void OnComputeStep(const G4FieldTrack* /*track*/ = nullptr) = 0;
|
||||
|
||||
/**
|
||||
* Dispatch interface method for initialisation/reset of driver.
|
||||
*/
|
||||
virtual void OnStartTracking() = 0;
|
||||
|
||||
public: // without description
|
||||
/**
|
||||
* Whether the driver implements re-integration:
|
||||
* Does this driver *Recalculate* when AccurateAdvance() is called ?
|
||||
*/
|
||||
virtual G4bool DoesReIntegrate() const = 0;
|
||||
|
||||
/**
|
||||
* Writes out to stream the parameters/state of the driver.
|
||||
*/
|
||||
virtual void StreamInfo( std::ostream& os ) const = 0;
|
||||
|
||||
/**
|
||||
* Streaming operator.
|
||||
*/
|
||||
friend std::ostream& operator<<( std::ostream& os, const G4VIntegrationDriver& id);
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
//[[deprecated("will be removed")]]
|
||||
virtual G4bool QuickAdvance(G4FieldTrack& /*track*/, // INOUT
|
||||
@@ -107,17 +157,6 @@ class G4VIntegrationDriver
|
||||
// Taking the last step's normalised error, calculate
|
||||
// a step size for the next step.
|
||||
// - Can limit the next step's size within a factor of the current one.
|
||||
|
||||
virtual G4bool DoesReIntegrate() const = 0;
|
||||
// Whether the driver implementates re-integration
|
||||
// - original Integration driver will re-start and re-calculate interval => yes
|
||||
// - Interpolation Driver does not recalculate (it interpolates)
|
||||
// Basically answer: does this driver *Recalculate* when AccurateAdvance is called ?
|
||||
|
||||
virtual void StreamInfo( std::ostream& os ) const = 0;
|
||||
// Write out the parameters / state of the driver
|
||||
|
||||
friend std::ostream& operator<<( std::ostream& os, const G4VIntegrationDriver& id);
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user