Skip to main content
Definition of a unit.

Members

Public functions

Function Unit

Return type:

Function Unit

Create a Unit with given name. Parameters:
  • std::string const & symbol: [in] Symbol name of unit.
Return type:

Function Unit

Create a Unit with a given homogeneity from given unit_system. Parameters:
  • Homogeneity const & homogeneity: [in] Measurement quantity.
  • UnitSystem const & unit_system: [in] Unit system from which to create unit.
Return type:

Function Unit

Create a Unit with a given homogeneity and a given symbol. Parameters:
  • Homogeneity const & homogeneity: [in] Measurement quantity.
  • std::string const & symbol: [in] Symbol name of unit.
Return type:

Function operator==

Parameters:
  • Unit const & unit
Return type: bool

Function conversionFactorTo

Returns: Multiplication factor required to convert to new unit system. Parameters:
  • Unit const & rhs: [in] Unit system to which to convert.
Return type: double

Function shiftTo

Returns: Additive factor required to convert to new unit system. Parameters:
  • Unit const & rhs: [in] Unit system to which to convert.
Return type: double

Function isHomogeneousTo

Returns: Indication of same measurement quantities. Parameters:
  • Unit const &
Return type: bool

Function homogeneity

Returns: Measurement quantity. Return type: ansys::dpf::Homogeneity const &

Function toString

Returns: Symbol name. Return type: std::string const &

Function c_str

Returns: Symbol name. Return type: const char *

Function multiplyWith

Returns: new unit that is the product of this unit and another one. Works only for in process API. Parameters:
  • Unit const & rhs
Return type: Unit

Function divideBy

Returns: new unit that is the division of this unit by another one. Works only for in process API. Parameters:
  • Unit const & rhs
Return type: Unit

Function invert

Returns: new the inverse unit to this one. Works only for in process API. Return type: Unit

Function pow

Returns: the powed unit. Works only for in process API. Parameters:
  • double power
Return type: Unit

Public static functions

Function HomogeneityIdToHomogeneity

Returns: the homogeneity corresponding to a homogeneity id Parameters:
  • int id
Return type: Homogeneity