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 Attributes | Private Member Functions | Friends | List of all members
PhQ::ScalarStrainRate< NumericType > Class Template Reference

Scalar component or resultant of a three-dimensional Euclidean strain rate symmetric dyadic tensor. For the related tensor, see PhQ::StrainRate. See also PhQ::ScalarStrain, PhQ::Time, and PhQ::Frequency. More...

#include "ScalarStrainRate.hpp"

Public Member Functions

 ScalarStrainRate ()=default
 Default constructor. Constructs a scalar strain rate with an uninitialized value. More...
 
 ScalarStrainRate (const NumericType value, const Unit::Frequency unit)
 Constructor. Constructs a scalar strain rate with a given value expressed in a given frequency unit. More...
 
constexpr ScalarStrainRate (const ScalarStrain< NumericType > &scalar_strain, const Time< NumericType > &time)
 Constructor. Constructs a scalar strain rate from a given scalar strain and time using the definition of strain rate. More...
 
constexpr ScalarStrainRate (const ScalarStrain< NumericType > &scalar_strain, const Frequency< NumericType > &frequency)
 Constructor. Constructs a scalar strain rate from a given scalar strain and frequency using the definition of strain rate. More...
 
 ~ScalarStrainRate () noexcept=default
 Destructor. Destroys this scalar strain rate. More...
 
constexpr ScalarStrainRate (const ScalarStrainRate< NumericType > &other)=default
 Copy constructor. Constructs a scalar strain rate by copying another one. More...
 
template<typename OtherNumericType >
constexpr ScalarStrainRate (const ScalarStrainRate< OtherNumericType > &other)
 Copy constructor. Constructs a scalar strain rate by copying another one. More...
 
constexpr ScalarStrainRate (ScalarStrainRate< NumericType > &&other) noexcept=default
 Move constructor. Constructs a scalar strain rate by moving another one. More...
 
constexpr ScalarStrainRate< NumericType > & operator= (const ScalarStrainRate< NumericType > &other)=default
 Copy assignment operator. Assigns this scalar strain rate by copying another one. More...
 
template<typename OtherNumericType >
constexpr ScalarStrainRate< NumericType > & operator= (const ScalarStrainRate< OtherNumericType > &other)
 Copy assignment operator. Assigns this scalar strain rate by copying another one. More...
 
constexpr ScalarStrainRate< NumericType > & operator= (ScalarStrainRate< NumericType > &&other) noexcept=default
 Move assignment operator. Assigns this scalar strain rate by moving another one. More...
 
constexpr ScalarStrainRate< NumericType > operator+ (const ScalarStrainRate< NumericType > &other) const
 
constexpr ScalarStrainRate< NumericType > operator- (const ScalarStrainRate< NumericType > &other) const
 
constexpr ScalarStrainRate< NumericType > operator* (const NumericType number) const
 
constexpr ScalarStrainRate< NumericType > operator/ (const NumericType number) const
 
constexpr ScalarStrain< NumericType > operator* (const Time< NumericType > &time) const
 
constexpr NumericType operator/ (const ScalarStrainRate< NumericType > &other) const noexcept
 
constexpr ScalarStrain< NumericType > operator/ (const Frequency< NumericType > &frequency) const
 
constexpr void operator+= (const ScalarStrainRate< NumericType > &other) noexcept
 
constexpr void operator-= (const ScalarStrainRate< NumericType > &other) noexcept
 
constexpr void operator*= (const NumericType number) noexcept
 
constexpr void operator/= (const NumericType number) noexcept
 
constexpr double Value () const noexcept
 Value of this physical quantity expressed in its standard unit of measure. More...
 
double Value (const Unit::Frequency unit) const
 Value of this physical quantity expressed in a given unit of measure. More...
 
constexpr double 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 double & 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 double 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 Unit::Frequency 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 Unit::Frequency 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 Unit::Frequency 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 Unit::Frequency 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 ScalarStrainRate< NumericType > Zero ()
 Statically creates a scalar strain rate of zero. More...
 
template<Unit::Frequency Unit>
static constexpr ScalarStrainRate< NumericType > Create (const NumericType value)
 Statically creates a scalar strain rate with a given value expressed in a given frequency unit. More...
 
static constexpr const PhQ::DimensionsDimensions ()
 Physical dimension set of this physical quantity. More...
 
static constexpr Unit::Frequency Unit ()
 Standard unit of measure for this physical quantity. This physical quantity's value is stored internally in this unit of measure. More...
 

Protected Attributes

double value
 Value of this physical quantity expressed in its standard unit of measure. More...
 

Private Member Functions

constexpr ScalarStrainRate (const NumericType value)
 Constructor. Constructs a scalar strain rate with a given value expressed in the standard frequency unit. More...
 

Friends

template<typename OtherNumericType >
class StrainRate
 

Detailed Description

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

Scalar component or resultant of a three-dimensional Euclidean strain rate symmetric dyadic tensor. For the related tensor, see PhQ::StrainRate. See also PhQ::ScalarStrain, PhQ::Time, and PhQ::Frequency.

Definition at line 44 of file ScalarStrainRate.hpp.

Constructor & Destructor Documentation

◆ ScalarStrainRate() [1/8]

template<typename NumericType = double>
PhQ::ScalarStrainRate< NumericType >::ScalarStrainRate ( )
default

Default constructor. Constructs a scalar strain rate with an uninitialized value.

◆ ScalarStrainRate() [2/8]

template<typename NumericType = double>
PhQ::ScalarStrainRate< NumericType >::ScalarStrainRate ( const NumericType  value,
const Unit::Frequency  unit 
)
inline

Constructor. Constructs a scalar strain rate with a given value expressed in a given frequency unit.

Definition at line 51 of file ScalarStrainRate.hpp.

◆ ScalarStrainRate() [3/8]

template<typename NumericType = double>
constexpr PhQ::ScalarStrainRate< NumericType >::ScalarStrainRate ( const ScalarStrain< NumericType > &  scalar_strain,
const Time< NumericType > &  time 
)
inlineconstexpr

Constructor. Constructs a scalar strain rate from a given scalar strain and time using the definition of strain rate.

Definition at line 56 of file ScalarStrainRate.hpp.

◆ ScalarStrainRate() [4/8]

template<typename NumericType = double>
constexpr PhQ::ScalarStrainRate< NumericType >::ScalarStrainRate ( const ScalarStrain< NumericType > &  scalar_strain,
const Frequency< NumericType > &  frequency 
)
inlineconstexpr

Constructor. Constructs a scalar strain rate from a given scalar strain and frequency using the definition of strain rate.

Definition at line 62 of file ScalarStrainRate.hpp.

◆ ~ScalarStrainRate()

template<typename NumericType = double>
PhQ::ScalarStrainRate< NumericType >::~ScalarStrainRate ( )
defaultnoexcept

Destructor. Destroys this scalar strain rate.

◆ ScalarStrainRate() [5/8]

template<typename NumericType = double>
constexpr PhQ::ScalarStrainRate< NumericType >::ScalarStrainRate ( const ScalarStrainRate< NumericType > &  other)
constexprdefault

Copy constructor. Constructs a scalar strain rate by copying another one.

◆ ScalarStrainRate() [6/8]

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

Copy constructor. Constructs a scalar strain rate by copying another one.

Definition at line 74 of file ScalarStrainRate.hpp.

◆ ScalarStrainRate() [7/8]

template<typename NumericType = double>
constexpr PhQ::ScalarStrainRate< NumericType >::ScalarStrainRate ( ScalarStrainRate< NumericType > &&  other)
constexprdefaultnoexcept

Move constructor. Constructs a scalar strain rate by moving another one.

◆ ScalarStrainRate() [8/8]

template<typename NumericType = double>
constexpr PhQ::ScalarStrainRate< NumericType >::ScalarStrainRate ( const NumericType  value)
inlineexplicitconstexprprivate

Constructor. Constructs a scalar strain rate with a given value expressed in the standard frequency unit.

Definition at line 158 of file ScalarStrainRate.hpp.

Member Function Documentation

◆ Create()

template<typename NumericType = double>
template<Unit::Frequency Unit>
static constexpr ScalarStrainRate<NumericType> PhQ::ScalarStrainRate< NumericType >::Create ( const NumericType  value)
inlinestaticconstexpr

Statically creates a scalar strain rate with a given value expressed in a given frequency unit.

Definition at line 104 of file ScalarStrainRate.hpp.

References PhQ::DimensionalScalar< Unit::Frequency, double >::value.

◆ Dimensions()

static constexpr const PhQ::Dimensions& PhQ::DimensionalScalar< Unit::Frequency , double >::Dimensions ( )
inlinestaticconstexprinherited

Physical dimension set of this physical quantity.

Definition at line 54 of file DimensionalScalar.hpp.

◆ JSON() [1/2]

std::string PhQ::DimensionalScalar< Unit::Frequency , double >::JSON ( ) const
inlineinherited

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

Definition at line 107 of file DimensionalScalar.hpp.

◆ JSON() [2/2]

std::string PhQ::DimensionalScalar< Unit::Frequency , double >::JSON ( const UnitType  unit) const
inlineinherited

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

Definition at line 117 of file DimensionalScalar.hpp.

◆ MutableValue()

constexpr double & PhQ::DimensionalScalar< Unit::Frequency , double >::MutableValue ( )
inlineconstexprnoexceptinherited

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

Definition at line 83 of file DimensionalScalar.hpp.

◆ operator*() [1/2]

template<typename NumericType = double>
constexpr ScalarStrainRate<NumericType> PhQ::ScalarStrainRate< NumericType >::operator* ( const NumericType  number) const
inlineconstexpr

◆ operator*() [2/2]

template<typename NumericType = double>
constexpr ScalarStrain<NumericType> PhQ::ScalarStrainRate< NumericType >::operator* ( const Time< NumericType > &  time) const
inlineconstexpr

Definition at line 127 of file ScalarStrainRate.hpp.

◆ operator*=()

template<typename NumericType = double>
constexpr void PhQ::ScalarStrainRate< NumericType >::operator*= ( const NumericType  number)
inlineconstexprnoexcept

◆ operator+()

template<typename NumericType = double>
constexpr ScalarStrainRate<NumericType> PhQ::ScalarStrainRate< NumericType >::operator+ ( const ScalarStrainRate< NumericType > &  other) const
inlineconstexpr

◆ operator+=()

template<typename NumericType = double>
constexpr void PhQ::ScalarStrainRate< NumericType >::operator+= ( const ScalarStrainRate< NumericType > &  other)
inlineconstexprnoexcept

◆ operator-()

template<typename NumericType = double>
constexpr ScalarStrainRate<NumericType> PhQ::ScalarStrainRate< NumericType >::operator- ( const ScalarStrainRate< NumericType > &  other) const
inlineconstexpr

◆ operator-=()

template<typename NumericType = double>
constexpr void PhQ::ScalarStrainRate< NumericType >::operator-= ( const ScalarStrainRate< NumericType > &  other)
inlineconstexprnoexcept

◆ operator/() [1/3]

template<typename NumericType = double>
constexpr ScalarStrain<NumericType> PhQ::ScalarStrainRate< NumericType >::operator/ ( const Frequency< NumericType > &  frequency) const
inlineconstexpr

Definition at line 135 of file ScalarStrainRate.hpp.

◆ operator/() [2/3]

template<typename NumericType = double>
constexpr ScalarStrainRate<NumericType> PhQ::ScalarStrainRate< NumericType >::operator/ ( const NumericType  number) const
inlineconstexpr

◆ operator/() [3/3]

template<typename NumericType = double>
constexpr NumericType PhQ::ScalarStrainRate< NumericType >::operator/ ( const ScalarStrainRate< NumericType > &  other) const
inlineconstexprnoexcept

◆ operator/=()

template<typename NumericType = double>
constexpr void PhQ::ScalarStrainRate< NumericType >::operator/= ( const NumericType  number)
inlineconstexprnoexcept

◆ operator=() [1/3]

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

Copy assignment operator. Assigns this scalar strain rate by copying another one.

◆ operator=() [2/3]

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

Copy assignment operator. Assigns this scalar strain rate by copying another one.

Definition at line 86 of file ScalarStrainRate.hpp.

References PhQ::DimensionalScalar< UnitType, NumericType >::Value(), and PhQ::DimensionalScalar< Unit::Frequency, double >::value.

◆ operator=() [3/3]

template<typename NumericType = double>
constexpr ScalarStrainRate<NumericType>& PhQ::ScalarStrainRate< NumericType >::operator= ( ScalarStrainRate< NumericType > &&  other)
constexprdefaultnoexcept

Move assignment operator. Assigns this scalar strain rate by moving another one.

◆ Print() [1/2]

std::string PhQ::DimensionalScalar< Unit::Frequency , double >::Print ( ) const
inlineinherited

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

Definition at line 95 of file DimensionalScalar.hpp.

◆ Print() [2/2]

std::string PhQ::DimensionalScalar< Unit::Frequency , double >::Print ( const UnitType  unit) const
inlineinherited

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

Definition at line 101 of file DimensionalScalar.hpp.

◆ SetValue()

constexpr void PhQ::DimensionalScalar< Unit::Frequency , double >::SetValue ( const NumericType  value)
inlineconstexprnoexceptinherited

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

Definition at line 89 of file DimensionalScalar.hpp.

◆ StaticValue()

constexpr double PhQ::DimensionalScalar< Unit::Frequency , double >::StaticValue ( ) const
inlineconstexprinherited

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

Definition at line 77 of file DimensionalScalar.hpp.

◆ Unit()

static constexpr Unit::Frequency PhQ::DimensionalScalar< Unit::Frequency , double >::Unit ( )
inlinestaticconstexprinherited

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

Definition at line 60 of file DimensionalScalar.hpp.

◆ Value() [1/2]

constexpr double PhQ::DimensionalScalar< Unit::Frequency , double >::Value ( ) const
inlineconstexprnoexceptinherited

Value of this physical quantity expressed in its standard unit of measure.

Definition at line 65 of file DimensionalScalar.hpp.

◆ Value() [2/2]

double PhQ::DimensionalScalar< Unit::Frequency , double >::Value ( const UnitType  unit) const
inlineinherited

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

Definition at line 70 of file DimensionalScalar.hpp.

◆ XML() [1/2]

std::string PhQ::DimensionalScalar< Unit::Frequency , double >::XML ( ) const
inlineinherited

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

Definition at line 127 of file DimensionalScalar.hpp.

◆ XML() [2/2]

std::string PhQ::DimensionalScalar< Unit::Frequency , double >::XML ( const UnitType  unit) const
inlineinherited

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

Definition at line 137 of file DimensionalScalar.hpp.

◆ YAML() [1/2]

std::string PhQ::DimensionalScalar< Unit::Frequency , double >::YAML ( ) const
inlineinherited

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

Definition at line 147 of file DimensionalScalar.hpp.

◆ YAML() [2/2]

std::string PhQ::DimensionalScalar< Unit::Frequency , double >::YAML ( const UnitType  unit) const
inlineinherited

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

Definition at line 157 of file DimensionalScalar.hpp.

◆ Zero()

template<typename NumericType = double>
static constexpr ScalarStrainRate<NumericType> PhQ::ScalarStrainRate< NumericType >::Zero ( )
inlinestaticconstexpr

Statically creates a scalar strain rate of zero.

Definition at line 97 of file ScalarStrainRate.hpp.

Friends And Related Function Documentation

◆ StrainRate

template<typename NumericType = double>
template<typename OtherNumericType >
friend class StrainRate
friend

Definition at line 162 of file ScalarStrainRate.hpp.

Member Data Documentation

◆ value

double PhQ::DimensionalScalar< Unit::Frequency , double >::value
protectedinherited

Value of this physical quantity expressed in its standard unit of measure.

Definition at line 221 of file DimensionalScalar.hpp.


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