ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4BulirschStoerDriver.hh
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file G4BulirschStoerDriver.hh
1 // ********************************************************************
2 // * License and Disclaimer *
3 // * *
4 // * The Geant4 software is copyright of the Copyright Holders of *
5 // * the Geant4 Collaboration. It is provided under the terms and *
6 // * conditions of the Geant4 Software License, included in the file *
7 // * LICENSE and available at http://cern.ch/geant4/license . These *
8 // * include a list of copyright holders. *
9 // * *
10 // * Neither the authors of this software system, nor their employing *
11 // * institutes,nor the agencies providing financial support for this *
12 // * work make any representation or warranty, express or implied, *
13 // * regarding this software system or assume any liability for its *
14 // * use. Please see the license in the file LICENSE and URL above *
15 // * for the full disclaimer and the limitation of liability. *
16 // * *
17 // * This code implementation is the result of the scientific and *
18 // * technical work of the GEANT4 collaboration. *
19 // * By using, copying, modifying or distributing the software (or *
20 // * any work based on the software) you agree to acknowledge its *
21 // * use in resulting scientific publications, and indicate your *
22 // * acceptance of all terms of the Geant4 Software license. *
23 // ********************************************************************
24 //
25 // G4BulirschStoer driver
26 //
27 // Class description:
28 //
29 // G4IntegrationDriver<G4BulirschStoer> is a driver class using
30 // Bulirsch-Stoer method to integrate the equation of motion.
31 
32 // Author: Dmitry Sorokin, Google Summer of Code 2016
33 // Supervision: John Apostolakis, CERN
34 // --------------------------------------------------------------------
35 #ifndef G4BULIRSCH_STOER_DRIVER_HH
36 #define G4BULIRSCH_STOER_DRIVER_HH
37 
38 #include "G4IntegrationDriver.hh"
39 #include "G4BulirschStoer.hh"
40 #include "G4ChordFinderDelegate.hh"
41 
42 template <>
44  public G4VIntegrationDriver,
45  public G4ChordFinderDelegate<G4IntegrationDriver<G4BulirschStoer>>
46 {
47  public:
48 
49  G4IntegrationDriver( G4double hminimum,
51  G4int numberOfComponents = 6,
52  G4int statisticsVerbosity = 1);
53 
54  ~G4IntegrationDriver() = default;
55 
58 
60  G4double hstep,
61  G4double eps,
62  G4double chordDistance) override
63  {
65  AdvanceChordLimitedImpl(track, hstep, eps, chordDistance);
66  }
67 
68  virtual void OnStartTracking() override
69  {
71  }
72 
73  virtual void OnComputeStep() override {};
74 
75  virtual G4bool DoesReIntegrate() override { return false; }
76 
78  G4double stepLen,
79  G4double eps,
80  G4double beginStep = 0) override;
81 
82  virtual G4bool QuickAdvance( G4FieldTrack& y_val,
83  const G4double dydx[],
84  G4double hstep,
85  G4double& missDist,
86  G4double& dyerr) override;
87 
88  void OneGoodStep( G4double y[],
89  const G4double dydx[],
90  G4double& curveLength,
91  G4double htry,
92  G4double eps,
93  G4double& hdid,
94  G4double& hnext);
95 
96  virtual void GetDerivatives( const G4FieldTrack& track,
97  G4double dydx[]) const override;
98 
99  virtual void GetDerivatives( const G4FieldTrack& track,
100  G4double dydx[],
101  G4double field[]) const override;
102 
103  virtual void SetVerboseLevel(G4int level) override;
104  virtual G4int GetVerboseLevel() const override;
105 
107  G4double errMaxNorm, // normalised error
108  G4double hstepCurrent) override; // current step size
109 
110  virtual G4EquationOfMotion* GetEquationOfMotion() override;
112  virtual void SetEquationOfMotion(G4EquationOfMotion* equation) override;
113 
114  virtual const G4MagIntegratorStepper* GetStepper() const override;
115  virtual G4MagIntegratorStepper* GetStepper() override;
116 
117  private:
118 
119  G4int GetNumberOfVarialbles() const;
120 
123 
126 
132  yError[G4FieldTrack::ncompSVEC];
133 
134 
137 
139 
140  const G4int interval_sequence[2];
141 
142  using ChordFinderDelegate =
144 };
145 
146 #include "G4BulirschStoerDriver.icc"
147 
148 #endif