Flow123d
JS_before_hm-62-ge56f9d5
|
Helper class storing unit conversion coefficient and functionality for conversion of units. More...
#include <time_governor.hh>
Public Member Functions | |
TimeUnitConversion (std::string user_defined_unit) | |
TimeUnitConversion () | |
double | read_time (Input::Iterator< Input::Tuple > time_it, double default_time) const |
double | read_coef (Input::Iterator< std::string > unit_it) const |
double | get_coef () const |
std::string | get_unit_string () const |
Protected Attributes | |
double | coef_ |
Conversion coefficient of all time values within the equation. More... | |
std::string | unit_string_ |
String representation of global unit of all time values within the equation. More... | |
Helper class storing unit conversion coefficient and functionality for conversion of units.
This class has created one instance for each TimeGovernor object. This object is shared with all TimeSteps.
Definition at line 58 of file time_governor.hh.
TimeUnitConversion::TimeUnitConversion | ( | std::string | user_defined_unit | ) |
Definition at line 138 of file time_governor.cc.
TimeUnitConversion::TimeUnitConversion | ( | ) |
Definition at line 146 of file time_governor.cc.
|
inline |
Return global time unit coefficient of equation stored in coeff_.
Definition at line 81 of file time_governor.hh.
|
inline |
Return string representation of global time unit.
Definition at line 88 of file time_governor.hh.
double TimeUnitConversion::read_coef | ( | Input::Iterator< std::string > | unit_it | ) | const |
Read and return time unit coefficient given in unit_it or global coefficient of equation stored in coeff_, if iterator is not defined.
Definition at line 168 of file time_governor.cc.
double TimeUnitConversion::read_time | ( | Input::Iterator< Input::Tuple > | time_it, |
double | default_time | ||
) | const |
Read and return time value multiplied by coefficient of given unit or global coefficient of equation stored in coeff_. If time Tuple is not defined (e. g. Tuple is optional key) return default_time value.
Definition at line 151 of file time_governor.cc.
|
protected |
Conversion coefficient of all time values within the equation.
Definition at line 94 of file time_governor.hh.
|
protected |
String representation of global unit of all time values within the equation.
Definition at line 97 of file time_governor.hh.