std::vector< _Type, _Alloc > CepsVector
C++ vector.
std::make_unsigned_t< CepsInt > CepsUInt
Unsigned version on CepsInt.
float CepsReal
Need single precision floating point.
AbstractOdeSolver()
Constructor.
CepsBool m_initialized
Check at deallocation.
CepsUInt getNbSubSteps() const
Tells if several intermediate steps are needed to get to .
virtual void takeOneSubStep(CepsReal t, CepsReal dt)
Progress by a substep, for RK methods. Does nothing by default.
CepsUInt m_nbSubSteps
Number of sub steps (eg RK solvers)
CepsReal * m_yNp1
Solution at time .
void evaluateDerivative(CepsReal t, CepsReal *y, CepsReal *dty, CepsUInt n, CepsBool nLinPart=true)
Selects and computes depending on how it was passed to the class.
virtual void initialize(CepsReal *y0, CepsUInt n, RateFunction *nonlinearFunc, RateFunction *linearFunc=nullptr, CepsBool copy=false)
Allocate data arrays and sets initial condition with given data.
CepsVector< CepsReal * > m_yNm
Solution at time and before.
CepsReal phi1(CepsReal x) const
Function used in exponential schemes.
virtual void takeOneStep(CepsReal t, CepsReal dt)=0
Make a full ode step : must be defined in every child class.
CepsBool m_ownedSolData
Flag for destructor.
CepsUInt m_nbMultiSteps
Number of steps for multi step solvers.
RateFunction * m_fL
Linear function to call in evaluateDerivative.
CepsReal * getSolution() const
Returns a pointer to the solution. Size is the same as y0 argument in initialize.
CepsUInt m_currentStep
Ongoing step.
virtual void shiftDataArraysForNextStep()
Rotates the pointers on data such that yN becomes yN-1, etc...
RateFunction * m_fNL
Non-linear function to call in evaluateDerivative.
virtual ~AbstractOdeSolver()
Destructor.
CepsUInt m_ySize
Function used in exponential schemes. Return all phi_n until n, starting at phi0.
CepsUInt getNbMultiSteps() const
Tells how many time steps the method covers.
function caller : abstract base, only contains an variadic operator()