Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
G4CashKarpRKF45.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 //
27 // $Id: G4CashKarpRKF45.hh 97598 2016-06-06 07:19:46Z gcosmo $
28 //
29 //
30 // class G4CashKarpRKF45
31 //
32 // Class description:
33 //
34 // The Cash-Karp Runge-Kutta-Fehlberg 4/5 method is an embedded fourth
35 // order method (giving fifth-order accuracy) for the solution of an ODE.
36 // Two different fourth order estimates are calculated; their difference
37 // gives an error estimate. [ref. Numerical Recipes in C, 2nd Edition]
38 // It is used to integrate the equations of the motion of a particle
39 // in a magnetic field.
40 
41 // History:
42 // - Created. J.Apostolakis, V.Grichine - 30.1.97
43 // -------------------------------------------------------------------
44 
45 #ifndef G4CashKARP_RKF45
46 #define G4CashKARP_RKF45
47 
49 
51 {
52 
53  public: // with description
54 
56  G4int numberOfVariables = 6,
57  G4bool primary= true ) ;
59 
60  void Stepper( const G4double y[],
61  const G4double dydx[],
62  G4double h,
63  G4double yout[],
64  G4double yerr[] ) ;
65 
66  public: // without description
67 
68  G4double DistChord() const;
69  G4int IntegratorOrder() const { return 4; }
70 
71  private:
72 
73  void StepWithEst( const G4double yIn[],
74  const G4double dydx[],
75  G4double Step,
76  G4double yOut[],
77  G4double& alpha2,
78  G4double& beta2,
79  const G4double B1[],
80  G4double B2[] );
81  // No longer used. Obsolete.
82 
85  // Private copy constructor and assignment operator.
86 
87  private:
88 
89  G4double *ak2, *ak3, *ak4, *ak5, *ak6, *yTemp, *yIn; // *ak7
90  // scratch space
91 
95  // for DistChord calculations
96 
98 
99 };
100 
101 #endif /* G4CashKARP_RKF45 */
G4double * fLastInitialVector
Float_t y
Definition: compare.C:6
G4int IntegratorOrder() const
G4CashKarpRKF45 * fAuxStepper
G4CashKarpRKF45(G4EquationOfMotion *EqRhs, G4int numberOfVariables=6, G4bool primary=true)
G4double * fLastDyDx
double G4double
Definition: G4Types.hh:76
bool G4bool
Definition: G4Types.hh:79
G4double * fMidVector
G4double * fMidError
G4double fLastStepLength
G4CashKarpRKF45 & operator=(const G4CashKarpRKF45 &)
void StepWithEst(const G4double yIn[], const G4double dydx[], G4double Step, G4double yOut[], G4double &alpha2, G4double &beta2, const G4double B1[], G4double B2[])
int G4int
Definition: G4Types.hh:78
G4double * fLastFinalVector
G4double DistChord() const
void Stepper(const G4double y[], const G4double dydx[], G4double h, G4double yout[], G4double yerr[])
Definition: Step.hh:41