Flow123d  master-ac4164ba5
Classes | Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
TimeGovernor Class Reference

Basic time management functionality for unsteady (and steady) solvers (class Equation). More...

#include <time_governor.hh>

Collaboration diagram for TimeGovernor:
Collaboration graph
[legend]

Classes

struct  DtLimitRow
 Structure that stores one record of DT limit. More...
 

Public Member Functions

 DECLARE_INPUT_EXCEPTION (ExcTimeGovernorMessage,<< EI_Message::val)
 
 TYPEDEF_ERR_INFO (EI_Index, int)
 
 TYPEDEF_ERR_INFO (EI_BackIndex, unsigned int)
 
 TYPEDEF_ERR_INFO (EI_HistorySize, unsigned int)
 
 DECLARE_EXCEPTION (ExcMissingTimeStep,<< "Time step index: "<< EI_Index::val<< ", history index: "<< EI_BackIndex::val<< " out of history of size: "<< EI_HistorySize::val)
 
 TimeGovernor (const Input::Record &input, TimeMark::Type fixed_time_mask=TimeMark::none_type, bool timestep_output=true)
 Constructor for unsteady solvers. More...
 
 TimeGovernor (double init_time=0.0, TimeMark::Type fixed_time_mask=TimeMark::none_type)
 Default constructor - steady time governor. More...
 
 TimeGovernor (double init_time, double dt)
 
 ~TimeGovernor ()
 
bool is_default ()
 
void set_dt_limits (double min_dt, double max_dt, Input::Array dt_limits_list)
 Sets dt limits for time dependent DT limits in simulation. More...
 
int set_upper_constraint (double upper, std::string message)
 Sets upper constraint for the next time step estimating. More...
 
int set_lower_constraint (double lower, std::string message)
 Sets lower constraint for the next time step estimating. More...
 
double fix_dt_until_mark ()
 Fixing time step until fixed time mark. More...
 
void next_time ()
 Proceed to the next time according to current estimated time step. More...
 
double reduce_timestep (double factor)
 Force timestep reduction in particular in the case of failure of the non-linear solver. More...
 
const TimeStepstep (int index=-1) const
 
TimeMark::Type equation_mark_type () const
 
TimeMark::Type equation_fixed_mark_type () const
 
void add_time_marks_grid (double step, TimeMark::Type mark_type=TimeMark::none_type) const
 
bool is_current (const TimeMark::Type &mask) const
 
TimeMarks::iterator next (const TimeMark::Type &mask) const
 
TimeMarks::iterator last (const TimeMark::Type &mask) const
 
double upper_constraint () const
 
double lower_constraint () const
 
double end_of_fixed_dt () const
 
bool is_changed_dt () const
 
double init_time () const
 
double t () const
 
double last_dt () const
 
double last_t () const
 
double dt () const
 
double estimate_dt () const
 Estimate choice of next time step according to actual setting of constraints. More...
 
double estimate_time () const
 
double end_time () const
 End time. More...
 
bool is_end () const
 Returns true if the actual time is greater than or equal to the end time. More...
 
bool is_steady () const
 Returns true if the time governor is used for steady problem. More...
 
int tlevel () const
 
void view (const char *name="") const
 
double read_time (Input::Iterator< Input::Tuple > time_it, double default_time=std::numeric_limits< double >::quiet_NaN()) const
 
double read_coef (Input::Iterator< Input::Record > unit_it) const
 
double get_coef () const
 
std::shared_ptr< TimeUnitConversionget_unit_conversion () const
 Getter for time unit conversion object. More...
 

Static Public Member Functions

static const Input::Type::Recordget_input_type ()
 
static const Input::Type::Tupleget_input_time_type (double lower_bound=-std::numeric_limits< double >::max(), double upper_bound=std::numeric_limits< double >::max())
 
static TimeMarksmarks ()
 

Static Public Attributes

static const double max_end_time = MAX_END_TIME
 
static const double inf_time = numeric_limits<double>::infinity()
 Infinity time used for steady case. More...
 
static const double time_step_precision = 16*numeric_limits<double>::epsilon()
 

Private Member Functions

void init_common (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 values to other. More...
 
void set_permanent_constraint ()
 Sets permanent constraints for actual time step. More...
 

Private Attributes

boost::circular_buffer< TimeSteprecent_steps_
 Circular buffer of recent time steps. Implicit size is 3. More...
 
double init_time_
 Initial time. More...
 
double end_of_fixed_dt_interval_
 End of interval if fixed time step. More...
 
double end_time_
 End time of the simulation. More...
 
double fixed_time_step_
 Next fixed time step. More...
 
bool is_time_step_fixed_
 Flag that is set when the fixed step is set (lasts only one time step). More...
 
bool time_step_changed_
 Flag is set if the time step has been changed (lasts only one time step). More...
 
std::string upper_constraint_message_
 Description of the upper constraint. More...
 
std::string lower_constraint_message_
 Description of the upper constraint. More...
 
double upper_constraint_
 Upper constraint for the choice of the next time step. More...
 
double lower_constraint_
 Lower constraint for the choice of the next time step. More...
 
double max_time_step_
 Permanent upper limit for the time step. More...
 
double min_time_step_
 Permanent lower limit for the time step. More...
 
double last_upper_constraint_
 Upper constraint used for choice of current time. More...
 
double last_lower_constraint_
 Lower constraint used for choice of current time. More...
 
TimeMark::Type eq_mark_type_
 TimeMark type of the equation. More...
 
bool steady_
 True if the time governor is used for steady problem. More...
 
std::shared_ptr< TimeUnitConversiontime_unit_conversion_
 Conversion unit of all time values within the equation. More...
 
std::vector< DtLimitRowdt_limits_table_
 Table of DT limits. More...
 
unsigned int dt_limits_pos_
 Index to actual position of DT limits. More...
 
FilePath timesteps_output_file_
 File path for timesteps_output_ stream. More...
 
std::ofstream timesteps_output_
 Handle for file for output time steps to YAML format. More...
 
double last_printed_timestep_
 Store last printed time to YAML output, try multiplicity output of one time. More...
 
bool timestep_output_
 Special flag allows forbid output time steps during multiple initialization of TimeGovernor. More...
 
bool limits_time_marks_
 Allows add all times defined in dt_limits_table_ to list of TimeMarks. More...
 
friend TimeMarks
 

Static Private Attributes

static const unsigned int size_of_recent_steps_ = 3
 
static TimeMarks time_marks_ = TimeMarks()
 

Detailed Description

Basic time management functionality for unsteady (and steady) solvers (class Equation).

Common features and unsteady time governor (TG)

This class provides algorithm for selecting next time step, and information about current time step frame. Step estimating is constrained by several bounds (permanent maximal and minimal time step, upper and lower constraint of time step). The permanent constraints are set in the constructor from the input record so that user can set the time step constraints for the whole simulation. Function set_dt_limits() should be used only in very specific cases and possibly right after the constructor before using other functions of TG.

Choice of the very next time step can be constrained using functions set_upper_constraint() and set_lower_constraint(). Lower and upper constraints are set equal to permanent ones in the constructor and can only become stricter. If one tries to set these constraints outside the interval of the previous constraints, nothing is changed and a specified value is returned. Upper and lower constraints are reset in function next_time() to the permanent constraints.

The later one can be called multiple times with various constraint values and we use the minimum of them. Function next_time() choose the next time step in such a way that it meets actual constraints and a uniform discrete time grid with this step hits the nearest fixed time in lowest possible number of steps.

The fixed times are time marks of TimeMarks object passed at construction time with particular mask.

There is just one set of time marks for the whole problem. Therefore TimeMarks object is static and is shared umong all the equations and time governors. Each equation creates its own specific time mark type.

Information provided by TG includes:

Steady time governor

Steady TG can be constructed by default constructor (initial time is zero) or by constructor with initial time as parameter. End time and time step are set to infinity. One can check if the time governor is steady by calling is_steady(). Calling estimate_dt() will return infinity.

Setting constraints have no consequences. Calling fix_dt_until_mark() will only return zero and will not do anything.

The steady TG works in two states. At first the time is set to initial and time level is equal zero. To use steady TG properly one should call next_time() after the computation of steady problem is done. Current time is then set to infinity, time level is set to 1 and calling estimate_dt() will return zero.

Note: For example class TransportNothing (which computes really nothing) uses also steady TG but it calls next_time() immediately after TG's construction. This means that the 'computation'of transport is done.

Definition at line 317 of file time_governor.hh.

Constructor & Destructor Documentation

◆ TimeGovernor() [1/3]

TimeGovernor::TimeGovernor ( const Input::Record input,
TimeMark::Type  fixed_time_mask = TimeMark::none_type,
bool  timestep_output = true 
)

Constructor for unsteady solvers.

Parameters
inputaccessor to input data
fixed_time_maskTimeMark mask used to select fixed time marks from all the time marks.
timestep_outputenable/forbid output of time steps to YAML file This value is bitwise added to the default one defined in TimeMarks::type_fixed_time().

Definition at line 296 of file time_governor.cc.

◆ TimeGovernor() [2/3]

TimeGovernor::TimeGovernor ( double  init_time = 0.0,
TimeMark::Type  fixed_time_mask = TimeMark::none_type 
)
explicit

Default constructor - steady time governor.

OBSOLETE.

We can have "zero step" steady problem (no computation, e.g. EquationNothing) and one step steady problem (e.g. steady water flow).

Time is set to zero, time step and end time to infinity.

First call of next_time() pushes the actual time to infinity.

However, you have to use full constructor for the "steady problem" that has time-variable input data.

Has a private pointer to static TimeMarks and can access them by marks().

Definition at line 381 of file time_governor.cc.

◆ TimeGovernor() [3/3]

TimeGovernor::TimeGovernor ( double  init_time,
double  dt 
)

The aim of this constuctor is simple way to make a time governor without Input interface.

TODO: Partially tested as part of field test. Needs its own unit test.

Definition at line 353 of file time_governor.cc.

◆ ~TimeGovernor()

TimeGovernor::~TimeGovernor ( )

Destructor.

Definition at line 398 of file time_governor.cc.

Member Function Documentation

◆ add_time_marks_grid()

void TimeGovernor::add_time_marks_grid ( double  step,
TimeMark::Type  mark_type = TimeMark::none_type 
) const

Add sequence of time marks starting from the initial time up to the end time with given step. Time marks type combines given mark_type (none by default) and native mark type of the time governor.

Definition at line 608 of file time_governor.cc.

◆ DECLARE_EXCEPTION()

TimeGovernor::DECLARE_EXCEPTION ( ExcMissingTimeStep  ,
<< "Time step index: "<< EI_Index::val<< "  ,
history index:"<< EI_BackIndex::val<< " out of history of size:"<< EI_HistorySize::val   
)

◆ DECLARE_INPUT_EXCEPTION()

TimeGovernor::DECLARE_INPUT_EXCEPTION ( ExcTimeGovernorMessage  ,
<< EI_Message::val   
)

◆ dt()

double TimeGovernor::dt ( ) const
inline

Length of actual time interval; i.e. the actual time step.

Definition at line 565 of file time_governor.hh.

Here is the caller graph for this function:

◆ end_of_fixed_dt()

double TimeGovernor::end_of_fixed_dt ( ) const
inline

End of interval with currently fixed time step. Can be changed by next call of method fix_dt_until_mark.

Definition at line 523 of file time_governor.hh.

◆ end_time()

double TimeGovernor::end_time ( ) const
inline

End time.

Definition at line 591 of file time_governor.hh.

Here is the caller graph for this function:

◆ equation_fixed_mark_type()

TimeMark::Type TimeGovernor::equation_fixed_mark_type ( ) const
inline

Specific time mark of the fixed times of the equation owning the time governor.

Definition at line 481 of file time_governor.hh.

Here is the caller graph for this function:

◆ equation_mark_type()

TimeMark::Type TimeGovernor::equation_mark_type ( ) const
inline

Specific time mark of the equation owning the time governor.

Definition at line 475 of file time_governor.hh.

Here is the caller graph for this function:

◆ estimate_dt()

double TimeGovernor::estimate_dt ( ) const

Estimate choice of next time step according to actual setting of constraints.

Precedence of constraints:

  1. meet next fixed time (always satisfied)
  2. permanent upper constraint (always satisfied)
  3. upper constraint (always satisfied)
  4. lower constraint (satisfied if not in conflict with 1.)
  5. permanent lower constraint (satisfied if 4.)
  6. else writes the difference between lower constraint and estimated time step
  7. If there are more then one step to the next fixed time, try to use the last time step if it is nearly the same.

Definition at line 631 of file time_governor.cc.

Here is the caller graph for this function:

◆ estimate_time()

double TimeGovernor::estimate_time ( ) const
inline

Estimate next time.

Definition at line 587 of file time_governor.hh.

Here is the caller graph for this function:

◆ fix_dt_until_mark()

double TimeGovernor::fix_dt_until_mark ( )

Fixing time step until fixed time mark.

Fix time step until first fixed time mark. When called inside an already fixed interval, it overwrites previous setting.

Returns
actual end of fixed time step.

Definition at line 597 of file time_governor.cc.

Here is the caller graph for this function:

◆ get_coef()

double TimeGovernor::get_coef ( ) const

Return global time unit coefficient of equation. Shortcut for time_unit_conversion_ function.

Definition at line 805 of file time_governor.cc.

Here is the caller graph for this function:

◆ get_input_time_type()

const Tuple & TimeGovernor::get_input_time_type ( double  lower_bound = -std::numeric_limits<double>::max(),
double  upper_bound = std::numeric_limits<double>::max() 
)
static

Definition at line 47 of file time_governor.cc.

Here is the caller graph for this function:

◆ get_input_type()

const Record & TimeGovernor::get_input_type ( )
static

Definition at line 63 of file time_governor.cc.

Here is the caller graph for this function:

◆ get_unit_conversion()

std::shared_ptr< TimeUnitConversion > TimeGovernor::get_unit_conversion ( ) const

Getter for time unit conversion object.

Definition at line 810 of file time_governor.cc.

Here is the caller graph for this function:

◆ init_common()

void TimeGovernor::init_common ( double  init_time,
double  end_time,
TimeMark::Type  type 
)
private

Common part of the constructors. Set most important parameters, check they are valid and set default values to other.

Set main parameters to given values. Check they are correct. Set soft and permanent constrains to the same, the least restricting values. Set time marks for the start time and end time (if finite).

Definition at line 407 of file time_governor.cc.

Here is the caller graph for this function:

◆ init_time()

double TimeGovernor::init_time ( ) const
inline

Initial time getter.

Definition at line 536 of file time_governor.hh.

Here is the caller graph for this function:

◆ is_changed_dt()

bool TimeGovernor::is_changed_dt ( ) const
inline

Getter for dt_changed. Returns whether the time step has been changed.

Definition at line 529 of file time_governor.hh.

Here is the caller graph for this function:

◆ is_current()

bool TimeGovernor::is_current ( const TimeMark::Type mask) const

Simpler interface to TimeMarks::is_current().

Definition at line 623 of file time_governor.cc.

◆ is_default()

bool TimeGovernor::is_default ( )
inline

Returns true if the time governor was set from default values

Definition at line 388 of file time_governor.hh.

Here is the caller graph for this function:

◆ is_end()

bool TimeGovernor::is_end ( ) const
inline

Returns true if the actual time is greater than or equal to the end time.

Definition at line 595 of file time_governor.hh.

Here is the caller graph for this function:

◆ is_steady()

bool TimeGovernor::is_steady ( ) const
inline

Returns true if the time governor is used for steady problem.

Definition at line 599 of file time_governor.hh.

◆ last()

TimeMarks::iterator TimeGovernor::last ( const TimeMark::Type mask) const
inline

Simpler interface to TimeMarks::last().

Definition at line 505 of file time_governor.hh.

◆ last_dt()

double TimeGovernor::last_dt ( ) const
inline

Previous time step.

Definition at line 548 of file time_governor.hh.

Here is the caller graph for this function:

◆ last_t()

double TimeGovernor::last_t ( ) const
inline

Previous time.

Definition at line 556 of file time_governor.hh.

Here is the caller graph for this function:

◆ lower_constraint()

double TimeGovernor::lower_constraint ( ) const
inline

Returns lower constraint.

Definition at line 517 of file time_governor.hh.

Here is the caller graph for this function:

◆ marks()

static TimeMarks& TimeGovernor::marks ( )
inlinestatic

Getter for time marks.

Definition at line 338 of file time_governor.hh.

Here is the caller graph for this function:

◆ next()

TimeMarks::iterator TimeGovernor::next ( const TimeMark::Type mask) const
inline

Simpler interface to TimeMarks::next().

Definition at line 499 of file time_governor.hh.

◆ next_time()

void TimeGovernor::next_time ( )

Proceed to the next time according to current estimated time step.

The timestep constraints are relaxed to the permanent constraints.

Definition at line 670 of file time_governor.cc.

Here is the caller graph for this function:

◆ read_coef()

double TimeGovernor::read_coef ( Input::Iterator< Input::Record unit_it) const

Read and return time unit coefficient given in unit_it or global coefficient of equation stored in time_unit_conversion_, if iterator is not defined. Shortcut for time_unit_conversion_ function.

Definition at line 799 of file time_governor.cc.

◆ read_time()

double TimeGovernor::read_time ( Input::Iterator< Input::Tuple time_it,
double  default_time = std::numeric_limits<double>::quiet_NaN() 
) const

Read and return time value multiplied by coefficient of given unit or global coefficient of equation stored in time_unit_conversion_. If time Tuple is not defined (e. g. Tuple is optional key) return default_time value. Shortcut for time_unit_conversion_ function.

Definition at line 793 of file time_governor.cc.

Here is the caller graph for this function:

◆ reduce_timestep()

double TimeGovernor::reduce_timestep ( double  factor)

Force timestep reduction in particular in the case of failure of the non-linear solver.

Calling this method also force immediate end of the fixed timestep interval. Returns true reduce factor used. It is larger then given factor if we hit the lower timestep constraint.

TODO: How to keep constraints active for the last next_time call.

Definition at line 731 of file time_governor.cc.

◆ set_dt_limits()

void TimeGovernor::set_dt_limits ( double  min_dt,
double  max_dt,
Input::Array  dt_limits_list 
)

Sets dt limits for time dependent DT limits in simulation.

This function should not be normally used. These values are to be set in constructor from the input record or by default.

Parameters
min_dtis the minimal value allowed for time step
max_dtis the maximal value allowed for time step
dt_limits_listlist of time dependent values of minimal and maximal value allowed for time step

Definition at line 465 of file time_governor.cc.

Here is the caller graph for this function:

◆ set_lower_constraint()

int TimeGovernor::set_lower_constraint ( double  lower,
std::string  message 
)

Sets lower constraint for the next time step estimating.

This function can only make the constraint stricter. Lower constraint is reset to min_dt after the next_time() call. The return value mimics result of the comparison: current constraint compared to

Parameters
upper.In particular the return values is:
  • -1: Current upper constraint is less then the
lower.No change happen.
  • 0: Current constraint interval contains the
lower.The lower constraint is set.
  • +1: Current upper constraint is greater then the
lower.No change happen.

Sets lower constraint for the next time step estimating.

Parameters
loweris the lower constraint for time step
messagedescribes the origin of the constraint
Returns
-1, 0 or 1 according to the success.
See also
set_upper_constrain().

Definition at line 576 of file time_governor.cc.

Here is the caller graph for this function:

◆ set_permanent_constraint()

void TimeGovernor::set_permanent_constraint ( )
private

Sets permanent constraints for actual time step.

Definition at line 539 of file time_governor.cc.

Here is the caller graph for this function:

◆ set_upper_constraint()

int TimeGovernor::set_upper_constraint ( double  upper,
std::string  message 
)

Sets upper constraint for the next time step estimating.

This function can only make the constraint stricter. Upper constraint is reset to max_dt after the next_time() call. The return value mimics result of the comparison: current constraint compared to

Parameters
upper.
messagedescribes the origin of the constraint In particular the return values is:
  • -1: Current upper constraint is less then the
upper.No change happen.
  • 0: Current constraint interval contains the
upper.The upper constraint is set.
  • +1: Current lower constraint is greater then the
upper.No change happen.

Definition at line 555 of file time_governor.cc.

Here is the caller graph for this function:

◆ step()

const TimeStep & TimeGovernor::step ( int  index = -1) const

Returns reference to required time step in the recent history. Without parameter the actual time step is returned. Use negative indices to get recent time steps: step(-1) the actual step, step(-2) the last one. Use positive index to get time step by its index: step(0) the first time step. However only limited number of last time steps is stored. If the time step is not accessible any more, we throw an exception ExcMissingTimeStep.

Definition at line 756 of file time_governor.cc.

◆ t()

double TimeGovernor::t ( ) const
inline

End of actual time interval; i.e. where the solution is computed.

Definition at line 542 of file time_governor.hh.

Here is the caller graph for this function:

◆ tlevel()

int TimeGovernor::tlevel ( ) const
inline

Returns the time level.

Definition at line 607 of file time_governor.hh.

Here is the caller graph for this function:

◆ TYPEDEF_ERR_INFO() [1/3]

TimeGovernor::TYPEDEF_ERR_INFO ( EI_BackIndex  ,
unsigned int   
)

◆ TYPEDEF_ERR_INFO() [2/3]

TimeGovernor::TYPEDEF_ERR_INFO ( EI_HistorySize  ,
unsigned int   
)

◆ TYPEDEF_ERR_INFO() [3/3]

TimeGovernor::TYPEDEF_ERR_INFO ( EI_Index  ,
int   
)

◆ upper_constraint()

double TimeGovernor::upper_constraint ( ) const
inline

Getter for upper constrain.

Definition at line 511 of file time_governor.hh.

Here is the caller graph for this function:

◆ view()

void TimeGovernor::view ( const char *  name = "") const

Prints output of TimeGovernor.

Parameters
nameis the name of time governor that you want to show up in output (just for your convenience)

Definition at line 772 of file time_governor.cc.

Here is the caller graph for this function:

Member Data Documentation

◆ dt_limits_pos_

unsigned int TimeGovernor::dt_limits_pos_
private

Index to actual position of DT limits.

Definition at line 744 of file time_governor.hh.

◆ dt_limits_table_

std::vector<DtLimitRow> TimeGovernor::dt_limits_table_
private

Table of DT limits.

Definition at line 741 of file time_governor.hh.

◆ end_of_fixed_dt_interval_

double TimeGovernor::end_of_fixed_dt_interval_
private

End of interval if fixed time step.

Definition at line 694 of file time_governor.hh.

◆ end_time_

double TimeGovernor::end_time_
private

End time of the simulation.

Definition at line 696 of file time_governor.hh.

◆ eq_mark_type_

TimeMark::Type TimeGovernor::eq_mark_type_
private

TimeMark type of the equation.

Definition at line 732 of file time_governor.hh.

◆ fixed_time_step_

double TimeGovernor::fixed_time_step_
private

Next fixed time step.

Definition at line 699 of file time_governor.hh.

◆ inf_time

const double TimeGovernor::inf_time = numeric_limits<double>::infinity()
static

Infinity time used for steady case.

Definition at line 645 of file time_governor.hh.

◆ init_time_

double TimeGovernor::init_time_
private

Initial time.

Definition at line 692 of file time_governor.hh.

◆ is_time_step_fixed_

bool TimeGovernor::is_time_step_fixed_
private

Flag that is set when the fixed step is set (lasts only one time step).

Definition at line 701 of file time_governor.hh.

◆ last_lower_constraint_

double TimeGovernor::last_lower_constraint_
private

Lower constraint used for choice of current time.

Definition at line 721 of file time_governor.hh.

◆ last_printed_timestep_

double TimeGovernor::last_printed_timestep_
private

Store last printed time to YAML output, try multiplicity output of one time.

Definition at line 753 of file time_governor.hh.

◆ last_upper_constraint_

double TimeGovernor::last_upper_constraint_
private

Upper constraint used for choice of current time.

Definition at line 719 of file time_governor.hh.

◆ limits_time_marks_

bool TimeGovernor::limits_time_marks_
private

Allows add all times defined in dt_limits_table_ to list of TimeMarks.

Definition at line 759 of file time_governor.hh.

◆ lower_constraint_

double TimeGovernor::lower_constraint_
private

Lower constraint for the choice of the next time step.

Definition at line 712 of file time_governor.hh.

◆ lower_constraint_message_

std::string TimeGovernor::lower_constraint_message_
private

Description of the upper constraint.

Definition at line 708 of file time_governor.hh.

◆ max_end_time

const double TimeGovernor::max_end_time = MAX_END_TIME
static

Definition at line 642 of file time_governor.hh.

◆ max_time_step_

double TimeGovernor::max_time_step_
private

Permanent upper limit for the time step.

Definition at line 714 of file time_governor.hh.

◆ min_time_step_

double TimeGovernor::min_time_step_
private

Permanent lower limit for the time step.

Definition at line 716 of file time_governor.hh.

◆ recent_steps_

boost::circular_buffer<TimeStep> TimeGovernor::recent_steps_
private

Circular buffer of recent time steps. Implicit size is 3.

Definition at line 690 of file time_governor.hh.

◆ size_of_recent_steps_

const unsigned int TimeGovernor::size_of_recent_steps_ = 3
staticprivate

Size of the time step buffer, i.e. recent_time_steps_.

Definition at line 687 of file time_governor.hh.

◆ steady_

bool TimeGovernor::steady_
private

True if the time governor is used for steady problem.

Definition at line 735 of file time_governor.hh.

◆ time_marks_

TimeMarks TimeGovernor::time_marks_ = TimeMarks()
staticprivate

When the next time is chosen we need only the lowest fix time. Therefore we use minimum priority queue of doubles based on the vector container. This is one global set of time marks for the whole problem and is shared among all equations. Therefore this object is static constant pointer.

Definition at line 729 of file time_governor.hh.

◆ time_step_changed_

bool TimeGovernor::time_step_changed_
private

Flag is set if the time step has been changed (lasts only one time step).

Definition at line 703 of file time_governor.hh.

◆ time_step_precision

const double TimeGovernor::time_step_precision = 16*numeric_limits<double>::epsilon()
static

Rounding precision for computing time_step. Used as technical lower bound for the time step.

Definition at line 651 of file time_governor.hh.

◆ time_unit_conversion_

std::shared_ptr<TimeUnitConversion> TimeGovernor::time_unit_conversion_
private

Conversion unit of all time values within the equation.

Definition at line 738 of file time_governor.hh.

◆ TimeMarks

friend TimeGovernor::TimeMarks
private

Definition at line 761 of file time_governor.hh.

◆ timestep_output_

bool TimeGovernor::timestep_output_
private

Special flag allows forbid output time steps during multiple initialization of TimeGovernor.

Definition at line 756 of file time_governor.hh.

◆ timesteps_output_

std::ofstream TimeGovernor::timesteps_output_
private

Handle for file for output time steps to YAML format.

Definition at line 750 of file time_governor.hh.

◆ timesteps_output_file_

FilePath TimeGovernor::timesteps_output_file_
private

File path for timesteps_output_ stream.

Definition at line 747 of file time_governor.hh.

◆ upper_constraint_

double TimeGovernor::upper_constraint_
private

Upper constraint for the choice of the next time step.

Definition at line 710 of file time_governor.hh.

◆ upper_constraint_message_

std::string TimeGovernor::upper_constraint_message_
private

Description of the upper constraint.

Definition at line 706 of file time_governor.hh.


The documentation for this class was generated from the following files: