Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
G4VIntegrationDriver.hh
이 파일의 문서화 페이지로 가기
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 // $Id: $
27 //
28 // class G4VIntegrationDriver
29 //
30 // Class description:
31 //
32 // Abstract base class for 'driver' classes which are responsible for
33 // undertaking integration of an state given an equation of motion and
34 // within acceptable error bound(s).
35 //
36 // Different integration methods are meant to be provided via this
37 // common interface, and can span the original type (explicit Runge Kutta
38 // methods), enhanced RK methods and alternatives such as the
39 // Bulirsch-Stoer and multi-step methods.
40 //
41 // The drivers' key mission is to insure that the error is below set values.
42 //
43 // Implementation by Dmitry Sorokin - GSoC 2017
44 // Work supported by Google as part of Google Summer of Code 2017.
45 // Supervision / code review: John Apostolakis
46 
47 #ifndef G4VINTEGRATION_DRIVER_HH
48 #define G4VINTEGRATION_DRIVER_HH
49 
50 #include "G4Types.hh"
51 #include "G4FieldTrack.hh"
53 
55 public:
58  virtual ~G4VIntegrationDriver() = default;
59 
62 
63  virtual G4bool QuickAdvance(G4FieldTrack& track, // INOUT
64  const G4double dydx[],
65  G4double hstep,
66  G4double& dchord_step,
67  G4double& dyerr) = 0;
68 
70  G4double hstep,
71  G4double eps, // Requested y_err/hstep
72  G4double hinitial = 0) = 0; // Suggested 1st interval
73 
74  virtual void GetDerivatives(const G4FieldTrack& track,
75  G4double dydx[]) const = 0;
76 
77  virtual void SetEquationOfMotion(G4EquationOfMotion* equation) = 0;
79 
80  //[[deprecated("use GetEquationOfMotion() instead of GetStepper()->GetEquationOfMotion()")]]
81  virtual const G4MagIntegratorStepper* GetStepper() const = 0;
82  virtual G4MagIntegratorStepper* GetStepper() = 0;
83 
84  // Method for compatibility -- relevant only for G4MagIntegratorDriver
85  virtual void RenewStepperAndAdjust(G4MagIntegratorStepper *pItsStepper);
86 
87  // Taking the last step's normalised error, calculate
88  // a step size for the next step.
89  // Do not limit the next step's size within a factor of the
90  // current one.
91  virtual G4double ComputeNewStepSize(G4double errMaxNorm, // normalised error
92  G4double hstepCurrent) = 0; // current step size
93 
94  virtual void SetVerboseLevel(G4int level) = 0;
95  virtual G4int GetVerboseLevel() const = 0;
96 
97  protected:
98 
101 };
102 
103 
104 #endif
virtual G4bool QuickAdvance(G4FieldTrack &track, const G4double dydx[], G4double hstep, G4double &dchord_step, G4double &dyerr)=0
virtual void RenewStepperAndAdjust(G4MagIntegratorStepper *pItsStepper)
virtual void SetVerboseLevel(G4int level)=0
virtual G4EquationOfMotion * GetEquationOfMotion()=0
virtual G4int GetVerboseLevel() const =0
double G4double
Definition: G4Types.hh:76
bool G4bool
Definition: G4Types.hh:79
virtual void SetEquationOfMotion(G4EquationOfMotion *equation)=0
virtual const G4MagIntegratorStepper * GetStepper() const =0
virtual ~G4VIntegrationDriver()=default
virtual G4double ComputeNewStepSize(G4double errMaxNorm, G4double hstepCurrent)=0
virtual void GetDerivatives(const G4FieldTrack &track, G4double dydx[]) const =0
int G4int
Definition: G4Types.hh:78
const G4VIntegrationDriver & operator=(const G4VIntegrationDriver &)=delete
static const G4double eps
virtual G4bool AccurateAdvance(G4FieldTrack &track, G4double hstep, G4double eps, G4double hinitial=0)=0