tfel
Loading...
Searching...
No Matches
tfel::math::internals Namespace Reference

This namespace contains classes, functions, metafunctions and data structures that are used internally in the tfel::math namespace and that are meant to be used by the end user. More...

Classes

struct  tag
struct  HasIndexingPolicyTraits
struct  HasIndexingPolicyTraits< T, std::void_t< typename T::indexing_policy > >
struct  StridedViewsArrayBase
 an helper structure using to define the type of views generate by StridedViewsArray. More...
struct  StridedViewsArrayBase< true, MappedType, ViewIndexingPolicyType >
 an helper structure using to define the type of views generate by StridedViewsArray. More...
struct  StridedViewsArrayDefaultViewIndexingPolicy
 a metafunction returning the default indexing policy for the given mapped type More...
struct  StridedViewsArrayDefaultViewIndexingPolicy< true, MappedType >
 a metafunction returning the default indexing policy for the given scalar mapped type More...
struct  MakeViewReference
struct  MakeViewReference< qt< UnitType, ValueType > >
struct  MakeConstViewReference
struct  MakeConstViewReference< qt< UnitType, ValueType > >
struct  ScalarViewImplementation
struct  ScalarViewImplementation< ScalarType, true >
struct  ViewsArrayBase
 an helper structure using to define the type of views generate by ViewsArray. More...
struct  ViewsArrayBase< true, MappedType, ViewIndexingPolicyType >
 an helper structure using to define the type of views generate by ViewsArray. More...
struct  ViewsArrayDefaultViewIndexingPolicy
 a metafunction returning the default indexing policy for the given mapped type More...
struct  ViewsArrayDefaultViewIndexingPolicy< true, MappedType >
 a metafunction returning the default indexing policy for the given scalar mapped type More...
struct  InvalidResult
struct  ResultType1
struct  ResultType2
struct  ResultType3
struct  ResultType1< T1, T2, tfel::math::OpPlus >
struct  ResultType1< T1, T2, tfel::math::OpMinus >
struct  ResultType1< T1, T2, tfel::math::OpMult >
struct  ResultType1< T1, T2, tfel::math::OpDiv >
struct  ResultType2< T1, T2, tfel::math::OpPlus >
struct  ResultType2< T1, T2, tfel::math::OpMinus >
struct  ResultType2< T1, T2, tfel::math::OpMult >
struct  ResultType2< T1, T2, tfel::math::OpDiv >
struct  ResultType3< T1, T2, tfel::math::OpPlus >
struct  ResultType3< T1, T2, tfel::math::OpMinus >
struct  ResultType3< T1, T2, tfel::math::OpMult >
struct  ResultType3< T1, T2, tfel::math::OpDiv >
struct  CubicSplineCollocationPointComparator
 internal structure to compare collocation points More...
struct  ExpressionTest
struct  ExpressionTest< Expr< ResultType, Operation > >
struct  QuantityValueOwnershipPolicy
 an helper structure which holds the value internally. More...
struct  QuantityReferenceOwnershipPolicy
 an helper structure which wraps a reference to an external value. More...
struct  HasConceptTag
struct  HasConceptTag< T, std::void_t< typename T::ConceptTag > >
struct  ApplySpecificationDrifts
struct  ApplySpecificationDrifts< nb, nb, N, T, Model >
struct  DerivativeViewFromTinyMatrixImplementation
 an helper structure to build a view on derivative from a tiny matrix. More...
struct  DerivativeViewFromTinyMatrixImplementation< true, false, FunctionType, VariableType >
 partial specialization if the function type is a scalar. More...
struct  DerivativeViewFromTinyMatrixImplementation< false, true, FunctionType, VariableType >
 partial specialization if the variable type is a scalar. More...
struct  DerivativeViewFromTinyMatrixImplementation< true, true, FunctionType, VariableType >
 partial specialization if the function type and the variable type are scalars. More...
struct  PowerGenerator
struct  PowerPosImpl
class  PowerPos
struct  PowerPosImpl< N, 0u >
struct  PowerPosImpl< 0u, M >
struct  PowerPosImpl< 0u, 0u >
struct  PowerPos< 0u >
struct  PowerPos< 1u >
struct  PowerPos< 2u >
struct  PowerPos< 3u >
struct  PowerNeg
 an helper structure to compute the negative power of a number. More...
struct  PowerSqrtNeg
class  PowerSqrtPos
class  PowerImplSelector
class  PowerImplSelector< N, 1u >
class  PowerImplSelector< N, 2u >
struct  FSESAnalyticalSymmetricEigensolver2x2
struct  FSESAnalyticalSymmetricEigensolver3x3
struct  GteSymmetricEigensolver3x3
struct  HarariEigensolver3x3
struct  StensorChangeBasis
struct  StensorChangeBasis< 1u >
struct  StensorChangeBasis< 2u >
struct  StensorChangeBasis< 3u >
struct  StensorComputeEigenValues
struct  StensorComputeEigenValues< 1u >
struct  StensorComputeEigenValues< 2u >
struct  StensorComputeEigenValues< 3u >
struct  StensorComputeEigenValuesDerivatives
struct  StensorComputeEigenValuesDerivatives< 1u >
struct  StensorComputeEigenValuesDerivatives< 2u >
struct  StensorComputeEigenValuesDerivatives< 3u >
struct  StensorComputeEigenVectors
struct  StensorComputeEigenVectors< 1u >
struct  StensorComputeEigenVectors< 2u >
struct  StensorComputeEigenVectors< 3u >
struct  StensorComputeEigenTensorsDerivatives
struct  StensorComputeEigenTensorsDerivativesBase
struct  StensorComputeEigenTensorsDerivatives< 1u >
struct  StensorComputeEigenTensorsDerivatives< 2u >
struct  StensorComputeEigenTensorsDerivatives< 3u >
struct  StensorComputeIsotropicFunctionDerivative
struct  StensorComputeIsotropicFunctionDerivative< 1u >
struct  StensorComputeIsotropicFunctionDerivative< 2u >
struct  StensorComputeIsotropicFunctionDerivative< 3u >
struct  DPK1_DF_to_DTAU_DF_Converter
 an helper structure meant to be specialized in each spatial dimension. More...
struct  DPK1_DF_to_DTAU_DF_Converter< 1u >
 partial specialisation in 1D More...
struct  DPK1_DF_to_DTAU_DF_Converter< 2u >
 partial specialisation in 2D More...
struct  DPK1_DF_to_DTAU_DF_Converter< 3u >
 partial specialisation in 3D More...
struct  DSIG_DF_to_DPK1_DF_Converter
 an helper structure meant to be specialized in each spatial dimension. More...
struct  DSIG_DF_to_DPK1_DF_Converter< 1u >
 partial specialisation in 1D More...
struct  DSIG_DF_to_DPK1_DF_Converter< 2u >
 partial specialisation in 2D More...
struct  DSIG_DF_to_DPK1_DF_Converter< 3u >
 partial specialisation in 3D More...
struct  TensorConceptMatrixAccessOperator
struct  TensorConceptMatrixAccessOperator< 1u >
struct  TensorConceptMatrixAccessOperator< 2u >
struct  TensorConceptMatrixAccessOperator< 3u >
struct  BuildDerivativeViewFromTinyMatrixImplementation
 a metafunction returning a view type on a derivative in tiny matrix ordered of M columns. More...
struct  BuildDerivativeViewFromTinyMatrixImplementation< true, false, M, FunctionType, VariableType >
 partial specialisation when FunctionType is a scalar type. matrix ordered in row major format of M columns. More...
struct  BuildDerivativeViewFromTinyMatrixImplementation< false, true, M, FunctionType, VariableType >
 partial specialisation when VariableType is a scalar type. matrix ordered in row major format of M columns. More...
struct  BuildDerivativeViewFromTinyMatrixImplementation< true, true, M, FunctionType, VariableType >
struct  BuildDerivativeViewFromTinyMatrix
 a metafunction returning a view type on a derivative in tiny matrix ordered in row major format of M columns. More...
struct  BuildStridedDerivativeViewFromTinyMatrixImplementation
 a metafunction returning a strided view type on a derivative in tiny matrix ordered of M columns. More...
struct  BuildStridedDerivativeViewFromTinyMatrixImplementation< true, M, FunctionType, VariableType >
 partial specialisation when both the function and the variable types are scalar types. More...
struct  BuildStridedDerivativeViewFromTinyMatrix
 a metafunction returning a strided view type on a derivative in tiny matrix ordered in row major format of M columns. More...
struct  BuildScatteredDerivativeViewFromTinyMatrixImplementation
 a metafunction returning a scattered view type on a derivative in tiny matrix ordered of M columns. More...
struct  BuildScatteredDerivativeViewFromTinyMatrixImplementation< true, M, FunctionType, VariableType >
 partial specialisation when both the function and the variable types are scalar types. More...
struct  BuildScatteredDerivativeViewFromTinyMatrix
 a metafunction returning a scattered view type on a derivative in tiny matrix ordered in row major format of M columns. More...
struct  CheckUnitCompatibilityImplementation
struct  CheckUnitCompatibilityImplementation< Unit, NumericType >
struct  CheckUnitCompatibilityImplementation< Unit, MathObjectType >

Typedefs

template<typename... Ts>
using select_last = typename decltype((tag<Ts>{}, ...))::type
template<typename VectorType, TensorConcept TensorType>
using VectorDerivativeWithRespectToTensor
 type of the derivative of a vector with respect to a tensor

Functions

template<typename T, typename... Args>
constexpr bool isLastArgumentConvertibleTo ()
template<typename Iterator>
constexpr void advance (Iterator &i, const typename std::iterator_traits< Iterator >::difference_type n)
 advance an iterator by the given number of positions.
template<typename Iterator>
constexpr Iterator previous (Iterator i)
template<typename ForwardIterator, typename Tp, typename Compare>
constexpr ForwardIterator lower_bound (ForwardIterator first, ForwardIterator last, const Tp &val, Compare comp)
template<typename AbscissaType, typename ValueType>
constexpr auto computeCubicSplineLocalCoefficients (const CubicSplineCollocationPoint< AbscissaType, ValueType > &pa, const CubicSplineCollocationPoint< AbscissaType, ValueType > &pb)
template<typename AbscissaType, typename ValueType>
constexpr result_type< ValueType, AbscissaType, OpMult > computeCubicSplineLocalIntegral (const AbscissaType xa, const AbscissaType xb, const CubicSplineCollocationPoint< AbscissaType, ValueType > &pa, const CubicSplineCollocationPoint< AbscissaType, ValueType > &pb)
template<typename MathObjectType>
constexpr unsigned short getDerivativeSubBlockExtent ()
 return the number of components of a scalar (1) or of a tensorial object (the size of its array policy), i.e. the number of rows or columns of a derivative sub-block in its base matrix.
template<MatrixConcept MatrixType>
TFEL_HOST_DEVICE constexpr auto det2 (const MatrixType &m) noexcept
template<MatrixConcept MatrixType>
TFEL_HOST_DEVICE constexpr auto det3 (const MatrixType &m) noexcept
template<typename NumType>
constexpr auto stensor_ppos (const NumType x)
template<typename NumType>
constexpr auto stensor_pneg (const NumType x)
template<unsigned short N, typename ValueType, TensorConcept TensorType>
requires (getSpaceDimension<TensorType>() == N)
TFEL_HOST_DEVICE constexpr auto applyTensor (const TensorType &t, const tvector< N, ValueType > &v) noexcept
template<unsigned short N, typename ValueType, TensorConcept TensorType>
requires (getSpaceDimension<TensorType>() == N)
TFEL_HOST_DEVICE constexpr auto applyTransposedTensor (const TensorType &t, const tvector< N, ValueType > &v) noexcept
TFEL_HOST_DEVICE constexpr unsigned short getTensorComponentRowIndex (const unsigned short c) noexcept
TFEL_HOST_DEVICE constexpr unsigned short getTensorComponentColumnIndex (const unsigned short c) noexcept
template<TensorConcept TensorType>
TFEL_HOST_DEVICE constexpr numeric_type< TensorType > getTensorComponent (const TensorType &t, const unsigned short i, const unsigned short j) noexcept
template<unsigned short N, typename ValueType>
TFEL_HOST_DEVICE constexpr ValueType getVectorComponent (const tvector< N, ValueType > &v, const unsigned short i) noexcept
template<unsigned short N, typename MatrixType, typename FunctionType>
TFEL_HOST_DEVICE constexpr MatrixType buildMatrix (const FunctionType &f) noexcept
template<unsigned short N, typename DerivativeType, typename FunctionType>
TFEL_HOST_DEVICE constexpr DerivativeType buildDerivativeWithRespectToTensor (const FunctionType &f) noexcept

Detailed Description

This namespace contains classes, functions, metafunctions and data structures that are used internally in the tfel::math namespace and that are meant to be used by the end user.

Typedef Documentation

◆ VectorDerivativeWithRespectToTensor

template<typename VectorType, TensorConcept TensorType>
using tfel::math::internals::VectorDerivativeWithRespectToTensor
Initial value:
VectorType,
std::conditional_t< tfel::typetraits::isScalar< std::decay_t< MathObjectType > >(), std::decay_t< MathObjectType >, typename MathObjectTraits< std::decay_t< MathObjectType > >::value_type > numeric_type
a simple alias
Definition MathObjectTraits.hxx:80
typename DerivativeTypeMetaFunction< FunctionType, VariableTypes... >::type derivative_type
a simple alias giving the type representing the derivative of an object of type FunctionType with res...
Definition DerivativeType.hxx:223
Definition tensor.hxx:77

type of the derivative of a vector with respect to a tensor

Function Documentation

◆ advance()

template<typename Iterator>
void tfel::math::internals::advance ( Iterator & i,
const typename std::iterator_traits< Iterator >::difference_type n )
constexpr

advance an iterator by the given number of positions.

The std::advance, std::next and std::prev functions of libstdc++ can't be used in device code: they call the __builtin_constant_p built-in, which nvcc treats as a host function, and nvcc 13.0 silently compiles them as functions doing nothing.

◆ applyTensor()

template<unsigned short N, typename ValueType, TensorConcept TensorType>
requires (getSpaceDimension<TensorType>() == N)
TFEL_HOST_DEVICE constexpr auto tfel::math::internals::applyTensor ( const TensorType & t,
const tvector< N, ValueType > & v )
nodiscardconstexprnoexcept
Returns
the product of a tensor and a vector
Parameters
[in]ttensor
[in]vvector

◆ applyTransposedTensor()

template<unsigned short N, typename ValueType, TensorConcept TensorType>
requires (getSpaceDimension<TensorType>() == N)
TFEL_HOST_DEVICE constexpr auto tfel::math::internals::applyTransposedTensor ( const TensorType & t,
const tvector< N, ValueType > & v )
nodiscardconstexprnoexcept
Returns
the product of the transpose of a tensor and a vector
Parameters
[in]ttensor
[in]vvector

◆ buildDerivativeWithRespectToTensor()

template<unsigned short N, typename DerivativeType, typename FunctionType>
TFEL_HOST_DEVICE constexpr DerivativeType tfel::math::internals::buildDerivativeWithRespectToTensor ( const FunctionType & f)
nodiscardconstexprnoexcept
Returns
the derivative of a vector with respect to a tensor
Template Parameters
DerivativeTypetype of the derivative
Parameters
[in]ffunction returning the derivative of the component i of the vector with respect to the component (k, l) of the tensor

◆ buildMatrix()

template<unsigned short N, typename MatrixType, typename FunctionType>
TFEL_HOST_DEVICE constexpr MatrixType tfel::math::internals::buildMatrix ( const FunctionType & f)
nodiscardconstexprnoexcept
Returns
a matrix whose components are given by a function
Template Parameters
MatrixTypetype of the matrix
Parameters
[in]ffunction of the indices (i, j)

◆ getDerivativeSubBlockExtent()

template<typename MathObjectType>
unsigned short tfel::math::internals::getDerivativeSubBlockExtent ( )
constexpr

return the number of components of a scalar (1) or of a tensorial object (the size of its array policy), i.e. the number of rows or columns of a derivative sub-block in its base matrix.

Template Parameters
MathObjectTypescalar or tensorial type.

◆ getTensorComponent()

template<TensorConcept TensorType>
TFEL_HOST_DEVICE constexpr numeric_type< TensorType > tfel::math::internals::getTensorComponent ( const TensorType & t,
const unsigned short i,
const unsigned short j )
nodiscardconstexprnoexcept
Returns
the component (i, j) of a tensor, the components which are not stored in 1D and 2D being null
Parameters
[in]ttensor
[in]irow index, lower than 3
[in]jcolumn index, lower than 3

◆ getTensorComponentColumnIndex()

TFEL_HOST_DEVICE constexpr unsigned short tfel::math::internals::getTensorComponentColumnIndex ( const unsigned short c)
constexprnoexcept
Returns
the column index of a component of a tensor
Parameters
[in]cindex of the component
See also
getTensorComponentRowIndex

◆ getTensorComponentRowIndex()

TFEL_HOST_DEVICE constexpr unsigned short tfel::math::internals::getTensorComponentRowIndex ( const unsigned short c)
constexprnoexcept
Returns
the row index of a component of a tensor
Parameters
[in]cindex of the component
Note
the components are stored in the following order: 00, 11, 22, 01, 10, 02, 20, 12, 21. Only the first 3 (1D) or 5 (2D) are stored in 1D and 2D. The indices are computed, not read from a table.

◆ getVectorComponent()

template<unsigned short N, typename ValueType>
TFEL_HOST_DEVICE constexpr ValueType tfel::math::internals::getVectorComponent ( const tvector< N, ValueType > & v,
const unsigned short i )
nodiscardconstexprnoexcept
Returns
the component i of a vector, the components which are not stored in 1D and 2D being null
Parameters
[in]vvector
[in]iindex, lower than 3

◆ previous()

template<typename Iterator>
Iterator tfel::math::internals::previous ( Iterator i)
constexpr
Returns
the iterator preceding the given one (see advance)