24 double const t_initial,
double const t_end,
double const min_dt,
25 double const max_dt,
double const initial_dt,
26 std::vector<int>&& iter_times_vector,
27 std::vector<double>&& multiplier_vector)
29 _iter_times_vector(std::move(iter_times_vector)),
30 _multiplier_vector(std::move(multiplier_vector)),
33 _initial_dt(initial_dt),
34 _max_iter(_iter_times_vector.empty() ? 0 : _iter_times_vector.back())
38 OGS_FATAL(
"Vector of iteration numbers must not be empty.");
43 "Vector of iteration numbers must be of the same size as the " 44 "vector of multipliers.");
49 OGS_FATAL(
"Vector of iteration numbers must be sorted.");
54 int const number_iterations)
60 std::numeric_limits<double>::epsilon())
84 int const number_iterations)
const 86 double multiplier = std::numeric_limits<double>::quiet_NaN();
double dt() const
time step size from _previous
const double _min_dt
The minimum allowed time step size.
int _iter_times
The number of nonlinear iterations.
Interface of time stepping algorithms.
std::size_t steps() const
the number of time _steps
std::vector< double > _dt_vector
a vector of time step sizes
double findMultiplier(int number_iterations) const
Find a multiplier for the given number of iterations.
const double _initial_dt
Initial time step size.
TimeStep _ts_current
current time step information
double end() const
return the end of time steps
bool next(double solution_error, int number_iterations) override
int _n_rejected_steps
The number of rejected steps.
double getNextTimeStepSize() const
Calculate the next time step size.
const int _max_iter
The maximum allowed iteration number to accept current time step.
IterationNumberBasedTimeStepping(double const t_initial, double const t_end, double const min_dt, double const max_dt, double const initial_dt, std::vector< int > &&iter_times_vector, std::vector< double > &&multiplier_vector)
TimeStep _ts_prev
previous time step information
double current() const
return current time step
const double _max_dt
The maximum allowed time step size.
#define OGS_FATAL(fmt,...)
const std::vector< int > _iter_times_vector
bool accepted() const override
return if current time step is accepted or not
const std::vector< double > _multiplier_vector
This vector stores the multiplier coefficients.