Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4DoLoMcPriRK34.hh
Go to the documentation of this file.
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 // DoLoMcPri4(3) RK method - header
27 // Implements the 6-3-4 non-FSAL method ( 6 stage, 3rd & 4th order embedded RK method )
28 //
29 // RK tableau / method develoed by
30 // Dormand Lockyer McGorrigan Prince
31 // RK4(3)6FD - forced Non-FSAL
32 //
33 // Header, design, implementation by Somnath Banerjee
34 // Supported by Google in Google Summer of Code 2015.
35 // Supervision / code review: John Apostolakis
36 //
37 // First version: 7 July 2015
38 //
39 // This code is made available subject to the Geant4 license, a copy of
40 // which is available at
41 // http://geant4.org/license
42 // G4DoLoMcPriRK34.hh
43 // Geant4
44 //
45 // History
46 // -----------------------------
47 // Created by Somnath on 7 July 2015
48 
49 
50 #ifndef DoLo_McPri_34
51 #define DoLo_McPri_34
52 
54 
56 {
57 public:
58  //Constructor using Equation
60  G4int numberOfVariables = 6,
61  G4bool primary = true);
63 
64  void Stepper( const G4double y[],
65  const G4double dydx[],
66  G4double h,
67  G4double yout[],
68  G4double yerr[] ) ;
69 
70  //For Preparing the Interpolant and calculating the extra stages
71  void SetupInterpolation();
72  void SetupInterpolate( const G4double yInput[],
73  const G4double dydx[],
74  const G4double Step );
75 
76  //For calculating the output at the tau fraction of Step
77  void Interpolate( const G4double yInput[],
78  const G4double dydx[],
79  const G4double Step,
80  G4double yOut[],
81  G4double tau );
82 
83  void Interpolate( G4double tau,
84  G4double yOut[]);
85 
86  void interpolate(const G4double yInput[],
87  const G4double dydx[],
88  G4double yOut[],
89  G4double Step,
90  G4double tau ) ;
91 
92  G4double DistChord() const;
93  G4int IntegratorOrder() const {return 3; }
94 
95 private :
96 
98  //Copy constructor kept private
99  G4DoLoMcPriRK34& operator=(const G4DoLoMcPriRK34&);
100  //assignment operator overloaded
101 
102  G4double *ak2, *ak3, *ak4, *ak5, *ak6, *yTemp, *yIn;
103 
104  G4double fLastStepLength;
105  G4double *fLastInitialVector, *fLastFinalVector,
106  *fLastDyDx, *fMidVector, *fMidError;
107  // for DistChord calculations
108 
109  G4DoLoMcPriRK34* fAuxStepper;
110 };
111 
112 #endif /* defined(__Geant4__G4DoLoMcPriRK34__) */
void SetupInterpolate(const G4double yInput[], const G4double dydx[], const G4double Step)
G4double DistChord() const
void Interpolate(const G4double yInput[], const G4double dydx[], const G4double Step, G4double yOut[], G4double tau)
int G4int
Definition: G4Types.hh:78
void Stepper(const G4double y[], const G4double dydx[], G4double h, G4double yout[], G4double yerr[])
bool G4bool
Definition: G4Types.hh:79
G4int IntegratorOrder() const
Definition: Step.hh:41
void interpolate(const G4double yInput[], const G4double dydx[], G4double yOut[], G4double Step, G4double tau)
double G4double
Definition: G4Types.hh:76
G4DoLoMcPriRK34(G4EquationOfMotion *EqRhs, G4int numberOfVariables=6, G4bool primary=true)