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

Three-dimensional Euclidean strain symmetric dyadic tensor. Contains six components in Cartesian coordinates: xx, xy = yx, xz = zx, yy, yz = zy, and zz. For the scalar components or resultants of a strain tensor, see PhQ::ScalarStrain. For the time rate of change of strain, see PhQ::StrainRate, PhQ::Time, and PhQ::Frequency. More...

#include "Strain.hpp"

Public Member Functions

 Strain ()=default
 Default constructor. Constructs a strain tensor with an uninitialized value. More...
 
constexpr Strain (const NumericType xx, const NumericType xy, const NumericType xz, const NumericType yy, const NumericType yz, const NumericType zz)
 Constructor. Constructs a strain tensor whose value has the given xx, xy, xz, yy, yz, and zz Cartesian components. More...
 
constexpr Strain (const std::array< NumericType, 6 > &xx_xy_xz_yy_yz_zz)
 Constructor. Constructs a strain tensor from a given array representing its value's xx, xy, xz, yy, yz, and zz Cartesian components. More...
 
constexpr Strain (const SymmetricDyad< NumericType > &value)
 Constructor. Constructs a strain tensor with a given value. More...
 
constexpr Strain (const StrainRate< NumericType > &strain_rate, const Time< NumericType > &time)
 Constructor. Constructs a strain tensor from a given strain rate tensor and time using the definition of the strain rate tensor. More...
 
constexpr Strain (const StrainRate< NumericType > &strain_rate, const Frequency< NumericType > &frequency)
 Constructor. Constructs a strain tensor from a given strain rate tensor and frequency using the definition of the strain rate tensor. More...
 
constexpr Strain (const DisplacementGradient< NumericType > &displacement_gradient)
 Constructor. Constructs a strain tensor from a given displacement gradient using the definition of the strain tensor. More...
 
constexpr Strain (const VolumetricThermalExpansionCoefficient< NumericType > &volumetric_thermal_expansion_coefficient, const TemperatureDifference< NumericType > &temperature_difference)
 Constructor. Constructs a strain tensor from a given volumetric thermal expansion coefficient and temperature difference using the definition of the volumetric thermal expansion coefficient. More...
 
 ~Strain () noexcept=default
 Destructor. Destroys this strain tensor. More...
 
constexpr Strain (const Strain< NumericType > &other)=default
 Copy constructor. Constructs a strain tensor by copying another one. More...
 
template<typename OtherNumericType >
constexpr Strain (const Strain< OtherNumericType > &other)
 Copy constructor. Constructs a strain tensor by copying another one. More...
 
constexpr Strain (Strain< NumericType > &&other) noexcept=default
 Move constructor. Constructs a strain tensor by moving another one. More...
 
constexpr Strain< NumericType > & operator= (const Strain< NumericType > &other)=default
 Copy assignment operator. Assigns this strain tensor by copying another one. More...
 
template<typename OtherNumericType >
constexpr Strain< NumericType > & operator= (const Strain< OtherNumericType > &other)
 Copy assignment operator. Assigns this strain tensor by copying another one. More...
 
constexpr Strain< NumericType > & operator= (Strain< NumericType > &&other) noexcept=default
 Move assignment operator. Assigns this strain tensor by moving another one. More...
 
constexpr ScalarStrain< NumericType > xx () const noexcept
 Returns the xx Cartesian component of this strain tensor. More...
 
constexpr ScalarStrain< NumericType > xy () const noexcept
 Returns the xy = yx Cartesian component of this strain tensor. More...
 
constexpr ScalarStrain< NumericType > xz () const noexcept
 Returns the xz = zx Cartesian component of this strain tensor. More...
 
constexpr ScalarStrain< NumericType > yx () const noexcept
 Returns the yx = xy Cartesian component of this strain tensor. More...
 
constexpr ScalarStrain< NumericType > yy () const noexcept
 Returns the yy Cartesian component of this strain tensor. More...
 
constexpr ScalarStrain< NumericType > yz () const noexcept
 Returns the yz = zy Cartesian component of this strain tensor. More...
 
constexpr ScalarStrain< NumericType > zx () const noexcept
 Returns the zx = xz Cartesian component of this strain tensor. More...
 
constexpr ScalarStrain< NumericType > zy () const noexcept
 Returns the zy = yz Cartesian component of this strain tensor. More...
 
constexpr ScalarStrain< NumericType > zz () const noexcept
 Returns the zz Cartesian component of this strain tensor. More...
 
constexpr Strain< NumericType > operator+ (const Strain< NumericType > &strain) const
 
constexpr Strain< NumericType > operator- (const Strain< NumericType > &strain) const
 
constexpr Strain< NumericType > operator* (const NumericType number) const
 
constexpr StrainRate< NumericType > operator* (const Frequency< NumericType > &frequency) const
 
constexpr Strain< NumericType > operator/ (const NumericType number) const
 
constexpr StrainRate< NumericType > operator/ (const Time< NumericType > &time) const
 
constexpr void operator+= (const Strain< NumericType > &strain) noexcept
 
constexpr void operator-= (const Strain< NumericType > &strain) noexcept
 
constexpr void operator*= (const NumericType number) noexcept
 
constexpr void operator/= (const NumericType number) noexcept
 
constexpr const PhQ::SymmetricDyad< double > & Value () const noexcept
 Value of this physical quantity. More...
 
constexpr PhQ::SymmetricDyad< double > & MutableValue () noexcept
 Returns the value of this physical quantity as a mutable value. More...
 
constexpr void SetValue (const PhQ::SymmetricDyad< 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 Strain< NumericType > Zero ()
 Statically creates a strain tensor 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

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

Detailed Description

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

Three-dimensional Euclidean strain symmetric dyadic tensor. Contains six components in Cartesian coordinates: xx, xy = yx, xz = zx, yy, yz = zy, and zz. For the scalar components or resultants of a strain tensor, see PhQ::ScalarStrain. For the time rate of change of strain, see PhQ::StrainRate, PhQ::Time, and PhQ::Frequency.

Definition at line 68 of file Strain.hpp.

Constructor & Destructor Documentation

◆ Strain() [1/11]

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

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

◆ Strain() [2/11]

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

Constructor. Constructs a strain tensor whose value has the given xx, xy, xz, yy, yz, and zz Cartesian components.

Definition at line 75 of file Strain.hpp.

◆ Strain() [3/11]

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

Constructor. Constructs a strain tensor from a given array representing its value's xx, xy, xz, yy, yz, and zz Cartesian components.

Definition at line 81 of file Strain.hpp.

◆ Strain() [4/11]

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

Constructor. Constructs a strain tensor with a given value.

Definition at line 85 of file Strain.hpp.

◆ Strain() [5/11]

template<typename NumericType >
constexpr PhQ::Strain< NumericType >::Strain ( const StrainRate< NumericType > &  strain_rate,
const Time< NumericType > &  time 
)
inlineconstexpr

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

Definition at line 286 of file StrainRate.hpp.

◆ Strain() [6/11]

template<typename NumericType >
constexpr PhQ::Strain< NumericType >::Strain ( const StrainRate< NumericType > &  strain_rate,
const Frequency< NumericType > &  frequency 
)
inlineconstexpr

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

Definition at line 291 of file StrainRate.hpp.

◆ Strain() [7/11]

template<typename NumericType >
constexpr PhQ::Strain< NumericType >::Strain ( const DisplacementGradient< NumericType > &  displacement_gradient)
inlineexplicitconstexpr

Constructor. Constructs a strain tensor from a given displacement gradient using the definition of the strain tensor.

Definition at line 264 of file DisplacementGradient.hpp.

◆ Strain() [8/11]

template<typename NumericType >
constexpr PhQ::Strain< NumericType >::Strain ( const VolumetricThermalExpansionCoefficient< NumericType > &  volumetric_thermal_expansion_coefficient,
const TemperatureDifference< NumericType > &  temperature_difference 
)
inlineconstexpr

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

Definition at line 228 of file VolumetricThermalExpansionCoefficient.hpp.

◆ ~Strain()

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

Destructor. Destroys this strain tensor.

◆ Strain() [9/11]

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

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

◆ Strain() [10/11]

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

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

Definition at line 116 of file Strain.hpp.

◆ Strain() [11/11]

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

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

Member Function Documentation

◆ Dimensions()

static constexpr PhQ::Dimensions PhQ::DimensionlessSymmetricDyad< 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 56 of file DimensionlessSymmetricDyad.hpp.

◆ JSON()

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

Serializes this physical quantity as a JSON message.

Definition at line 81 of file DimensionlessSymmetricDyad.hpp.

◆ MutableValue()

constexpr PhQ::SymmetricDyad<double >& PhQ::DimensionlessSymmetricDyad< double >::MutableValue ( )
inlineconstexprnoexceptinherited

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

Definition at line 66 of file DimensionlessSymmetricDyad.hpp.

◆ operator*() [1/2]

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

Definition at line 296 of file StrainRate.hpp.

◆ operator*() [2/2]

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

Definition at line 193 of file Strain.hpp.

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

◆ operator*=()

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

Definition at line 213 of file Strain.hpp.

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

◆ operator+()

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

◆ operator+=()

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

Definition at line 205 of file Strain.hpp.

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

◆ operator-()

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

◆ operator-=()

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

Definition at line 209 of file Strain.hpp.

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

◆ operator/() [1/2]

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

Definition at line 199 of file Strain.hpp.

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

◆ operator/() [2/2]

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

Definition at line 302 of file StrainRate.hpp.

◆ operator/=()

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

Definition at line 217 of file Strain.hpp.

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

◆ operator=() [1/3]

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

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

◆ operator=() [2/3]

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

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

Definition at line 127 of file Strain.hpp.

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

◆ operator=() [3/3]

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

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

◆ Print()

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

Prints this physical quantity as a string.

Definition at line 76 of file DimensionlessSymmetricDyad.hpp.

◆ SetValue()

constexpr void PhQ::DimensionlessSymmetricDyad< double >::SetValue ( const PhQ::SymmetricDyad< double > &  value)
inlineconstexprnoexceptinherited

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

Definition at line 71 of file DimensionlessSymmetricDyad.hpp.

◆ Value()

constexpr const PhQ::SymmetricDyad<double >& PhQ::DimensionlessSymmetricDyad< double >::Value ( ) const
inlineconstexprnoexceptinherited

Value of this physical quantity.

Definition at line 61 of file DimensionlessSymmetricDyad.hpp.

◆ XML()

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

Serializes this physical quantity as an XML message.

Definition at line 86 of file DimensionlessSymmetricDyad.hpp.

◆ xx()

template<typename NumericType = double>
constexpr ScalarStrain<NumericType> PhQ::Strain< NumericType >::xx ( ) const
inlineconstexprnoexcept

Returns the xx Cartesian component of this strain tensor.

Definition at line 141 of file Strain.hpp.

References PhQ::DimensionlessSymmetricDyad< double >::value, and PhQ::SymmetricDyad< NumericType >::xx().

◆ xy()

template<typename NumericType = double>
constexpr ScalarStrain<NumericType> PhQ::Strain< NumericType >::xy ( ) const
inlineconstexprnoexcept

Returns the xy = yx Cartesian component of this strain tensor.

Definition at line 146 of file Strain.hpp.

References PhQ::DimensionlessSymmetricDyad< double >::value, and PhQ::SymmetricDyad< NumericType >::xy().

◆ xz()

template<typename NumericType = double>
constexpr ScalarStrain<NumericType> PhQ::Strain< NumericType >::xz ( ) const
inlineconstexprnoexcept

Returns the xz = zx Cartesian component of this strain tensor.

Definition at line 151 of file Strain.hpp.

References PhQ::DimensionlessSymmetricDyad< double >::value, and PhQ::SymmetricDyad< NumericType >::xz().

◆ YAML()

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

Serializes this physical quantity as a YAML message.

Definition at line 91 of file DimensionlessSymmetricDyad.hpp.

◆ yx()

template<typename NumericType = double>
constexpr ScalarStrain<NumericType> PhQ::Strain< NumericType >::yx ( ) const
inlineconstexprnoexcept

Returns the yx = xy Cartesian component of this strain tensor.

Definition at line 156 of file Strain.hpp.

References PhQ::DimensionlessSymmetricDyad< double >::value, and PhQ::SymmetricDyad< NumericType >::yx().

◆ yy()

template<typename NumericType = double>
constexpr ScalarStrain<NumericType> PhQ::Strain< NumericType >::yy ( ) const
inlineconstexprnoexcept

Returns the yy Cartesian component of this strain tensor.

Definition at line 161 of file Strain.hpp.

References PhQ::DimensionlessSymmetricDyad< double >::value, and PhQ::SymmetricDyad< NumericType >::yy().

◆ yz()

template<typename NumericType = double>
constexpr ScalarStrain<NumericType> PhQ::Strain< NumericType >::yz ( ) const
inlineconstexprnoexcept

Returns the yz = zy Cartesian component of this strain tensor.

Definition at line 166 of file Strain.hpp.

References PhQ::DimensionlessSymmetricDyad< double >::value, and PhQ::SymmetricDyad< NumericType >::yz().

◆ Zero()

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

◆ zx()

template<typename NumericType = double>
constexpr ScalarStrain<NumericType> PhQ::Strain< NumericType >::zx ( ) const
inlineconstexprnoexcept

Returns the zx = xz Cartesian component of this strain tensor.

Definition at line 171 of file Strain.hpp.

References PhQ::DimensionlessSymmetricDyad< double >::value, and PhQ::SymmetricDyad< NumericType >::zx().

◆ zy()

template<typename NumericType = double>
constexpr ScalarStrain<NumericType> PhQ::Strain< NumericType >::zy ( ) const
inlineconstexprnoexcept

Returns the zy = yz Cartesian component of this strain tensor.

Definition at line 176 of file Strain.hpp.

References PhQ::DimensionlessSymmetricDyad< double >::value, and PhQ::SymmetricDyad< NumericType >::zy().

◆ zz()

template<typename NumericType = double>
constexpr ScalarStrain<NumericType> PhQ::Strain< NumericType >::zz ( ) const
inlineconstexprnoexcept

Returns the zz Cartesian component of this strain tensor.

Definition at line 181 of file Strain.hpp.

References PhQ::DimensionlessSymmetricDyad< double >::value, and PhQ::SymmetricDyad< NumericType >::zz().

Member Data Documentation

◆ value

PhQ::SymmetricDyad<double > PhQ::DimensionlessSymmetricDyad< double >::value
protectedinherited

Value of this physical quantity.

Definition at line 161 of file DimensionlessSymmetricDyad.hpp.


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