tfel
Loading...
Searching...
No Matches
tfel::math::MutableArrayCommonMethods< Child, ArrayPolicyType > Struct Template Reference

a structure gathering access methods and helper function for arrays. More...

#include </home/runner/work/tfel/tfel/include/TFEL/Math/Array/ArrayCommonMethods.hxx>

Inheritance diagram for tfel::math::MutableArrayCommonMethods< Child, ArrayPolicyType >:
tfel::math::ConstArrayCommonMethods< Child, ArrayPolicyType > tfel::math::MutableFixedSizeArrayBase< Child, ArrayPolicyType > tfel::math::GenericFixedSizeArray< Child, ArrayPolicy, N > tfel::math::st2tost2< N, typename ScalarTypes< T, true >::real > tfel::math::st2tost2< N, typename ScalarTypes< T, true >::compliance > tfel::math::st2tost2< N, typename ScalarTypes< T, true >::viscosity > tfel::math::st2tost2< N, typename ScalarTypes< T, true >::viscouscompliance > tfel::math::st2tost2< N, typename ScalarTypes< T, true >::stress > tfel::math::st2tost2< N, T > tfel::math::st2tost2< tfel::math::getSpaceDimension< StressStensor >(), BarlatBaseType< StressStensor > > tfel::math::st2tost2< tfel::math::getSpaceDimension< StressStensor >(), BarlatInvertStressType< StressStensor > > tfel::math::st2tost2< tfel::math::getSpaceDimension< StressStensor >(), Cazacu2001InvertStressType< StressStensor > > tfel::math::st2tost2< tfel::math::getSpaceDimension< StressStensor >(), Cazacu2004InvertStressType< StressStensor > > tfel::math::st2tost2< tfel::math::getSpaceDimension< StressStensor >(), Drucker1949InvertStressType< StressStensor > > tfel::math::st2tost2< N, StressType > tfel::math::st2tost2< tfel::math::getSpaceDimension< StressStensor >(), GursonTvergaardNeedleman1982InvertStressType< StressStensor > > tfel::math::st2tost2< N, real > tfel::math::st2tost2< 2u, real > tfel::math::st2tost2< 3u, real > tfel::math::st2tost2< tfel::math::getSpaceDimension< StressStensor >(), HosfordInvertStressType< StressStensor > > tfel::math::st2tost2< 1u, stress > tfel::math::st2tost2< 2u, stress > tfel::math::st2tost2< 3u, stress > tfel::math::st2tost2< tfel::math::getSpaceDimension< StressStensor >(), MichelAndSuquet1992HollowSphereInvertStressType< StressStensor > > tfel::math::st2tost2< tfel::math::getSpaceDimension< StressStensor >(), MohrCoulombInvertStressType< StressStensor > > tfel::math::st2tost2< tfel::math::getSpaceDimension< StressStensor >(), RousselierTanguyBesson2002InvertStressType< StressStensor > > tfel::math::st2tost2< getSpaceDimension< ST2toST2Type >(), derivative_type< numeric_type< ST2toST2Type >, ScalarType > > tfel::math::st2tost2< getSpaceDimension< ST2toST2Type >(), derivative_type< ScalarType, numeric_type< ST2toST2Type > > > tfel::math::st2tost2< getSpaceDimension< StensorType1 >(), derivative_type< numeric_type< StensorType1 >, numeric_type< StensorType2 > > > tfel::math::st2tot2< getSpaceDimension< ST2toT2Type >(), derivative_type< numeric_type< ST2toT2Type >, ScalarType > > tfel::math::st2tot2< getSpaceDimension< ST2toT2Type >(), derivative_type< ScalarType, numeric_type< ST2toT2Type > > > tfel::math::st2tot2< getSpaceDimension< TensorType1 >(), derivative_type< numeric_type< TensorType1 >, numeric_type< StensorType2 > > > tfel::math::stensor< N, typename ScalarTypes< T, true >::real > tfel::math::stensor< N, typename ScalarTypes< T, true >::frequency > tfel::math::stensor< N, typename ScalarTypes< T, true >::stress > tfel::math::stensor< N, typename ScalarTypes< T, true >::stressrate > tfel::math::stensor< N, tfel::math::qt< tfel::math::unit::NoUnit, T > > tfel::math::stensor< N, tfel::math::qt< tfel::math::unit::Frequency, T > > tfel::math::stensor< N, typename ScalarTypes< T, true >::thermalexpansion > tfel::math::stensor< N, T > tfel::math::stensor< tfel::math::getSpaceDimension< StressStensor >(), BarlatBaseType< StressStensor > > tfel::math::stensor< tfel::math::getSpaceDimension< StressStensor >(), Cazacu2001BaseType< StressStensor > > tfel::math::stensor< tfel::math::getSpaceDimension< StressStensor >(), Cazacu2004BaseType< StressStensor > > tfel::math::stensor< tfel::math::getSpaceDimension< StressStensorType >(), ChuNeedleman1980StressBasedNucleationModelInverseStressType< StressStensorType > > tfel::math::stensor< tfel::math::getSpaceDimension< StressStensor >(), Drucker1949BaseType< StressStensor > > tfel::math::stensor< N, stress > tfel::math::stensor< tfel::math::getSpaceDimension< StressStensor >(), GursonTvergaardNeedleman1982BaseType< StressStensor > > tfel::math::stensor< tfel::math::getSpaceDimension< StressStensor >(), HosfordBaseType< StressStensor > > tfel::math::stensor< 1u, real > tfel::math::stensor< 1u, stress > tfel::math::stensor< 2u, real > tfel::math::stensor< 2u, stress > tfel::math::stensor< 3u, real > tfel::math::stensor< 3u, stress > tfel::math::stensor< tfel::math::getSpaceDimension< StressStensor >(), MichelAndSuquet1992HollowSphereBaseType< StressStensor > > tfel::math::stensor< tfel::math::getSpaceDimension< StressStensor >(), MohrCoulombBaseType< StressStensor > > tfel::math::stensor< tfel::math::getSpaceDimension< StressStensorType >(), PowerLawStressBasedNucleationModelInverseStressType< StressStensorType > > tfel::math::stensor< tfel::math::getSpaceDimension< StressStensor >(), RousselierTanguyBesson2002BaseType< StressStensor > > tfel::math::stensor< getSpaceDimension< StensorType >(), derivative_type< numeric_type< StensorType >, ScalarType > > tfel::math::stensor< getSpaceDimension< StensorType >(), derivative_type< ScalarType, numeric_type< StensorType > > > tfel::math::t2tost2< N, StressType > tfel::math::t2tost2< getSpaceDimension< T2toST2Type >(), derivative_type< numeric_type< T2toST2Type >, ScalarType > > tfel::math::t2tost2< getSpaceDimension< T2toST2Type >(), derivative_type< ScalarType, numeric_type< T2toST2Type > > > tfel::math::t2tost2< getSpaceDimension< StensorType1 >(), derivative_type< numeric_type< StensorType1 >, numeric_type< TensorType2 > > > tfel::math::t2tot2< N, StressType > tfel::math::t2tot2< getSpaceDimension< T2toT2Type >(), derivative_type< numeric_type< T2toT2Type >, ScalarType > > tfel::math::t2tot2< getSpaceDimension< T2toT2Type >(), derivative_type< ScalarType, numeric_type< T2toT2Type > > > tfel::math::t2tot2< getSpaceDimension< TensorType1 >(), derivative_type< numeric_type< TensorType1 >, numeric_type< TensorType2 > > > tfel::math::tensor< N, tfel::math::qt< tfel::math::unit::NoUnit, T > > tfel::math::tensor< N, typename ScalarTypes< T, true >::frequency > tfel::math::tensor< N, typename ScalarTypes< T, true >::stress > tfel::math::tensor< N, tfel::math::qt< tfel::math::unit::Frequency, T > > tfel::math::tensor< N, T > tfel::math::tensor< N, base_type< stress > > tfel::math::tensor< 1u, real > tfel::math::tensor< 2u, real > tfel::math::tensor< 3u, real > tfel::math::tensor< getSpaceDimension< TensorType >(), derivative_type< numeric_type< TensorType >, ScalarType > > tfel::math::tensor< getSpaceDimension< TensorType >(), derivative_type< ScalarType, numeric_type< TensorType > > > tfel::math::tmatrix< N, N, tfel::math::qt< tfel::math::unit::NoUnit, T > > tfel::math::tmatrix< N, N, T > tfel::math::tmatrix< 3, 3, base_type< T > > tfel::math::tmatrix< N, M, derivative_type< TMatrixNumericType, ScalarType > > tfel::math::tmatrix< N, M, derivative_type< ScalarType, TMatrixNumericType > > tfel::math::tmatrix< N1, N2, derivative_type< TVectorNumericTypeType1, TVectorNumericTypeType2 > > tfel::math::tvector< N, tfel::math::qt< tfel::math::unit::Length, T > > tfel::math::tvector< N, T > tfel::math::tvector< N, tfel::math::qt< tfel::math::unit::InvLength, T > > tfel::math::tvector< N, typename ScalarTypes< T, true >::real > tfel::math::tvector< N, typename ScalarTypes< T, true >::force > tfel::math::tvector< N, typename ScalarTypes< T, true >::length > tfel::math::tvector< 6u, tfel::math::base_type< StensorType > > tfel::math::tvector< 11u, tfel::math::base_type< StensorType > > tfel::math::tvector< M, T > tfel::math::tvector< N, derivative_type< TVectorNumericType, ScalarType > > tfel::math::tvector< N, derivative_type< ScalarType, TVectorNumericType > > tfel::math::tvector< 2, T >

Public Member Functions

TFEL_HOST_DEVICE constexpr ArrayPolicyType::reference operator[] (const typename ArrayPolicyType::IndexingPolicy::size_type) noexcept
 access operator
TFEL_HOST_DEVICE constexpr ArrayPolicyType::reference operator[] (const std::array< typename ArrayPolicyType::IndexingPolicy::size_type, ArrayPolicyType::IndexingPolicy::arity > &) noexcept
 access operator
template<typename... Indices>
TFEL_HOST_DEVICE constexpr ArrayPolicyType::reference operator() (const Indices...) noexcept
 access operator
TFEL_HOST_DEVICE constexpr ArrayPolicyType::reference operator() (const std::array< typename ArrayPolicyType::IndexingPolicy::size_type, ArrayPolicyType::IndexingPolicy::arity > &) noexcept
 access operator
template<typename ValueType>
requires ( isAssignableTo<ValueType, typename ArrayPolicyType::value_type>())
TFEL_HOST_DEVICE constexpr Child & operator= (const std::initializer_list< ValueType > &) noexcept
 assign values values from an initializer list
template<typename ImportIndexingPolicy, typename InputIterator>
TFEL_HOST_DEVICE constexpr void import (const ImportIndexingPolicy &, const InputIterator, const InputIterator)
 import array values from a sequence
template<typename ValueType2>
requires ( isAssignableTo<ValueType2, typename ArrayPolicyType::value_type>())
TFEL_HOST_DEVICE constexpr void fill (const ValueType2 &)
 fill the array with the given value
template<typename ValueType2, typename ValueType3>
requires ( isAssignableTo<ValueType2, typename ArrayPolicyType::value_type>() && isAssignableTo<ValueType3, typename ArrayPolicyType::value_type>())
TFEL_HOST_DEVICE constexpr void clamp (const ValueType2 &, const ValueType3 &)
 clamp all the values between the given bounds
template<typename... Indices>
constexpr ArrayPolicyType::reference operator() (const Indices... i) noexcept
template<typename OtherArray>
constexpr void assign (const OtherArray &src) noexcept
template<typename OtherArray>
constexpr void addAndAssign (const OtherArray &src) noexcept
template<typename OtherArray>
constexpr void substractAndAssign (const OtherArray &src) noexcept
template<typename ValueType>
requires ( isAssignableTo<ValueType, typename ArrayPolicyType::value_type>())
constexpr Child & operator= (const std::initializer_list< ValueType > &values) noexcept
template<typename ImportIndexingPolicy, typename InputIterator>
constexpr void import (const ImportIndexingPolicy &policy, const InputIterator p, const InputIterator pe)
template<typename ValueType2>
requires ( isAssignableTo<ValueType2, typename ArrayPolicyType::value_type>())
constexpr void fill (const ValueType2 &v)
template<typename ValueType2, typename ValueType3>
requires ( isAssignableTo<ValueType2, typename ArrayPolicyType::value_type>() && isAssignableTo<ValueType3, typename ArrayPolicyType::value_type>())
constexpr void clamp (const ValueType2 &lower_bound, const ValueType3 &upper_bound)
template<typename ValueType2>
requires (isAssignableTo< BinaryOperationResult<ValueType2, typename ArrayPolicyType::value_type, OpMult>, typename ArrayPolicyType::value_type>())
constexpr void multiplyByScalar (const ValueType2 &s)
template<typename ValueType2>
requires (isAssignableTo< BinaryOperationResult<typename ArrayPolicyType::value_type, ValueType2, OpDiv>, typename ArrayPolicyType::value_type>())
constexpr void divideByScalar (const ValueType2 &s)
Public Member Functions inherited from tfel::math::ConstArrayCommonMethods< Child, ArrayPolicyType >
TFEL_HOST_DEVICE constexpr ArrayPolicyType::const_reference operator[] (const typename ArrayPolicyType::IndexingPolicy::size_type) const noexcept
 access operator
TFEL_HOST_DEVICE constexpr ArrayPolicyType::const_reference operator[] (const std::array< typename ArrayPolicyType::IndexingPolicy::size_type, ArrayPolicyType::IndexingPolicy::arity > &) const noexcept
 access operator
template<typename... Indices>
TFEL_HOST_DEVICE constexpr ArrayPolicyType::const_reference operator() (const Indices...) const noexcept
 access operator
TFEL_HOST_DEVICE constexpr ArrayPolicyType::const_reference operator() (const std::array< typename ArrayPolicyType::IndexingPolicy::size_type, ArrayPolicyType::IndexingPolicy::arity > &) const noexcept
 access operator
template<typename... Indices>
constexpr ArrayPolicyType::const_reference operator() (const Indices... i) const noexcept

Protected Member Functions

template<typename OtherArray>
TFEL_HOST_DEVICE constexpr void assign (const OtherArray &) noexcept
 assign the values of the given array to the values of this array.
template<typename OtherArray>
TFEL_HOST_DEVICE constexpr void addAndAssign (const OtherArray &) noexcept
 add the values of the given array to the values of this array.
template<typename OtherArray>
TFEL_HOST_DEVICE constexpr void substractAndAssign (const OtherArray &) noexcept
 substract the values of the given array to the values of this array.
template<typename ValueType2>
requires ( isAssignableTo< BinaryOperationResult<ValueType2, typename ArrayPolicyType::value_type, OpMult>, typename ArrayPolicyType::value_type>())
TFEL_HOST_DEVICE constexpr void multiplyByScalar (const ValueType2 &)
 multiplication by a scalar
template<typename ValueType2>
requires ( isAssignableTo< BinaryOperationResult<typename ArrayPolicyType::value_type, ValueType2, OpDiv>, typename ArrayPolicyType::value_type>())
TFEL_HOST_DEVICE constexpr void divideByScalar (const ValueType2 &)
 division by a scalar

Additional Inherited Members

Public Types inherited from tfel::math::ConstArrayCommonMethods< Child, ArrayPolicyType >
using array_policy = ArrayPolicyType
 exposing the array policy
using indexing_policy = typename ArrayPolicyType::IndexingPolicy
 exposing the indexing policy

Detailed Description

template<typename Child, typename ArrayPolicyType>
struct tfel::math::MutableArrayCommonMethods< Child, ArrayPolicyType >

a structure gathering access methods and helper function for arrays.

Template Parameters
Childchild class
ArrayPolicyTypearray policy

Member Function Documentation

◆ addAndAssign()

template<typename Child, typename ArrayPolicyType>
template<typename OtherArray>
TFEL_HOST_DEVICE constexpr void tfel::math::MutableArrayCommonMethods< Child, ArrayPolicyType >::addAndAssign ( const OtherArray & )
constexprprotectednoexcept

add the values of the given array to the values of this array.

Template Parameters
OtherArraytype of the given array
Note
this shall not be used directly, because no runtime checks are performed.

◆ assign()

template<typename Child, typename ArrayPolicyType>
template<typename OtherArray>
TFEL_HOST_DEVICE constexpr void tfel::math::MutableArrayCommonMethods< Child, ArrayPolicyType >::assign ( const OtherArray & )
constexprprotectednoexcept

assign the values of the given array to the values of this array.

Template Parameters
OtherArraytype of the given array
Note
this shall not be used directly, because no runtime checks are performed.

◆ clamp()

template<typename Child, typename ArrayPolicyType>
template<typename ValueType2, typename ValueType3>
requires ( isAssignableTo<ValueType2, typename ArrayPolicyType::value_type>() && isAssignableTo<ValueType3, typename ArrayPolicyType::value_type>())
TFEL_HOST_DEVICE constexpr void tfel::math::MutableArrayCommonMethods< Child, ArrayPolicyType >::clamp ( const ValueType2 & ,
const ValueType3 &  )
constexpr

clamp all the values between the given bounds

Parameters
[in]lower_boundlower bound
[in]upper_boundupper bound

◆ divideByScalar()

template<typename Child, typename ArrayPolicyType>
template<typename ValueType2>
requires ( isAssignableTo< BinaryOperationResult<typename ArrayPolicyType::value_type, ValueType2, OpDiv>, typename ArrayPolicyType::value_type>())
TFEL_HOST_DEVICE constexpr void tfel::math::MutableArrayCommonMethods< Child, ArrayPolicyType >::divideByScalar ( const ValueType2 & )
constexprprotected

division by a scalar

Parameters
[in]sscalar value

◆ fill()

template<typename Child, typename ArrayPolicyType>
template<typename ValueType2>
requires ( isAssignableTo<ValueType2, typename ArrayPolicyType::value_type>())
TFEL_HOST_DEVICE constexpr void tfel::math::MutableArrayCommonMethods< Child, ArrayPolicyType >::fill ( const ValueType2 & )
constexpr

fill the array with the given value

Parameters
[in]vvalue

◆ import()

template<typename Child, typename ArrayPolicyType>
template<typename ImportIndexingPolicy, typename InputIterator>
TFEL_HOST_DEVICE constexpr void tfel::math::MutableArrayCommonMethods< Child, ArrayPolicyType >::import ( const ImportIndexingPolicy & ,
const InputIterator ,
const InputIterator  )
constexpr

import array values from a sequence

Parameters
[in]prandom access iterator to the first element of the sequence
[in]perandom access iterator after the last element of the sequence

◆ multiplyByScalar()

template<typename Child, typename ArrayPolicyType>
template<typename ValueType2>
requires ( isAssignableTo< BinaryOperationResult<ValueType2, typename ArrayPolicyType::value_type, OpMult>, typename ArrayPolicyType::value_type>())
TFEL_HOST_DEVICE constexpr void tfel::math::MutableArrayCommonMethods< Child, ArrayPolicyType >::multiplyByScalar ( const ValueType2 & )
constexprprotected

multiplication by a scalar

Parameters
[in]sscalar value

◆ operator()() [1/2]

template<typename Child, typename ArrayPolicyType>
template<typename... Indices>
TFEL_HOST_DEVICE constexpr ArrayPolicyType::reference tfel::math::MutableArrayCommonMethods< Child, ArrayPolicyType >::operator() ( const Indices... )
constexprnoexcept

access operator

Returns
a reference to the data associated with the given indices
Parameters
[in]irequested indices

◆ operator()() [2/2]

template<typename Child, typename ArrayPolicyType>
ArrayPolicyType::reference tfel::math::MutableArrayCommonMethods< Child, ArrayPolicyType >::operator() ( const std::array< typename ArrayPolicyType::IndexingPolicy::size_type, ArrayPolicyType::IndexingPolicy::arity > & i)
constexprnoexcept

access operator

Returns
a reference to the data associated with the given indices
Parameters
[in]irequested indices

◆ operator=()

template<typename Child, typename ArrayPolicyType>
template<typename ValueType>
requires ( isAssignableTo<ValueType, typename ArrayPolicyType::value_type>())
TFEL_HOST_DEVICE constexpr Child & tfel::math::MutableArrayCommonMethods< Child, ArrayPolicyType >::operator= ( const std::initializer_list< ValueType > & )
constexprnoexcept

assign values values from an initializer list

Parameters
[in]valuesvalues to be assigned

◆ operator[]() [1/2]

template<typename Child, typename ArrayPolicyType>
ArrayPolicyType::reference tfel::math::MutableArrayCommonMethods< Child, ArrayPolicyType >::operator[] ( const std::array< typename ArrayPolicyType::IndexingPolicy::size_type, ArrayPolicyType::IndexingPolicy::arity > & i)
constexprnoexcept

access operator

Returns
a reference to the data associated with the given indices
Parameters
[in]irequested indices

◆ operator[]() [2/2]

template<typename Child, typename ArrayPolicyType>
ArrayPolicyType::reference tfel::math::MutableArrayCommonMethods< Child, ArrayPolicyType >::operator[] ( const typename ArrayPolicyType::IndexingPolicy::size_type i)
constexprnoexcept

access operator

Returns
a reference to the data associated with the given index
Parameters
[in]irequested index

◆ substractAndAssign()

template<typename Child, typename ArrayPolicyType>
template<typename OtherArray>
TFEL_HOST_DEVICE constexpr void tfel::math::MutableArrayCommonMethods< Child, ArrayPolicyType >::substractAndAssign ( const OtherArray & )
constexprprotectednoexcept

substract the values of the given array to the values of this array.

Template Parameters
OtherArraytype of the given array
Note
this shall not be used directly, because no runtime checks are performed.

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