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 | List of all members
PhQ::ScalarStrain< NumericType > Class Template Reference

Scalar component or resultant of a three-dimensional Euclidean strain symmetric dyadic tensor. For the related tensor, see PhQ::Strain. For the time rate of change of scalar strain, see PhQ::ScalarStrainRate, PhQ::Time, and PhQ::Frequency. More...

#include "ScalarStrain.hpp"

Public Member Functions

 ScalarStrain ()=default
 Default constructor. Constructs a scalar strain with an uninitialized value. More...
 
constexpr ScalarStrain (const NumericType value)
 Constructor. Constructs a scalar strain with a given value. More...
 
constexpr ScalarStrain (const ScalarStrainRate< NumericType > &scalar_strain_rate, const Time< NumericType > &time)
 Constructor. Constructs a scalar strain from a given scalar strain rate and time using the definition of strain rate. More...
 
constexpr ScalarStrain (const ScalarStrainRate< NumericType > &scalar_strain_rate, const Frequency< NumericType > &frequency)
 Constructor. Constructs a scalar strain from a given scalar strain rate and frequency using the definition of strain rate. More...
 
constexpr ScalarStrain (const LinearThermalExpansionCoefficient< NumericType > &linear_thermal_expansion_coefficient, const TemperatureDifference< NumericType > &temperature_difference)
 Constructor. Constructs a scalar strain from a given linear thermal expansion coefficient and temperature difference using the definition of the linear thermal expansion coefficient. More...
 
 ~ScalarStrain () noexcept=default
 Destructor. Destroys this scalar strain. More...
 
constexpr ScalarStrain (const ScalarStrain< NumericType > &other)=default
 Copy constructor. Constructs a scalar strain by copying another one. More...
 
template<typename OtherNumericType >
constexpr ScalarStrain (const ScalarStrain< OtherNumericType > &other)
 Copy constructor. Constructs a scalar strain by copying another one. More...
 
constexpr ScalarStrain (ScalarStrain< NumericType > &&other) noexcept=default
 Move constructor. Constructs a scalar strain by moving another one. More...
 
constexpr ScalarStrain< NumericType > & operator= (const ScalarStrain< NumericType > &other)=default
 Copy assignment operator. Assigns this scalar strain by copying another one. More...
 
template<typename OtherNumericType >
constexpr ScalarStrain< NumericType > & operator= (const ScalarStrain< OtherNumericType > &other)
 Copy assignment operator. Assigns this scalar strain by copying another one. More...
 
constexpr ScalarStrain< NumericType > & operator= (ScalarStrain< NumericType > &&other) noexcept=default
 Move assignment operator. Assigns this scalar strain by moving another one. More...
 
constexpr ScalarStrain< NumericType > operator+ (const ScalarStrain< NumericType > &scalar_strain) const
 
constexpr ScalarStrain< NumericType > operator- (const ScalarStrain< NumericType > &scalar_strain) const
 
constexpr ScalarStrain< NumericType > operator* (const NumericType number) const
 
constexpr ScalarStrainRate< NumericType > operator* (const Frequency< NumericType > &frequency) const
 
constexpr ScalarStrain< NumericType > operator/ (const NumericType number) const
 
constexpr ScalarStrainRate< NumericType > operator/ (const Time< NumericType > &time) const
 
constexpr NumericType operator/ (const ScalarStrain< NumericType > &scalar_strain) const noexcept
 
constexpr void operator+= (const ScalarStrain< NumericType > &scalar_strain) noexcept
 
constexpr void operator-= (const ScalarStrain< NumericType > &scalar_strain) 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. More...
 
constexpr double & MutableValue () noexcept
 Returns the value of this physical quantity as a mutable value. More...
 
constexpr void SetValue (const double 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 ScalarStrain< NumericType > Zero ()
 Statically creates a scalar strain of zero. More...
 
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 Attributes

double value
 Value of this physical quantity. More...
 

Detailed Description

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

Scalar component or resultant of a three-dimensional Euclidean strain symmetric dyadic tensor. For the related tensor, see PhQ::Strain. For the time rate of change of scalar strain, see PhQ::ScalarStrainRate, PhQ::Time, and PhQ::Frequency.

Definition at line 60 of file ScalarStrain.hpp.

Constructor & Destructor Documentation

◆ ScalarStrain() [1/8]

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

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

◆ ScalarStrain() [2/8]

template<typename NumericType = double>
constexpr PhQ::ScalarStrain< NumericType >::ScalarStrain ( const NumericType  value)
inlineexplicitconstexpr

Constructor. Constructs a scalar strain with a given value.

Definition at line 66 of file ScalarStrain.hpp.

◆ ScalarStrain() [3/8]

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

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

Definition at line 215 of file ScalarStrainRate.hpp.

◆ ScalarStrain() [4/8]

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

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

Definition at line 220 of file ScalarStrainRate.hpp.

◆ ScalarStrain() [5/8]

template<typename NumericType >
constexpr PhQ::ScalarStrain< NumericType >::ScalarStrain ( const LinearThermalExpansionCoefficient< NumericType > &  linear_thermal_expansion_coefficient,
const TemperatureDifference< NumericType > &  temperature_difference 
)
inlineconstexpr

Constructor. Constructs a scalar strain from a given linear thermal expansion coefficient and temperature difference using the definition of the linear thermal expansion coefficient.

Definition at line 228 of file LinearThermalExpansionCoefficient.hpp.

◆ ~ScalarStrain()

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

Destructor. Destroys this scalar strain.

◆ ScalarStrain() [6/8]

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

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

◆ ScalarStrain() [7/8]

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

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

Definition at line 94 of file ScalarStrain.hpp.

◆ ScalarStrain() [8/8]

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

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

Member Function Documentation

◆ Dimensions()

static constexpr PhQ::Dimensions PhQ::DimensionlessScalar< double >::Dimensions ( )
inlinestaticconstexprinherited

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 55 of file DimensionlessScalar.hpp.

◆ JSON()

std::string PhQ::DimensionlessScalar< double >::JSON ( ) const
inlineinherited

Serializes this physical quantity as a JSON message.

Definition at line 80 of file DimensionlessScalar.hpp.

◆ MutableValue()

constexpr double & PhQ::DimensionlessScalar< double >::MutableValue ( )
inlineconstexprnoexceptinherited

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

Definition at line 65 of file DimensionlessScalar.hpp.

◆ operator*() [1/2]

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

Definition at line 226 of file ScalarStrainRate.hpp.

◆ operator*() [2/2]

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

Definition at line 129 of file ScalarStrain.hpp.

References PhQ::DimensionlessScalar< double >::value.

◆ operator*=()

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

Definition at line 153 of file ScalarStrain.hpp.

References PhQ::DimensionlessScalar< double >::value.

◆ operator+()

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

◆ operator+=()

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

Definition at line 145 of file ScalarStrain.hpp.

References PhQ::DimensionlessScalar< double >::value.

◆ operator-()

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

◆ operator-=()

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

Definition at line 149 of file ScalarStrain.hpp.

References PhQ::DimensionlessScalar< double >::value.

◆ operator/() [1/3]

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

Definition at line 135 of file ScalarStrain.hpp.

References PhQ::DimensionlessScalar< double >::value.

◆ operator/() [2/3]

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

Definition at line 141 of file ScalarStrain.hpp.

References PhQ::DimensionlessScalar< double >::value.

◆ operator/() [3/3]

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

Definition at line 232 of file ScalarStrainRate.hpp.

◆ operator/=()

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

Definition at line 157 of file ScalarStrain.hpp.

References PhQ::DimensionlessScalar< double >::value.

◆ operator=() [1/3]

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

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

◆ operator=() [2/3]

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

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

Definition at line 105 of file ScalarStrain.hpp.

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

◆ operator=() [3/3]

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

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

◆ Print()

std::string PhQ::DimensionlessScalar< double >::Print ( ) const
inlineinherited

Prints this physical quantity as a string.

Definition at line 75 of file DimensionlessScalar.hpp.

◆ SetValue()

constexpr void PhQ::DimensionlessScalar< double >::SetValue ( const NumericType  value)
inlineconstexprnoexceptinherited

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

Definition at line 70 of file DimensionlessScalar.hpp.

◆ Value()

constexpr double PhQ::DimensionlessScalar< double >::Value ( ) const
inlineconstexprnoexceptinherited

Value of this physical quantity.

Definition at line 60 of file DimensionlessScalar.hpp.

◆ XML()

std::string PhQ::DimensionlessScalar< double >::XML ( ) const
inlineinherited

Serializes this physical quantity as an XML message.

Definition at line 85 of file DimensionlessScalar.hpp.

◆ YAML()

std::string PhQ::DimensionlessScalar< double >::YAML ( ) const
inlineinherited

Serializes this physical quantity as a YAML message.

Definition at line 90 of file DimensionlessScalar.hpp.

◆ Zero()

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

Statically creates a scalar strain of zero.

Definition at line 115 of file ScalarStrain.hpp.

Member Data Documentation

◆ value

double PhQ::DimensionlessScalar< double >::value
protectedinherited

Value of this physical quantity.

Definition at line 143 of file DimensionlessScalar.hpp.


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