Physical Quantities  v1.0.0
C++ library of physical quantities, physical models, and units of measure for scientific computing. https://github.com/acodcha/phq
Loading...
Searching...
No Matches
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.
 
constexpr ScalarStrain (const NumericType value)
 Constructor. Constructs a scalar strain with a given value.
 
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.
 
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.
 
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.
 
 ~ScalarStrain () noexcept=default
 Destructor. Destroys this scalar strain.
 
constexpr ScalarStrain (const ScalarStrain< NumericType > &other)=default
 Copy constructor. Constructs a scalar strain by copying another one.
 
template<typename OtherNumericType >
constexpr ScalarStrain (const ScalarStrain< OtherNumericType > &other)
 Copy constructor. Constructs a scalar strain by copying another one.
 
constexpr ScalarStrain (ScalarStrain< NumericType > &&other) noexcept=default
 Move constructor. Constructs a scalar strain by moving another one.
 
constexpr ScalarStrain< NumericType > & operator= (const ScalarStrain< NumericType > &other)=default
 Copy assignment operator. Assigns this scalar strain by copying another one.
 
template<typename OtherNumericType >
constexpr ScalarStrain< NumericType > & operator= (const ScalarStrain< OtherNumericType > &other)
 Copy assignment operator. Assigns this scalar strain by copying another one.
 
constexpr ScalarStrain< NumericType > & operator= (ScalarStrain< NumericType > &&other) noexcept=default
 Move assignment operator. Assigns this scalar strain by moving another one.
 
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 NumericType Value () const noexcept
 Value of this physical quantity.
 
constexpr NumericType & MutableValue () noexcept
 Returns the value of this physical quantity as a mutable value.
 
constexpr void SetValue (const NumericType value) noexcept
 Sets the value of this physical quantity to the given value.
 
std::string Print () const
 Prints this physical quantity as a string.
 
std::string JSON () const
 Serializes this physical quantity as a JSON message.
 
std::string XML () const
 Serializes this physical quantity as an XML message.
 
std::string YAML () const
 Serializes this physical quantity as a YAML message.
 

Static Public Member Functions

static constexpr ScalarStrain< NumericType > Zero ()
 Statically creates a scalar strain of zero.
 
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.
 

Protected Attributes

NumericType value
 Value of this physical quantity.
 

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()

template<typename NumericType = double>
static constexpr PhQ::Dimensions PhQ::DimensionlessScalar< NumericType >::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.

References PhQ::Dimensionless.

◆ JSON()

template<typename NumericType = double>
std::string PhQ::DimensionlessScalar< NumericType >::JSON ( ) const
inlineinherited

Serializes this physical quantity as a JSON message.

Definition at line 80 of file DimensionlessScalar.hpp.

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

◆ MutableValue()

template<typename NumericType = double>
constexpr NumericType & PhQ::DimensionlessScalar< NumericType >::MutableValue ( )
inlineconstexprnoexceptinherited

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

Definition at line 65 of file DimensionlessScalar.hpp.

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

◆ 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< NumericType >::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< NumericType >::value.

◆ operator+()

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

Definition at line 119 of file ScalarStrain.hpp.

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

◆ 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< NumericType >::value.

◆ operator-()

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

Definition at line 124 of file ScalarStrain.hpp.

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

◆ 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< NumericType >::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< NumericType >::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< NumericType >::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< NumericType >::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< NumericType >::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()

template<typename NumericType = double>
std::string PhQ::DimensionlessScalar< NumericType >::Print ( ) const
inlineinherited

◆ SetValue()

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

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

Definition at line 70 of file DimensionlessScalar.hpp.

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

◆ Value()

template<typename NumericType = double>
constexpr NumericType PhQ::DimensionlessScalar< NumericType >::Value ( ) const
inlineconstexprnoexceptinherited

◆ XML()

template<typename NumericType = double>
std::string PhQ::DimensionlessScalar< NumericType >::XML ( ) const
inlineinherited

Serializes this physical quantity as an XML message.

Definition at line 85 of file DimensionlessScalar.hpp.

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

◆ YAML()

template<typename NumericType = double>
std::string PhQ::DimensionlessScalar< NumericType >::YAML ( ) const
inlineinherited

Serializes this physical quantity as a YAML message.

Definition at line 90 of file DimensionlessScalar.hpp.

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

◆ 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

template<typename NumericType = double>
NumericType PhQ::DimensionlessScalar< NumericType >::value
protectedinherited

Value of this physical quantity.

Definition at line 143 of file DimensionlessScalar.hpp.

Referenced by PhQ::DimensionlessScalar< NumericType >::JSON(), PhQ::DimensionlessScalar< NumericType >::MutableValue(), PhQ::HeatCapacityRatio< NumericType >::operator*(), PhQ::MachNumber< NumericType >::operator*(), PhQ::PoissonRatio< NumericType >::operator*(), PhQ::PrandtlNumber< NumericType >::operator*(), PhQ::ReynoldsNumber< NumericType >::operator*(), PhQ::ScalarDisplacementGradient< NumericType >::operator*(), PhQ::ScalarStrain< NumericType >::operator*(), PhQ::HeatCapacityRatio< NumericType >::operator*=(), PhQ::MachNumber< NumericType >::operator*=(), PhQ::PoissonRatio< NumericType >::operator*=(), PhQ::PrandtlNumber< NumericType >::operator*=(), PhQ::ReynoldsNumber< NumericType >::operator*=(), PhQ::ScalarDisplacementGradient< NumericType >::operator*=(), PhQ::ScalarStrain< NumericType >::operator*=(), PhQ::HeatCapacityRatio< NumericType >::operator+(), PhQ::MachNumber< NumericType >::operator+(), PhQ::PoissonRatio< NumericType >::operator+(), PhQ::PrandtlNumber< NumericType >::operator+(), PhQ::ReynoldsNumber< NumericType >::operator+(), PhQ::ScalarDisplacementGradient< NumericType >::operator+(), PhQ::ScalarStrain< NumericType >::operator+(), PhQ::HeatCapacityRatio< NumericType >::operator+=(), PhQ::MachNumber< NumericType >::operator+=(), PhQ::PoissonRatio< NumericType >::operator+=(), PhQ::PrandtlNumber< NumericType >::operator+=(), PhQ::ReynoldsNumber< NumericType >::operator+=(), PhQ::ScalarDisplacementGradient< NumericType >::operator+=(), PhQ::ScalarStrain< NumericType >::operator+=(), PhQ::HeatCapacityRatio< NumericType >::operator-(), PhQ::MachNumber< NumericType >::operator-(), PhQ::PoissonRatio< NumericType >::operator-(), PhQ::PrandtlNumber< NumericType >::operator-(), PhQ::ReynoldsNumber< NumericType >::operator-(), PhQ::ScalarDisplacementGradient< NumericType >::operator-(), PhQ::ScalarStrain< NumericType >::operator-(), PhQ::HeatCapacityRatio< NumericType >::operator-=(), PhQ::MachNumber< NumericType >::operator-=(), PhQ::PoissonRatio< NumericType >::operator-=(), PhQ::PrandtlNumber< NumericType >::operator-=(), PhQ::ReynoldsNumber< NumericType >::operator-=(), PhQ::ScalarDisplacementGradient< NumericType >::operator-=(), PhQ::ScalarStrain< NumericType >::operator-=(), PhQ::HeatCapacityRatio< NumericType >::operator/(), PhQ::MachNumber< NumericType >::operator/(), PhQ::HeatCapacityRatio< NumericType >::operator/(), PhQ::MachNumber< NumericType >::operator/(), PhQ::PoissonRatio< NumericType >::operator/(), PhQ::PrandtlNumber< NumericType >::operator/(), PhQ::ReynoldsNumber< NumericType >::operator/(), PhQ::ScalarDisplacementGradient< NumericType >::operator/(), PhQ::ScalarStrain< NumericType >::operator/(), PhQ::PoissonRatio< NumericType >::operator/(), PhQ::PrandtlNumber< NumericType >::operator/(), PhQ::ReynoldsNumber< NumericType >::operator/(), PhQ::ScalarDisplacementGradient< NumericType >::operator/(), PhQ::ScalarStrain< NumericType >::operator/(), PhQ::HeatCapacityRatio< NumericType >::operator/=(), PhQ::MachNumber< NumericType >::operator/=(), PhQ::PoissonRatio< NumericType >::operator/=(), PhQ::PrandtlNumber< NumericType >::operator/=(), PhQ::ReynoldsNumber< NumericType >::operator/=(), PhQ::ScalarDisplacementGradient< NumericType >::operator/=(), PhQ::ScalarStrain< NumericType >::operator/=(), PhQ::DimensionlessScalar< NumericType >::operator=(), PhQ::HeatCapacityRatio< NumericType >::operator=(), PhQ::MachNumber< NumericType >::operator=(), PhQ::PoissonRatio< NumericType >::operator=(), PhQ::PrandtlNumber< NumericType >::operator=(), PhQ::ReynoldsNumber< NumericType >::operator=(), PhQ::ScalarDisplacementGradient< NumericType >::operator=(), PhQ::ScalarStrain< NumericType >::operator=(), PhQ::DimensionlessScalar< NumericType >::Print(), PhQ::DimensionlessScalar< NumericType >::SetValue(), PhQ::DimensionlessScalar< NumericType >::Value(), PhQ::DimensionlessScalar< NumericType >::XML(), and PhQ::DimensionlessScalar< NumericType >::YAML().


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