ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4RK547FEq3.hh
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file G4RK547FEq3.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 // G4RK547FEq3
26 //
27 // Class description:
28 //
29 // An implementation of the 7 stage embedded Runge-Kutta 4,5 pair (RK547FEq3)
30 // from the paper:
31 // D. J. Higham and G. Hall,
32 // "Embedded Runge-Kutta formulae with stable equilibrium states",
33 // J. Comput. Appl. Math., vol. 29, no. 1, pp. 25-33, 1990.
34 
35 // Author: Dmitry Sorokin, Google Summer of Code 2017
36 // Supervision: John Apostolakis, CERN
37 // --------------------------------------------------------------------
38 #ifndef G4RK547FEq3_HH
39 #define G4RK547FEq3_HH
40 
42 #include "G4FieldTrack.hh"
43 
45 {
46  public:
47 
48  G4RK547FEq3(G4EquationOfMotion* EqRhs, G4int integrationVariables = 6);
49 
50  G4RK547FEq3(const G4RK547FEq3&) = delete;
51  G4RK547FEq3& operator = (const G4RK547FEq3&) = delete;
52 
53  virtual void Stepper( const G4double yInput[],
54  const G4double dydx[],
55  G4double hstep,
56  G4double yOutput[],
57  G4double yError[] ) override;
58 
59  void Stepper( const G4double yInput[],
60  const G4double dydx[],
61  G4double hstep,
62  G4double yOutput[],
63  G4double yError[],
64  G4double dydxOutput[] );
65 
66  virtual G4double DistChord() const override;
67  virtual G4int IntegratorOrder() const override { return 4; }
68 
69  private:
70 
71  void makeStep( const G4double yInput[],
72  const G4double dydx[],
73  const G4double hstep,
74  G4double yOutput[],
75  G4double* dydxOutput = nullptr,
76  G4double* yError = nullptr) const;
77  private:
78 
83 
84  G4double fhstep = -1.0;
85 };
86 
87 #endif