Geant4-11
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
G4RK547FEq1 Class Reference

#include <G4RK547FEq1.hh>

Inheritance diagram for G4RK547FEq1:
G4MagIntegratorStepper

Public Member Functions

virtual G4double DistChord () const override
 
 G4RK547FEq1 (const G4RK547FEq1 &)=delete
 
 G4RK547FEq1 (G4EquationOfMotion *EqRhs, G4int integrationVariables=6)
 
G4EquationOfMotionGetEquationOfMotion ()
 
const G4EquationOfMotionGetEquationOfMotion () const
 
unsigned long GetfNoRHSCalls ()
 
G4int GetNumberOfStateVariables () const
 
G4int GetNumberOfVariables () const
 
G4int IntegrationOrder ()
 
virtual G4int IntegratorOrder () const override
 
G4bool IsFSAL () const
 
void NormalisePolarizationVector (G4double vec[12])
 
void NormaliseTangentVector (G4double vec[6])
 
G4RK547FEq1operator= (const G4RK547FEq1 &)=delete
 
void ResetfNORHSCalls ()
 
void RightHandSide (const G4double y[], G4double dydx[]) const
 
void RightHandSide (const G4double y[], G4double dydx[], G4double field[]) const
 
void SetEquationOfMotion (G4EquationOfMotion *newEquation)
 
virtual void Stepper (const G4double yInput[], const G4double dydx[], G4double hstep, G4double yOutput[], G4double yError[]) override
 
void Stepper (const G4double yInput[], const G4double dydx[], G4double hstep, G4double yOutput[], G4double yError[], G4double dydxOutput[])
 

Protected Member Functions

void SetFSAL (G4bool flag=true)
 
void SetIntegrationOrder (G4int order)
 

Private Member Functions

void makeStep (const G4double yInput[], const G4double dydx[], const G4double hstep, G4double yOutput[], G4double *dydxOutput=nullptr, G4double *yError=nullptr) const
 

Private Attributes

G4double fdydx [G4FieldTrack::ncompSVEC]
 
G4double fdydxOut [G4FieldTrack::ncompSVEC]
 
G4EquationOfMotionfEquation_Rhs = nullptr
 
G4double fhstep = -1.0
 
G4int fIntegrationOrder = -1
 
G4bool fIsFSAL = false
 
const G4int fNoIntegrationVariables = 0
 
unsigned long fNoRHSCalls = 0UL
 
const G4int fNoStateVariables = 0
 
G4double fyIn [G4FieldTrack::ncompSVEC]
 
G4double fyOut [G4FieldTrack::ncompSVEC]
 

Detailed Description

Definition at line 44 of file G4RK547FEq1.hh.

Constructor & Destructor Documentation

◆ G4RK547FEq1() [1/2]

G4RK547FEq1::G4RK547FEq1 ( G4EquationOfMotion EqRhs,
G4int  integrationVariables = 6 
)

Definition at line 51 of file G4RK547FEq1.cc.

52 : G4MagIntegratorStepper(EqRhs, integrationVariables)
53{
54}
G4MagIntegratorStepper(G4EquationOfMotion *Equation, G4int numIntegrationVariables, G4int numStateVariables=12, G4bool isFSAL=false)

◆ G4RK547FEq1() [2/2]

G4RK547FEq1::G4RK547FEq1 ( const G4RK547FEq1 )
delete

Member Function Documentation

◆ DistChord()

G4double G4RK547FEq1::DistChord ( ) const
overridevirtual

Implements G4MagIntegratorStepper.

Definition at line 164 of file G4RK547FEq1.cc.

165{
167 makeStep(fyIn, fdydx, fhstep / 2., yMid);
168
169 const G4ThreeVector begin = makeVector(fyIn, Value3D::Position);
170 const G4ThreeVector mid = makeVector(yMid, Value3D::Position);
171 const G4ThreeVector end = makeVector(fyOut, Value3D::Position);
172
173 return G4LineSection::Distline(mid, begin, end);
174}
double G4double
Definition: G4Types.hh:83
static G4double Distline(const G4ThreeVector &OtherPnt, const G4ThreeVector &LinePntA, const G4ThreeVector &LinePntB)
G4double fyOut[G4FieldTrack::ncompSVEC]
Definition: G4RK547FEq1.hh:82
void makeStep(const G4double yInput[], const G4double dydx[], const G4double hstep, G4double yOutput[], G4double *dydxOutput=nullptr, G4double *yError=nullptr) const
Definition: G4RK547FEq1.cc:56
G4double fdydx[G4FieldTrack::ncompSVEC]
Definition: G4RK547FEq1.hh:81
G4double fhstep
Definition: G4RK547FEq1.hh:85
G4double fyIn[G4FieldTrack::ncompSVEC]
Definition: G4RK547FEq1.hh:80
G4ThreeVector makeVector(const ArrayType &array, Value3D value)

References G4LineSection::Distline(), fdydx, fhstep, fyIn, fyOut, makeStep(), field_utils::makeVector(), and G4FieldTrack::ncompSVEC.

◆ GetEquationOfMotion() [1/2]

G4EquationOfMotion * G4MagIntegratorStepper::GetEquationOfMotion ( )
inlineinherited

◆ GetEquationOfMotion() [2/2]

const G4EquationOfMotion * G4MagIntegratorStepper::GetEquationOfMotion ( ) const
inlineinherited

◆ GetfNoRHSCalls()

unsigned long G4MagIntegratorStepper::GetfNoRHSCalls ( )
inlineinherited

◆ GetNumberOfStateVariables()

G4int G4MagIntegratorStepper::GetNumberOfStateVariables ( ) const
inlineinherited

◆ GetNumberOfVariables()

G4int G4MagIntegratorStepper::GetNumberOfVariables ( ) const
inlineinherited

◆ IntegrationOrder()

G4int G4MagIntegratorStepper::IntegrationOrder ( )
inlineinherited

◆ IntegratorOrder()

virtual G4int G4RK547FEq1::IntegratorOrder ( ) const
inlineoverridevirtual

Implements G4MagIntegratorStepper.

Definition at line 67 of file G4RK547FEq1.hh.

67{ return 4; }

◆ IsFSAL()

G4bool G4MagIntegratorStepper::IsFSAL ( ) const
inlineinherited

◆ makeStep()

void G4RK547FEq1::makeStep ( const G4double  yInput[],
const G4double  dydx[],
const G4double  hstep,
G4double  yOutput[],
G4double dydxOutput = nullptr,
G4double yError = nullptr 
) const
private

Definition at line 56 of file G4RK547FEq1.cc.

62{
65 {
66 yOutput[i] = yTemp[i] = yInput[i];
67 }
68
74
75 const G4double b21 = 2./9.,
76 b31 = 1./12., b32 = 1./4.,
77 b41 = 1./8., b42 = 0., b43 = 3./8.,
78 b51 = 91./500., b52 = -27./100.,
79 b53 = 78./125., b54 = 8./125.,
80 b61 = -11./20., b62 = 27./20., b63 = 12./5.,
81 b64 = -36./5., b65 = 5.,
82 b71 = 1./12., b72 = 0., b73 = 27./32.,
83 b74 = -4./3., b75 = 125./96., b76 = 5./48.;
84
85 const G4double dc1 = b71 - 2./15.,
86 dc2 = b72 - 0.,
87 dc3 = b73 - 27./80.,
88 dc4 = b74 + 2./15.,
89 dc5 = b75 - 25./48.,
90 dc6 = b76 - 1./24.,
91 dc7 = 0. - 1./10.;
92
93 // RightHandSide(yInput, dydx);
94 for(G4int i = 0; i < GetNumberOfVariables(); ++i)
95 yTemp[i] = yInput[i] + hstep * b21 * dydx[i];
96
97 RightHandSide(yTemp, ak2);
98 for(G4int i = 0; i < GetNumberOfVariables(); ++i)
99 yTemp[i] = yInput[i] + hstep * (b31 * dydx[i] + b32 * ak2[i]);
100
101 RightHandSide(yTemp, ak3);
102 for(G4int i = 0;i < GetNumberOfVariables(); ++i)
103 yTemp[i] = yInput[i] + hstep * (b41 * dydx[i] + b42 * ak2[i] +
104 b43 * ak3[i]);
105
106 RightHandSide(yTemp, ak4);
107 for(G4int i = 0; i < GetNumberOfVariables(); ++i)
108 yTemp[i] = yInput[i] + hstep * (b51 * dydx[i] + b52 * ak2[i] +
109 b53 * ak3[i] + b54 * ak4[i]);
110
111 RightHandSide(yTemp, ak5);
112 for(G4int i = 0; i < GetNumberOfVariables(); ++i)
113 yTemp[i] = yInput[i] + hstep * (b61 * dydx[i] + b62 * ak2[i] +
114 b63 * ak3[i] + b64 * ak4[i] +
115 b65 * ak5[i]);
116
117 RightHandSide(yTemp, ak6);
118 for(G4int i = 0; i < GetNumberOfVariables(); ++i)
119 yOutput[i] = yInput[i] + hstep * (b71 * dydx[i] + b72 * ak2[i] +
120 b73 * ak3[i] + b74 * ak4[i] +
121 b75 * ak5[i] + b76 * ak6[i]);
122 if (dydxOutput && yError)
123 {
124 RightHandSide(yOutput, dydxOutput);
125 for(G4int i = 0; i < GetNumberOfVariables(); ++i)
126 yError[i] = hstep * (dc1 * dydx[i] + dc2 * ak2[i] + dc3 * ak3[i] +
127 dc4 * ak4[i] + dc5 * ak5[i] + dc6 * ak6[i] +
128 dc7 * dydxOutput[i]);
129 }
130}
static const G4double ak2
int G4int
Definition: G4Types.hh:85
G4int GetNumberOfVariables() const
void RightHandSide(const G4double y[], G4double dydx[]) const
G4int GetNumberOfStateVariables() const

References ak2, G4MagIntegratorStepper::GetNumberOfStateVariables(), G4MagIntegratorStepper::GetNumberOfVariables(), G4FieldTrack::ncompSVEC, and G4MagIntegratorStepper::RightHandSide().

Referenced by DistChord(), and Stepper().

◆ NormalisePolarizationVector()

void G4MagIntegratorStepper::NormalisePolarizationVector ( G4double  vec[12])
inlineinherited

◆ NormaliseTangentVector()

void G4MagIntegratorStepper::NormaliseTangentVector ( G4double  vec[6])
inlineinherited

◆ operator=()

G4RK547FEq1 & G4RK547FEq1::operator= ( const G4RK547FEq1 )
delete

◆ ResetfNORHSCalls()

void G4MagIntegratorStepper::ResetfNORHSCalls ( )
inlineinherited

◆ RightHandSide() [1/2]

void G4MagIntegratorStepper::RightHandSide ( const G4double  y[],
G4double  dydx[] 
) const
inlineinherited

◆ RightHandSide() [2/2]

void G4MagIntegratorStepper::RightHandSide ( const G4double  y[],
G4double  dydx[],
G4double  field[] 
) const
inlineinherited

◆ SetEquationOfMotion()

void G4MagIntegratorStepper::SetEquationOfMotion ( G4EquationOfMotion newEquation)
inlineinherited

◆ SetFSAL()

void G4MagIntegratorStepper::SetFSAL ( G4bool  flag = true)
inlineprotectedinherited

◆ SetIntegrationOrder()

void G4MagIntegratorStepper::SetIntegrationOrder ( G4int  order)
inlineprotectedinherited

◆ Stepper() [1/2]

void G4RK547FEq1::Stepper ( const G4double  yInput[],
const G4double  dydx[],
G4double  hstep,
G4double  yOutput[],
G4double  yError[] 
)
overridevirtual

Implements G4MagIntegratorStepper.

Definition at line 132 of file G4RK547FEq1.cc.

137{
138 copy(fyIn, yInput);
139 copy(fdydx, dydx);
140 fhstep = hstep;
141
142 makeStep(fyIn, fdydx, fhstep, fyOut, fdydxOut, yError);
143
144 copy(yOutput, fyOut);
145}
G4double fdydxOut[G4FieldTrack::ncompSVEC]
Definition: G4RK547FEq1.hh:83
void copy(G4double dst[], const G4double src[], size_t size=G4FieldTrack::ncompSVEC)
Definition: G4FieldUtils.cc:98

References field_utils::copy(), fdydx, fdydxOut, fhstep, fyIn, fyOut, and makeStep().

◆ Stepper() [2/2]

void G4RK547FEq1::Stepper ( const G4double  yInput[],
const G4double  dydx[],
G4double  hstep,
G4double  yOutput[],
G4double  yError[],
G4double  dydxOutput[] 
)

Definition at line 147 of file G4RK547FEq1.cc.

153{
154 copy(fyIn, yInput);
155 copy(fdydx, dydx);
156 fhstep = hstep;
157
159
160 copy(yOutput, fyOut);
161 copy(dydxOutput, fdydxOut);
162}

References field_utils::copy(), fdydx, fdydxOut, fhstep, fyIn, fyOut, and makeStep().

Field Documentation

◆ fdydx

G4double G4RK547FEq1::fdydx[G4FieldTrack::ncompSVEC]
private

Definition at line 81 of file G4RK547FEq1.hh.

Referenced by DistChord(), and Stepper().

◆ fdydxOut

G4double G4RK547FEq1::fdydxOut[G4FieldTrack::ncompSVEC]
private

Definition at line 83 of file G4RK547FEq1.hh.

Referenced by Stepper().

◆ fEquation_Rhs

G4EquationOfMotion* G4MagIntegratorStepper::fEquation_Rhs = nullptr
privateinherited

Definition at line 124 of file G4MagIntegratorStepper.hh.

◆ fhstep

G4double G4RK547FEq1::fhstep = -1.0
private

Definition at line 85 of file G4RK547FEq1.hh.

Referenced by DistChord(), and Stepper().

◆ fIntegrationOrder

G4int G4MagIntegratorStepper::fIntegrationOrder = -1
privateinherited

Definition at line 134 of file G4MagIntegratorStepper.hh.

◆ fIsFSAL

G4bool G4MagIntegratorStepper::fIsFSAL = false
privateinherited

Definition at line 136 of file G4MagIntegratorStepper.hh.

◆ fNoIntegrationVariables

const G4int G4MagIntegratorStepper::fNoIntegrationVariables = 0
privateinherited

Definition at line 125 of file G4MagIntegratorStepper.hh.

◆ fNoRHSCalls

unsigned long G4MagIntegratorStepper::fNoRHSCalls = 0UL
mutableprivateinherited

Definition at line 128 of file G4MagIntegratorStepper.hh.

◆ fNoStateVariables

const G4int G4MagIntegratorStepper::fNoStateVariables = 0
privateinherited

Definition at line 126 of file G4MagIntegratorStepper.hh.

◆ fyIn

G4double G4RK547FEq1::fyIn[G4FieldTrack::ncompSVEC]
private

Definition at line 80 of file G4RK547FEq1.hh.

Referenced by DistChord(), and Stepper().

◆ fyOut

G4double G4RK547FEq1::fyOut[G4FieldTrack::ncompSVEC]
private

Definition at line 82 of file G4RK547FEq1.hh.

Referenced by DistChord(), and Stepper().


The documentation for this class was generated from the following files: