Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
G4ModifiedMidpoint.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 //
26 // $Id: $
27 //
28 //
29 // Description:
30 // Modified midpoint method implementation
31 // Implementation is based on modified_midpoint.hpp from boost odeint
32 
33 // Implementation by Dmitry Sorokin - GSoC 2016
34 // Work supported by Google as part of Google Summer of Code 2016.
35 // Supervision / code review: John Apostolakis
36 //
38 
39 #ifndef G4MODIFIED_MIDPOINT_HH
40 #define G4MODIFIED_MIDPOINT_HH
41 
42 #include "G4Types.hh"
43 #include "G4EquationOfMotion.hh"
44 #include "G4FieldTrack.hh"
45 
47 {
48  public:
49 
51  G4int nvar = 6, G4int steps = 2 );
52  ~G4ModifiedMidpoint() = default;
53 
54  void DoStep( const G4double yIn[], const G4double dydxIn[],
55  G4double yOut[], G4double hstep) const;
56 
57  void DoStep( const G4double yIn[], const G4double dydxIn[],
58  G4double yOut[], G4double hstep, G4double yMid[],
59  G4double derivs[][G4FieldTrack::ncompSVEC]) const;
60 
61  inline void SetSteps(G4int steps);
62  inline G4int GetSteps() const;
63 
64  inline void SetEquationOfMotion(G4EquationOfMotion* equation);
66 
67  inline G4int GetNumberOfVariables() const;
68 
69  private:
70 
71  void copy(G4double dst[], const G4double src[]) const;
72 
73  private:
74 
78 };
79 
80 #include "G4ModifiedMidpoint.icc"
81 
82 #endif
G4int GetNumberOfVariables() const
G4EquationOfMotion * GetEquationOfMotion()
G4EquationOfMotion * fEquation
double G4double
Definition: G4Types.hh:76
void DoStep(const G4double yIn[], const G4double dydxIn[], G4double yOut[], G4double hstep) const
G4int GetSteps() const
int G4int
Definition: G4Types.hh:78
~G4ModifiedMidpoint()=default
void SetEquationOfMotion(G4EquationOfMotion *equation)
void copy(G4double dst[], const G4double src[]) const
void SetSteps(G4int steps)
G4ModifiedMidpoint(G4EquationOfMotion *equation, G4int nvar=6, G4int steps=2)