ansys::dpf::Unit Class Reference
Last update: 16.07.2025#include <dpf_api.h>
Public Member Functions | |
| Unit (std::string const &symbol) | |
| Unit (Homogeneity const &homogeneity, UnitSystem const &unit_system) | |
| bool | operator== (Unit const &unit) const |
| double | conversionFactorTo (Unit const &rhs) const |
| double | shiftTo (Unit const &rhs) const |
| bool | isHomogeneousTo (Unit const &) const |
| ansys::dpf::Homogeneity const & | homogeneity () const |
| std::string const & | toString () const |
| const char * | c_str () const |
Detailed Description
Definition of a unit.
- Examples
- CompleteRST.cpp, DataApis.cpp, DataExport.cpp, and ResultTest.cpp.
Constructor & Destructor Documentation
◆ Unit() [1/2]
|
explicit |
Create a Unit with given name.
- Parameters
-
[in] symbol Symbol name of unit.
◆ Unit() [2/2]
|
explicit |
Member Function Documentation
◆ c_str()
| const char * ansys::dpf::Unit::c_str | ( | ) | const |
- Returns
- Symbol name.
◆ conversionFactorTo()
| double ansys::dpf::Unit::conversionFactorTo | ( | Unit const & | rhs | ) | const |
- Returns
- Multiplication factor required to convert to new unit system.
- Parameters
-
[in] rhs Unit system to which to convert.
◆ homogeneity()
| ansys::dpf::Homogeneity const & ansys::dpf::Unit::homogeneity | ( | ) | const |
- Returns
- Measurement quantity.
- Examples
- CompleteRST.cpp, and ResultTest.cpp.
◆ isHomogeneousTo()
| bool ansys::dpf::Unit::isHomogeneousTo | ( | Unit const & | ) | const |
- Returns
- Indication of same measurement quantities.
◆ shiftTo()
| double ansys::dpf::Unit::shiftTo | ( | Unit const & | rhs | ) | const |
- Returns
- Additive factor required to convert to new unit system.
- Parameters
-
[in] rhs Unit system to which to convert.
◆ toString()
| std::string const & ansys::dpf::Unit::toString | ( | ) | const |
- Returns
- Symbol name.
- Examples
- CompleteRST.cpp.