G4MagIntegratorStepper Class Reference

#include <G4MagIntegratorStepper.hh>

Inheritance diagram for G4MagIntegratorStepper:

G4CashKarpRKF45 G4MagErrorStepper G4MagHelicalStepper G4NystromRK4 G4RKG3_Stepper G4ClassicalRK4 G4ConstRK4 G4ExplicitEuler G4ImplicitEuler G4SimpleHeum G4SimpleRunge G4ExactHelixStepper G4HelixExplicitEuler G4HelixHeum G4HelixImplicitEuler G4HelixMixedStepper G4HelixSimpleRunge

Public Member Functions

 G4MagIntegratorStepper (G4EquationOfMotion *Equation, G4int numIntegrationVariables, G4int numStateVariables=12)
virtual ~G4MagIntegratorStepper ()
virtual void Stepper (const G4double y[], const G4double dydx[], G4double h, G4double yout[], G4double yerr[])=0
virtual G4double DistChord () const =0
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
virtual G4int IntegratorOrder () const =0
G4EquationOfMotionGetEquationOfMotion ()
void SetEquationOfMotion (G4EquationOfMotion *newEquation)

Detailed Description

Definition at line 52 of file G4MagIntegratorStepper.hh.


Constructor & Destructor Documentation

G4MagIntegratorStepper::G4MagIntegratorStepper ( G4EquationOfMotion Equation,
G4int  numIntegrationVariables,
G4int  numStateVariables = 12 
)

Definition at line 36 of file G4MagIntegratorStepper.cc.

00039   : fEquation_Rhs(Equation),
00040     fNoIntegrationVariables(num_integration_vars),
00041     fNoStateVariables(num_state_vars)
00042     // fNumberOfVariables( std::max(num_var,fNoStateVariables) )
00043 {
00044 }

G4MagIntegratorStepper::~G4MagIntegratorStepper (  )  [virtual]

Definition at line 46 of file G4MagIntegratorStepper.cc.

00047 {
00048 }


Member Function Documentation

void G4MagIntegratorStepper::ComputeRightHandSide ( const G4double  y[],
G4double  dydx[] 
) [virtual]

Reimplemented in G4NystromRK4.

Definition at line 50 of file G4MagIntegratorStepper.cc.

References RightHandSide().

Referenced by G4MagInt_Driver::AccurateAdvance().

00051 {
00052   this->RightHandSide( y, dydx );
00053 }

virtual G4double G4MagIntegratorStepper::DistChord (  )  const [pure virtual]

Implemented in G4CashKarpRKF45, G4ConstRK4, G4ExactHelixStepper, G4HelixExplicitEuler, G4HelixMixedStepper, G4MagErrorStepper, G4MagHelicalStepper, G4NystromRK4, and G4RKG3_Stepper.

G4EquationOfMotion * G4MagIntegratorStepper::GetEquationOfMotion (  )  [inline]

Definition at line 30 of file G4MagIntegratorStepper.icc.

Referenced by G4ErrorPropagatorManager::InitFieldForBackwards(), G4MagHelicalStepper::MagFieldEvaluate(), G4MagInt_Driver::SetChargeMomentumMass(), and G4RKG3_Stepper::StepNoErr().

00031 {
00032   return  fEquation_Rhs;
00033 } 

G4int G4MagIntegratorStepper::GetNumberOfStateVariables (  )  const [inline]

Definition at line 52 of file G4MagIntegratorStepper.icc.

Referenced by G4SimpleRunge::G4SimpleRunge(), G4MagErrorStepper::Stepper(), and G4ConstRK4::Stepper().

00053 {
00054   return fNoStateVariables;
00055 }

G4int G4MagIntegratorStepper::GetNumberOfVariables (  )  const [inline]

Definition at line 45 of file G4MagIntegratorStepper.icc.

Referenced by G4ImplicitEuler::DumbStepper(), G4ExplicitEuler::DumbStepper(), G4ClassicalRK4::DumbStepper(), G4ChordFinder::G4ChordFinder(), G4MagErrorStepper::Stepper(), and G4CashKarpRKF45::Stepper().

00046 {
00047   return fNoIntegrationVariables;
00048 }

virtual G4int G4MagIntegratorStepper::IntegratorOrder (  )  const [pure virtual]

Implemented in G4CashKarpRKF45, G4ClassicalRK4, G4ConstRK4, G4ExactHelixStepper, G4ExplicitEuler, G4HelixExplicitEuler, G4HelixHeum, G4HelixImplicitEuler, G4HelixMixedStepper, G4HelixSimpleRunge, G4ImplicitEuler, G4NystromRK4, G4RKG3_Stepper, G4SimpleHeum, and G4SimpleRunge.

Referenced by G4MagInt_Driver::G4MagInt_Driver(), G4MagInt_Driver::ReSetParameters(), and G4MagErrorStepper::Stepper().

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

Definition at line 76 of file G4MagIntegratorStepper.icc.

Referenced by G4SimpleHeum::DumbStepper(), and G4ClassicalRK4::DumbStepper().

00077 {
00078   G4double drds2 = vec[9]*vec[9]+vec[10]*vec[10]+vec[11]*vec[11];
00079 
00080   if( drds2 > 0. )
00081   {
00082     if( std::fabs(drds2 - 1.0) > 1.e-14 )
00083     {
00084       G4double normx = 1.0 / std::sqrt(drds2);
00085       for(G4int i=9;i<12;i++)  { vec[i] *= normx; }
00086     }
00087   }
00088 }

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

Definition at line 64 of file G4MagIntegratorStepper.icc.

00065 {
00066   G4double drds2 = vec[3]*vec[3]+vec[4]*vec[4]+vec[5]*vec[5];
00067 
00068   if( std::fabs(drds2 - 1.0) > 1.e-14 )
00069   {
00070     G4double normx = 1.0 / std::sqrt(drds2);
00071     for(G4int i=3;i<6;i++) { vec[i] *= normx; }
00072   }
00073 }

void G4MagIntegratorStepper::RightHandSide ( const double  y[],
double  dydx[] 
) [inline]

Definition at line 58 of file G4MagIntegratorStepper.icc.

Referenced by ComputeRightHandSide(), G4SimpleRunge::DumbStepper(), G4SimpleHeum::DumbStepper(), G4ImplicitEuler::DumbStepper(), G4ClassicalRK4::DumbStepper(), G4MagErrorStepper::Stepper(), and G4CashKarpRKF45::Stepper().

00059 {
00060   fEquation_Rhs-> RightHandSide(y, dydx);
00061 }

void G4MagIntegratorStepper::SetEquationOfMotion ( G4EquationOfMotion newEquation  )  [inline]

Definition at line 36 of file G4MagIntegratorStepper.icc.

Referenced by G4ErrorPropagatorManager::InitFieldForBackwards().

00037 {
00038   if( newEquation != 0 )
00039   {
00040     fEquation_Rhs= newEquation;
00041   }
00042 } 

virtual void G4MagIntegratorStepper::Stepper ( const G4double  y[],
const G4double  dydx[],
G4double  h,
G4double  yout[],
G4double  yerr[] 
) [pure virtual]

Implemented in G4CashKarpRKF45, G4ConstRK4, G4ExactHelixStepper, G4HelixMixedStepper, G4MagErrorStepper, G4MagHelicalStepper, G4NystromRK4, and G4RKG3_Stepper.


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:52:28 2013 for Geant4 by  doxygen 1.4.7