CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions
EulerOdeSolver Class Reference

#include <ConstantStepOdeSolver.h>

Inheritance diagram for EulerOdeSolver:
ConstantStepOdeSolver

Public Member Functions

 EulerOdeSolver ()
 
 EulerOdeSolver (const AbsODERHS &rhs)
 
const char * methodName () const override
 
- Public Member Functions inherited from ConstantStepOdeSolver
 ConstantStepOdeSolver ()
 
 ConstantStepOdeSolver (const AbsODERHS &rhs)
 
 ConstantStepOdeSolver (const ConstantStepOdeSolver &r)
 
double getCoordinate (const unsigned which, const unsigned idx) const
 
double getIntegrated (unsigned which, unsigned idx) const
 
double getPeakTime (unsigned which) const
 
AbsODERHSgetRHS ()
 
const AbsODERHSgetRHS () const
 
double getTime (const unsigned idx) const
 
double interpolateCoordinate (unsigned which, double t, bool cubic=false) const
 
double interpolateIntegrated (unsigned which, double t, bool cubic=false) const
 
double lastDeltaT () const
 
unsigned lastDim () const
 
double lastMaxT () const
 
unsigned lastRunLength () const
 
ConstantStepOdeSolveroperator= (const ConstantStepOdeSolver &r)
 
void run (const double *initialConditions, unsigned lenConditions, double dt, unsigned nSteps)
 
void setHistory (double dt, const double *data, unsigned dim, unsigned runLen)
 
void setRHS (const AbsODERHS &rhs)
 
void truncateCoordinate (unsigned which, double minValue, double maxValue)
 
void writeHistory (std::ostream &os, double dt, bool cubic=false) const
 
void writeIntegrated (std::ostream &os, unsigned which, double dt, bool cubic=false) const
 
virtual ~ConstantStepOdeSolver ()
 

Private Member Functions

void step (double t, double dt, const double *x, unsigned lenX, double *coordIncrement) const override
 

Additional Inherited Members

- Protected Attributes inherited from ConstantStepOdeSolver
AbsODERHSrhs_
 

Detailed Description

Definition at line 115 of file ConstantStepOdeSolver.h.

Constructor & Destructor Documentation

◆ EulerOdeSolver() [1/2]

EulerOdeSolver::EulerOdeSolver ( )
inline

Definition at line 117 of file ConstantStepOdeSolver.h.

◆ EulerOdeSolver() [2/2]

EulerOdeSolver::EulerOdeSolver ( const AbsODERHS rhs)
inlineexplicit

Definition at line 119 of file ConstantStepOdeSolver.h.

119 : ConstantStepOdeSolver(rhs) {}

Member Function Documentation

◆ methodName()

const char* EulerOdeSolver::methodName ( ) const
inlineoverridevirtual

Implements ConstantStepOdeSolver.

Definition at line 121 of file ConstantStepOdeSolver.h.

121 { return "Euler"; }

◆ step()

void EulerOdeSolver::step ( double  t,
double  dt,
const double *  x,
unsigned  lenX,
double *  coordIncrement 
) const
overrideprivatevirtual

Implements ConstantStepOdeSolver.

Definition at line 292 of file ConstantStepOdeSolver.cc.

293  {
294  rhs_->calc(t, x, lenX, coordIncrement);
295  for (unsigned i = 0; i < lenX; ++i)
296  coordIncrement[i] *= dt;
297 }

References AbsODERHS::calc(), dt, mps_fire::i, ConstantStepOdeSolver::rhs_, submitPVValidationJobs::t, and x.

mps_fire.i
i
Definition: mps_fire.py:428
AbsODERHS::calc
virtual void calc(double t, const double *x, unsigned lenX, double *derivative)=0
ConstantStepOdeSolver::rhs_
AbsODERHS * rhs_
Definition: ConstantStepOdeSolver.h:89
DDAxes::x
dt
float dt
Definition: AMPTWrapper.h:136
ConstantStepOdeSolver::ConstantStepOdeSolver
ConstantStepOdeSolver()
Definition: ConstantStepOdeSolver.h:16
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644