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 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

◆ ~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 63 of file TimeStepAlgorithm.h.

66 {
67 return false;
68 }

◆ 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 60 of file TimeStepAlgorithm.h.

60{ return false; }

Referenced by ProcessLib::computationOfChangeNeeded().

◆ next()

virtual 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
the computed step size.

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

Member Data Documentation

◆ _t_end

const Time NumLib::TimeStepAlgorithm::_t_end
protected

end time

Definition at line 74 of file TimeStepAlgorithm.h.

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

◆ _t_initial

const Time NumLib::TimeStepAlgorithm::_t_initial
protected

initial time

Definition at line 72 of file TimeStepAlgorithm.h.

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


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