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

Three-dimensional Euclidean dyadic tensor. Contains nine components in Cartesian coordinates: xx, xy, xz, yx, yy, yz, zx, zy, and zz. May be symmetric or asymmetric. For a symmetric three-dimensional Euclidean dyadic tensor, see PhQ::SymmetricDyad. For a three-dimensional Euclidean vector, see PhQ::Vector. For a two-dimensional Euclidean vector in the XY plane, see PhQ::PlanarVector. More...

#include "Dyad.hpp"

Public Member Functions

 Dyad ()=default
 Default constructor. Constructs a three-dimensional dyadic tensor with uninitialized xx, xy, xz, yx, yy, yz, zx, zy, and zz Cartesian components. More...
 
constexpr Dyad (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 three-dimensional dyadic tensor from the given xx, xy, xz, yx, yy, yz, zx, zy, and zz Cartesian components. More...
 
constexpr Dyad (const std::array< NumericType, 9 > &xx_xy_xz_yx_yy_yz_zx_zy_zz)
 Constructor. Constructs a three-dimensional dyadic tensor from a given array representing its xx, xy, xz, yx, yy, yz, zx, zy, and zz Cartesian components. More...
 
constexpr Dyad (const SymmetricDyad< NumericType > &symmetric_dyad)
 Constructor. Constructs a three-dimensional dyadic tensor from a given three-dimensional symmetric dyadic tensor. More...
 
 ~Dyad () noexcept=default
 Destructor. Destroys this three-dimensional dyadic tensor. More...
 
constexpr Dyad (const Dyad< NumericType > &other)=default
 Copy constructor. Constructs a three-dimensional dyadic tensor by copying another one. More...
 
template<typename OtherNumericType >
constexpr Dyad (const Dyad< OtherNumericType > &other)
 Copy constructor. Constructs a three-dimensional dyadic tensor by copying another one. More...
 
constexpr Dyad (Dyad< NumericType > &&other) noexcept=default
 Move constructor. Constructs a three-dimensional dyadic tensor by moving another one. More...
 
constexpr Dyad< NumericType > & operator= (const Dyad< NumericType > &other)=default
 Copy assignment operator. Assigns this three-dimensional dyadic tensor by copying another one. More...
 
template<typename OtherNumericType >
constexpr Dyad< NumericType > & operator= (const Dyad< OtherNumericType > &other)
 Copy assignment operator. Assigns this three-dimensional dyadic tensor by copying another one. More...
 
constexpr Dyad< NumericType > & operator= (Dyad< NumericType > &&other) noexcept=default
 Move assignment operator. Assigns this three-dimensional dyadic tensor by moving another one. More...
 
constexpr Dyad< NumericType > & operator= (const SymmetricDyad< NumericType > &other)
 Assignment operator. Assigns this three-dimensional dyadic tensor by copying a three-dimensional symmetric dyadic tensor. More...
 
constexpr Dyad< NumericType > & operator= (const std::array< NumericType, 9 > &xx_xy_xz_yx_yy_yz_zx_zy_zz)
 Assignment operator. Assigns this three-dimensional dyadic tensor by copying a given array representing its xx, xy, xz, yx, yy, yz, zx, zy, and zz Cartesian components. More...
 
constexpr const std::array< NumericType, 9 > & xx_xy_xz_yx_yy_yz_zx_zy_zz () const noexcept
 Returns this three-dimensional symmetric dyadic tensor's xx, xy, xz, yx, yy, yz, zx, zy, and zz Cartesian components as an array. More...
 
constexpr NumericType xx () const noexcept
 Returns this three-dimensional dyadic tensor's xx Cartesian component. More...
 
constexpr NumericType xy () const noexcept
 Returns this three-dimensional dyadic tensor's xy Cartesian component. More...
 
constexpr NumericType xz () const noexcept
 Returns this three-dimensional dyadic tensor's xz Cartesian component. More...
 
constexpr NumericType yx () const noexcept
 Returns this three-dimensional dyadic tensor's yx Cartesian component. More...
 
constexpr NumericType yy () const noexcept
 Returns this three-dimensional dyadic tensor's yy Cartesian component. More...
 
constexpr NumericType yz () const noexcept
 Returns this three-dimensional dyadic tensor's yz Cartesian component. More...
 
constexpr NumericType zx () const noexcept
 Returns this three-dimensional dyadic tensor's zx Cartesian component. More...
 
constexpr NumericType zy () const noexcept
 Returns this three-dimensional dyadic tensor's zy Cartesian component. More...
 
constexpr NumericType zz () const noexcept
 Returns this three-dimensional dyadic tensor's zz Cartesian component. More...
 
constexpr std::array< NumericType, 9 > & Mutable_xx_xy_xz_yx_yy_yz_zx_zy_zz () noexcept
 Returns this three-dimensional symmetric dyadic tensor's xx, xy, xz, yx, yy, yz, zx, zy, and zz Cartesian components as a mutable array. More...
 
constexpr NumericType & Mutable_xx () noexcept
 Returns this three-dimensional dyadic tensor's xx Cartesian component as a mutable value. More...
 
constexpr NumericType & Mutable_xy () noexcept
 Returns this three-dimensional dyadic tensor's xy Cartesian component as a mutable value. More...
 
constexpr NumericType & Mutable_xz () noexcept
 Returns this three-dimensional dyadic tensor's xz Cartesian component as a mutable value. More...
 
constexpr NumericType & Mutable_yx () noexcept
 Returns this three-dimensional dyadic tensor's yx Cartesian component as a mutable value. More...
 
constexpr NumericType & Mutable_yy () noexcept
 Returns this three-dimensional dyadic tensor's yy Cartesian component as a mutable value. More...
 
constexpr NumericType & Mutable_yz () noexcept
 Returns this three-dimensional dyadic tensor's yz Cartesian component as a mutable value. More...
 
constexpr NumericType & Mutable_zx () noexcept
 Returns this three-dimensional dyadic tensor's zx Cartesian component as a mutable value. More...
 
constexpr NumericType & Mutable_zy () noexcept
 Returns this three-dimensional dyadic tensor's zy Cartesian component as a mutable value. More...
 
constexpr NumericType & Mutable_zz () noexcept
 Returns this three-dimensional dyadic tensor's zz Cartesian component as a mutable value. More...
 
constexpr void Set_xx_xy_xz_yx_yy_yz_zx_zy_zz (const std::array< NumericType, 9 > &xx_xy_xz_yx_yy_yz_zx_zy_zz) noexcept
 Sets this three-dimensional dyadic tensor's xx, xy, xz, yx, yy, yz, zx, zy, and zz Cartesian components to the given values. More...
 
constexpr void Set_xx_xy_xz_yx_yy_yz_zx_zy_zz (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) noexcept
 Sets this three-dimensional dyadic tensor's xx, xy, xz, yx, yy, yz, zx, zy, and zz Cartesian components to the given values. More...
 
constexpr void Set_xx (const NumericType xx) noexcept
 Sets this three-dimensional dyadic tensor's xx Cartesian component to a given value. More...
 
constexpr void Set_xy (const NumericType xy) noexcept
 Sets this three-dimensional dyadic tensor's xy Cartesian component to a given value. More...
 
constexpr void Set_xz (const NumericType xz) noexcept
 Sets this three-dimensional dyadic tensor's xz Cartesian component to a given value. More...
 
constexpr void Set_yx (const NumericType yx) noexcept
 Sets this three-dimensional dyadic tensor's yx Cartesian component to a given value. More...
 
constexpr void Set_yy (const NumericType yy) noexcept
 Sets this three-dimensional dyadic tensor's yy Cartesian component to a given value. More...
 
constexpr void Set_yz (const NumericType yz) noexcept
 Sets this three-dimensional dyadic tensor's yz Cartesian component to a given value. More...
 
constexpr void Set_zx (const NumericType zx) noexcept
 Sets this three-dimensional dyadic tensor's zx Cartesian component to a given value. More...
 
constexpr void Set_zy (const NumericType zy) noexcept
 Sets this three-dimensional dyadic tensor's zy Cartesian component to a given value. More...
 
constexpr void Set_zz (const NumericType zz) noexcept
 Sets this three-dimensional dyadic tensor's zz Cartesian component to a given value. More...
 
constexpr bool IsSymmetric () const noexcept
 Returns whether this three-dimensional dyadic tensor is symmetric. More...
 
constexpr NumericType Trace () const noexcept
 Returns the trace of this three-dimensional dyadic tensor. More...
 
constexpr NumericType Determinant () const noexcept
 Returns the determinant of this three-dimensional dyadic tensor. More...
 
constexpr Dyad< NumericType > Transpose () const
 Returns the transpose of this three-dimensional dyadic tensor. More...
 
constexpr Dyad< NumericType > Cofactors () const
 Returns the cofactors of this three-dimensional dyadic tensor. More...
 
constexpr Dyad< NumericType > Adjugate () const
 Returns the adjugate of this three-dimensional dyadic tensor. More...
 
constexpr std::optional< Dyad< NumericType > > Inverse () const
 Returns the inverse of this three-dimensional dyadic tensor if it exists, or std::nullopt otherwise. More...
 
std::string Print () const
 Prints this three-dimensional dyadic tensor as a string. More...
 
std::string JSON () const
 Serializes this three-dimensional dyadic tensor as a JSON message. More...
 
std::string XML () const
 Serializes this three-dimensional dyadic tensor as an XML message. More...
 
std::string YAML () const
 Serializes this three-dimensional dyadic tensor as a YAML message. More...
 
constexpr void operator+= (const Dyad< NumericType > &other) noexcept
 Adds another three-dimensional dyadic tensor to this one. More...
 
constexpr void operator-= (const Dyad< NumericType > &other) noexcept
 Subtracts another three-dimensional dyadic tensor from this one. More...
 
template<typename OtherNumericType >
constexpr void operator*= (const OtherNumericType number) noexcept
 Multiplies this three-dimensional dyadic tensor by the given number. More...
 
template<typename OtherNumericType >
constexpr void operator/= (const OtherNumericType number) noexcept
 Divides this three-dimensional dyadic tensor by the given number. More...
 

Static Public Member Functions

static constexpr Dyad< NumericType > Zero ()
 Statically creates a three-dimensional dyadic tensor with its xx, xy, xz, yx, yy, yz, zx, zy, and zz Cartesian components initialized to zero. More...
 

Private Attributes

std::array< NumericType, 9 > xx_xy_xz_yx_yy_yz_zx_zy_zz_
 Cartesian components of this three-dimensional dyadic tensor. More...
 

Detailed Description

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

Three-dimensional Euclidean dyadic tensor. Contains nine components in Cartesian coordinates: xx, xy, xz, yx, yy, yz, zx, zy, and zz. May be symmetric or asymmetric. For a symmetric three-dimensional Euclidean dyadic tensor, see PhQ::SymmetricDyad. For a three-dimensional Euclidean vector, see PhQ::Vector. For a two-dimensional Euclidean vector in the XY plane, see PhQ::PlanarVector.

Template Parameters
NumericTypeFloating-point numeric type: float, double, or long double. Defaults to double if unspecified.

Definition at line 51 of file Dyad.hpp.

Constructor & Destructor Documentation

◆ Dyad() [1/7]

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

Default constructor. Constructs a three-dimensional dyadic tensor with uninitialized xx, xy, xz, yx, yy, yz, zx, zy, and zz Cartesian components.

◆ Dyad() [2/7]

template<typename NumericType = double>
constexpr PhQ::Dyad< NumericType >::Dyad ( 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 three-dimensional dyadic tensor from the given xx, xy, xz, yx, yy, yz, zx, zy, and zz Cartesian components.

Definition at line 63 of file Dyad.hpp.

References PhQ::Dyad< NumericType >::xx(), PhQ::Dyad< NumericType >::xy(), PhQ::Dyad< NumericType >::xz(), PhQ::Dyad< NumericType >::yx(), PhQ::Dyad< NumericType >::yy(), PhQ::Dyad< NumericType >::yz(), PhQ::Dyad< NumericType >::zx(), PhQ::Dyad< NumericType >::zy(), and PhQ::Dyad< NumericType >::zz().

◆ Dyad() [3/7]

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

Constructor. Constructs a three-dimensional dyadic tensor from a given array representing its xx, xy, xz, yx, yy, yz, zx, zy, and zz Cartesian components.

Definition at line 70 of file Dyad.hpp.

◆ Dyad() [4/7]

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

◆ ~Dyad()

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

Destructor. Destroys this three-dimensional dyadic tensor.

◆ Dyad() [5/7]

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

Copy constructor. Constructs a three-dimensional dyadic tensor by copying another one.

◆ Dyad() [6/7]

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

Copy constructor. Constructs a three-dimensional dyadic tensor by copying another one.

Definition at line 89 of file Dyad.hpp.

◆ Dyad() [7/7]

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

Move constructor. Constructs a three-dimensional dyadic tensor by moving another one.

Member Function Documentation

◆ Adjugate()

template<typename NumericType = double>
constexpr Dyad<NumericType> PhQ::Dyad< NumericType >::Adjugate ( ) const
inlineconstexpr

Returns the adjugate of this three-dimensional dyadic tensor.

Definition at line 377 of file Dyad.hpp.

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

◆ Cofactors()

template<typename NumericType = double>
constexpr Dyad<NumericType> PhQ::Dyad< NumericType >::Cofactors ( ) const
inlineconstexpr

◆ Determinant()

template<typename NumericType = double>
constexpr NumericType PhQ::Dyad< NumericType >::Determinant ( ) const
inlineconstexprnoexcept

◆ Inverse()

template<typename NumericType >
constexpr std::optional< Dyad< NumericType > > PhQ::Dyad< NumericType >::Inverse
inlineconstexpr

Returns the inverse of this three-dimensional dyadic tensor if it exists, or std::nullopt otherwise.

Definition at line 713 of file Dyad.hpp.

◆ IsSymmetric()

template<typename NumericType = double>
constexpr bool PhQ::Dyad< NumericType >::IsSymmetric ( ) const
inlineconstexprnoexcept

◆ JSON()

template<typename NumericType = double>
std::string PhQ::Dyad< NumericType >::JSON ( ) const
inline

◆ Mutable_xx()

template<typename NumericType = double>
constexpr NumericType& PhQ::Dyad< NumericType >::Mutable_xx ( )
inlineconstexprnoexcept

Returns this three-dimensional dyadic tensor's xx Cartesian component as a mutable value.

Definition at line 219 of file Dyad.hpp.

References PhQ::Dyad< NumericType >::xx_xy_xz_yx_yy_yz_zx_zy_zz_.

◆ Mutable_xx_xy_xz_yx_yy_yz_zx_zy_zz()

template<typename NumericType = double>
constexpr std::array<NumericType, 9>& PhQ::Dyad< NumericType >::Mutable_xx_xy_xz_yx_yy_yz_zx_zy_zz ( )
inlineconstexprnoexcept

Returns this three-dimensional symmetric dyadic tensor's xx, xy, xz, yx, yy, yz, zx, zy, and zz Cartesian components as a mutable array.

Definition at line 213 of file Dyad.hpp.

References PhQ::Dyad< NumericType >::xx_xy_xz_yx_yy_yz_zx_zy_zz_.

Referenced by PhQ::ConvertInPlace().

◆ Mutable_xy()

template<typename NumericType = double>
constexpr NumericType& PhQ::Dyad< NumericType >::Mutable_xy ( )
inlineconstexprnoexcept

Returns this three-dimensional dyadic tensor's xy Cartesian component as a mutable value.

Definition at line 225 of file Dyad.hpp.

◆ Mutable_xz()

template<typename NumericType = double>
constexpr NumericType& PhQ::Dyad< NumericType >::Mutable_xz ( )
inlineconstexprnoexcept

Returns this three-dimensional dyadic tensor's xz Cartesian component as a mutable value.

Definition at line 231 of file Dyad.hpp.

References PhQ::Dyad< NumericType >::xx_xy_xz_yx_yy_yz_zx_zy_zz_.

◆ Mutable_yx()

template<typename NumericType = double>
constexpr NumericType& PhQ::Dyad< NumericType >::Mutable_yx ( )
inlineconstexprnoexcept

Returns this three-dimensional dyadic tensor's yx Cartesian component as a mutable value.

Definition at line 237 of file Dyad.hpp.

References PhQ::Dyad< NumericType >::xx_xy_xz_yx_yy_yz_zx_zy_zz_.

◆ Mutable_yy()

template<typename NumericType = double>
constexpr NumericType& PhQ::Dyad< NumericType >::Mutable_yy ( )
inlineconstexprnoexcept

Returns this three-dimensional dyadic tensor's yy Cartesian component as a mutable value.

Definition at line 243 of file Dyad.hpp.

References PhQ::Dyad< NumericType >::xx_xy_xz_yx_yy_yz_zx_zy_zz_.

◆ Mutable_yz()

template<typename NumericType = double>
constexpr NumericType& PhQ::Dyad< NumericType >::Mutable_yz ( )
inlineconstexprnoexcept

Returns this three-dimensional dyadic tensor's yz Cartesian component as a mutable value.

Definition at line 249 of file Dyad.hpp.

References PhQ::Dyad< NumericType >::xx_xy_xz_yx_yy_yz_zx_zy_zz_.

◆ Mutable_zx()

template<typename NumericType = double>
constexpr NumericType& PhQ::Dyad< NumericType >::Mutable_zx ( )
inlineconstexprnoexcept

Returns this three-dimensional dyadic tensor's zx Cartesian component as a mutable value.

Definition at line 255 of file Dyad.hpp.

References PhQ::Dyad< NumericType >::xx_xy_xz_yx_yy_yz_zx_zy_zz_.

◆ Mutable_zy()

template<typename NumericType = double>
constexpr NumericType& PhQ::Dyad< NumericType >::Mutable_zy ( )
inlineconstexprnoexcept

Returns this three-dimensional dyadic tensor's zy Cartesian component as a mutable value.

Definition at line 261 of file Dyad.hpp.

References PhQ::Dyad< NumericType >::xx_xy_xz_yx_yy_yz_zx_zy_zz_.

◆ Mutable_zz()

template<typename NumericType = double>
constexpr NumericType& PhQ::Dyad< NumericType >::Mutable_zz ( )
inlineconstexprnoexcept

Returns this three-dimensional dyadic tensor's zz Cartesian component as a mutable value.

Definition at line 267 of file Dyad.hpp.

References PhQ::Dyad< NumericType >::xx_xy_xz_yx_yy_yz_zx_zy_zz_.

◆ operator*=()

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

Multiplies this three-dimensional dyadic tensor by the given number.

Template Parameters
OtherNumericTypeFloating-point numeric type of the given number. Deduced automatically.

Definition at line 446 of file Dyad.hpp.

References PhQ::Dyad< NumericType >::xx_xy_xz_yx_yy_yz_zx_zy_zz_.

◆ operator+=()

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

Adds another three-dimensional dyadic tensor to this one.

Definition at line 417 of file Dyad.hpp.

References PhQ::Dyad< NumericType >::xx_xy_xz_yx_yy_yz_zx_zy_zz_.

◆ operator-=()

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

Subtracts another three-dimensional dyadic tensor from this one.

Definition at line 430 of file Dyad.hpp.

References PhQ::Dyad< NumericType >::xx_xy_xz_yx_yy_yz_zx_zy_zz_.

◆ operator/=()

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

Divides this three-dimensional dyadic tensor by the given number.

Template Parameters
OtherNumericTypeFloating-point numeric type of the given number. Deduced automatically.

Definition at line 462 of file Dyad.hpp.

References PhQ::Dyad< NumericType >::xx_xy_xz_yx_yy_yz_zx_zy_zz_.

◆ operator=() [1/5]

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

Copy assignment operator. Assigns this three-dimensional dyadic tensor by copying another one.

◆ operator=() [2/5]

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

◆ operator=() [3/5]

template<typename NumericType = double>
constexpr Dyad<NumericType>& PhQ::Dyad< NumericType >::operator= ( const std::array< NumericType, 9 > &  xx_xy_xz_yx_yy_yz_zx_zy_zz)
inlineconstexpr

Assignment operator. Assigns this three-dimensional dyadic tensor by copying a given array representing its xx, xy, xz, yx, yy, yz, zx, zy, and zz Cartesian components.

Definition at line 141 of file Dyad.hpp.

References PhQ::Dyad< NumericType >::xx_xy_xz_yx_yy_yz_zx_zy_zz(), and PhQ::Dyad< NumericType >::xx_xy_xz_yx_yy_yz_zx_zy_zz_.

◆ operator=() [4/5]

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

◆ operator=() [5/5]

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

Move assignment operator. Assigns this three-dimensional dyadic tensor by moving another one.

◆ Print()

template<typename NumericType = double>
std::string PhQ::Dyad< NumericType >::Print ( ) const
inline

◆ Set_xx()

template<typename NumericType = double>
constexpr void PhQ::Dyad< NumericType >::Set_xx ( const NumericType  xx)
inlineconstexprnoexcept

Sets this three-dimensional dyadic tensor's xx Cartesian component to a given value.

Definition at line 296 of file Dyad.hpp.

References PhQ::Dyad< NumericType >::xx(), and PhQ::Dyad< NumericType >::xx_xy_xz_yx_yy_yz_zx_zy_zz_.

◆ Set_xx_xy_xz_yx_yy_yz_zx_zy_zz() [1/2]

template<typename NumericType = double>
constexpr void PhQ::Dyad< NumericType >::Set_xx_xy_xz_yx_yy_yz_zx_zy_zz ( 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 
)
inlineconstexprnoexcept

◆ Set_xx_xy_xz_yx_yy_yz_zx_zy_zz() [2/2]

template<typename NumericType = double>
constexpr void PhQ::Dyad< NumericType >::Set_xx_xy_xz_yx_yy_yz_zx_zy_zz ( const std::array< NumericType, 9 > &  xx_xy_xz_yx_yy_yz_zx_zy_zz)
inlineconstexprnoexcept

Sets this three-dimensional dyadic tensor's xx, xy, xz, yx, yy, yz, zx, zy, and zz Cartesian components to the given values.

Definition at line 273 of file Dyad.hpp.

References PhQ::Dyad< NumericType >::xx_xy_xz_yx_yy_yz_zx_zy_zz(), and PhQ::Dyad< NumericType >::xx_xy_xz_yx_yy_yz_zx_zy_zz_.

◆ Set_xy()

template<typename NumericType = double>
constexpr void PhQ::Dyad< NumericType >::Set_xy ( const NumericType  xy)
inlineconstexprnoexcept

Sets this three-dimensional dyadic tensor's xy Cartesian component to a given value.

Definition at line 301 of file Dyad.hpp.

References PhQ::Dyad< NumericType >::xx_xy_xz_yx_yy_yz_zx_zy_zz_, and PhQ::Dyad< NumericType >::xy().

◆ Set_xz()

template<typename NumericType = double>
constexpr void PhQ::Dyad< NumericType >::Set_xz ( const NumericType  xz)
inlineconstexprnoexcept

Sets this three-dimensional dyadic tensor's xz Cartesian component to a given value.

Definition at line 306 of file Dyad.hpp.

References PhQ::Dyad< NumericType >::xx_xy_xz_yx_yy_yz_zx_zy_zz_, and PhQ::Dyad< NumericType >::xz().

◆ Set_yx()

template<typename NumericType = double>
constexpr void PhQ::Dyad< NumericType >::Set_yx ( const NumericType  yx)
inlineconstexprnoexcept

Sets this three-dimensional dyadic tensor's yx Cartesian component to a given value.

Definition at line 311 of file Dyad.hpp.

References PhQ::Dyad< NumericType >::xx_xy_xz_yx_yy_yz_zx_zy_zz_, and PhQ::Dyad< NumericType >::yx().

◆ Set_yy()

template<typename NumericType = double>
constexpr void PhQ::Dyad< NumericType >::Set_yy ( const NumericType  yy)
inlineconstexprnoexcept

Sets this three-dimensional dyadic tensor's yy Cartesian component to a given value.

Definition at line 316 of file Dyad.hpp.

References PhQ::Dyad< NumericType >::xx_xy_xz_yx_yy_yz_zx_zy_zz_, and PhQ::Dyad< NumericType >::yy().

◆ Set_yz()

template<typename NumericType = double>
constexpr void PhQ::Dyad< NumericType >::Set_yz ( const NumericType  yz)
inlineconstexprnoexcept

Sets this three-dimensional dyadic tensor's yz Cartesian component to a given value.

Definition at line 321 of file Dyad.hpp.

References PhQ::Dyad< NumericType >::xx_xy_xz_yx_yy_yz_zx_zy_zz_, and PhQ::Dyad< NumericType >::yz().

◆ Set_zx()

template<typename NumericType = double>
constexpr void PhQ::Dyad< NumericType >::Set_zx ( const NumericType  zx)
inlineconstexprnoexcept

Sets this three-dimensional dyadic tensor's zx Cartesian component to a given value.

Definition at line 326 of file Dyad.hpp.

References PhQ::Dyad< NumericType >::xx_xy_xz_yx_yy_yz_zx_zy_zz_, and PhQ::Dyad< NumericType >::zx().

◆ Set_zy()

template<typename NumericType = double>
constexpr void PhQ::Dyad< NumericType >::Set_zy ( const NumericType  zy)
inlineconstexprnoexcept

Sets this three-dimensional dyadic tensor's zy Cartesian component to a given value.

Definition at line 331 of file Dyad.hpp.

References PhQ::Dyad< NumericType >::xx_xy_xz_yx_yy_yz_zx_zy_zz_, and PhQ::Dyad< NumericType >::zy().

◆ Set_zz()

template<typename NumericType = double>
constexpr void PhQ::Dyad< NumericType >::Set_zz ( const NumericType  zz)
inlineconstexprnoexcept

Sets this three-dimensional dyadic tensor's zz Cartesian component to a given value.

Definition at line 336 of file Dyad.hpp.

References PhQ::Dyad< NumericType >::xx_xy_xz_yx_yy_yz_zx_zy_zz_, and PhQ::Dyad< NumericType >::zz().

◆ Trace()

template<typename NumericType = double>
constexpr NumericType PhQ::Dyad< NumericType >::Trace ( ) const
inlineconstexprnoexcept

Returns the trace of this three-dimensional dyadic tensor.

Definition at line 346 of file Dyad.hpp.

References PhQ::Dyad< NumericType >::xx(), PhQ::Dyad< NumericType >::yy(), and PhQ::Dyad< NumericType >::zz().

◆ Transpose()

template<typename NumericType = double>
constexpr Dyad<NumericType> PhQ::Dyad< NumericType >::Transpose ( ) const
inlineconstexpr

◆ XML()

template<typename NumericType = double>
std::string PhQ::Dyad< NumericType >::XML ( ) const
inline

◆ xx()

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

◆ xx_xy_xz_yx_yy_yz_zx_zy_zz()

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

Returns this three-dimensional symmetric dyadic tensor's xx, xy, xz, yx, yy, yz, zx, zy, and zz Cartesian components as an array.

Definition at line 161 of file Dyad.hpp.

References PhQ::Dyad< NumericType >::xx_xy_xz_yx_yy_yz_zx_zy_zz_.

Referenced by PhQ::Convert(), PhQ::ConvertStatically(), PhQ::Dyad< NumericType >::operator=(), and PhQ::Dyad< NumericType >::Set_xx_xy_xz_yx_yy_yz_zx_zy_zz().

◆ xy()

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

◆ xz()

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

◆ YAML()

template<typename NumericType = double>
std::string PhQ::Dyad< NumericType >::YAML ( ) const
inline

◆ yx()

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

◆ yy()

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

◆ yz()

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

◆ Zero()

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

Statically creates a three-dimensional dyadic tensor with its xx, xy, xz, yx, yy, yz, zx, zy, and zz Cartesian components initialized to zero.

Definition at line 149 of file Dyad.hpp.

Referenced by PhQ::DisplacementGradient< NumericType >::Zero(), and PhQ::VelocityGradient< NumericType >::Zero().

◆ zx()

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

◆ zy()

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

◆ zz()

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

Member Data Documentation

◆ xx_xy_xz_yx_yy_yz_zx_zy_zz_

template<typename NumericType = double>
std::array<NumericType, 9> PhQ::Dyad< NumericType >::xx_xy_xz_yx_yy_yz_zx_zy_zz_
private

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