Class ansys::dpf::Unit
Last update: 25.03.2026
Definition of a unit.
Members
- c_str
- conversionFactorTo
- divideBy
- homogeneity
- HomogeneityIdToHomogeneity
- invert
- isHomogeneousTo
- multiplyWith
- operator==
- pow
- shiftTo
- toString
- Unit
- Unit
- Unit
- Unit
Public functions
Function Unit
ansys::dpf::Unit::Unit()
Return type:
Function Unit
ansys::dpf::Unit::Unit(std::string const &symbol)
Create a Unit with given name.
Parameters:
- std::string const & symbol: [in] Symbol name of unit.
Return type:
Function Unit
ansys::dpf::Unit::Unit(Homogeneity const &homogeneity, UnitSystem const &unit_system)
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
ansys::dpf::Unit::Unit(Homogeneity const &homogeneity, std::string const &symbol)
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==
bool ansys::dpf::Unit::operator==(Unit const &unit) const
Parameters:
- Unit const & unit
Return type: bool
Function conversionFactorTo
double ansys::dpf::Unit::conversionFactorTo(Unit const &rhs) const
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
double ansys::dpf::Unit::shiftTo(Unit const &rhs) const
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
bool ansys::dpf::Unit::isHomogeneousTo(Unit const &) const
Returns:
Indication of same measurement quantities.
Parameters:
- Unit const &
Return type: bool
Function homogeneity
ansys::dpf::Homogeneity const & ansys::dpf::Unit::homogeneity() const
Returns:
Measurement quantity.
Return type: ansys::dpf::Homogeneity const &
Function toString
std::string const & ansys::dpf::Unit::toString() const
Returns:
Symbol name.
Return type: std::string const &
Function c_str
const char * ansys::dpf::Unit::c_str() const
Returns:
Symbol name.
Return type: const char *
Function multiplyWith
Unit ansys::dpf::Unit::multiplyWith(Unit const &rhs) const
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
Unit ansys::dpf::Unit::divideBy(Unit const &rhs) const
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
Unit ansys::dpf::Unit::invert() const
Returns:
new the inverse unit to this one.
Works only for in process API.
Return type: Unit
Function pow
Unit ansys::dpf::Unit::pow(double power) const
Returns:
the powed unit.
Works only for in process API.
Parameters:
- double power
Return type: Unit
Public static functions
Function HomogeneityIdToHomogeneity
static Homogeneity ansys::dpf::Unit::HomogeneityIdToHomogeneity(int id)
Returns:
the homogeneity corresponding to a homogeneity id
Parameters:
- int id
Return type: Homogeneity