Flow123d  3.9.0-72cb42cb8
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
TimeUnitConversion Class Reference

Helper class storing unit conversion coefficient and functionality for conversion of units. More...

#include <time_governor.hh>

Collaboration diagram for TimeUnitConversion:
Collaboration graph
[legend]

Public Member Functions

 TimeUnitConversion ()
 
 TimeUnitConversion (const Input::Record &input)
 
double read_time (Input::Iterator< Input::Tuple > time_it, double default_time) const
 
double read_coef (Input::Iterator< Input::Record > unit_it) const
 
double get_coef () const
 
std::string get_unit_string () const
 

Static Public Member Functions

static Input::Type::Default get_input_default ()
 

Protected Member Functions

double read_unit_coef_from_input (const Input::Record &input) const
 Reads the Unit record and computes the coef. More...
 

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...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ TimeUnitConversion() [1/2]

TimeUnitConversion::TimeUnitConversion ( )

Definition at line 144 of file time_governor.cc.

◆ TimeUnitConversion() [2/2]

TimeUnitConversion::TimeUnitConversion ( const Input::Record input)

Definition at line 147 of file time_governor.cc.

Member Function Documentation

◆ get_coef()

double TimeUnitConversion::get_coef ( ) const
inline

Return global time unit coefficient of equation stored in coeff_.

Definition at line 87 of file time_governor.hh.

◆ get_input_default()

static Input::Type::Default TimeUnitConversion::get_input_default ( )
inlinestatic

Definition at line 66 of file time_governor.hh.

Here is the caller graph for this function:

◆ get_unit_string()

std::string TimeUnitConversion::get_unit_string ( ) const
inline

Return string representation of global time unit.

Definition at line 94 of file time_governor.hh.

◆ read_coef()

double TimeUnitConversion::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 coeff_, if iterator is not defined.

Definition at line 189 of file time_governor.cc.

◆ read_time()

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 169 of file time_governor.cc.

◆ read_unit_coef_from_input()

double TimeUnitConversion::read_unit_coef_from_input ( const Input::Record input) const
protected

Reads the Unit record and computes the coef.

Definition at line 153 of file time_governor.cc.

Here is the caller graph for this function:

Member Data Documentation

◆ coef_

double TimeUnitConversion::coef_
protected

Conversion coefficient of all time values within the equation.

Definition at line 104 of file time_governor.hh.

◆ unit_string_

std::string TimeUnitConversion::unit_string_
protected

String representation of global unit of all time values within the equation.

Definition at line 107 of file time_governor.hh.


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