CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
sim::FieldStepper Class Reference

#include <FieldStepper.h>

Inheritance diagram for sim::FieldStepper:

Public Member Functions

double DistChord () const override
 
 FieldStepper (G4Mag_UsualEqRhs *eq, double del=0.0)
 
int IntegratorOrder () const override
 
G4MagIntegratorStepper * select (const std::string &s)
 
void Stepper (const double y[], const double dydx[], double h, double yout[], double yerr[]) override
 
 ~FieldStepper () override
 

Private Attributes

double delta
 
G4Mag_UsualEqRhs * theEquation
 
G4MagIntegratorStepper * theStepper
 

Detailed Description

Definition at line 9 of file FieldStepper.h.

Constructor & Destructor Documentation

FieldStepper::FieldStepper ( G4Mag_UsualEqRhs *  eq,
double  del = 0.0 
)

Definition at line 20 of file FieldStepper.cc.

20  :
21  G4MagIntegratorStepper(eq, 6), theEquation(eq), delta(del) {}
G4Mag_UsualEqRhs * theEquation
Definition: FieldStepper.h:21
FieldStepper::~FieldStepper ( )
override

Definition at line 23 of file FieldStepper.cc.

23 {}

Member Function Documentation

double FieldStepper::DistChord ( ) const
override

Definition at line 29 of file FieldStepper.cc.

References theStepper.

29 { return theStepper->DistChord(); }
G4MagIntegratorStepper * theStepper
Definition: FieldStepper.h:20
int FieldStepper::IntegratorOrder ( ) const
override

Definition at line 31 of file FieldStepper.cc.

References theStepper.

32 { return theStepper->IntegratorOrder(); }
G4MagIntegratorStepper * theStepper
Definition: FieldStepper.h:20
G4MagIntegratorStepper * FieldStepper::select ( const std::string &  s)

Definition at line 34 of file FieldStepper.cc.

References delta, theEquation, and theStepper.

Referenced by sim::FieldBuilder::configureForVolume().

35 {
36  if (ss == "G4ClassicalRK4") theStepper = new G4ClassicalRK4(theEquation);
37  else if (ss == "G4NystromRK4") theStepper = new G4NystromRK4(theEquation, delta);
38  else if (ss == "G4SimpleRunge") theStepper = new G4SimpleRunge(theEquation);
39  else if (ss == "G4SimpleHeum") theStepper = new G4SimpleHeum(theEquation);
40  else if (ss == "G4CashKarpRKF45") theStepper = new G4CashKarpRKF45(theEquation);
41  else if (ss == "G4RKG3_Stepper") theStepper = new G4RKG3_Stepper(theEquation);
42  else if (ss == "G4ExplicitEuler") theStepper = new G4ExplicitEuler(theEquation);
43  else if (ss == "G4ImplicitEuler") theStepper = new G4ImplicitEuler(theEquation);
44  else if (ss == "G4HelixExplicitEuler") theStepper = new G4HelixExplicitEuler(theEquation);
45  else if (ss == "G4HelixImplicitEuler") theStepper = new G4HelixImplicitEuler(theEquation);
46  else if (ss == "G4HelixSimpleRunge") theStepper = new G4HelixSimpleRunge(theEquation);
47  else if (ss == "G4HelixHeum") theStepper = new G4HelixHeum(theEquation);
48  else
49  {
50  edm::LogWarning("SimG4CoreMagneticField")
51  << " FieldStepper invalid choice, defaulting to G4ClassicalRK4 ";
52  theStepper = new G4ClassicalRK4(theEquation);
53  }
54  return theStepper;
55 }
G4MagIntegratorStepper * theStepper
Definition: FieldStepper.h:20
G4Mag_UsualEqRhs * theEquation
Definition: FieldStepper.h:21
void FieldStepper::Stepper ( const double  y[],
const double  dydx[],
double  h,
double  yout[],
double  yerr[] 
)
override

Definition at line 25 of file FieldStepper.cc.

References theStepper.

27 { theStepper->Stepper(y,dydx,h,yout,yerr); }
G4MagIntegratorStepper * theStepper
Definition: FieldStepper.h:20

Member Data Documentation

double sim::FieldStepper::delta
private

Definition at line 22 of file FieldStepper.h.

Referenced by select().

G4Mag_UsualEqRhs* sim::FieldStepper::theEquation
private

Definition at line 21 of file FieldStepper.h.

Referenced by select().

G4MagIntegratorStepper* sim::FieldStepper::theStepper
private

Definition at line 20 of file FieldStepper.h.

Referenced by DistChord(), IntegratorOrder(), select(), and Stepper().