20 IT::Record(
"TimeGrid",
"Equally spaced grid of time points.")
24 "The start time of the grid.")
26 "The step of the grid. If not specified, the grid consists of the single time given by the `begin` key.")
29 "The time greater or equal to the last time in the grid.")
43 double simulation_end_time = tg.
end_time();
50 if (!
it->opt_val(
"step", step) ) {
56 if ( t_begin > t_end) {
57 WarningOut().fmt(
"Ignoring output time grid. Time begin {} > time end {}. {}",
58 t_begin, t_end,
it->address_string());
61 if ( t_step < 2*numeric_limits<double>::epsilon()) {
62 WarningOut().fmt(
"Ignoring output time grid. Time step {} < two times machine epsilon {}. {}",
63 t_step, 2*numeric_limits<double>::epsilon(),
it->address_string());
67 this->
add(t_begin, t_step, t_end, mark_type);
80 auto mark =
TimeMark(time, output_mark_type);
82 times_.insert( mark_time );
90 ASSERT_GE( step, 2*numeric_limits<double>::epsilon());
96 if (n_steps_dbl > 1.0e+6) {
97 WarningOut().fmt(
"Output step: {} to small, fixing number of output steps to 1e6.", step);
99 step = (end - begin)/n_steps_dbl;
101 unsigned int n_steps = (
unsigned int)n_steps_dbl;
102 for(
unsigned int i = 0; i <= n_steps; i++) {
103 auto mark =
TimeMark(begin + i * step, output_mark_type);
#define ASSERT_GE(a, b)
Definition of comparative assert macro (Greater or Equal) only for debug mode.
#define ASSERT_LE(a, b)
Definition of comparative assert macro (Less or Equal) only for debug mode.
static const Input::Type::Array get_input_type()
void read_from_input(Input::Array in_array, const TimeGovernor &tg)
std::set< double > times_
void add(double begin, TimeMark::Type mark_type)
bool contains(TimeMark mark) const
Basic time management functionality for unsteady (and steady) solvers (class Equation).
TimeMark::Type equation_fixed_mark_type() const
double read_time(Input::Iterator< Input::Tuple > time_it, double default_time=std::numeric_limits< double >::quiet_NaN()) const
static const Input::Type::Tuple & get_input_time_type(double lower_bound=-std::numeric_limits< double >::max(), double upper_bound=std::numeric_limits< double >::max())
double end_time() const
End time.
static const double time_step_precision
static const double inf_time
Infinity time used for steady case.
static TimeMarks & marks()
Class used for marking specified times at which some events occur.
double time() const
Getter for the time of the TimeMark.
TimeMark::Type type_output()
TimeMark add(const TimeMark &mark)
#define WarningOut()
Macro defining 'warning' record of log.
Basic time management class.