tfel
Loading...
Searching...
No Matches
tfel::math::stensor< N, ValueType > Class Template Reference

symmetric tensor. More...

#include </home/runner/work/tfel/tfel/include/TFEL/Math/Forward/stensor.hxx>

Inheritance diagram for tfel::math::stensor< N, ValueType >:
tfel::math::StensorConceptBase< stensor< N, ValueType > > tfel::math::stensor_common tfel::math::GenericFixedSizeArray< stensor< N, ValueType >, FixedSizeVectorPolicy< StensorDimeToSize< N >::value, ValueType > >

Public Types

using GenericFixedSizeArrayBase
 a simple alias
Public Types inherited from tfel::math::StensorConceptBase< stensor< N, ValueType > >
using ConceptTag
 an alias to StensorTag
Public Types inherited from tfel::math::stensor_common
enum  EigenSolver {
  TFELEIGENSOLVER , FSESANALYTICALEIGENSOLVER , FSESJACOBIEIGENSOLVER , FSESQLEIGENSOLVER ,
  FSESCUPPENEIGENSOLVER , FSESHYBRIDEIGENSOLVER , GTESYMMETRICQREIGENSOLVER , HARARIEIGENSOLVER
}
 available eigen solver More...
enum  EigenValuesOrdering { ASCENDING , DESCENDING , UNSORTED }
 available eigen solver More...
Public Types inherited from tfel::math::GenericFixedSizeArray< stensor< N, ValueType >, FixedSizeVectorPolicy< StensorDimeToSize< N >::value, ValueType > >
using value_type

Public Member Functions

 TFEL_MATH_FIXED_SIZE_ARRAY_DEFAULT_METHODS (stensor, GenericFixedSizeArrayBase)
template<typename InputIterator>
requires ( std::is_same_v<typename std::iterator_traits<InputIterator>::value_type, base_type<ValueType>>)
TFEL_HOST_DEVICE constexpr void importVoigt (const InputIterator) noexcept
 import from external memory location which uses Voigt notations for strains
template<typename InputIterator>
requires ( std::is_same_v<typename std::iterator_traits<InputIterator>::value_type, base_type<ValueType>>)
TFEL_HOST_DEVICE constexpr void importTab (const InputIterator) noexcept
 import from external memory location which uses Voigt notations for stresses
template<typename InputIterator>
requires ( std::is_same_v<typename std::iterator_traits<InputIterator>::value_type, base_type<ValueType>>)
TFEL_HOST_DEVICE constexpr void import (const InputIterator) noexcept
 import values from external memory location
TFEL_HOST_DEVICE constexpr void exportTab (base_type< ValueType > *const) const noexcept
 export to external memory location using Voigt notations for0 stresses
TFEL_HOST_DEVICE constexpr void write (base_type< ValueType > *const) const noexcept
 write to external memory location
template<EigenSolver = TFELEIGENSOLVER>
TFEL_HOST_DEVICE TFEL_MATH_INLINE2 void computeEigenValues (ValueType &, ValueType &, ValueType &, const bool=false) const
template<EigenSolver = TFELEIGENSOLVER>
TFEL_HOST_DEVICE TFEL_MATH_INLINE2 void computeEigenValues (tvector< 3u, ValueType > &, const bool=false) const
template<EigenSolver = TFELEIGENSOLVER>
TFEL_HOST_DEVICE TFEL_MATH_INLINE2 tvector< 3u, ValueType > computeEigenValues (const bool=false) const
template<EigenSolver = TFELEIGENSOLVER>
TFEL_HOST_DEVICE TFEL_MATH_INLINE2 void computeEigenValues (ValueType &, ValueType &, ValueType &, const EigenValuesOrdering, const bool=false) const
template<EigenSolver = TFELEIGENSOLVER>
TFEL_HOST_DEVICE TFEL_MATH_INLINE2 void computeEigenValues (tvector< 3u, ValueType > &, const EigenValuesOrdering, const bool=false) const
template<EigenSolver = TFELEIGENSOLVER>
TFEL_HOST_DEVICE TFEL_MATH_INLINE2 tvector< 3u, ValueType > computeEigenValues (const EigenValuesOrdering, const bool=false) const
template<EigenSolver = TFELEIGENSOLVER>
TFEL_HOST_DEVICE TFEL_MATH_INLINE2 std::tuple< tvector< 3u, ValueType >, rotation_matrix< ValueType > > computeEigenVectors (const bool=false) const
template<EigenSolver = TFELEIGENSOLVER>
TFEL_HOST_DEVICE TFEL_MATH_INLINE2 void computeEigenVectors (tvector< 3u, ValueType > &, rotation_matrix< ValueType > &, const bool=false) const
template<EigenSolver = TFELEIGENSOLVER>
TFEL_HOST_DEVICE TFEL_MATH_INLINE2 std::tuple< tvector< 3u, ValueType >, rotation_matrix< ValueType > > computeEigenVectors (const EigenValuesOrdering, const bool=false) const
template<EigenSolver = TFELEIGENSOLVER>
TFEL_HOST_DEVICE TFEL_MATH_INLINE2 void computeEigenVectors (tvector< 3u, ValueType > &, rotation_matrix< ValueType > &, const EigenValuesOrdering, const bool=false) const
template<typename VectorType>
TFEL_HOST_DEVICE TFEL_MATH_INLINE2 bool computeEigenVector (VectorType &, const ValueType) const
TFEL_HOST_DEVICE constexpr void changeBasis (const rotation_matrix< base_type< ValueType > > &) noexcept
 change basis
template<typename InputIterator>
TFEL_HOST_DEVICE void constexpr copy (const InputIterator src) noexcept
template<EigenSolver = TFELEIGENSOLVER, typename Function>
TFEL_HOST_DEVICE auto computeIsotropicFunction (const Function &, const bool=false) const
template<EigenSolver = TFELEIGENSOLVER, typename Function, typename FunctionDerivative>
TFEL_HOST_DEVICE auto computeIsotropicFunctionDerivative (const Function &, const FunctionDerivative &, const ValueType, const bool=false) const
template<EigenSolver = TFELEIGENSOLVER, typename Function, typename FunctionDerivative>
TFEL_HOST_DEVICE auto computeIsotropicFunctionAndDerivative (const Function &, const FunctionDerivative &, const ValueType, const bool=false) const
template<typename stensor_common::EigenSolver es>
TFEL_HOST_DEVICE void computeEigenValues (T &vp0, T &vp1, T &vp2, const bool b) const
template<typename stensor_common::EigenSolver es>
TFEL_HOST_DEVICE void computeEigenValues (tvector< 3u, T > &vp, const bool b) const
template<typename stensor_common::EigenSolver es>
TFEL_HOST_DEVICE tvector< 3u, T > computeEigenValues (const bool b) const
template<typename stensor_common::EigenSolver es>
TFEL_HOST_DEVICE void computeEigenValues (T &vp0, T &vp1, T &vp2, const EigenValuesOrdering o, const bool b) const
template<typename stensor_common::EigenSolver es>
TFEL_HOST_DEVICE void computeEigenValues (tvector< 3u, T > &vp, const EigenValuesOrdering o, const bool b) const
template<typename stensor_common::EigenSolver es>
TFEL_HOST_DEVICE tvector< 3u, T > computeEigenValues (const EigenValuesOrdering o, const bool b) const
template<typename stensor_common::EigenSolver es>
TFEL_HOST_DEVICE void computeEigenVectors (tvector< 3u, T > &vp, tmatrix< 3u, 3u, base_type< T > > &m, const bool b) const
template<typename stensor_common::EigenSolver es>
TFEL_HOST_DEVICE std::tuple< tvector< 3u, T >, tmatrix< 3u, 3u, base_type< T > > > computeEigenVectors (const bool b) const
template<typename stensor_common::EigenSolver es>
TFEL_HOST_DEVICE void computeEigenVectors (tvector< 3u, T > &vp, tmatrix< 3u, 3u, base_type< T > > &m, const EigenValuesOrdering o, const bool b) const
template<typename stensor_common::EigenSolver es>
TFEL_HOST_DEVICE std::tuple< tvector< 3u, T >, tmatrix< 3u, 3u, base_type< T > > > computeEigenVectors (const EigenValuesOrdering o, const bool b) const
template<typename VectorType>
TFEL_HOST_DEVICE bool computeEigenVector (VectorType &ev, const T vp) const
template<StensorConcept StensorType>
requires ((getSpaceDimension<StensorType>() == N) && (isAssignableTo<base_type<T>, numeric_type<StensorType>>()))
TFEL_HOST_DEVICE constexpr void computeEigenValuesDerivatives (StensorType &n0, StensorType &n1, StensorType &n2, const rotation_matrix< T > &m) noexcept
template<StensorConcept StensorType>
requires ((getSpaceDimension<StensorType>() == N) && (isAssignableTo<base_type<T>, numeric_type<StensorType>>()))
TFEL_HOST_DEVICE constexpr void computeEigenTensors (StensorType &n0, StensorType &n1, StensorType &n2, const rotation_matrix< T > &m) noexcept
template<ST2toST2Concept ST2toST2Type>
requires ((getSpaceDimension<ST2toST2Type>() == N) && (isAssignableTo< BinaryOperationResult<base_type<T>, T, OpDiv>, numeric_type<ST2toST2Type>>()))
TFEL_HOST_DEVICE void computeEigenTensorsDerivatives (ST2toST2Type &dn0_ds, ST2toST2Type &dn1_ds, ST2toST2Type &dn2_ds, const tvector< 3u, T > &vp, const rotation_matrix< T > &m, const T eps)
template<typename Function>
TFEL_HOST_DEVICE auto computeIsotropicFunction (const Function &f, const tvector< 3u, T > &vp, const rotation_matrix< T > &m)
template<typename T2>
TFEL_HOST_DEVICE constexpr auto computeIsotropicFunction (const tvector< 3u, T2 > &f, const rotation_matrix< T > &m) noexcept
template<typename Function, typename FunctionDerivative>
TFEL_HOST_DEVICE auto computeIsotropicFunctionDerivative (const Function &f, const FunctionDerivative &df, const tvector< 3u, T > &vp, const rotation_matrix< T > &m, const T eps)
template<ST2toST2Concept ST2toST2Type, typename Function, typename FunctionDerivative>
requires ((getSpaceDimension<ST2toST2Type>() == N) && (isAssignableTo<BinaryOperationResult<T, T, OpDiv>, numeric_type<ST2toST2Type>>()))
TFEL_HOST_DEVICE void computeIsotropicFunctionDerivative (ST2toST2Type &d, const Function &f, const FunctionDerivative &df, const tvector< 3u, T > &vp, const rotation_matrix< T > &m, const T eps)
template<typename T1, typename T2>
TFEL_HOST_DEVICE auto computeIsotropicFunctionDerivative (const tvector< 3u, T1 > &f, const tvector< 3u, T2 > &df, const tvector< 3u, T > &vp, const rotation_matrix< T > &m, const T eps)
template<ST2toST2Concept ST2toST2Type, typename T1, typename T2>
requires ((getSpaceDimension<ST2toST2Type>() == N) && (isAssignableTo<BinaryOperationResult<T, T, OpDiv>, numeric_type<ST2toST2Type>>()))
TFEL_HOST_DEVICE void computeIsotropicFunctionDerivative (ST2toST2Type &d, const tvector< 3u, T1 > &f, const tvector< 3u, T2 > &df, const tvector< 3u, T > &vp, const rotation_matrix< T > &m, const T eps)
template<typename stensor_common::EigenSolver es, typename Function, typename FunctionDerivative>
TFEL_HOST_DEVICE auto computeIsotropicFunctionDerivative (const Function &f, const FunctionDerivative &df, const T eps, const bool b) const
template<typename stensor_common::EigenSolver es, typename Function, typename FunctionDerivative>
TFEL_HOST_DEVICE auto computeIsotropicFunctionAndDerivative (const Function &f, const FunctionDerivative &df, const T eps, const bool b) const
template<typename InputIterator>
TFEL_HOST_DEVICE constexpr void copy (const InputIterator src) noexcept
Public Member Functions inherited from tfel::math::GenericFixedSizeArray< stensor< N, ValueType >, FixedSizeVectorPolicy< StensorDimeToSize< N >::value, ValueType > >
TFEL_HOST_DEVICE constexpr GenericFixedSizeArray () noexcept
 default constructor
TFEL_HOST_DEVICE constexpr GenericFixedSizeArray (const GenericFixedSizeArray &) noexcept
 copy constructor
TFEL_HOST_DEVICE constexpr GenericFixedSizeArray (GenericFixedSizeArray &&) noexcept
 move constructor
TFEL_HOST_DEVICE constexpr GenericFixedSizeArray (const ValueType &) noexcept
 constructor from a value
TFEL_HOST_DEVICE constexpr GenericFixedSizeArray (const std::initializer_list< ValueType2 > &values) noexcept
 constructor from an initializer list
TFEL_HOST_DEVICE constexpr GenericFixedSizeArray (const InputIterator) noexcept
 default donstructor.
TFEL_HOST_DEVICE constexpr GenericFixedSizeArray (const OtherArray &) noexcept
 copy constructor from an object assignable to the Child class.
TFEL_HOST_DEVICE constexpr GenericFixedSizeArray< stensor< N, ValueType >, FixedSizeVectorPolicy< StensorDimeToSize< N >::value, ValueType >, getArrayPolicySize< FixedSizeVectorPolicy< StensorDimeToSize< N >::value, ValueType > >() >::size_type getContainerSize () const noexcept
TFEL_HOST_DEVICE constexpr stensor< N, ValueType > & operator= (const OtherArray &) noexcept
 assign values values from an other array
TFEL_HOST_DEVICE constexpr stensor< N, ValueType > & operator+= (const OtherArray &) noexcept
TFEL_HOST_DEVICE constexpr stensor< N, ValueType > & operator-= (const OtherArray &) noexcept
TFEL_HOST_DEVICE constexpr stensor< N, ValueType > & operator*= (const ValueType2 &) noexcept
TFEL_HOST_DEVICE constexpr stensor< N, ValueType > & operator/= (const ValueType2 &) noexcept
TFEL_HOST_DEVICE constexpr GenericFixedSizeArray< stensor< N, ValueType >, FixedSizeVectorPolicy< StensorDimeToSize< N >::value, ValueType >, getArrayPolicySize< FixedSizeVectorPolicy< StensorDimeToSize< N >::value, ValueType > >() >::pointer data () noexcept
TFEL_HOST_DEVICE constexpr GenericFixedSizeArray< stensor< N, ValueType >, FixedSizeVectorPolicy< StensorDimeToSize< N >::value, ValueType >, getArrayPolicySize< FixedSizeVectorPolicy< StensorDimeToSize< N >::value, ValueType > >() >::const_pointer data () const noexcept
TFEL_HOST_DEVICE constexpr GenericFixedSizeArray (const std::initializer_list< ValueType > &values) noexcept

Static Public Member Functions

static TFEL_HOST_DEVICE constexpr stensor< N, base_type< ValueType > > Id () noexcept
static TFEL_HOST_DEVICE constexpr base_type< ValueType > Id (const typename stensor< N, ValueType >::size_type) noexcept
template<MatrixConcept MatrixType>
requires (isAssignableTo<numeric_type<MatrixType>, ValueType>())
static TFEL_HOST_DEVICE constexpr auto buildFromMatrix (const MatrixType &) noexcept
template<VectorConcept VectorType>
requires ( isAssignableTo<typename ComputeUnaryResult<numeric_type<VectorType>, Power<2>>::Result, ValueType>())
static TFEL_HOST_DEVICE constexpr auto buildFromVectorDiadicProduct (const VectorType &) noexcept
template<VectorConcept VectorType, VectorConcept VectorType2>
requires (isAssignableTo<BinaryOperationResult<numeric_type<VectorType>, numeric_type<VectorType2>, OpMult>, ValueType>())
static TFEL_HOST_DEVICE constexpr auto buildFromVectorsSymmetricDiadicProduct (const VectorType &, const VectorType2 &) noexcept
static TFEL_HOST_DEVICE constexpr auto buildFromEigenValuesAndVectors (const ValueType &, const ValueType &, const ValueType &, const rotation_matrix< ValueType > &) noexcept
static TFEL_HOST_DEVICE constexpr auto buildFromEigenValuesAndVectors (const tvector< 3u, ValueType > &, const rotation_matrix< ValueType > &) noexcept
static TFEL_HOST_DEVICE auto buildLogarithmFromEigenValuesAndVectors (const ValueType &, const ValueType &, const ValueType &, const rotation_matrix< ValueType > &) noexcept
static TFEL_HOST_DEVICE auto buildLogarithmFromEigenValuesAndVectors (const tvector< 3u, ValueType > &, const rotation_matrix< ValueType > &) noexcept
static TFEL_HOST_DEVICE constexpr auto buildAbsoluteValueFromEigenValuesAndVectors (const ValueType &, const ValueType &, const ValueType &, const rotation_matrix< ValueType > &) noexcept
static TFEL_HOST_DEVICE constexpr auto buildAbsoluteValueFromEigenValuesAndVectors (const tvector< 3u, ValueType > &, const rotation_matrix< ValueType > &) noexcept
static TFEL_HOST_DEVICE constexpr auto buildPositivePartFromEigenValuesAndVectors (const ValueType &, const ValueType &, const ValueType &, const rotation_matrix< ValueType > &) noexcept
static TFEL_HOST_DEVICE constexpr auto buildPositivePartFromEigenValuesAndVectors (const tvector< 3u, ValueType > &, const rotation_matrix< ValueType > &) noexcept
static TFEL_HOST_DEVICE constexpr auto buildNegativePartFromEigenValuesAndVectors (const ValueType &, const ValueType &, const ValueType &, const rotation_matrix< ValueType > &) noexcept
static TFEL_HOST_DEVICE constexpr auto buildNegativePartFromEigenValuesAndVectors (const tvector< 3u, ValueType > &, const rotation_matrix< ValueType > &) noexcept
static TFEL_HOST_DEVICE constexpr auto computeEigenValuesDerivatives (const rotation_matrix< ValueType > &) noexcept
template<StensorConcept StensorType>
requires ((getSpaceDimension<StensorType>() == N) && (isAssignableTo<base_type<ValueType>, numeric_type<StensorType>>()))
static TFEL_HOST_DEVICE constexpr void computeEigenValuesDerivatives (StensorType &, StensorType &, StensorType &, const rotation_matrix< ValueType > &) noexcept
static TFEL_HOST_DEVICE constexpr auto computeEigenTensors (const rotation_matrix< ValueType > &) noexcept
template<StensorConcept StensorType>
requires ((getSpaceDimension<StensorType>() == N) && (isAssignableTo<base_type<ValueType>, numeric_type<StensorType>>()))
static TFEL_HOST_DEVICE constexpr void computeEigenTensors (StensorType &, StensorType &, StensorType &, const rotation_matrix< ValueType > &) noexcept
 compute the eigentensors
template<ST2toST2Concept ST2toST2Type>
requires ( (getSpaceDimension<ST2toST2Type>() == N) && (isAssignableTo< BinaryOperationResult<base_type<ValueType>, ValueType, OpDiv>, numeric_type<ST2toST2Type>>()))
static TFEL_HOST_DEVICE void computeEigenTensorsDerivatives (ST2toST2Type &, ST2toST2Type &, ST2toST2Type &, const tvector< 3u, ValueType > &, const rotation_matrix< ValueType > &, const ValueType)
 compute the "eigentensors" derivatives
template<typename Function>
static TFEL_HOST_DEVICE auto computeIsotropicFunction (const Function &, const tvector< 3u, ValueType > &, const rotation_matrix< ValueType > &)
 compute an isotropic function
template<typename T2>
static TFEL_HOST_DEVICE constexpr auto computeIsotropicFunction (const tvector< 3u, T2 > &, const rotation_matrix< ValueType > &) noexcept
template<typename T1, typename T2>
static TFEL_HOST_DEVICE auto computeIsotropicFunctionDerivative (const tvector< 3u, T1 > &, const tvector< 3u, T2 > &, const tvector< 3u, ValueType > &, const rotation_matrix< ValueType > &, const ValueType)
template<ST2toST2Concept ST2toST2Type, typename T1, typename T2>
requires ((getSpaceDimension<ST2toST2Type>() == N) && (isAssignableTo< BinaryOperationResult<ValueType, ValueType, OpDiv>, numeric_type<ST2toST2Type>>()))
static TFEL_HOST_DEVICE void computeIsotropicFunctionDerivative (ST2toST2Type &, const tvector< 3u, T1 > &, const tvector< 3u, T2 > &, const tvector< 3u, ValueType > &, const rotation_matrix< ValueType > &, const ValueType)
template<typename Function, typename FunctionDerivative>
static TFEL_HOST_DEVICE auto computeIsotropicFunctionDerivative (const Function &, const FunctionDerivative &, const tvector< 3u, ValueType > &, const rotation_matrix< ValueType > &, const ValueType)
template<ST2toST2Concept ST2toST2Type, typename Function, typename FunctionDerivative>
requires ((getSpaceDimension<ST2toST2Type>() == N) && (isAssignableTo< BinaryOperationResult<ValueType, ValueType, OpDiv>, numeric_type<ST2toST2Type>>()))
static TFEL_HOST_DEVICE void computeIsotropicFunctionDerivative (ST2toST2Type &, const Function &, const FunctionDerivative &, const tvector< 3u, ValueType > &, const rotation_matrix< ValueType > &, const ValueType)
Static Public Member Functions inherited from tfel::math::GenericFixedSizeArray< stensor< N, ValueType >, FixedSizeVectorPolicy< StensorDimeToSize< N >::value, ValueType > >
static TFEL_HOST_DEVICE constexpr stensor< N, ValueType > zero ()

Additional Inherited Members

Protected Member Functions inherited from tfel::math::GenericFixedSizeArray< stensor< N, ValueType >, FixedSizeVectorPolicy< StensorDimeToSize< N >::value, ValueType > >
TFEL_HOST_DEVICE constexpr GenericFixedSizeArray & operator= (const GenericFixedSizeArray &) noexcept
 assignement operator
TFEL_HOST_DEVICE constexpr GenericFixedSizeArray & operator= (GenericFixedSizeArray &&) noexcept
 move assigment
Protected Attributes inherited from tfel::math::GenericFixedSizeArray< stensor< N, ValueType >, FixedSizeVectorPolicy< StensorDimeToSize< N >::value, ValueType > >
FixedSizeVectorPolicy< StensorDimeToSize< N >::value, ValueType >::value_type v [getArrayPolicySize< FixedSizeVectorPolicy< StensorDimeToSize< N >::value, ValueType > >()]
 values holded

Detailed Description

template<unsigned short N, typename ValueType>
class tfel::math::stensor< N, ValueType >

symmetric tensor.

Template Parameters
Nthe spatial dimension, see StensorDimeToSize for details.
Tnumerical type used, by default, double
Precondition
This class is only defined for N=1u,2u and 3u.
See also
StensorDimeToSize and StensorSizeToDime.

Member Typedef Documentation

◆ GenericFixedSizeArrayBase

template<unsigned short N, typename ValueType>
using tfel::math::stensor< N, ValueType >::GenericFixedSizeArrayBase
Initial value:
GenericFixedSizeArray<
an array policy based on the fixed size vector indexing policy
Definition FixedSizeArrayPolicies.hxx:26
symmetric tensor.
Definition stensor.hxx:114

a simple alias

Member Function Documentation

◆ buildAbsoluteValueFromEigenValuesAndVectors() [1/2]

template<unsigned short N, typename ValueType>
TFEL_HOST_DEVICE constexpr auto tfel::math::stensor< N, ValueType >::buildAbsoluteValueFromEigenValuesAndVectors ( const tvector< 3u, ValueType > & ,
const rotation_matrix< ValueType > &  )
staticnodiscardconstexprnoexcept

build the absolute value of a symmetric tensor given through its eigen values and vectors

Parameters
[in]vp: eigen values
[in]m: matrix containing the eigen vectors

◆ buildAbsoluteValueFromEigenValuesAndVectors() [2/2]

template<unsigned short N, typename ValueType>
TFEL_HOST_DEVICE constexpr auto tfel::math::stensor< N, ValueType >::buildAbsoluteValueFromEigenValuesAndVectors ( const ValueType & ,
const ValueType & ,
const ValueType & ,
const rotation_matrix< ValueType > &  )
staticnodiscardconstexprnoexcept

build the absolute value of a symmetric tensor given through its eigen values and vectors

Parameters
[in]v1: first eigen value
[in]v2: second eigen value
[in]v2: third eigen value
[in]m: matrix containing the eigen vectors

◆ buildFromEigenValuesAndVectors() [1/2]

template<unsigned short N, typename ValueType>
TFEL_HOST_DEVICE constexpr auto tfel::math::stensor< N, ValueType >::buildFromEigenValuesAndVectors ( const tvector< 3u, ValueType > & ,
const rotation_matrix< ValueType > &  )
staticnodiscardconstexprnoexcept

build a symmetric tensor from its eigen values and vectors

Parameters
[in]vp: eigen values
[in]m: matrix containing the eigen vectors

◆ buildFromEigenValuesAndVectors() [2/2]

template<unsigned short N, typename ValueType>
TFEL_HOST_DEVICE constexpr auto tfel::math::stensor< N, ValueType >::buildFromEigenValuesAndVectors ( const ValueType & ,
const ValueType & ,
const ValueType & ,
const rotation_matrix< ValueType > &  )
staticnodiscardconstexprnoexcept

build a symmetric tensor from its eigen values and vectors

Parameters
[in]v1: first eigen value
[in]v2: second eigen value
[in]v2: third eigen value
[in]m: matrix containing the eigen vectors

◆ buildFromMatrix()

template<unsigned short N, typename T>
requires (isAssignableTo<numeric_type<MatrixType>, ValueType>())
template<MatrixConcept MatrixType>
requires (isAssignableTo<numeric_type<MatrixType>, ValueType>())
TFEL_HOST_DEVICE constexpr auto tfel::math::stensor< N, T >::buildFromMatrix ( const MatrixType & m)
staticnodiscardconstexprnoexcept

build a symmetric tensor from a matrix

Parameters
[in]m: matrix

◆ buildFromVectorDiadicProduct()

template<unsigned short N, typename T>
requires ( isAssignableTo<typename ComputeUnaryResult<numeric_type<VectorType>, Power<2>>::Result, ValueType>())
template<VectorConcept VectorType>
requires ( isAssignableTo<typename ComputeUnaryResult<numeric_type<VectorType>, Power<2>>::Result, ValueType>())
TFEL_HOST_DEVICE constexpr auto tfel::math::stensor< N, T >::buildFromVectorDiadicProduct ( const VectorType & v)
staticnodiscardconstexprnoexcept

build a symmetric tensor from the diadic product of a vector with itself

Parameters
[in]v: vector

◆ buildFromVectorsSymmetricDiadicProduct()

template<unsigned short N, typename T>
requires (isAssignableTo<BinaryOperationResult<numeric_type<VectorType>, numeric_type<VectorType2>, OpMult>, ValueType>())
template<VectorConcept VectorType, VectorConcept VectorType2>
requires (isAssignableTo<BinaryOperationResult<numeric_type<VectorType>, numeric_type<VectorType2>, OpMult>, ValueType>())
TFEL_HOST_DEVICE constexpr auto tfel::math::stensor< N, T >::buildFromVectorsSymmetricDiadicProduct ( const VectorType & v1,
const VectorType2 & v2 )
staticnodiscardconstexprnoexcept

build a symmetric tensor from the symmetric diadic product of two vectors

Parameters
[in]v1: first vector
[in]v1: second vector

◆ buildLogarithmFromEigenValuesAndVectors() [1/2]

template<unsigned short N, typename ValueType>
TFEL_HOST_DEVICE auto tfel::math::stensor< N, ValueType >::buildLogarithmFromEigenValuesAndVectors ( const tvector< 3u, ValueType > & ,
const rotation_matrix< ValueType > &  )
staticnodiscardnoexcept

build the logarithm of a symmetric tensor given through its eigen values and vectors

Parameters
[in]vp: eigen values
[in]m: matrix containing the eigen vectors

◆ buildLogarithmFromEigenValuesAndVectors() [2/2]

template<unsigned short N, typename ValueType>
TFEL_HOST_DEVICE auto tfel::math::stensor< N, ValueType >::buildLogarithmFromEigenValuesAndVectors ( const ValueType & ,
const ValueType & ,
const ValueType & ,
const rotation_matrix< ValueType > &  )
staticnodiscardnoexcept

build the logarithm of a symmetric tensor given through its eigen values and vectors

Parameters
[in]v1: first eigen value
[in]v2: second eigen value
[in]v2: third eigen value
[in]m: matrix containing the eigen vectors

◆ buildNegativePartFromEigenValuesAndVectors() [1/2]

template<unsigned short N, typename ValueType>
TFEL_HOST_DEVICE constexpr auto tfel::math::stensor< N, ValueType >::buildNegativePartFromEigenValuesAndVectors ( const tvector< 3u, ValueType > & ,
const rotation_matrix< ValueType > &  )
staticnodiscardconstexprnoexcept

build the negative part of a symmetric tensor given through its eigen values and vectors

Parameters
[in]vp: eigen values
[in]m: matrix containing the eigen vectors

◆ buildNegativePartFromEigenValuesAndVectors() [2/2]

template<unsigned short N, typename ValueType>
TFEL_HOST_DEVICE constexpr auto tfel::math::stensor< N, ValueType >::buildNegativePartFromEigenValuesAndVectors ( const ValueType & ,
const ValueType & ,
const ValueType & ,
const rotation_matrix< ValueType > &  )
staticnodiscardconstexprnoexcept

build the positive part of a symmetric tensor given through its eigen values and vectors

Parameters
[in]v1: first eigen value
[in]v2: second eigen value
[in]v2: third eigen value
[in]m: matrix containing the eigen vectors

◆ buildPositivePartFromEigenValuesAndVectors() [1/2]

template<unsigned short N, typename ValueType>
TFEL_HOST_DEVICE constexpr auto tfel::math::stensor< N, ValueType >::buildPositivePartFromEigenValuesAndVectors ( const tvector< 3u, ValueType > & ,
const rotation_matrix< ValueType > &  )
staticnodiscardconstexprnoexcept

build the positive part of a symmetric tensor given through its eigen values and vectors

Parameters
[in]vp: eigen values
[in]m: matrix containing the eigen vectors

◆ buildPositivePartFromEigenValuesAndVectors() [2/2]

template<unsigned short N, typename ValueType>
TFEL_HOST_DEVICE constexpr auto tfel::math::stensor< N, ValueType >::buildPositivePartFromEigenValuesAndVectors ( const ValueType & ,
const ValueType & ,
const ValueType & ,
const rotation_matrix< ValueType > &  )
staticnodiscardconstexprnoexcept

build the positive part of a symmetric tensor given through its eigen values and vectors

Parameters
[in]v1: first eigen value
[in]v2: second eigen value
[in]v2: third eigen value
[in]m: matrix containing the eigen vectors

◆ changeBasis()

template<unsigned short N, typename ValueType>
TFEL_HOST_DEVICE constexpr void tfel::math::stensor< N, T >::changeBasis ( const rotation_matrix< base_type< ValueType > > & )
constexprnoexcept

change basis

Parameters
[in]mrotation matrix

◆ computeEigenTensors() [1/2]

template<unsigned short N, typename ValueType>
TFEL_HOST_DEVICE constexpr auto tfel::math::stensor< N, ValueType >::computeEigenTensors ( const rotation_matrix< ValueType > & )
staticnodiscardconstexprnoexcept
Returns
the eigentensors
Parameters
[in]meigenvectors

◆ computeEigenTensors() [2/2]

template<unsigned short N, typename ValueType>
template<StensorConcept StensorType>
requires ((getSpaceDimension<StensorType>() == N) && (isAssignableTo<base_type<ValueType>, numeric_type<StensorType>>()))
TFEL_HOST_DEVICE constexpr void tfel::math::stensor< N, ValueType >::computeEigenTensors ( StensorType & ,
StensorType & ,
StensorType & ,
const rotation_matrix< ValueType > &  )
staticconstexprnoexcept

compute the eigentensors

Parameters
[out]n0derivative of the first eigenvalue
[out]n1derivative of the second eigenvalue
[out]n2derivative of the third eigenvalue
[in]meigenvectors

◆ computeEigenTensorsDerivatives()

template<unsigned short N, typename ValueType>
template<ST2toST2Concept ST2toST2Type>
requires ( (getSpaceDimension<ST2toST2Type>() == N) && (isAssignableTo< BinaryOperationResult<base_type<ValueType>, ValueType, OpDiv>, numeric_type<ST2toST2Type>>()))
TFEL_HOST_DEVICE void tfel::math::stensor< N, ValueType >::computeEigenTensorsDerivatives ( ST2toST2Type & ,
ST2toST2Type & ,
ST2toST2Type & ,
const tvector< 3u, ValueType > & ,
const rotation_matrix< ValueType > & ,
const ValueType  )
static

compute the "eigentensors" derivatives

Parameters
[out]dn0_dsderivative of the first eigentensor
[out]dn1_dsderivative of the second eigentensor
[out]dn2_dsderivative of the third eigentensor
[in]vpeigen values
[in]meigen vectors
[in]epsnumerical parameter for regularisation

◆ computeEigenValues() [1/6]

template<unsigned short N, typename ValueType>
template<EigenSolver = TFELEIGENSOLVER>
TFEL_HOST_DEVICE TFEL_MATH_INLINE2 tvector< 3u, ValueType > tfel::math::stensor< N, ValueType >::computeEigenValues ( const bool = false) const
nodiscard

compute eigenvalues

Template Parameters
eseigen solver
Parameters
[in]brefine eigenvalues
Returns
eigen values

◆ computeEigenValues() [2/6]

template<unsigned short N, typename ValueType>
template<EigenSolver = TFELEIGENSOLVER>
TFEL_HOST_DEVICE TFEL_MATH_INLINE2 tvector< 3u, ValueType > tfel::math::stensor< N, ValueType >::computeEigenValues ( const EigenValuesOrdering ,
const bool = false ) const
nodiscard

compute eigenvalues

Template Parameters
eseigen solver
Parameters
[in]oeigenvalues ordering
[in]brefine eigenvalues
Returns
eigen values
Note
even though one may ask the eigen values to be sorted, the eigenvalues in 1D are not sorted by this method and in 2D, only the inplane eigenvalues are sorted.

◆ computeEigenValues() [3/6]

template<unsigned short N, typename ValueType>
template<EigenSolver = TFELEIGENSOLVER>
TFEL_HOST_DEVICE TFEL_MATH_INLINE2 void tfel::math::stensor< N, ValueType >::computeEigenValues ( tvector< 3u, ValueType > & ,
const bool = false ) const

compute eigenvalues

Template Parameters
eseigen solver
Parameters
[out]vpeigen values
[in]brefine eigenvalues

◆ computeEigenValues() [4/6]

template<unsigned short N, typename ValueType>
template<EigenSolver = TFELEIGENSOLVER>
TFEL_HOST_DEVICE TFEL_MATH_INLINE2 void tfel::math::stensor< N, ValueType >::computeEigenValues ( tvector< 3u, ValueType > & ,
const EigenValuesOrdering ,
const bool = false ) const

compute eigenvalues

Template Parameters
eseigen solver
Parameters
[out]vpeigen values
[in]oeigenvalues ordering
[in]brefine eigenvalues
Note
even though one may ask the eigen values to be sorted, the eigenvalues in 1D are not sorted by this method and in 2D, only the inplane eigenvalues are sorted.

◆ computeEigenValues() [5/6]

template<unsigned short N, typename ValueType>
template<EigenSolver = TFELEIGENSOLVER>
TFEL_HOST_DEVICE TFEL_MATH_INLINE2 void tfel::math::stensor< N, ValueType >::computeEigenValues ( ValueType & ,
ValueType & ,
ValueType & ,
const bool = false ) const

compute eigenvalues

Template Parameters
eseigen solver
Parameters
[out]vp0first eigen value
[out]vp1first eigen value
[out]vp2first eigen value
[in]brefine eigenvalues

◆ computeEigenValues() [6/6]

template<unsigned short N, typename ValueType>
template<EigenSolver = TFELEIGENSOLVER>
TFEL_HOST_DEVICE TFEL_MATH_INLINE2 void tfel::math::stensor< N, ValueType >::computeEigenValues ( ValueType & ,
ValueType & ,
ValueType & ,
const EigenValuesOrdering ,
const bool = false ) const

compute eigenvalues

Template Parameters
eseigen solver
Parameters
[out]vp0first eigen value
[out]vp1first eigen value
[out]vp2first eigen value
[in]oeigenvalues ordering
[in]brefine eigenvalues
Note
even though one may ask the eigen values to be sorted, the eigenvalues in 1D are not sorted by this method and in 2D, only the inplane eigenvalues are sorted.

◆ computeEigenValuesDerivatives() [1/2]

template<unsigned short N, typename ValueType>
TFEL_HOST_DEVICE constexpr auto tfel::math::stensor< N, ValueType >::computeEigenValuesDerivatives ( const rotation_matrix< ValueType > & )
staticnodiscardconstexprnoexcept

compute the eigenvalues derivatives with respect with this tensor

Parameters
[out]nderivatives of the eigenvalues
[in]meigenvectors

This eigenvalues of the derivatives is given by~:

\[\frac{\displaystyle \partial}{\lambda_{i}}{\displaystyle \underbrace{s}}=\underbrace{n}_{i}=\vec{e}_{i}\otimes\vec{e}_{i} \]

(\underbrace{n}_{i}) are the eigen tensors associated to the given tensor.

◆ computeEigenValuesDerivatives() [2/2]

template<unsigned short N, typename ValueType>
template<StensorConcept StensorType>
requires ((getSpaceDimension<StensorType>() == N) && (isAssignableTo<base_type<ValueType>, numeric_type<StensorType>>()))
TFEL_HOST_DEVICE constexpr void tfel::math::stensor< N, ValueType >::computeEigenValuesDerivatives ( StensorType & ,
StensorType & ,
StensorType & ,
const rotation_matrix< ValueType > &  )
staticconstexprnoexcept

compute the eigenvalues derivatives with respect with this tensor

Parameters
[out]n0: derivative of the first eigenvalue
[out]n1: derivative of the second eigenvalue
[out]n2: derivative of the third eigenvalue
[in]m: eigenvectors This eigenvalues of the derivatives is given by~:

\[\frac{\displaystyle \partial}{\lambda_{i}}{\displaystyle \underbrace{s}}=\underbrace{n}_{i}=\vec{e}_{i}\otimes\vec{e}_{i} \]

\(\underbrace{n}_{i}\) are the eigen tensors associated to the given tensor.

◆ computeEigenVector()

template<unsigned short N, typename ValueType>
template<typename VectorType>
TFEL_HOST_DEVICE TFEL_MATH_INLINE2 bool tfel::math::stensor< N, ValueType >::computeEigenVector ( VectorType & ,
const ValueType  ) const
nodiscard

compute eigenvector associated to a given eigenvalue

Note
the given vector must be properly allocated and the eigenvector is stored in the three first locations
no check made that the given value is an eigenvalue of the tensor
the eigen value geometric multiplicity must be egal to one.
Parameters
[out]ev: eigen vector
[in]vp: eigenvalue

◆ computeEigenVectors() [1/4]

template<unsigned short N, typename ValueType>
template<EigenSolver = TFELEIGENSOLVER>
TFEL_HOST_DEVICE TFEL_MATH_INLINE2 std::tuple< tvector< 3u, ValueType >, rotation_matrix< ValueType > > tfel::math::stensor< N, ValueType >::computeEigenVectors ( const bool = false) const
nodiscard

compute eigenvectors and eigenvalues

Template Parameters
eseigen solver
Parameters
[in]brefine eigenvalues

◆ computeEigenVectors() [2/4]

template<unsigned short N, typename ValueType>
template<EigenSolver = TFELEIGENSOLVER>
TFEL_HOST_DEVICE TFEL_MATH_INLINE2 std::tuple< tvector< 3u, ValueType >, rotation_matrix< ValueType > > tfel::math::stensor< N, ValueType >::computeEigenVectors ( const EigenValuesOrdering ,
const bool = false ) const
nodiscard

compute eigenvectors and eigenvalues

Template Parameters
eseigen solver
Parameters
[in]oeigenvalues ordering
[in]brefine eigenvalues
Note
even though one may ask the eigen values to be sorted, the eigenvalues in 1D are not sorted by this method and in 2D, only the inplane eigenvalues are sorted.

◆ computeEigenVectors() [3/4]

template<unsigned short N, typename ValueType>
template<EigenSolver = TFELEIGENSOLVER>
TFEL_HOST_DEVICE TFEL_MATH_INLINE2 void tfel::math::stensor< N, ValueType >::computeEigenVectors ( tvector< 3u, ValueType > & ,
rotation_matrix< ValueType > & ,
const bool = false ) const

compute eigenvectors and eigenvalues

Template Parameters
eseigen solver
Parameters
[out]vp: eigenvalues
[out]m: rotation matrix
[in]b: refine eigenvalues

◆ computeEigenVectors() [4/4]

template<unsigned short N, typename ValueType>
template<EigenSolver = TFELEIGENSOLVER>
TFEL_HOST_DEVICE TFEL_MATH_INLINE2 void tfel::math::stensor< N, ValueType >::computeEigenVectors ( tvector< 3u, ValueType > & ,
rotation_matrix< ValueType > & ,
const EigenValuesOrdering ,
const bool = false ) const

compute eigenvectors and eigenvalues

Template Parameters
eseigen solver
Parameters
[out]vpeigenvalues
[out]mrotation matrix
[in]oeigenvalues ordering
[in]brefine eigenvalues
Note
even though one may ask the eigen values to be sorted, the eigenvalues in 1D are not sorted by this method and in 2D, only the inplane eigenvalues are sorted.

◆ computeIsotropicFunction() [1/3]

template<unsigned short N, typename T>
template<typename stensor_common::EigenSolver es, typename Function>
TFEL_HOST_DEVICE auto tfel::math::stensor< N, T >::computeIsotropicFunction ( const Function & f,
const bool b = false ) const
nodiscard
Returns
the value of an isotropic function
Parameters
[in]ffunction
[in]bif true, refinement of eigen values is performed

◆ computeIsotropicFunction() [2/3]

template<unsigned short N, typename ValueType>
template<typename Function>
TFEL_HOST_DEVICE auto tfel::math::stensor< N, ValueType >::computeIsotropicFunction ( const Function & ,
const tvector< 3u, ValueType > & ,
const rotation_matrix< ValueType > &  )
staticnodiscard

compute an isotropic function

Parameters
[in]ffunction
[in]vpeigen values
[in]meigenvectors

◆ computeIsotropicFunction() [3/3]

template<unsigned short N, typename ValueType>
template<typename T2>
TFEL_HOST_DEVICE constexpr auto tfel::math::stensor< N, ValueType >::computeIsotropicFunction ( const tvector< 3u, T2 > & ,
const rotation_matrix< ValueType > &  )
staticnodiscardconstexprnoexcept

compute an isotropic function

Parameters
[in]ffunction values for each eigen values
[in]meigenvectors

◆ computeIsotropicFunctionAndDerivative()

template<unsigned short N, typename ValueType>
template<EigenSolver = TFELEIGENSOLVER, typename Function, typename FunctionDerivative>
TFEL_HOST_DEVICE auto tfel::math::stensor< N, ValueType >::computeIsotropicFunctionAndDerivative ( const Function & ,
const FunctionDerivative & ,
const ValueType ,
const bool = false ) const
nodiscard
Returns
the derivative of an isotropic function
Parameters
[in]ffunction
[in]dfderivative of the function
[in]epsabsolute threshold below which two eigenvalues are considered equal. It must be well above the rounding errors of the eigenvalues, for instance sqrt(epsilon) times the largest absolute eigenvalue (see the documentation of tensors)
[in]bif true, refinement of eigen values is performed

◆ computeIsotropicFunctionDerivative() [1/5]

template<unsigned short N, typename ValueType>
template<typename Function, typename FunctionDerivative>
TFEL_HOST_DEVICE auto tfel::math::stensor< N, ValueType >::computeIsotropicFunctionDerivative ( const Function & ,
const FunctionDerivative & ,
const tvector< 3u, ValueType > & ,
const rotation_matrix< ValueType > & ,
const ValueType  )
staticnodiscard

compute the derivative of an isotropic function

Parameters
[out]dresult
[in]ffunction
[in]dfderivative of the function
[in]vpeigen values
[in]meigenvectors
[in]epsabsolute threshold below which two eigenvalues are considered equal. It must be well above the rounding errors of the eigenvalues, for instance sqrt(epsilon) times the largest absolute eigenvalue (see the documentation of tensors)

◆ computeIsotropicFunctionDerivative() [2/5]

template<unsigned short N, typename ValueType>
template<EigenSolver = TFELEIGENSOLVER, typename Function, typename FunctionDerivative>
TFEL_HOST_DEVICE auto tfel::math::stensor< N, ValueType >::computeIsotropicFunctionDerivative ( const Function & ,
const FunctionDerivative & ,
const ValueType ,
const bool = false ) const
nodiscard
Returns
the derivative of an isotropic function
Parameters
[in]ffunction
[in]dfderivative of the function
[in]epsabsolute threshold below which two eigenvalues are considered equal. It must be well above the rounding errors of the eigenvalues, for instance sqrt(epsilon) times the largest absolute eigenvalue (see the documentation of tensors)
[in]bif true, refinement of eigen values is performed

◆ computeIsotropicFunctionDerivative() [3/5]

template<unsigned short N, typename ValueType>
template<typename T1, typename T2>
TFEL_HOST_DEVICE auto tfel::math::stensor< N, ValueType >::computeIsotropicFunctionDerivative ( const tvector< 3u, T1 > & ,
const tvector< 3u, T2 > & ,
const tvector< 3u, ValueType > & ,
const rotation_matrix< ValueType > & ,
const ValueType  )
staticnodiscard
Returns
the derivative of an isotropic function
Parameters
[in]ffunction values
[in]dfvalues of the derivative of the function
[in]vpeigen values
[in]meigenvectors
[in]epsabsolute threshold below which two eigenvalues are considered equal. It must be well above the rounding errors of the eigenvalues, for instance sqrt(epsilon) times the largest absolute eigenvalue (see the documentation of tensors)

◆ computeIsotropicFunctionDerivative() [4/5]

template<unsigned short N, typename ValueType>
template<ST2toST2Concept ST2toST2Type, typename Function, typename FunctionDerivative>
requires ((getSpaceDimension<ST2toST2Type>() == N) && (isAssignableTo< BinaryOperationResult<ValueType, ValueType, OpDiv>, numeric_type<ST2toST2Type>>()))
TFEL_HOST_DEVICE void tfel::math::stensor< N, ValueType >::computeIsotropicFunctionDerivative ( ST2toST2Type & ,
const Function & ,
const FunctionDerivative & ,
const tvector< 3u, ValueType > & ,
const rotation_matrix< ValueType > & ,
const ValueType  )
static

compute the derivative of an isotropic function

Parameters
[out]dresult
[in]ffunction
[in]dfderivative of the function
[in]vpeigen values
[in]meigenvectors
[in]epsabsolute threshold below which two eigenvalues are considered equal. It must be well above the rounding errors of the eigenvalues, for instance sqrt(epsilon) times the largest absolute eigenvalue (see the documentation of tensors)

◆ computeIsotropicFunctionDerivative() [5/5]

template<unsigned short N, typename ValueType>
template<ST2toST2Concept ST2toST2Type, typename T1, typename T2>
requires ((getSpaceDimension<ST2toST2Type>() == N) && (isAssignableTo< BinaryOperationResult<ValueType, ValueType, OpDiv>, numeric_type<ST2toST2Type>>()))
TFEL_HOST_DEVICE void tfel::math::stensor< N, ValueType >::computeIsotropicFunctionDerivative ( ST2toST2Type & ,
const tvector< 3u, T1 > & ,
const tvector< 3u, T2 > & ,
const tvector< 3u, ValueType > & ,
const rotation_matrix< ValueType > & ,
const ValueType  )
static

compute the derivative of an isotropic function

Parameters
[out]dresult
[in]ffunction values
[in]dfvalues of the derivative of the function
[in]vpeigen values
[in]meigenvectors
[in]epsabsolute threshold below which two eigenvalues are considered equal. It must be well above the rounding errors of the eigenvalues, for instance sqrt(epsilon) times the largest absolute eigenvalue (see the documentation of tensors)

◆ copy()

template<unsigned short N, typename ValueType>
template<typename InputIterator>
TFEL_HOST_DEVICE void constexpr tfel::math::stensor< N, ValueType >::copy ( const InputIterator src)
constexprnoexcept

copy the value from a container

◆ Id() [1/2]

template<unsigned short N, typename T>
stensor< N, base_type< T > > tfel::math::stensor< N, T >::Id ( )
staticnodiscardconstexprnoexcept
Returns
the identity

◆ Id() [2/2]

template<unsigned short N, typename ValueType>
TFEL_HOST_DEVICE constexpr base_type< ValueType > tfel::math::stensor< N, ValueType >::Id ( const typename stensor< N, ValueType >::size_type )
staticnodiscardconstexprnoexcept
Returns
the component i of Id(), without building the tensor. This is useful when the index is only known at run time: no table is stored nor read. The component has no unit: its type is the base type of ValueType.
Parameters
[in]iindex

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