CLHEP 2.4.6.4
C++ Class Library for High Energy Physics
Loading...
Searching...
No Matches
Genfun::RKIntegrator Class Reference

#include <RKIntegrator.hh>

Classes

class  RKData
 
class  RKFunction
 
class  RKStepper
 

Public Member Functions

 RKIntegrator (const RKStepper *stepper=NULL)
 
virtual ~RKIntegrator ()
 
ParameteraddDiffEquation (const AbsFunction *diffEquation, const std::string &variableName="anon", double defStartingValue=0.0, double startingValueMin=0.0, double startingValueMax=0.0)
 
ParametercreateControlParameter (const std::string &variableName="anon", double defStartingValue=0.0, double startingValueMin=0.0, double startingValueMax=0.0)
 
const RKFunctiongetFunction (unsigned int i) const
 

Detailed Description

Author

Definition at line 43 of file RKIntegrator.hh.

Constructor & Destructor Documentation

◆ RKIntegrator()

Genfun::RKIntegrator::RKIntegrator ( const RKStepper stepper = NULL)

Definition at line 95 of file RKIntegrator.cc.

95 :
96 _data(new RKData())
97{
98 if (stepper) _data->_stepper=stepper->clone();
99 else _data->_stepper= new AdaptiveRKStepper();
100 _data->ref();
101}
void ref() const
Definition: RCBase.cc:15
const RKStepper * _stepper
virtual RKStepper * clone() const =0

◆ ~RKIntegrator()

Genfun::RKIntegrator::~RKIntegrator ( )
virtual

Definition at line 103 of file RKIntegrator.cc.

103 {
104 _data->unref();
105 for (size_t i=0;i<_fcn.size();i++) delete _fcn[i];
106}
void unref() const
Definition: RCBase.cc:20

Member Function Documentation

◆ addDiffEquation()

Parameter * Genfun::RKIntegrator::addDiffEquation ( const AbsFunction diffEquation,
const std::string &  variableName = "anon",
double  defStartingValue = 0.0,
double  startingValueMin = 0.0,
double  startingValueMax = 0.0 
)

Definition at line 108 of file RKIntegrator.cc.

112 {
113 Parameter *par = new Parameter(variableName, defStartingValue, defValueMin, defValueMax);
114 _data->_startingValParameter.push_back(par);
115 _data->_diffEqn.push_back(diffEquation->clone());
116 _data->_startingValParameterCache.push_back(defStartingValue);
117 _fcn.push_back(new RKFunction(_data,(unsigned int)_fcn.size()));
118 return par;
119}
std::vector< Parameter * > _startingValParameter
std::vector< double > _startingValParameterCache
std::vector< const AbsFunction * > _diffEqn

Referenced by Classical::RungeKuttaSolver::RungeKuttaSolver().

◆ createControlParameter()

Parameter * Genfun::RKIntegrator::createControlParameter ( const std::string &  variableName = "anon",
double  defStartingValue = 0.0,
double  startingValueMin = 0.0,
double  startingValueMax = 0.0 
)

Definition at line 125 of file RKIntegrator.cc.

128 {
129
130 Parameter *par = new Parameter(variableName, defStartingValue, startingValueMin, startingValueMax);
131 _data->_controlParameter.push_back(par);
132 _data->_controlParameterCache.push_back(defStartingValue);
133 return par;
134
135}
std::vector< double > _controlParameterCache
std::vector< Parameter * > _controlParameter

Referenced by Classical::RungeKuttaSolver::createControlParameter().

◆ getFunction()

const RKIntegrator::RKFunction * Genfun::RKIntegrator::getFunction ( unsigned int  i) const

Definition at line 139 of file RKIntegrator.cc.

139 {
140 return _fcn[i];
141}

Referenced by Classical::RungeKuttaSolver::equationOf().


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