Flow123d
JS_before_hm-2154-g185f171e0
|
Go to the documentation of this file.
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);
Basic time management class.
double end_time() const
End time.
TimeMark::Type equation_fixed_mark_type() const
void add(double begin, TimeMark::Type mark_type)
bool contains(TimeMark mark) const
Class used for marking specified times at which some events occur.
static const double time_step_precision
Basic time management functionality for unsteady (and steady) solvers (class Equation).
TimeMark add(const TimeMark &mark)
void read_from_input(Input::Array in_array, const TimeGovernor &tg)
static const Input::Type::Array get_input_type()
double read_time(Input::Iterator< Input::Tuple > time_it, double default_time=std::numeric_limits< double >::quiet_NaN()) const
static TimeMarks & marks()
#define ASSERT_GE(a, b)
Definition of comparative assert macro (Greater or Equal)
#define WarningOut()
Macro defining 'warning' record of log.
#define ASSERT_LE(a, b)
Definition of comparative assert macro (Less or Equal)
static const double inf_time
Infinity time used for steady case.
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())
std::set< double > times_
double time() const
Getter for the time of the TimeMark.
TimeMark::Type type_output()