std::make_unsigned_t< CepsInt > CepsUInt
Unsigned version on CepsInt.
float CepsReal
Need single precision floating point.
void setStartTime(CepsReal startTime)
startTime start time of simulation
CepsReal getTimeStep() const
Time step.
virtual ~TimeStepper()
Destructor.
virtual void reset()
Reset current time to tStart.
CepsReal m_step
Time step, i.e dt.
CepsUInt m_stepsTaken
Number of time steps taken.
virtual CepsReal getTime()
current simulation time
virtual CepsReal computeNextTimeStep()
Compute next time step (fixed time stepping only)
void takeOneStep()
Updates the number of steps taken (derived steppers may compute new time and time step here)
CepsBool atEnd()
Whether time stepper has reached the end time or not.
void setEndTime(CepsReal endTime)
End time of simulation.
TimeStepper()
Default constructor.
CepsBool isProperlySet() const
Check that everything is fine with this time stepper.
CepsUInt getNbTakenTimeSteps() const
Number of time steps performed until now.
CepsReal m_start
Start time of simulation.
CepsReal m_end
End time of simulation.
virtual void setTimes(CepsReal start, CepsReal end, CepsReal step)
Set start, end and time step.
virtual void setTimeStep(CepsReal timeStep)
Set time step.
CepsReal getEndTime() const
End time of simulation.
CepsReal getStartTime() const
startTime start time of simulation
CepsBool lesserThan(CepsReal a, CepsReal b, CepsReal epsilon=FLOATING_POINT_EPSILON)
Lesser than comparison with epsilon tolerance.