OGS
NumLib::TimeStepAlgorithm Class Referenceabstract

Detailed Description

Interface of time stepping algorithms.

Definition at line 29 of file TimeStepAlgorithm.h.

#include <TimeStepAlgorithm.h>

Inheritance diagram for NumLib::TimeStepAlgorithm:
[legend]
Collaboration diagram for NumLib::TimeStepAlgorithm:
[legend]

Public Member Functions

 TimeStepAlgorithm (const double t0, const double t_end)
 
virtual ~TimeStepAlgorithm ()=default
 
Time begin () const
 return the beginning of time steps
 
Time end () const
 return the end of time steps
 
virtual void resetCurrentTimeStep (const double, TimeStep &, TimeStep &)
 reset the current step size from the previous time
 
virtual std::tuple< bool, double > next (const double solution_error, int number_iterations, NumLib::TimeStep &ts_previous, NumLib::TimeStep &ts_current)=0
 
virtual bool isSolutionErrorComputationNeeded () const
 
virtual bool canReduceTimestepSize (NumLib::TimeStep const &, NumLib::TimeStep const &) const
 Query the timestepper if further time step size reduction is possible.
 

Protected Attributes

const Time _t_initial
 initial time
 
const Time _t_end
 end time
 

Constructor & Destructor Documentation

◆ TimeStepAlgorithm()

NumLib::TimeStepAlgorithm::TimeStepAlgorithm ( const double t0,
const double t_end )
inline

Definition at line 32 of file TimeStepAlgorithm.h.

33 : _t_initial(t0), _t_end(t_end)
34 {
35 }
const Time _t_initial
initial time

◆ ~TimeStepAlgorithm()

virtual NumLib::TimeStepAlgorithm::~TimeStepAlgorithm ( )
virtualdefault

Member Function Documentation

◆ begin()

Time NumLib::TimeStepAlgorithm::begin ( ) const
inline

return the beginning of time steps

Definition at line 40 of file TimeStepAlgorithm.h.

40{ return _t_initial; }

References _t_initial.

Referenced by ProcessLib::computationOfChangeNeeded().

◆ canReduceTimestepSize()

virtual bool NumLib::TimeStepAlgorithm::canReduceTimestepSize ( NumLib::TimeStep const & ,
NumLib::TimeStep const &  ) const
inlinevirtual

Query the timestepper if further time step size reduction is possible.

Reimplemented in NumLib::EvolutionaryPIDcontroller, and NumLib::IterationNumberBasedTimeStepping.

Definition at line 69 of file TimeStepAlgorithm.h.

72 {
73 return false;
74 }

◆ end()

Time NumLib::TimeStepAlgorithm::end ( ) const
inline

return the end of time steps

Definition at line 42 of file TimeStepAlgorithm.h.

42{ return _t_end; }

References _t_end.

Referenced by NumLib::FixedTimeStepping::next().

◆ isSolutionErrorComputationNeeded()

virtual bool NumLib::TimeStepAlgorithm::isSolutionErrorComputationNeeded ( ) const
inlinevirtual

Get a flag to indicate whether this algorithm needs to compute solution error. The default return value is false.

Reimplemented in NumLib::EvolutionaryPIDcontroller, and NumLib::IterationNumberBasedTimeStepping.

Definition at line 66 of file TimeStepAlgorithm.h.

66{ return false; }

Referenced by ProcessLib::computationOfChangeNeeded().

◆ next()

virtual std::tuple< bool, double > NumLib::TimeStepAlgorithm::next ( const double solution_error,
int number_iterations,
NumLib::TimeStep & ts_previous,
NumLib::TimeStep & ts_current )
pure virtual

Move to the next time step

Parameters
solution_errorSolution error \(e_n\) between two successive time steps.
number_iterationsNumber of non-linear iterations used.
ts_previousthe previous time step used to compute the size of the next step
ts_currentthe current time step used to compute the size of the next step
Returns
A step acceptance flag and the computed step size.

Implemented in NumLib::EvolutionaryPIDcontroller, NumLib::FixedTimeStepping, and NumLib::IterationNumberBasedTimeStepping.

◆ resetCurrentTimeStep()

virtual void NumLib::TimeStepAlgorithm::resetCurrentTimeStep ( const double ,
TimeStep & ,
TimeStep &  )
inlinevirtual

reset the current step size from the previous time

Definition at line 44 of file TimeStepAlgorithm.h.

47 {
48 }

Member Data Documentation

◆ _t_end

const Time NumLib::TimeStepAlgorithm::_t_end
protected

end time

Definition at line 80 of file TimeStepAlgorithm.h.

Referenced by NumLib::FixedTimeStepping::FixedTimeStepping(), and end().

◆ _t_initial

const Time NumLib::TimeStepAlgorithm::_t_initial
protected

initial time

Definition at line 78 of file TimeStepAlgorithm.h.

Referenced by NumLib::FixedTimeStepping::FixedTimeStepping(), and begin().


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