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

Three-dimensional Euclidean displacement gradient dyadic tensor. Gradient of the displacement vector. May be symmetric or asymmetric. Contains nine components in Cartesian coordinates: xx, xy, xz, yx, yy, yz, zx, zy, and zz. For the scalar components or resultants of a displacement gradient tensor, see PhQ::ScalarDisplacementGradient. The time rate of change of a displacement gradient is a velocity gradient; see PhQ::VelocityGradient, PhQ::Time, and PhQ::Frequency. More...

#include "DisplacementGradient.hpp"

Public Member Functions

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

Detailed Description

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

Three-dimensional Euclidean displacement gradient dyadic tensor. Gradient of the displacement vector. May be symmetric or asymmetric. Contains nine components in Cartesian coordinates: xx, xy, xz, yx, yy, yz, zx, zy, and zz. For the scalar components or resultants of a displacement gradient tensor, see PhQ::ScalarDisplacementGradient. The time rate of change of a displacement gradient is a velocity gradient; see PhQ::VelocityGradient, PhQ::Time, and PhQ::Frequency.

Definition at line 51 of file DisplacementGradient.hpp.

Constructor & Destructor Documentation

◆ DisplacementGradient() [1/9]

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

Default constructor. Constructs a displacement gradient tensor with an uninitialized value.

◆ DisplacementGradient() [2/9]

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

Constructor. Constructs a displacement gradient tensor whose value has the given xx, xy, xz, yx, yy, yz, zx, zy, and zz Cartesian components.

Definition at line 59 of file DisplacementGradient.hpp.

◆ DisplacementGradient() [3/9]

template<typename NumericType = double>
constexpr PhQ::DisplacementGradient< NumericType >::DisplacementGradient ( const std::array< NumericType, 9 > &  xx_xy_xz_yx_yy_yz_zx_zy_zz)
inlineexplicitconstexpr

Constructor. Constructs a displacement gradient tensor from a given array representing its value's xx, xy, xz, yx, yy, yz, zx, zy, and zz Cartesian components.

Definition at line 66 of file DisplacementGradient.hpp.

◆ DisplacementGradient() [4/9]

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

Constructor. Constructs a displacement gradient tensor with a given value.

Definition at line 71 of file DisplacementGradient.hpp.

◆ DisplacementGradient() [5/9]

template<typename NumericType >
constexpr PhQ::DisplacementGradient< NumericType >::DisplacementGradient ( const VelocityGradient< NumericType > &  velocity_gradient,
const Time< NumericType > &  time 
)
inlineconstexpr

Constructor. Constructs a displacement gradient tensor from a given velocity gradient tensor and time using the definition of speed.

Definition at line 311 of file VelocityGradient.hpp.

◆ DisplacementGradient() [6/9]

template<typename NumericType >
constexpr PhQ::DisplacementGradient< NumericType >::DisplacementGradient ( const VelocityGradient< NumericType > &  velocity_gradient,
const Frequency< NumericType > &  frequency 
)
inlineconstexpr

Constructor. Constructs a displacement gradient tensor from a given velocity gradient tensor and frequency using the definition of speed.

Definition at line 316 of file VelocityGradient.hpp.

◆ ~DisplacementGradient()

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

Destructor. Destroys this displacement gradient tensor.

◆ DisplacementGradient() [7/9]

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

Copy constructor. Constructs a displacement gradient tensor by copying another one.

◆ DisplacementGradient() [8/9]

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

Copy constructor. Constructs a displacement gradient tensor by copying another one.

Definition at line 92 of file DisplacementGradient.hpp.

◆ DisplacementGradient() [9/9]

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

Move constructor. Constructs a displacement gradient tensor by moving another one.

Member Function Documentation

◆ Dimensions()

static constexpr PhQ::Dimensions PhQ::DimensionlessDyad< 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 DimensionlessDyad.hpp.

◆ JSON()

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

Serializes this physical quantity as a JSON message.

Definition at line 81 of file DimensionlessDyad.hpp.

◆ MutableValue()

constexpr PhQ::Dyad<double >& PhQ::DimensionlessDyad< double >::MutableValue ( )
inlineconstexprnoexceptinherited

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

Definition at line 66 of file DimensionlessDyad.hpp.

◆ operator*() [1/2]

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

Definition at line 322 of file VelocityGradient.hpp.

◆ operator*() [2/2]

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

Definition at line 183 of file DisplacementGradient.hpp.

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

◆ operator*=()

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

Definition at line 205 of file DisplacementGradient.hpp.

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

◆ operator+()

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

◆ operator+=()

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

Definition at line 195 of file DisplacementGradient.hpp.

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

◆ operator-()

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

◆ operator-=()

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

Definition at line 200 of file DisplacementGradient.hpp.

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

◆ operator/() [1/2]

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

Definition at line 189 of file DisplacementGradient.hpp.

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

◆ operator/() [2/2]

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

Definition at line 328 of file VelocityGradient.hpp.

◆ operator/=()

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

Definition at line 209 of file DisplacementGradient.hpp.

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

◆ operator=() [1/3]

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

Copy assignment operator. Assigns this displacement gradient tensor by copying another one.

◆ operator=() [2/3]

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

Copy assignment operator. Assigns this displacement gradient tensor by copying another one.

Definition at line 106 of file DisplacementGradient.hpp.

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

◆ operator=() [3/3]

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

Move assignment operator. Assigns this displacement gradient tensor by moving another one.

◆ Print()

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

Prints this physical quantity as a string.

Definition at line 76 of file DimensionlessDyad.hpp.

◆ SetValue()

constexpr void PhQ::DimensionlessDyad< double >::SetValue ( const PhQ::Dyad< double > &  value)
inlineconstexprnoexceptinherited

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

Definition at line 71 of file DimensionlessDyad.hpp.

◆ Strain()

template<typename NumericType = double>
constexpr PhQ::Strain<NumericType> PhQ::DisplacementGradient< NumericType >::Strain ( ) const
inlineconstexpr

Creates a strain tensor from this displacement gradient tensor using the definition of the strain tensor.

Definition at line 169 of file DisplacementGradient.hpp.

◆ Value()

constexpr const PhQ::Dyad<double >& PhQ::DimensionlessDyad< double >::Value ( ) const
inlineconstexprnoexceptinherited

Value of this physical quantity.

Definition at line 61 of file DimensionlessDyad.hpp.

◆ XML()

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

Serializes this physical quantity as an XML message.

Definition at line 86 of file DimensionlessDyad.hpp.

◆ xx()

template<typename NumericType = double>
constexpr ScalarDisplacementGradient<NumericType> PhQ::DisplacementGradient< NumericType >::xx ( ) const
inlineconstexprnoexcept

Returns the xx Cartesian component of this displacement gradient tensor.

Definition at line 123 of file DisplacementGradient.hpp.

References PhQ::DimensionlessDyad< double >::value, and PhQ::Dyad< NumericType >::xx().

◆ xy()

template<typename NumericType = double>
constexpr ScalarDisplacementGradient<NumericType> PhQ::DisplacementGradient< NumericType >::xy ( ) const
inlineconstexprnoexcept

Returns the xy Cartesian component of this displacement gradient tensor.

Definition at line 128 of file DisplacementGradient.hpp.

References PhQ::DimensionlessDyad< double >::value, and PhQ::Dyad< NumericType >::xy().

◆ xz()

template<typename NumericType = double>
constexpr ScalarDisplacementGradient<NumericType> PhQ::DisplacementGradient< NumericType >::xz ( ) const
inlineconstexprnoexcept

Returns the xz Cartesian component of this displacement gradient tensor.

Definition at line 133 of file DisplacementGradient.hpp.

References PhQ::DimensionlessDyad< double >::value, and PhQ::Dyad< NumericType >::xz().

◆ YAML()

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

Serializes this physical quantity as a YAML message.

Definition at line 91 of file DimensionlessDyad.hpp.

◆ yx()

template<typename NumericType = double>
constexpr ScalarDisplacementGradient<NumericType> PhQ::DisplacementGradient< NumericType >::yx ( ) const
inlineconstexprnoexcept

Returns the yx Cartesian component of this displacement gradient tensor.

Definition at line 138 of file DisplacementGradient.hpp.

References PhQ::DimensionlessDyad< double >::value, and PhQ::Dyad< NumericType >::yx().

◆ yy()

template<typename NumericType = double>
constexpr ScalarDisplacementGradient<NumericType> PhQ::DisplacementGradient< NumericType >::yy ( ) const
inlineconstexprnoexcept

Returns the yy Cartesian component of this displacement gradient tensor.

Definition at line 143 of file DisplacementGradient.hpp.

References PhQ::DimensionlessDyad< double >::value, and PhQ::Dyad< NumericType >::yy().

◆ yz()

template<typename NumericType = double>
constexpr ScalarDisplacementGradient<NumericType> PhQ::DisplacementGradient< NumericType >::yz ( ) const
inlineconstexprnoexcept

Returns the yz Cartesian component of this displacement gradient tensor.

Definition at line 148 of file DisplacementGradient.hpp.

References PhQ::DimensionlessDyad< double >::value, and PhQ::Dyad< NumericType >::yz().

◆ Zero()

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

Statically creates a displacement gradient tensor of zero.

Definition at line 118 of file DisplacementGradient.hpp.

References PhQ::Dyad< NumericType >::Zero().

◆ zx()

template<typename NumericType = double>
constexpr ScalarDisplacementGradient<NumericType> PhQ::DisplacementGradient< NumericType >::zx ( ) const
inlineconstexprnoexcept

Returns the zx Cartesian component of this displacement gradient tensor.

Definition at line 153 of file DisplacementGradient.hpp.

References PhQ::DimensionlessDyad< double >::value, and PhQ::Dyad< NumericType >::zx().

◆ zy()

template<typename NumericType = double>
constexpr ScalarDisplacementGradient<NumericType> PhQ::DisplacementGradient< NumericType >::zy ( ) const
inlineconstexprnoexcept

Returns the zy Cartesian component of this displacement gradient tensor.

Definition at line 158 of file DisplacementGradient.hpp.

References PhQ::DimensionlessDyad< double >::value, and PhQ::Dyad< NumericType >::zy().

◆ zz()

template<typename NumericType = double>
constexpr ScalarDisplacementGradient<NumericType> PhQ::DisplacementGradient< NumericType >::zz ( ) const
inlineconstexprnoexcept

Returns the zz Cartesian component of this displacement gradient tensor.

Definition at line 163 of file DisplacementGradient.hpp.

References PhQ::DimensionlessDyad< double >::value, and PhQ::Dyad< NumericType >::zz().

Member Data Documentation

◆ value

PhQ::Dyad<double > PhQ::DimensionlessDyad< double >::value
protectedinherited

Value of this physical quantity.

Definition at line 157 of file DimensionlessDyad.hpp.


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