1 #ifndef CalibCalorimetry_HcalAlgos_ConstantStepOdeSolver_h_
2 #define CalibCalorimetry_HcalAlgos_ConstantStepOdeSolver_h_
50 "In ConstantStepOdeSolver::getTime: index out of range");
57 "In ConstantStepOdeSolver::getCoordinate: index out of range");
71 bool cubic =
false)
const;
75 bool cubic =
false)
const;
81 void run(
const double* initialConditions,
unsigned lenConditions,
82 double dt,
unsigned nSteps);
87 unsigned dim,
unsigned runLen);
90 void writeHistory(std::ostream& os,
double dt,
bool cubic =
false)
const;
94 double dt,
bool cubic =
false)
const;
104 virtual void step(
double t,
double dt,
105 const double*
x,
unsigned lenX,
106 double* coordIncrement)
const = 0;
144 const double*
x,
unsigned lenX,
145 double* coordIncrement)
const;
156 inline const char*
methodName()
const {
return "2nd order Runge-Kutta";}
160 const double*
x,
unsigned lenX,
161 double* coordIncrement)
const;
163 mutable std::vector<double>
buf_;
174 inline const char*
methodName()
const {
return "4th order Runge-Kutta";}
178 const double*
x,
unsigned lenX,
179 double* coordIncrement)
const;
181 mutable std::vector<double>
buf_;
184 #endif // CalibCalorimetry_HcalAlgos_ConstantStepOdeSolver_h_
virtual AbsODERHS * clone() const =0
double getCoordinate(const unsigned which, const unsigned idx) const
RK4(const AbsODERHS &rhs)
double lastDeltaT() const
double interpolateIntegrated(unsigned which, double t, bool cubic=false) const
double getTime(const unsigned idx) const
std::ostream & operator<<(std::ostream &out, const ALILine &li)
const char * methodName() const
ConstantStepOdeSolver(const AbsODERHS &rhs)
std::vector< double > chargeBuffer_
double getPeakTime(unsigned which) const
void step(double t, double dt, const double *x, unsigned lenX, double *coordIncrement) const
double getIntegrated(unsigned which, unsigned idx) const
void writeIntegrated(std::ostream &os, unsigned which, double dt, bool cubic=false) const
const char * methodName() const
virtual void step(double t, double dt, const double *x, unsigned lenX, double *coordIncrement) const =0
std::vector< double > buf_
virtual const char * methodName() const =0
EulerOdeSolver(const AbsODERHS &rhs)
void setRHS(const AbsODERHS &rhs)
void integrateCoordinate(const unsigned which)
const AbsODERHS * getRHS() const
ConstantStepOdeSolver & operator=(const ConstantStepOdeSolver &r)
double interpolateCoordinate(unsigned which, double t, bool cubic=false) const
std::vector< double > historyBuffer_
tuple idx
DEBUGGING if hasattr(process,"trackMonIterativeTracking2012"): print "trackMonIterativeTracking2012 D...
void step(double t, double dt, const double *x, unsigned lenX, double *coordIncrement) const
void step(double t, double dt, const double *x, unsigned lenX, double *coordIncrement) const
void run(const double *initialConditions, unsigned lenConditions, double dt, unsigned nSteps)
virtual ~ConstantStepOdeSolver()
const char * methodName() const
std::vector< double > buf_
void truncateCoordinate(unsigned which, double minValue, double maxValue)
unsigned lastRunLength() const
void writeHistory(std::ostream &os, double dt, bool cubic=false) const
void setHistory(double dt, const double *data, unsigned dim, unsigned runLen)
RK2(const AbsODERHS &rhs)