24 double const solution_error,
int const )
28 const double e_n = solution_error;
29 const double zero_threshlod = std::numeric_limits<double>::epsilon();
41 "This step is rejected due to the relative change from the"
42 " solution of the previous\n"
43 "\t time step to the current solution exceeds the given tolerance"
45 "\t This time step will be repeated with a new time step size of"
47 "\t or the simulation will be halted.",
50 return std::make_tuple(
false, h_new);
60 return std::make_tuple(
true,
_h0);
67 if (e_n > zero_threshlod)
83 std::pow(
_tol / e_n,
_kI) * h_n;
88 h_new = std::pow(
_tol / e_n,
_kI) * h_n;
97 return std::make_tuple(
true, h_new);
104 const double h_new,
const bool previous_step_accepted)
const
109 const double h_in_range = std::max(
_h_min, std::min(h_new,
_h_max));
114 if (!previous_step_accepted)
120 std::numeric_limits<double>::min())
122 limited_h = std::max(
_h_min, 0.5 * limited_h);
void WARN(char const *fmt, Args const &... args)
const double _h_max
maximum step size.
const double _kD
Parameter.
const double _rel_h_min
in
const double _kI
Parameter.
virtual bool canReduceTimestepSize() const override
Query the timestepper if further time step size reduction is possible.
const double _kP
Parameter.
const double _h_min
minimum step size.
std::tuple< bool, double > next(double solution_error, int number_iterations) override
double limitStepSize(const double h_new, const bool previous_step_accepted) const
const double _h0
initial time step size.
const double _rel_h_max
in
TimeStep _ts_current
current time step information
TimeStep _ts_prev
previous time step information
std::size_t steps() const
the number of time _steps
double dt() const
time step size from _previous