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::DimensionlessSymmetricDyad< NumericType > Class Template Reference

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

#include "DimensionlessSymmetricDyad.hpp"

Public Member Functions

constexpr const PhQ::SymmetricDyad< NumericType > & Value () const noexcept
 Value of this physical quantity. More...
 
constexpr PhQ::SymmetricDyad< NumericType > & MutableValue () noexcept
 Returns the value of this physical quantity as a mutable value. More...
 
constexpr void SetValue (const PhQ::SymmetricDyad< NumericType > &value) noexcept
 Sets the value of this physical quantity to the given value. More...
 
std::string Print () const
 Prints this physical quantity as a string. More...
 
std::string JSON () const
 Serializes this physical quantity as a JSON message. More...
 
std::string XML () const
 Serializes this physical quantity as an XML message. More...
 
std::string YAML () const
 Serializes this physical quantity as a YAML message. More...
 

Static Public Member Functions

static constexpr PhQ::Dimensions Dimensions ()
 Physical dimension set of this physical quantity. Since this physical quantity is dimensionless, its physical dimension set is simply the null set. More...
 

Protected Member Functions

 DimensionlessSymmetricDyad ()=default
 Default constructor. Constructs a dimensionless symmetric dyadic tensor physical quantity with an uninitialized value. More...
 
constexpr DimensionlessSymmetricDyad (const NumericType xx, const NumericType xy, const NumericType xz, const NumericType yy, const NumericType yz, const NumericType zz)
 Constructor. Constructs a dimensionless symmetric dyadic tensor physical quantity whose value has the given xx, xy, xz, yy, yz, and zz Cartesian components. More...
 
constexpr DimensionlessSymmetricDyad (const std::array< NumericType, 6 > &xx_xy_xz_yy_yz_zz)
 Constructor. Constructs a dimensionless symmetric dyadic tensor physical quantity from a given array representing its value's xx, xy, xz, yy, yz, and zz Cartesian components. More...
 
constexpr DimensionlessSymmetricDyad (const PhQ::SymmetricDyad< NumericType > &value)
 Constructor. Constructs a dimensionless symmetric dyadic tensor physical quantity with a given value. More...
 
 ~DimensionlessSymmetricDyad () noexcept=default
 Destructor. Destroys this dimensionless symmetric dyadic tensor physical quantity. More...
 
constexpr DimensionlessSymmetricDyad (const DimensionlessSymmetricDyad< NumericType > &other)=default
 Copy constructor. Constructs a dimensionless symmetric dyadic tensor physical quantity by copying another one. More...
 
template<typename OtherNumericType >
constexpr DimensionlessSymmetricDyad (const DimensionlessSymmetricDyad< OtherNumericType > &other)
 Copy constructor. Constructs a dimensionless symmetric dyadic tensor physical quantity by copying another one. More...
 
constexpr DimensionlessSymmetricDyad (DimensionlessSymmetricDyad< NumericType > &&other) noexcept=default
 Move constructor. Constructs a dimensionless symmetric dyadic tensor physical quantity by moving another one. More...
 
constexpr DimensionlessSymmetricDyad< NumericType > & operator= (const DimensionlessSymmetricDyad< NumericType > &other)=default
 Copy assignment operator. Assigns this dimensionless symmetric dyadic tensor physical quantity by copying another one. More...
 
template<typename OtherNumericType >
constexpr DimensionlessSymmetricDyad< NumericType > & operator= (const DimensionlessSymmetricDyad< OtherNumericType > &other)
 Copy assignment operator. Assigns this dimensionless symmetric dyadic tensor physical quantity by copying another one. More...
 
constexpr DimensionlessSymmetricDyad< NumericType > & operator= (DimensionlessSymmetricDyad< NumericType > &&other) noexcept=default
 Move assignment operator. Assigns this dimensionless symmetric dyadic tensor physical quantity by moving another one. More...
 

Protected Attributes

PhQ::SymmetricDyad< NumericType > value
 Value of this physical quantity. More...
 

Detailed Description

template<typename NumericType = double>
class PhQ::DimensionlessSymmetricDyad< NumericType >

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

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

Definition at line 48 of file DimensionlessSymmetricDyad.hpp.

Constructor & Destructor Documentation

◆ DimensionlessSymmetricDyad() [1/7]

template<typename NumericType = double>
PhQ::DimensionlessSymmetricDyad< NumericType >::DimensionlessSymmetricDyad ( )
protecteddefault

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

◆ DimensionlessSymmetricDyad() [2/7]

template<typename NumericType = double>
constexpr PhQ::DimensionlessSymmetricDyad< NumericType >::DimensionlessSymmetricDyad ( const NumericType  xx,
const NumericType  xy,
const NumericType  xz,
const NumericType  yy,
const NumericType  yz,
const NumericType  zz 
)
inlineconstexprprotected

Constructor. Constructs a dimensionless symmetric dyadic tensor physical quantity whose value has the given xx, xy, xz, yy, yz, and zz Cartesian components.

Definition at line 102 of file DimensionlessSymmetricDyad.hpp.

◆ DimensionlessSymmetricDyad() [3/7]

template<typename NumericType = double>
constexpr PhQ::DimensionlessSymmetricDyad< NumericType >::DimensionlessSymmetricDyad ( const std::array< NumericType, 6 > &  xx_xy_xz_yy_yz_zz)
inlineexplicitconstexprprotected

Constructor. Constructs a dimensionless symmetric dyadic tensor physical quantity from a given array representing its value's xx, xy, xz, yy, yz, and zz Cartesian components.

Definition at line 109 of file DimensionlessSymmetricDyad.hpp.

◆ DimensionlessSymmetricDyad() [4/7]

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

Constructor. Constructs a dimensionless symmetric dyadic tensor physical quantity with a given value.

Definition at line 114 of file DimensionlessSymmetricDyad.hpp.

◆ ~DimensionlessSymmetricDyad()

template<typename NumericType = double>
PhQ::DimensionlessSymmetricDyad< NumericType >::~DimensionlessSymmetricDyad ( )
protecteddefaultnoexcept

Destructor. Destroys this dimensionless symmetric dyadic tensor physical quantity.

◆ DimensionlessSymmetricDyad() [5/7]

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

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

◆ DimensionlessSymmetricDyad() [6/7]

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

Copy constructor. Constructs a dimensionless 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 130 of file DimensionlessSymmetricDyad.hpp.

◆ DimensionlessSymmetricDyad() [7/7]

template<typename NumericType = double>
constexpr PhQ::DimensionlessSymmetricDyad< NumericType >::DimensionlessSymmetricDyad ( DimensionlessSymmetricDyad< NumericType > &&  other)
constexprprotecteddefaultnoexcept

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

Member Function Documentation

◆ Dimensions()

template<typename NumericType = double>
static constexpr PhQ::Dimensions PhQ::DimensionlessSymmetricDyad< NumericType >::Dimensions ( )
inlinestaticconstexpr

Physical dimension set of this physical quantity. Since this physical quantity is dimensionless, its physical dimension set is simply the null set.

Definition at line 56 of file DimensionlessSymmetricDyad.hpp.

References PhQ::Dimensionless.

◆ JSON()

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

Serializes this physical quantity as a JSON message.

Definition at line 81 of file DimensionlessSymmetricDyad.hpp.

References PhQ::DimensionlessSymmetricDyad< NumericType >::value.

◆ MutableValue()

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

Returns the value of this physical quantity as a mutable value.

Definition at line 66 of file DimensionlessSymmetricDyad.hpp.

References PhQ::DimensionlessSymmetricDyad< NumericType >::value.

◆ operator=() [1/3]

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

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

◆ operator=() [2/3]

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

Copy assignment operator. Assigns this dimensionless 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 149 of file DimensionlessSymmetricDyad.hpp.

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

◆ operator=() [3/3]

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

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

◆ Print()

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

Prints this physical quantity as a string.

Definition at line 76 of file DimensionlessSymmetricDyad.hpp.

References PhQ::DimensionlessSymmetricDyad< NumericType >::value.

Referenced by PhQ::operator<<().

◆ SetValue()

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

Sets the value of this physical quantity to the given value.

Definition at line 71 of file DimensionlessSymmetricDyad.hpp.

References PhQ::DimensionlessSymmetricDyad< NumericType >::value.

◆ Value()

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

◆ XML()

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

Serializes this physical quantity as an XML message.

Definition at line 86 of file DimensionlessSymmetricDyad.hpp.

References PhQ::DimensionlessSymmetricDyad< NumericType >::value.

◆ YAML()

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

Serializes this physical quantity as a YAML message.

Definition at line 91 of file DimensionlessSymmetricDyad.hpp.

References PhQ::DimensionlessSymmetricDyad< NumericType >::value.

Member Data Documentation

◆ value

template<typename NumericType = double>
PhQ::SymmetricDyad<NumericType> PhQ::DimensionlessSymmetricDyad< NumericType >::value
protected

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