Flow123d  JS_before_hm-1575-ga41e096
Public 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 (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...
 

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

Member Function Documentation

double TimeUnitConversion::get_coef ( ) const
inline

Return global time unit coefficient of equation stored in coeff_.

Definition at line 81 of file time_governor.hh.

std::string TimeUnitConversion::get_unit_string ( ) const
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.

Member Data Documentation

double TimeUnitConversion::coef_
protected

Conversion coefficient of all time values within the equation.

Definition at line 94 of file time_governor.hh.

std::string TimeUnitConversion::unit_string_
protected

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

Definition at line 97 of file time_governor.hh.


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