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::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.
 
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.
 
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.
 
constexpr Strain (const SymmetricDyad< NumericType > &value)
 Constructor. Constructs a strain tensor with a given value.
 
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.
 
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.
 
constexpr Strain (const DisplacementGradient< NumericType > &displacement_gradient)
 Constructor. Constructs a strain tensor from a given displacement gradient using the definition of the strain tensor.
 
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.
 
 ~Strain () noexcept=default
 Destructor. Destroys this strain tensor.
 
constexpr Strain (const Strain< NumericType > &other)=default
 Copy constructor. Constructs a strain tensor by copying another one.
 
template<typename OtherNumericType >
constexpr Strain (const Strain< OtherNumericType > &other)
 Copy constructor. Constructs a strain tensor by copying another one.
 
constexpr Strain (Strain< NumericType > &&other) noexcept=default
 Move constructor. Constructs a strain tensor by moving another one.
 
constexpr Strain< NumericType > & operator= (const Strain< NumericType > &other)=default
 Copy assignment operator. Assigns this strain tensor by copying another one.
 
template<typename OtherNumericType >
constexpr Strain< NumericType > & operator= (const Strain< OtherNumericType > &other)
 Copy assignment operator. Assigns this strain tensor by copying another one.
 
constexpr Strain< NumericType > & operator= (Strain< NumericType > &&other) noexcept=default
 Move assignment operator. Assigns this strain tensor by moving another one.
 
constexpr ScalarStrain< NumericType > xx () const noexcept
 Returns the xx Cartesian component of this strain tensor.
 
constexpr ScalarStrain< NumericType > xy () const noexcept
 Returns the xy = yx Cartesian component of this strain tensor.
 
constexpr ScalarStrain< NumericType > xz () const noexcept
 Returns the xz = zx Cartesian component of this strain tensor.
 
constexpr ScalarStrain< NumericType > yx () const noexcept
 Returns the yx = xy Cartesian component of this strain tensor.
 
constexpr ScalarStrain< NumericType > yy () const noexcept
 Returns the yy Cartesian component of this strain tensor.
 
constexpr ScalarStrain< NumericType > yz () const noexcept
 Returns the yz = zy Cartesian component of this strain tensor.
 
constexpr ScalarStrain< NumericType > zx () const noexcept
 Returns the zx = xz Cartesian component of this strain tensor.
 
constexpr ScalarStrain< NumericType > zy () const noexcept
 Returns the zy = yz Cartesian component of this strain tensor.
 
constexpr ScalarStrain< NumericType > zz () const noexcept
 Returns the zz Cartesian component of this strain tensor.
 
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< NumericType > & Value () const noexcept
 Value of this physical quantity.
 
constexpr PhQ::SymmetricDyad< NumericType > & MutableValue () noexcept
 Returns the value of this physical quantity as a mutable value.
 
constexpr void SetValue (const PhQ::SymmetricDyad< 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 Strain< NumericType > Zero ()
 Statically creates a strain tensor 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

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

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

template<typename NumericType = double>
static constexpr PhQ::Dimensions PhQ::DimensionlessSymmetricDyad< 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 56 of file DimensionlessSymmetricDyad.hpp.

References PhQ::Dimensionless.

◆ JSON()

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

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

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

◆ operator+()

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

Definition at line 185 of file Strain.hpp.

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

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

◆ operator-()

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

Definition at line 189 of file Strain.hpp.

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

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

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

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

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
inlineconstexprnoexceptinherited

◆ XML()

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

Serializes this physical quantity as an XML message.

Definition at line 86 of file DimensionlessSymmetricDyad.hpp.

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

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

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

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

◆ YAML()

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

Serializes this physical quantity as a YAML message.

Definition at line 91 of file DimensionlessSymmetricDyad.hpp.

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

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

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

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

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

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

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

Member Data Documentation

◆ value

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

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