#include <G4ModifiedMidpoint.hh>
|
void | DoStep (const G4double yIn[], const G4double dydxIn[], G4double yOut[], G4double hstep) const |
|
void | DoStep (const G4double yIn[], const G4double dydxIn[], G4double yOut[], G4double hstep, G4double yMid[], G4double derivs[][G4FieldTrack::ncompSVEC]) const |
|
| G4ModifiedMidpoint (G4EquationOfMotion *equation, G4int nvar=6, G4int steps=2) |
|
G4EquationOfMotion * | GetEquationOfMotion () |
|
G4int | GetNumberOfVariables () const |
|
G4int | GetSteps () const |
|
void | SetEquationOfMotion (G4EquationOfMotion *equation) |
|
void | SetSteps (G4int steps) |
|
| ~G4ModifiedMidpoint ()=default |
|
Definition at line 41 of file G4ModifiedMidpoint.hh.
◆ G4ModifiedMidpoint()
Definition at line 36 of file G4ModifiedMidpoint.cc.
39{
40 if (nvar <= 0)
41 {
42 G4Exception(
"G4ModifiedMidpoint::G4ModifiedMidpoint()",
44 "Invalid number of variables; must be greater than zero!");
45 }
46}
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4EquationOfMotion * fEquation
References FatalException, and G4Exception().
◆ ~G4ModifiedMidpoint()
G4ModifiedMidpoint::~G4ModifiedMidpoint |
( |
| ) |
|
|
default |
◆ copy()
◆ DoStep() [1/2]
Definition at line 48 of file G4ModifiedMidpoint.cc.
50{
54 setValue(yIn, Value1D::LabTime, y0, y1, yTemp, yOut);
55
57
60
61
62
64 {
65 y1[i] = yIn[i] + h * dydyIn[i];
66 }
67
69
71
72
73
74
76 {
79 {
80 y1[j] = y0[j] + h2 * dydx[j];
81 }
83
85 }
86
87
88
89
91 {
92 yOut[i] = 0.5 * (y0[i] + y1[i] + h * dydx[i]);
93 }
94}
void RightHandSide(const G4double y[], G4double dydx[]) const
void copy(G4double dst[], const G4double src[]) const
void setValue(const SourceArray &src, Value1D value, TargetArray &trg)
References copy(), fEquation, fnvar, fsteps, G4FieldTrack::ncompSVEC, G4EquationOfMotion::RightHandSide(), and field_utils::setValue().
Referenced by G4BulirschStoer::try_step().
◆ DoStep() [2/2]
Definition at line 96 of file G4ModifiedMidpoint.cc.
99{
103 setValue(yIn, Value1D::LabTime, y0, y1, yTemp, yMid, yOut);
104
107
108
110
111
113 {
114 y1[i] = y0[i] + h * dydxIn[i];
115 }
116
117
118
119
121 {
123 }
124
126
127
128
129
131 {
134 {
135 y1[j] = y0[j] + h2 * derivs[i-1][j];
136 }
138
139
141 {
143 }
144
146 }
147
148
149
150
152 {
153 yOut[i] = 0.5 * (y0[i] + y1[i] + h * derivs[
fsteps-1][i]);
154 }
155}
References copy(), fEquation, fnvar, fsteps, G4FieldTrack::ncompSVEC, G4EquationOfMotion::RightHandSide(), and field_utils::setValue().
◆ GetEquationOfMotion()
◆ GetNumberOfVariables()
G4int G4ModifiedMidpoint::GetNumberOfVariables |
( |
| ) |
const |
|
inline |
◆ GetSteps()
G4int G4ModifiedMidpoint::GetSteps |
( |
| ) |
const |
|
inline |
◆ SetEquationOfMotion()
◆ SetSteps()
void G4ModifiedMidpoint::SetSteps |
( |
G4int |
steps | ) |
|
|
inline |
◆ fEquation
◆ fnvar
G4int G4ModifiedMidpoint::fnvar = 0 |
|
private |
◆ fsteps
G4int G4ModifiedMidpoint::fsteps = 0 |
|
private |
The documentation for this class was generated from the following files: