![]() |
OGS
|
Fixed time stepping algorithm.
This algorithm returns time step size defined by a user priori.
Definition at line 29 of file FixedTimeStepping.h.
#include <FixedTimeStepping.h>
Public Member Functions | |
| FixedTimeStepping (double t0, double t_end, double dt) | |
| FixedTimeStepping (double t0, double tn, std::vector< RepeatDtPair > const &repeat_dt_pairs, std::vector< double > const &fixed_times_for_output) | |
| double | next (double solution_error, int number_iterations, NumLib::TimeStep &ts_previous, NumLib::TimeStep &ts_current) override |
Public Member Functions inherited from NumLib::TimeStepAlgorithm | |
| 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 bool | isSolutionErrorComputationNeeded () const |
| virtual bool | canReduceTimestepSize (NumLib::TimeStep const &, NumLib::TimeStep const &) const |
| Query the timestepper if further time step size reduction is possible. | |
Static Public Member Functions | |
| static bool | areRepeatDtPairsValid (std::vector< RepeatDtPair > const &repeat_dt_pairs) |
Private Attributes | |
| std::vector< double > | _dt_vector |
| a vector of time step sizes | |
Additional Inherited Members | |
Protected Attributes inherited from NumLib::TimeStepAlgorithm | |
| const Time | _t_initial |
| initial time | |
| const Time | _t_end |
| end time | |
| NumLib::FixedTimeStepping::FixedTimeStepping | ( | double | t0, |
| double | t_end, | ||
| double | dt ) |
Constructor with homogeneous time step size
A user provides a single time step size \(\Delta t\). Total number of time steps is calculated by
\[ n=\frac{t_{\rm n} - t_0}{\Delta t} \]
.
| t0 | start time |
| t_end | end time |
| dt | uniform time step size |
Definition at line 184 of file FixedTimeStepping.cpp.
References _dt_vector, and OGS_FATAL.
| NumLib::FixedTimeStepping::FixedTimeStepping | ( | double | t0, |
| double | tn, | ||
| std::vector< RepeatDtPair > const & | repeat_dt_pairs, | ||
| std::vector< double > const & | fixed_times_for_output ) |
Constructor with user-specified time step sizes including additional time steps for output.
Definition at line 152 of file FixedTimeStepping.cpp.
References _dt_vector, NumLib::TimeStepAlgorithm::_t_end, NumLib::TimeStepAlgorithm::_t_initial, areRepeatDtPairsValid(), NumLib::incorporateFixedTimesForOutput(), and OGS_FATAL.
|
static |
Definition at line 237 of file FixedTimeStepping.cpp.
References ERR().
Referenced by FixedTimeStepping(), and NumLib::createFixedTimeStepping().
|
overridevirtual |
Move to the next time step
| solution_error | Solution error \(e_n\) between two successive time steps. |
| number_iterations | Number of non-linear iterations used. |
| ts_previous | the previous time step used to compute the size of the next step |
| ts_current | the current time step used to compute the size of the next step |
Implements NumLib::TimeStepAlgorithm.
Definition at line 216 of file FixedTimeStepping.cpp.
References _dt_vector, NumLib::TimeStep::current(), NumLib::TimeStepAlgorithm::end(), and NumLib::TimeStep::timeStepNumber().
|
private |
a vector of time step sizes
Definition at line 64 of file FixedTimeStepping.h.
Referenced by FixedTimeStepping(), FixedTimeStepping(), and next().