Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4SimpleHeum Class Reference

#include <G4SimpleHeum.hh>

Inheritance diagram for G4SimpleHeum:
Collaboration diagram for G4SimpleHeum:

Public Member Functions

 G4SimpleHeum (G4EquationOfMotion *EqRhs, G4int num_variables=6)
 
 ~G4SimpleHeum ()
 
void DumbStepper (const G4double y[], const G4double dydx[], G4double h, G4double yout[])
 
G4int IntegratorOrder () const
 
- Public Member Functions inherited from G4MagErrorStepper
 G4MagErrorStepper (G4EquationOfMotion *EqRhs, G4int numberOfVariables, G4int numStateVariables=12)
 
virtual ~G4MagErrorStepper ()
 
void Stepper (const G4double y[], const G4double dydx[], G4double h, G4double yout[], G4double yerr[])
 
G4double DistChord () const
 
- Public Member Functions inherited from G4MagIntegratorStepper
 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 ()
 
G4EquationOfMotionGetEquationOfMotion ()
 
void SetEquationOfMotion (G4EquationOfMotion *newEquation)
 
unsigned long GetfNoRHSCalls ()
 
void ResetfNORHSCalls ()
 
bool IsFSAL ()
 

Additional Inherited Members

- Protected Member Functions inherited from G4MagIntegratorStepper
void SetIntegrationOrder (int order)
 
void SetFSAL (bool flag=true)
 

Detailed Description

Definition at line 50 of file G4SimpleHeum.hh.

Constructor & Destructor Documentation

G4SimpleHeum::G4SimpleHeum ( G4EquationOfMotion EqRhs,
G4int  num_variables = 6 
)

Definition at line 46 of file G4SimpleHeum.cc.

46  :
47  G4MagErrorStepper(EqRhs, num_variables),
48  fNumberOfVariables(num_variables)
49 {
50  dydxTemp = new G4double[fNumberOfVariables] ;
51  dydxTemp2 = new G4double[fNumberOfVariables] ;
52  yTemp = new G4double[fNumberOfVariables] ;
53  yTemp2 = new G4double[fNumberOfVariables] ;
54 }
G4MagErrorStepper(G4EquationOfMotion *EqRhs, G4int numberOfVariables, G4int numStateVariables=12)
double G4double
Definition: G4Types.hh:76
G4SimpleHeum::~G4SimpleHeum ( )

Definition at line 61 of file G4SimpleHeum.cc.

62 {
63  delete[] dydxTemp;
64  delete[] dydxTemp2;
65  delete[] yTemp;
66  delete[] yTemp2;
67 }

Member Function Documentation

void G4SimpleHeum::DumbStepper ( const G4double  y[],
const G4double  dydx[],
G4double  h,
G4double  yout[] 
)
virtual

Implements G4MagErrorStepper.

Definition at line 75 of file G4SimpleHeum.cc.

79 {
80  G4int i;
81  for( i = 0; i < fNumberOfVariables; i++ )
82  {
83  yTemp[i] = yIn[i] + (1.0/3.0) * h * dydx[i] ;
84  }
85 
86  RightHandSide(yTemp,dydxTemp);
87 
88  for( i = 0; i < fNumberOfVariables; i++ )
89  {
90  yTemp2[i] = yIn[i] + (2.0/3.0) * h * dydxTemp[i] ;
91  }
92 
93  RightHandSide(yTemp2,dydxTemp2);
94 
95  for( i = 0; i < fNumberOfVariables; i++ )
96  {
97  yOut[i] = yIn[i] + h * (0.25 * dydx[i] + 0.75 * dydxTemp2[i]);
98  }
99 
100  if ( fNumberOfVariables == 12 ) { NormalisePolarizationVector( yOut ); }
101 }
int G4int
Definition: G4Types.hh:78
void RightHandSide(const double y[], double dydx[])
void NormalisePolarizationVector(G4double vec[12])

Here is the call graph for this function:

G4int G4SimpleHeum::IntegratorOrder ( ) const
inlinevirtual

Implements G4MagIntegratorStepper.

Definition at line 66 of file G4SimpleHeum.hh.

66 { return 3; }

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