Physical Quantities  v1.0.0
C++ library of physical quantities, physical models, and units of measure for scientific computing. https://github.com/acodcha/phq
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
PhQ::DimensionalSymmetricDyad< UnitType, NumericType > Class Template Reference

Abstract base class that represents any dimensional symmetric dyadic tensor physical quantity. Such a physical quantity is composed of a value and a unit of measure where the value is a three-dimensional symmetric dyadic tensor. More...

#include "DimensionalSymmetricDyad.hpp"

Public Member Functions

constexpr const PhQ::SymmetricDyad< NumericType > & Value () const noexcept
 Value of this physical quantity expressed in its standard unit of measure. More...
 
PhQ::SymmetricDyad< NumericType > Value (const UnitType unit) const
 Value of this physical quantity expressed in a given unit of measure. More...
 
template<UnitType NewUnit>
constexpr PhQ::SymmetricDyad< NumericType > StaticValue () const
 Value of this physical quantity expressed in a given unit of measure. This method can be evaluated statically at compile-time. More...
 
constexpr PhQ::SymmetricDyad< NumericType > & MutableValue () noexcept
 Returns the value of this physical quantity expressed in its standard unit of measure as a mutable value. More...
 
constexpr void SetValue (const PhQ::SymmetricDyad< NumericType > &value) noexcept
 Sets the value of this physical quantity expressed in its standard unit of measure to the given value. More...
 
std::string Print () const
 Prints this physical quantity as a string. This physical quantity's value is expressed in its standard unit of measure. More...
 
std::string Print (const UnitType unit) const
 Prints this physical quantity as a string. This physical quantity's value is expressed in the given unit of measure. More...
 
std::string JSON () const
 Serializes this physical quantity as a JSON message. This physical quantity's value is expressed in its standard unit of measure. More...
 
std::string JSON (const UnitType unit) const
 Serializes this physical quantity as a JSON message. This physical quantity's value is expressed in the given unit of measure. More...
 
std::string XML () const
 Serializes this physical quantity as an XML message. This physical quantity's value is expressed in its standard unit of measure. More...
 
std::string XML (const UnitType unit) const
 Serializes this physical quantity as an XML message. This physical quantity's value is expressed in the given unit of measure. More...
 
std::string YAML () const
 Serializes this physical quantity as a YAML message. This physical quantity's value is expressed in its standard unit of measure. More...
 
std::string YAML (const UnitType unit) const
 Serializes this physical quantity as a YAML message. This physical quantity's value is expressed in the given unit of measure. More...
 

Static Public Member Functions

static constexpr const PhQ::DimensionsDimensions ()
 Physical dimension set of this physical quantity. More...
 
static constexpr UnitType Unit ()
 Standard unit of measure for this physical quantity. This physical quantity's value is stored internally in this unit of measure. More...
 

Protected Member Functions

 DimensionalSymmetricDyad ()=default
 Default constructor. Constructs a dimensional symmetric dyadic tensor physical quantity with an uninitialized value. More...
 
constexpr DimensionalSymmetricDyad (const PhQ::SymmetricDyad< NumericType > &value)
 Constructor. Constructs a dimensional symmetric dyadic tensor physical quantity with a given value expressed in its standard unit of measure. More...
 
 DimensionalSymmetricDyad (const PhQ::SymmetricDyad< NumericType > &value, const UnitType unit)
 Constructor. Constructs a dimensional dimensional symmetric dyadic tensor physical quantity with a given value expressed in a given unit of measure. More...
 
 ~DimensionalSymmetricDyad () noexcept=default
 Destructor. Destroys this dimensional symmetric dyadic tensor physical quantity. More...
 
constexpr DimensionalSymmetricDyad (const DimensionalSymmetricDyad< UnitType, NumericType > &other)=default
 Copy constructor. Constructs a dimensional symmetric dyadic tensor physical quantity by copying another one. More...
 
template<typename OtherNumericType >
constexpr DimensionalSymmetricDyad (const DimensionalSymmetricDyad< UnitType, OtherNumericType > &other)
 Copy constructor. Constructs a dimensional symmetric dyadic tensor physical quantity by copying another one. More...
 
constexpr DimensionalSymmetricDyad (DimensionalSymmetricDyad< UnitType, NumericType > &&other) noexcept=default
 Move constructor. Constructs a dimensional symmetric dyadic tensor physical quantity by moving another one. More...
 
constexpr DimensionalSymmetricDyad< UnitType, NumericType > & operator= (const DimensionalSymmetricDyad< UnitType, NumericType > &other)=default
 Copy assignment operator. Assigns this dimensional symmetric dyadic tensor physical quantity by copying another one. More...
 
template<typename OtherNumericType >
constexpr DimensionalSymmetricDyad< UnitType, NumericType > & operator= (const DimensionalSymmetricDyad< UnitType, OtherNumericType > &other)
 Copy assignment operator. Assigns this dimensional symmetric dyadic tensor physical quantity by copying another one. More...
 
constexpr DimensionalSymmetricDyad< UnitType, NumericType > & operator= (DimensionalSymmetricDyad< UnitType, NumericType > &&other) noexcept=default
 Move assignment operator. Assigns this dimensional symmetric dyadic tensor physical quantity by moving another one. More...
 

Protected Attributes

PhQ::SymmetricDyad< NumericType > value
 Value of this physical quantity expressed in its standard unit of measure. More...
 

Detailed Description

template<typename UnitType, typename NumericType = double>
class PhQ::DimensionalSymmetricDyad< UnitType, NumericType >

Abstract base class that represents any dimensional symmetric dyadic tensor physical quantity. Such a physical quantity is composed of a value and a unit of measure where the value is a three-dimensional symmetric dyadic tensor.

Template Parameters
UnitTypeUnit of measure enumeration type.
NumericTypeFloating-point numeric type: float, double, or long double. Defaults to double if unspecified.

Definition at line 47 of file DimensionalSymmetricDyad.hpp.

Constructor & Destructor Documentation

◆ DimensionalSymmetricDyad() [1/6]

template<typename UnitType , typename NumericType = double>
PhQ::DimensionalSymmetricDyad< UnitType, NumericType >::DimensionalSymmetricDyad ( )
protecteddefault

Default constructor. Constructs a dimensional symmetric dyadic tensor physical quantity with an uninitialized value.

◆ DimensionalSymmetricDyad() [2/6]

template<typename UnitType , typename NumericType = double>
constexpr PhQ::DimensionalSymmetricDyad< UnitType, NumericType >::DimensionalSymmetricDyad ( const PhQ::SymmetricDyad< NumericType > &  value)
inlineexplicitconstexprprotected

Constructor. Constructs a dimensional symmetric dyadic tensor physical quantity with a given value expressed in its standard unit of measure.

Definition at line 168 of file DimensionalSymmetricDyad.hpp.

◆ DimensionalSymmetricDyad() [3/6]

template<typename UnitType , typename NumericType = double>
PhQ::DimensionalSymmetricDyad< UnitType, NumericType >::DimensionalSymmetricDyad ( const PhQ::SymmetricDyad< NumericType > &  value,
const UnitType  unit 
)
inlineprotected

Constructor. Constructs a dimensional dimensional symmetric dyadic tensor physical quantity with a given value expressed in a given unit of measure.

Definition at line 173 of file DimensionalSymmetricDyad.hpp.

References PhQ::ConvertInPlace().

◆ ~DimensionalSymmetricDyad()

template<typename UnitType , typename NumericType = double>
PhQ::DimensionalSymmetricDyad< UnitType, NumericType >::~DimensionalSymmetricDyad ( )
protecteddefaultnoexcept

Destructor. Destroys this dimensional symmetric dyadic tensor physical quantity.

◆ DimensionalSymmetricDyad() [4/6]

template<typename UnitType , typename NumericType = double>
constexpr PhQ::DimensionalSymmetricDyad< UnitType, NumericType >::DimensionalSymmetricDyad ( const DimensionalSymmetricDyad< UnitType, NumericType > &  other)
constexprprotecteddefault

Copy constructor. Constructs a dimensional symmetric dyadic tensor physical quantity by copying another one.

◆ DimensionalSymmetricDyad() [5/6]

template<typename UnitType , typename NumericType = double>
template<typename OtherNumericType >
constexpr PhQ::DimensionalSymmetricDyad< UnitType, NumericType >::DimensionalSymmetricDyad ( const DimensionalSymmetricDyad< UnitType, OtherNumericType > &  other)
inlineexplicitconstexprprotected

Copy constructor. Constructs a dimensional symmetric dyadic tensor physical quantity by copying another one.

Template Parameters
OtherNumericTypeFloating-point numeric type of the other physical quantity. Deduced automatically.

Definition at line 191 of file DimensionalSymmetricDyad.hpp.

◆ DimensionalSymmetricDyad() [6/6]

template<typename UnitType , typename NumericType = double>
constexpr PhQ::DimensionalSymmetricDyad< UnitType, NumericType >::DimensionalSymmetricDyad ( DimensionalSymmetricDyad< UnitType, NumericType > &&  other)
constexprprotecteddefaultnoexcept

Move constructor. Constructs a dimensional symmetric dyadic tensor physical quantity by moving another one.

Member Function Documentation

◆ Dimensions()

template<typename UnitType , typename NumericType = double>
static constexpr const PhQ::Dimensions& PhQ::DimensionalSymmetricDyad< UnitType, NumericType >::Dimensions ( )
inlinestaticconstexpr

Physical dimension set of this physical quantity.

Definition at line 50 of file DimensionalSymmetricDyad.hpp.

◆ JSON() [1/2]

template<typename UnitType , typename NumericType = double>
std::string PhQ::DimensionalSymmetricDyad< UnitType, NumericType >::JSON ( ) const
inline

Serializes this physical quantity as a JSON message. This physical quantity's value is expressed in its standard unit of measure.

Definition at line 103 of file DimensionalSymmetricDyad.hpp.

References PhQ::Abbreviation(), and PhQ::DimensionalSymmetricDyad< UnitType, NumericType >::value.

Referenced by PhQ::DimensionalSymmetricDyad< UnitType, NumericType >::JSON().

◆ JSON() [2/2]

template<typename UnitType , typename NumericType = double>
std::string PhQ::DimensionalSymmetricDyad< UnitType, NumericType >::JSON ( const UnitType  unit) const
inline

Serializes this physical quantity as a JSON message. This physical quantity's value is expressed in the given unit of measure.

Definition at line 113 of file DimensionalSymmetricDyad.hpp.

References PhQ::Abbreviation(), PhQ::DimensionalSymmetricDyad< UnitType, NumericType >::JSON(), and PhQ::DimensionalSymmetricDyad< UnitType, NumericType >::Value().

◆ MutableValue()

template<typename UnitType , typename NumericType = double>
constexpr PhQ::SymmetricDyad<NumericType>& PhQ::DimensionalSymmetricDyad< UnitType, NumericType >::MutableValue ( )
inlineconstexprnoexcept

Returns the value of this physical quantity expressed in its standard unit of measure as a mutable value.

Definition at line 79 of file DimensionalSymmetricDyad.hpp.

References PhQ::DimensionalSymmetricDyad< UnitType, NumericType >::value.

◆ operator=() [1/3]

template<typename UnitType , typename NumericType = double>
constexpr DimensionalSymmetricDyad<UnitType, NumericType>& PhQ::DimensionalSymmetricDyad< UnitType, NumericType >::operator= ( const DimensionalSymmetricDyad< UnitType, NumericType > &  other)
constexprprotecteddefault

Copy assignment operator. Assigns this dimensional symmetric dyadic tensor physical quantity by copying another one.

◆ operator=() [2/3]

template<typename UnitType , typename NumericType = double>
template<typename OtherNumericType >
constexpr DimensionalSymmetricDyad<UnitType, NumericType>& PhQ::DimensionalSymmetricDyad< UnitType, NumericType >::operator= ( const DimensionalSymmetricDyad< UnitType, OtherNumericType > &  other)
inlineconstexprprotected

Copy assignment operator. Assigns this dimensional symmetric dyadic tensor physical quantity by copying another one.

Template Parameters
OtherNumericTypeFloating-point numeric type of the other physical quantity. Deduced automatically.

Definition at line 210 of file DimensionalSymmetricDyad.hpp.

References PhQ::DimensionalSymmetricDyad< UnitType, NumericType >::Value(), and PhQ::DimensionalSymmetricDyad< UnitType, NumericType >::value.

◆ operator=() [3/3]

template<typename UnitType , typename NumericType = double>
constexpr DimensionalSymmetricDyad<UnitType, NumericType>& PhQ::DimensionalSymmetricDyad< UnitType, NumericType >::operator= ( DimensionalSymmetricDyad< UnitType, NumericType > &&  other)
constexprprotecteddefaultnoexcept

Move assignment operator. Assigns this dimensional symmetric dyadic tensor physical quantity by moving another one.

◆ Print() [1/2]

template<typename UnitType , typename NumericType = double>
std::string PhQ::DimensionalSymmetricDyad< UnitType, NumericType >::Print ( ) const
inline

Prints this physical quantity as a string. This physical quantity's value is expressed in its standard unit of measure.

Definition at line 91 of file DimensionalSymmetricDyad.hpp.

References PhQ::Abbreviation(), and PhQ::DimensionalSymmetricDyad< UnitType, NumericType >::value.

Referenced by PhQ::operator<<().

◆ Print() [2/2]

template<typename UnitType , typename NumericType = double>
std::string PhQ::DimensionalSymmetricDyad< UnitType, NumericType >::Print ( const UnitType  unit) const
inline

Prints this physical quantity as a string. This physical quantity's value is expressed in the given unit of measure.

Definition at line 97 of file DimensionalSymmetricDyad.hpp.

References PhQ::Abbreviation(), and PhQ::DimensionalSymmetricDyad< UnitType, NumericType >::Value().

◆ SetValue()

template<typename UnitType , typename NumericType = double>
constexpr void PhQ::DimensionalSymmetricDyad< UnitType, NumericType >::SetValue ( const PhQ::SymmetricDyad< NumericType > &  value)
inlineconstexprnoexcept

Sets the value of this physical quantity expressed in its standard unit of measure to the given value.

Definition at line 85 of file DimensionalSymmetricDyad.hpp.

References PhQ::DimensionalSymmetricDyad< UnitType, NumericType >::value.

◆ StaticValue()

template<typename UnitType , typename NumericType = double>
template<UnitType NewUnit>
constexpr PhQ::SymmetricDyad<NumericType> PhQ::DimensionalSymmetricDyad< UnitType, NumericType >::StaticValue ( ) const
inlineconstexpr

Value of this physical quantity expressed in a given unit of measure. This method can be evaluated statically at compile-time.

Definition at line 73 of file DimensionalSymmetricDyad.hpp.

References PhQ::DimensionalSymmetricDyad< UnitType, NumericType >::value.

◆ Unit()

template<typename UnitType , typename NumericType = double>
static constexpr UnitType PhQ::DimensionalSymmetricDyad< UnitType, NumericType >::Unit ( )
inlinestaticconstexpr

Standard unit of measure for this physical quantity. This physical quantity's value is stored internally in this unit of measure.

Definition at line 56 of file DimensionalSymmetricDyad.hpp.

◆ Value() [1/2]

template<typename UnitType , typename NumericType = double>
constexpr const PhQ::SymmetricDyad<NumericType>& PhQ::DimensionalSymmetricDyad< UnitType, NumericType >::Value ( ) const
inlineconstexprnoexcept

◆ Value() [2/2]

template<typename UnitType , typename NumericType = double>
PhQ::SymmetricDyad<NumericType> PhQ::DimensionalSymmetricDyad< UnitType, NumericType >::Value ( const UnitType  unit) const
inline

Value of this physical quantity expressed in a given unit of measure.

Definition at line 66 of file DimensionalSymmetricDyad.hpp.

References PhQ::Convert(), and PhQ::DimensionalSymmetricDyad< UnitType, NumericType >::value.

◆ XML() [1/2]

template<typename UnitType , typename NumericType = double>
std::string PhQ::DimensionalSymmetricDyad< UnitType, NumericType >::XML ( ) const
inline

Serializes this physical quantity as an XML message. This physical quantity's value is expressed in its standard unit of measure.

Definition at line 123 of file DimensionalSymmetricDyad.hpp.

References PhQ::Abbreviation(), and PhQ::DimensionalSymmetricDyad< UnitType, NumericType >::value.

Referenced by PhQ::DimensionalSymmetricDyad< UnitType, NumericType >::XML().

◆ XML() [2/2]

template<typename UnitType , typename NumericType = double>
std::string PhQ::DimensionalSymmetricDyad< UnitType, NumericType >::XML ( const UnitType  unit) const
inline

Serializes this physical quantity as an XML message. This physical quantity's value is expressed in the given unit of measure.

Definition at line 133 of file DimensionalSymmetricDyad.hpp.

References PhQ::Abbreviation(), PhQ::DimensionalSymmetricDyad< UnitType, NumericType >::Value(), and PhQ::DimensionalSymmetricDyad< UnitType, NumericType >::XML().

◆ YAML() [1/2]

template<typename UnitType , typename NumericType = double>
std::string PhQ::DimensionalSymmetricDyad< UnitType, NumericType >::YAML ( ) const
inline

Serializes this physical quantity as a YAML message. This physical quantity's value is expressed in its standard unit of measure.

Definition at line 143 of file DimensionalSymmetricDyad.hpp.

References PhQ::Abbreviation(), and PhQ::DimensionalSymmetricDyad< UnitType, NumericType >::value.

Referenced by PhQ::DimensionalSymmetricDyad< UnitType, NumericType >::YAML().

◆ YAML() [2/2]

template<typename UnitType , typename NumericType = double>
std::string PhQ::DimensionalSymmetricDyad< UnitType, NumericType >::YAML ( const UnitType  unit) const
inline

Serializes this physical quantity as a YAML message. This physical quantity's value is expressed in the given unit of measure.

Definition at line 153 of file DimensionalSymmetricDyad.hpp.

References PhQ::Abbreviation(), PhQ::DimensionalSymmetricDyad< UnitType, NumericType >::Value(), and PhQ::DimensionalSymmetricDyad< UnitType, NumericType >::YAML().

Member Data Documentation

◆ value

template<typename UnitType , typename NumericType = double>
PhQ::SymmetricDyad<NumericType> PhQ::DimensionalSymmetricDyad< UnitType, NumericType >::value
protected

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