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

linear operator on symmetric tensors. More...

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

Inheritance diagram for tfel::math::st2tost2< N, ValueType >:
tfel::math::ST2toST2ConceptBase< st2tost2< N, ValueType > > tfel::math::GenericFixedSizeArray< st2tost2< N, ValueType >, FixedSizeRowMajorMatrixPolicy< StensorDimeToSize< N >::value, StensorDimeToSize< N >::value, ValueType > >

Public Types

using GenericFixedSizeArrayBase
 a simple alias
Public Types inherited from tfel::math::ST2toST2ConceptBase< st2tost2< N, ValueType > >
using ConceptTag
Public Types inherited from tfel::math::GenericFixedSizeArray< st2tost2< N, ValueType >, FixedSizeRowMajorMatrixPolicy< StensorDimeToSize< N >::value, StensorDimeToSize< N >::value, ValueType > >
using value_type

Public Member Functions

 TFEL_MATH_FIXED_SIZE_ARRAY_DEFAULT_METHODS (st2tost2, GenericFixedSizeArrayBase)
template<std::size_t... d>
requires ((sizeof...(d) == StensorDimeToSize<N>::value) && ((d == StensorDimeToSize<N>::value) && ...))
TFEL_HOST_DEVICE constexpr st2tost2 (ValueType const (&... arrays)[d])
 constructors from arrays to implement class template argument deduction.
TFEL_HOST_DEVICE constexpr void import (const base_type< ValueType > *const) noexcept
 import values from an external memory location
TFEL_HOST_DEVICE constexpr void copy (const auto) noexcept
 copy the values from a range
Public Member Functions inherited from tfel::math::GenericFixedSizeArray< st2tost2< N, ValueType >, FixedSizeRowMajorMatrixPolicy< StensorDimeToSize< N >::value, 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< st2tost2< N, ValueType >, FixedSizeRowMajorMatrixPolicy< StensorDimeToSize< N >::value, StensorDimeToSize< N >::value, ValueType >, getArrayPolicySize< FixedSizeRowMajorMatrixPolicy< StensorDimeToSize< N >::value, StensorDimeToSize< N >::value, ValueType > >() >::size_type getContainerSize () const noexcept
TFEL_HOST_DEVICE constexpr st2tost2< N, ValueType > & operator= (const OtherArray &) noexcept
 assign values values from an other array
TFEL_HOST_DEVICE constexpr st2tost2< N, ValueType > & operator+= (const OtherArray &) noexcept
TFEL_HOST_DEVICE constexpr st2tost2< N, ValueType > & operator-= (const OtherArray &) noexcept
TFEL_HOST_DEVICE constexpr st2tost2< N, ValueType > & operator*= (const ValueType2 &) noexcept
TFEL_HOST_DEVICE constexpr st2tost2< N, ValueType > & operator/= (const ValueType2 &) noexcept
TFEL_HOST_DEVICE constexpr GenericFixedSizeArray< st2tost2< N, ValueType >, FixedSizeRowMajorMatrixPolicy< StensorDimeToSize< N >::value, StensorDimeToSize< N >::value, ValueType >, getArrayPolicySize< FixedSizeRowMajorMatrixPolicy< StensorDimeToSize< N >::value, StensorDimeToSize< N >::value, ValueType > >() >::pointer data () noexcept
TFEL_HOST_DEVICE constexpr GenericFixedSizeArray< st2tost2< N, ValueType >, FixedSizeRowMajorMatrixPolicy< StensorDimeToSize< N >::value, StensorDimeToSize< N >::value, ValueType >, getArrayPolicySize< FixedSizeRowMajorMatrixPolicy< StensorDimeToSize< N >::value, 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

template<StensorConcept StensorType>
requires (getSpaceDimension<StensorType>() == N && isAssignableTo<numeric_type<StensorType>, ValueType>())
static TFEL_HOST_DEVICE constexpr auto dsquare (const StensorType &) noexcept
template<StensorConcept StensorType, ST2toST2Concept ST2toST2Type>
requires ( getSpaceDimension<StensorType>() == N && getSpaceDimension<ST2toST2Type>() == N && isAssignableTo<BinaryOperationResult<numeric_type<StensorType>, numeric_type<ST2toST2Type>, OpMult>, ValueType>())
static TFEL_HOST_DEVICE constexpr auto dsquare (const StensorType &, const ST2toST2Type &) noexcept
template<T2toST2Concept T2toST2Type>
requires (getSpaceDimension<T2toST2Type>() == N && isAssignableTo<numeric_type<T2toST2Type>, ValueType>())
static TFEL_HOST_DEVICE constexpr auto convert (const T2toST2Type &) noexcept
static TFEL_HOST_DEVICE constexpr auto fromRotationMatrix (const rotation_matrix< ValueType > &) noexcept
template<StensorConcept StensorType>
requires (getSpaceDimension<StensorType>() == N && isAssignableTo<numeric_type<StensorType>, ValueType>())
static TFEL_HOST_DEVICE constexpr auto stpd (const StensorType &) noexcept
 compute the derivative of the symmetric tensor product:
static TFEL_HOST_DEVICE constexpr st2tost2 Id () noexcept
static TFEL_HOST_DEVICE constexpr st2tost2 IxI () noexcept
static TFEL_HOST_DEVICE constexpr st2tost2 K () noexcept
static TFEL_HOST_DEVICE constexpr st2tost2 M () noexcept
static TFEL_HOST_DEVICE constexpr st2tost2 J () noexcept
static TFEL_HOST_DEVICE constexpr base_type< ValueType > Id (const typename st2tost2< N, ValueType >::size_type, const typename st2tost2< N, ValueType >::size_type) noexcept
static TFEL_HOST_DEVICE constexpr base_type< ValueType > IxI (const typename st2tost2< N, ValueType >::size_type, const typename st2tost2< N, ValueType >::size_type) noexcept
static TFEL_HOST_DEVICE constexpr base_type< ValueType > K (const typename st2tost2< N, ValueType >::size_type, const typename st2tost2< N, ValueType >::size_type) noexcept
static TFEL_HOST_DEVICE constexpr base_type< ValueType > M (const typename st2tost2< N, ValueType >::size_type, const typename st2tost2< N, ValueType >::size_type) noexcept
static TFEL_HOST_DEVICE constexpr base_type< ValueType > J (const typename st2tost2< N, ValueType >::size_type, const typename st2tost2< N, ValueType >::size_type) noexcept
Static Public Member Functions inherited from tfel::math::GenericFixedSizeArray< st2tost2< N, ValueType >, FixedSizeRowMajorMatrixPolicy< StensorDimeToSize< N >::value, StensorDimeToSize< N >::value, ValueType > >
static TFEL_HOST_DEVICE constexpr st2tost2< N, ValueType > zero ()

Additional Inherited Members

Protected Member Functions inherited from tfel::math::GenericFixedSizeArray< st2tost2< N, ValueType >, FixedSizeRowMajorMatrixPolicy< StensorDimeToSize< N >::value, 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< st2tost2< N, ValueType >, FixedSizeRowMajorMatrixPolicy< StensorDimeToSize< N >::value, StensorDimeToSize< N >::value, ValueType > >
FixedSizeRowMajorMatrixPolicy< StensorDimeToSize< N >::value, StensorDimeToSize< N >::value, ValueType >::value_type v [getArrayPolicySize< FixedSizeRowMajorMatrixPolicy< StensorDimeToSize< N >::value, StensorDimeToSize< N >::value, ValueType > >()]
 values holded

Detailed Description

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

linear operator on symmetric tensors.

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::st2tost2< N, ValueType >::GenericFixedSizeArrayBase
Initial value:
GenericFixedSizeArray<
StensorDimeToSize<N>::value,
ValueType>>
an array policy describing a fixed size matrix stored in row major format based on the fixed size mat...
Definition FixedSizeArrayPolicies.hxx:37
TFEL_HOST_DEVICE constexpr st2tost2(ValueType const (&... arrays)[d])
constructors from arrays to implement class template argument deduction.
Definition st2tost2.ixx:34

a simple alias

Constructor & Destructor Documentation

◆ st2tost2()

template<unsigned short N, typename ValueType>
requires ((sizeof...(d) == StensorDimeToSize<N>::value) && ((d == StensorDimeToSize<N>::value) && ...))
template<std::size_t... d>
requires ((sizeof...(d) == StensorDimeToSize<N>::value) && ((d == StensorDimeToSize<N>::value) && ...))
TFEL_HOST_DEVICE constexpr tfel::math::st2tost2< N, ValueType >::st2tost2 ( ValueType const (&... arrays)[d])
constexpr

constructors from arrays to implement class template argument deduction.

Template Parameters
ddimensions of the arrays

Member Function Documentation

◆ convert()

template<unsigned short N, typename T>
requires (getSpaceDimension<T2toST2Type>() == N && isAssignableTo<numeric_type<T2toST2Type>, ValueType>())
template<T2toST2Concept T2toST2Type>
requires (getSpaceDimension<T2toST2Type>() == N && isAssignableTo<numeric_type<T2toST2Type>, ValueType>())
TFEL_HOST_DEVICE constexpr auto tfel::math::st2tost2< N, T >::convert ( const T2toST2Type & src)
staticconstexprnoexcept

convert a T2toST2 to a ST2toST2

Parameters
[in]src: T2toST2 to be converted

◆ copy()

template<unsigned short N, typename T>
TFEL_HOST_DEVICE constexpr void tfel::math::st2tost2< N, T >::copy ( const auto p)
constexprnoexcept

copy the values from a range

Parameters
[in]piterator

◆ dsquare() [1/2]

template<unsigned short N, typename T>
requires (getSpaceDimension<StensorType>() == N && isAssignableTo<numeric_type<StensorType>, ValueType>())
template<StensorConcept StensorType>
requires (getSpaceDimension<StensorType>() == N && isAssignableTo<numeric_type<StensorType>, ValueType>())
TFEL_HOST_DEVICE constexpr auto tfel::math::st2tost2< N, T >::dsquare ( const StensorType & s)
staticconstexprnoexcept
Parameters
[in]s: tensor squared
Returns
the derivative of the square of a symmetric tensor

◆ dsquare() [2/2]

template<unsigned short N, typename T>
requires ( getSpaceDimension<StensorType>() == N && getSpaceDimension<ST2toST2Type>() == N && isAssignableTo<BinaryOperationResult<numeric_type<StensorType>, numeric_type<ST2toST2Type>, OpMult>, ValueType>())
template<StensorConcept StensorType, ST2toST2Concept ST2toST2Type>
requires ( getSpaceDimension<StensorType>() == N && getSpaceDimension<ST2toST2Type>() == N && isAssignableTo<BinaryOperationResult<numeric_type<StensorType>, numeric_type<ST2toST2Type>, OpMult>, ValueType>())
TFEL_HOST_DEVICE constexpr auto tfel::math::st2tost2< N, T >::dsquare ( const StensorType & s,
const ST2toST2Type & C )
staticconstexprnoexcept
Parameters
[in]s: tensor squared
[in]C: derivative of s
Returns
the derivative of the square of a symmetric tensor

◆ fromRotationMatrix()

template<unsigned short N, typename ValueType>
TFEL_HOST_DEVICE constexpr auto tfel::math::st2tost2< N, T >::fromRotationMatrix ( const rotation_matrix< ValueType > & )
staticconstexprnoexcept

build the equivalent st2tost2 from a rotation matrix

Parameters
[in]r: rotation matrix

◆ Id()

template<unsigned short N, typename ValueType>
TFEL_HOST_DEVICE constexpr base_type< ValueType > tfel::math::st2tost2< N, ValueType >::Id ( const typename st2tost2< N, ValueType >::size_type ,
const typename st2tost2< N, ValueType >::size_type  )
staticconstexprnoexcept
Returns
the component (i, j) of Id(), without building the tensor.
Parameters
[in]irow index
[in]jcolumn index

◆ IxI()

template<unsigned short N, typename ValueType>
TFEL_HOST_DEVICE constexpr base_type< ValueType > tfel::math::st2tost2< N, ValueType >::IxI ( const typename st2tost2< N, ValueType >::size_type ,
const typename st2tost2< N, ValueType >::size_type  )
staticconstexprnoexcept
Returns
the component (i, j) of IxI(), without building the tensor.
Parameters
[in]irow index
[in]jcolumn index

◆ J()

template<unsigned short N, typename ValueType>
TFEL_HOST_DEVICE constexpr base_type< ValueType > tfel::math::st2tost2< N, ValueType >::J ( const typename st2tost2< N, ValueType >::size_type ,
const typename st2tost2< N, ValueType >::size_type  )
staticconstexprnoexcept
Returns
the component (i, j) of J(), without building the tensor.
Parameters
[in]irow index
[in]jcolumn index

◆ K()

template<unsigned short N, typename ValueType>
TFEL_HOST_DEVICE constexpr base_type< ValueType > tfel::math::st2tost2< N, ValueType >::K ( const typename st2tost2< N, ValueType >::size_type ,
const typename st2tost2< N, ValueType >::size_type  )
staticconstexprnoexcept
Returns
the component (i, j) of K(), without building the tensor.
Parameters
[in]irow index
[in]jcolumn index

◆ M()

template<unsigned short N, typename ValueType>
TFEL_HOST_DEVICE constexpr base_type< ValueType > tfel::math::st2tost2< N, ValueType >::M ( const typename st2tost2< N, ValueType >::size_type ,
const typename st2tost2< N, ValueType >::size_type  )
staticconstexprnoexcept
Returns
the component (i, j) of M(), without building the tensor.
Parameters
[in]irow index
[in]jcolumn index

◆ stpd()

template<unsigned short N, typename T>
requires (getSpaceDimension<StensorType>() == N && isAssignableTo<numeric_type<StensorType>, ValueType>())
template<StensorConcept StensorType>
requires (getSpaceDimension<StensorType>() == N && isAssignableTo<numeric_type<StensorType>, ValueType>())
TFEL_HOST_DEVICE constexpr auto tfel::math::st2tost2< N, T >::stpd ( const StensorType & s)
staticconstexprnoexcept

compute the derivative of the symmetric tensor product:

\[\frac{d}{ds1}\left(s1*s+s*s1\right) \]

Parameters
[in]ssecond tensor of the product

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