Geant4
10.02.p02
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
G4CashKarpRKF45.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
//
27
// $Id: G4CashKarpRKF45.hh 66356 2012-12-18 09:02:32Z 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
48
#include "
G4MagIntegratorStepper.hh
"
49
50
class
G4CashKarpRKF45
:
public
G4MagIntegratorStepper
51
{
52
53
public
:
// with description
54
55
G4CashKarpRKF45
(
G4EquationOfMotion
*EqRhs,
56
G4int
numberOfVariables = 6,
57
G4bool
primary=
true
) ;
58
~G4CashKarpRKF45
() ;
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
83
G4CashKarpRKF45
(
const
G4CashKarpRKF45
&);
84
G4CashKarpRKF45
&
operator=
(
const
G4CashKarpRKF45
&);
85
// Private copy constructor and assignment operator.
86
87
private
:
88
89
G4double
*
ak2
, *
ak3
, *
ak4
, *
ak5
, *
ak6
, *
ak7
, *
yTemp
, *
yIn
;
90
// scratch space
91
92
G4double
fLastStepLength
;
93
G4double
*
fLastInitialVector
, *
fLastFinalVector
,
94
*
fLastDyDx
, *
fMidVector
, *
fMidError
;
95
// for DistChord calculations
96
97
G4CashKarpRKF45
*
fAuxStepper
;
98
99
};
100
101
#endif
/* G4CashKARP_RKF45 */
G4MagIntegratorStepper.hh
G4CashKarpRKF45::ak4
G4double * ak4
Definition:
G4CashKarpRKF45.hh:89
G4EquationOfMotion
Definition:
G4EquationOfMotion.hh:49
G4CashKarpRKF45::G4CashKarpRKF45
G4CashKarpRKF45(G4EquationOfMotion *EqRhs, G4int numberOfVariables=6, G4bool primary=true)
Definition:
G4CashKarpRKF45.cc:47
G4CashKarpRKF45::StepWithEst
void StepWithEst(const G4double yIn[], const G4double dydx[], G4double Step, G4double yOut[], G4double &alpha2, G4double &beta2, const G4double B1[], G4double B2[])
Definition:
G4CashKarpRKF45.cc:214
G4CashKarpRKF45::operator=
G4CashKarpRKF45 & operator=(const G4CashKarpRKF45 &)
G4CashKarpRKF45::fLastStepLength
G4double fLastStepLength
Definition:
G4CashKarpRKF45.hh:92
G4CashKarpRKF45::ak5
G4double * ak5
Definition:
G4CashKarpRKF45.hh:89
G4CashKarpRKF45::ak2
G4double * ak2
Definition:
G4CashKarpRKF45.hh:89
G4MagIntegratorStepper
Definition:
G4MagIntegratorStepper.hh:52
G4CashKarpRKF45::ak7
G4double * ak7
Definition:
G4CashKarpRKF45.hh:89
G4int
int G4int
Definition:
G4Types.hh:78
G4CashKarpRKF45::yIn
G4double * yIn
Definition:
G4CashKarpRKF45.hh:89
G4CashKarpRKF45::fMidVector
G4double * fMidVector
Definition:
G4CashKarpRKF45.hh:93
G4bool
bool G4bool
Definition:
G4Types.hh:79
G4CashKarpRKF45::yTemp
G4double * yTemp
Definition:
G4CashKarpRKF45.hh:89
G4CashKarpRKF45::Stepper
void Stepper(const G4double y[], const G4double dydx[], G4double h, G4double yout[], G4double yerr[])
Definition:
G4CashKarpRKF45.cc:111
G4CashKarpRKF45::ak3
G4double * ak3
Definition:
G4CashKarpRKF45.hh:89
G4CashKarpRKF45::fLastFinalVector
G4double * fLastFinalVector
Definition:
G4CashKarpRKF45.hh:93
G4CashKarpRKF45::ak6
G4double * ak6
Definition:
G4CashKarpRKF45.hh:89
G4CashKarpRKF45::IntegratorOrder
G4int IntegratorOrder() const
Definition:
G4CashKarpRKF45.hh:69
G4CashKarpRKF45::DistChord
G4double DistChord() const
Definition:
G4CashKarpRKF45.cc:230
Step
Definition:
Step.hh:41
G4CashKarpRKF45
Definition:
G4CashKarpRKF45.hh:50
G4CashKarpRKF45::fLastDyDx
G4double * fLastDyDx
Definition:
G4CashKarpRKF45.hh:93
G4CashKarpRKF45::~G4CashKarpRKF45
~G4CashKarpRKF45()
Definition:
G4CashKarpRKF45.cc:80
G4double
double G4double
Definition:
G4Types.hh:76
G4CashKarpRKF45::fAuxStepper
G4CashKarpRKF45 * fAuxStepper
Definition:
G4CashKarpRKF45.hh:97
G4CashKarpRKF45::fMidError
G4double * fMidError
Definition:
G4CashKarpRKF45.hh:93
G4CashKarpRKF45::fLastInitialVector
G4double * fLastInitialVector
Definition:
G4CashKarpRKF45.hh:93
geant4.10.02.p02
source
geometry
magneticfield
include
G4CashKarpRKF45.hh
Generated on Fri Jul 1 2016 14:11:06 for Geant4 by
1.8.8