289 inline double t()
const
308 inline double dt()
const
348 inline bool gt(
double other_time)
const
350 return ! (
time_ <= other_time
357 inline bool ge(
double other_time)
const
359 return time_ >= other_time
366 inline bool lt(
double other_time)
const
370 return ! (
time_ >= b);
376 inline bool le(
double other_time)
const
378 return time_ <= other_time
393 void view(
const char *name=
"")
const;
TimeMark::Type type_fixed_time()
void init_common(double dt, double init_time, double end_time, TimeMark::Type type)
Common part of the constructors. Set most important parameters, check they are valid and set default ...
static const double round_n_steps_precision
Rounding precision for computing number of steps. Used in estimate_dt().
double init_time_
Initial time.
TimeMarks::iterator next(const TimeGovernor &tg, const TimeMark::Type &mask) const
double lower_constraint_
Lower constraint for the choice of the next time step.
Iterator over TimeMark objects in TimeMarks object (database of TimeMark objects).
double end_time() const
End time.
double estimate_time() const
bool is_time_step_fixed_
Flag that is set when the fixed step is set (lasts only one time step).
int time_level_
Number of time_next calls, i.e. total number of performed time steps.
double last_time_
Beginning of the actual time interval; i.e. the time of last computed solution.
double time_step_
Length of actual time interval; i.e. the actual time step.
static TimeMarks time_marks_
ostream & operator<<(ostream &out, const TimeGovernor &tg)
Redirection operator for TimeGovernor.
double upper_constraint() const
TimeGovernor(const Input::Record &input, TimeMark::Type fixed_time_mask=TimeMark::none_type)
Constructor for unsteady solvers.
double end_time_
End time of the simulation.
double fix_dt_until_mark()
Fixing time step until fixed time mark.
void set_permanent_constraint(double min_dt, double max_dt)
Sets permanent constraints for time step.
bool is_end() const
Returns true if the actual time is greater than or equal to the end time.
void next_time()
Proceed to the next time according to current estimated time step.
bool ge(double other_time) const
TimeMarks::iterator last(const TimeMark::Type &mask) const
DECLARE_INPUT_EXCEPTION(ExcTimeGovernorMessage,<< EI_Message::val)
bool is_current(const TimeMark::Type &mask) const
TimeMarks::iterator next(const TimeMark::Type &mask) const
double end_of_fixed_dt() const
double last_time_step_
Time step just before last_time.
Basic time management functionality for unsteady (and steady) solvers (class Equation).
static const Type none_type
Mask that matches no type of TimeMark.
static TimeMarks & marks()
double estimate_dt() const
Estimate choice of next time step according to actual setting of constraints.
void view(const char *name="") const
bool time_step_changed_
Flag is set if the time step has been changed (lasts only one time step).
double upper_constraint_
Upper constraint for the choice of the next time step.
TimeMark::Type eq_mark_type_
TimeMark type of the equation.
Global macros to enhance readability and debugging, general constants.
bool is_current(const TimeGovernor &tg, const TimeMark::Type &mask) const
bool lt(double other_time) const
void add_time_marks_grid(double step, TimeMark::Type mark_type=TimeMark::none_type) const
bool le(double other_time) const
TimeMark::Type equation_fixed_mark_type() const
TimeMark::Type equation_mark_type() const
bool is_changed_dt() const
int set_lower_constraint(double lower)
Sets lower constraint for the next time step estimating.
double lower_constraint() const
static Input::Type::Record input_type
This class is a collection of time marks to manage various events occurring during simulation time...
double end_of_fixed_dt_interval_
End of interval if fixed time step.
bool steady_
True if the time governor is used for steady problem.
bool is_steady() const
Returns true if the time governor is used for steady problem.
double max_time_step_
Permanent upper limit for the time step.
int set_upper_constraint(double upper)
Sets upper constraint for the next time step estimating.
static const double time_step_lower_bound
Technical bound for the time step given by finite precision.
double time() const
Getter for the time of the TimeMark.
double fixed_time_step_
Next fixed time step.
bool gt(double other_time) const
double time_
End of actual time interval; i.e. where the solution is computed.
static const double inf_time
Infinity time used for steady case.
double min_time_step_
Permanent lower limit for the time step.
TimeMarks::iterator last(const TimeGovernor &tg, const TimeMark::Type &mask) const