#include <G4BogackiShampine23.hh>
|
| G4BogackiShampine23 (G4EquationOfMotion *EqRhs, G4int numberOfVariables=6, G4bool primary=true) |
|
| ~G4BogackiShampine23 () |
|
void | Stepper (const G4double y[], const G4double dydx[], G4double h, G4double yout[], G4double yerr[]) |
|
G4double | DistChord () const |
|
G4int | IntegratorOrder () const |
|
G4bool | isFSAL () const |
|
G4double * | getLastDydx () |
|
| G4BogackiShampine23 (const G4BogackiShampine23 &) |
|
G4BogackiShampine23 & | operator= (const G4BogackiShampine23 &) |
|
| G4MagIntegratorStepper (G4EquationOfMotion *Equation, G4int numIntegrationVariables, G4int numStateVariables=12, bool isFSAL=false) |
|
virtual | ~G4MagIntegratorStepper () |
|
virtual void | ComputeRightHandSide (const G4double y[], G4double dydx[]) |
|
void | NormaliseTangentVector (G4double vec[6]) |
|
void | NormalisePolarizationVector (G4double vec[12]) |
|
void | RightHandSide (const double y[], double dydx[]) |
|
G4int | GetNumberOfVariables () const |
|
G4int | GetNumberOfStateVariables () const |
|
G4int | IntegrationOrder () |
|
G4EquationOfMotion * | GetEquationOfMotion () |
|
void | SetEquationOfMotion (G4EquationOfMotion *newEquation) |
|
unsigned long | GetfNoRHSCalls () |
|
void | ResetfNORHSCalls () |
|
bool | IsFSAL () |
|
Definition at line 50 of file G4BogackiShampine23.hh.
Definition at line 61 of file G4BogackiShampine23.cc.
65 fLastStepLength(0.), fAuxStepper(0)
67 const G4int numberOfVariables = noIntegrationVariables;
70 ak3 =
new G4double[numberOfVariables] ;
71 ak4 =
new G4double[numberOfVariables] ;
73 pseudoDydx_for_DistChord =
new G4double[numberOfVariables];
78 yTemp =
new G4double[numberOfVariables] ;
79 yIn =
new G4double[numberOfVariables] ;
81 fLastInitialVector =
new G4double[numStateVars] ;
82 fLastFinalVector =
new G4double[numStateVars] ;
83 fLastDyDx =
new G4double[numStateVars];
85 fMidVector =
new G4double[numStateVars];
86 fMidError =
new G4double[numStateVars];
static const G4double ak2
G4BogackiShampine23(G4EquationOfMotion *EqRhs, G4int numberOfVariables=6, G4bool primary=true)
G4MagIntegratorStepper(G4EquationOfMotion *Equation, G4int numIntegrationVariables, G4int numStateVariables=12, bool isFSAL=false)
T max(const T t1, const T t2)
brief Return the largest of the two arguments
G4int GetNumberOfStateVariables() const
G4BogackiShampine23::~G4BogackiShampine23 |
( |
| ) |
|
Definition at line 95 of file G4BogackiShampine23.cc.
104 delete[] fLastInitialVector;
105 delete[] fLastFinalVector;
static const G4double ak2
G4double G4BogackiShampine23::DistChord |
( |
| ) |
const |
|
virtual |
Implements G4MagIntegratorStepper.
Definition at line 200 of file G4BogackiShampine23.cc.
207 fLastInitialVector[1], fLastInitialVector[2]);
209 fLastFinalVector[1], fLastFinalVector[2]);
213 fAuxStepper->
Stepper( fLastInitialVector, fLastDyDx, 0.5 * fLastStepLength,
214 fMidVector, fMidError );
216 midPoint =
G4ThreeVector( fMidVector[0], fMidVector[1], fMidVector[2]);
222 if (initialPoint != finalPoint)
225 distChord = distLine;
229 distChord = (midPoint-initialPoint).mag();
CLHEP::Hep3Vector G4ThreeVector
static G4double Distline(const G4ThreeVector &OtherPnt, const G4ThreeVector &LinePntA, const G4ThreeVector &LinePntB)
void Stepper(const G4double y[], const G4double dydx[], G4double h, G4double yout[], G4double yerr[])
G4double* G4BogackiShampine23::getLastDydx |
( |
| ) |
|
G4int G4BogackiShampine23::IntegratorOrder |
( |
| ) |
const |
|
inlinevirtual |
G4bool G4BogackiShampine23::isFSAL |
( |
| ) |
const |
|
inline |
Implements G4MagIntegratorStepper.
Definition at line 128 of file G4BogackiShampine23.cc.
138 b31 = 0. , b32 = 3.0/4.0 ,
139 b41 = 2.0/9.0, b42 = 1.0/3.0 , b43 = 4.0/9.0;
142 const G4double dc1 = b41 - 7.0/24.0 , dc2 = b42 - 1.0/4.0 ,
143 dc3 = b43 - 1.0/3.0 , dc4 = - 0.125 ;
150 yOut[7] = yTemp[7] = yIn[7];
156 for(i=0;i<numberOfVariables;i++)
162 for(i=0;i<numberOfVariables;i++)
164 yTemp[i] = yIn[i] + b21*
Step*DyDx[i] ;
168 for(i=0;i<numberOfVariables;i++)
170 yTemp[i] = yIn[i] +
Step*(b31*DyDx[i] + b32*
ak2[i]) ;
174 for(i=0;i<numberOfVariables;i++)
176 yOut[i] = yIn[i] +
Step*(b41*DyDx[i] + b42*
ak2[i] + b43*ak3[i]) ;
180 for(i=0;i<numberOfVariables;i++)
184 yErr[i] =
Step*(dc1*DyDx[i] + dc2*
ak2[i] + dc3*ak3[i] +
189 fLastInitialVector[i] = yIn[i] ;
190 fLastFinalVector[i] = yOut[i];
191 fLastDyDx[i] = DyDx[i];
195 fLastStepLength =
Step;
static const G4double ak2
G4int GetNumberOfVariables() const
void RightHandSide(const double y[], double dydx[])
The documentation for this class was generated from the following files: