tfel
Loading...
Searching...
No Matches
tfel::math::tensor< N, ValueType > Struct Template Reference
Inheritance diagram for tfel::math::tensor< N, ValueType >:
tfel::math::TensorConceptBase< tensor< N, ValueType > > tfel::math::GenericFixedSizeArray< tensor< N, ValueType >, FixedSizeVectorPolicy< TensorDimeToSize< N >::value, ValueType > >

Public Types

using GenericFixedSizeArrayBase
 a simple alias
Public Types inherited from tfel::math::TensorConceptBase< tensor< N, ValueType > >
using ConceptTag
 alias exposing TensorTag as the concept that must be satisfied by the T-type
Public Types inherited from tfel::math::GenericFixedSizeArray< tensor< N, ValueType >, FixedSizeVectorPolicy< TensorDimeToSize< N >::value, ValueType > >
using value_type

Public Member Functions

 TFEL_MATH_FIXED_SIZE_ARRAY_DEFAULT_METHODS (tensor, GenericFixedSizeArrayBase)
TFEL_HOST_DEVICE constexpr ValueType operator() (const typename tensor< N, ValueType >::size_type) const noexcept
 access operator
TFEL_HOST_DEVICE constexpr ValueType & operator() (const typename tensor< N, ValueType >::size_type) noexcept
 access operator
TFEL_HOST constexpr ValueType operator() (const typename tensor< N, ValueType >::size_type, const typename tensor< N, ValueType >::size_type) const
 matrix-like access operator
TFEL_HOST_DEVICE constexpr void write (base_type< ValueType > *const) const noexcept
 write to an external memory location
TFEL_HOST_DEVICE constexpr void import (const base_type< ValueType > *const) noexcept
 import values from an external memory location
TFEL_HOST_DEVICE constexpr void changeBasis (const rotation_matrix< ValueType > &) noexcept
 change basis
TFEL_HOST_DEVICE constexpr void copy (const auto) noexcept
 copy from a range
Public Member Functions inherited from tfel::math::TensorConceptBase< tensor< N, ValueType > >
TFEL_HOST numeric_type< tensor< N, ValueType > > operator() (const unsigned short, const unsigned short) const
 matrix-like access to values
Public Member Functions inherited from tfel::math::GenericFixedSizeArray< tensor< N, ValueType >, FixedSizeVectorPolicy< TensorDimeToSize< 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< tensor< N, ValueType >, FixedSizeVectorPolicy< TensorDimeToSize< N >::value, ValueType >, getArrayPolicySize< FixedSizeVectorPolicy< TensorDimeToSize< N >::value, ValueType > >() >::size_type getContainerSize () const noexcept
TFEL_HOST_DEVICE constexpr tensor< N, ValueType > & operator= (const OtherArray &) noexcept
 assign values values from an other array
TFEL_HOST_DEVICE constexpr tensor< N, ValueType > & operator+= (const OtherArray &) noexcept
TFEL_HOST_DEVICE constexpr tensor< N, ValueType > & operator-= (const OtherArray &) noexcept
TFEL_HOST_DEVICE constexpr tensor< N, ValueType > & operator*= (const ValueType2 &) noexcept
TFEL_HOST_DEVICE constexpr tensor< N, ValueType > & operator/= (const ValueType2 &) noexcept
TFEL_HOST_DEVICE constexpr GenericFixedSizeArray< tensor< N, ValueType >, FixedSizeVectorPolicy< TensorDimeToSize< N >::value, ValueType >, getArrayPolicySize< FixedSizeVectorPolicy< TensorDimeToSize< N >::value, ValueType > >() >::pointer data () noexcept
TFEL_HOST_DEVICE constexpr GenericFixedSizeArray< tensor< N, ValueType >, FixedSizeVectorPolicy< TensorDimeToSize< N >::value, ValueType >, getArrayPolicySize< FixedSizeVectorPolicy< TensorDimeToSize< 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 tensor< N, base_type< ValueType > > Id () noexcept
static TFEL_HOST_DEVICE constexpr base_type< ValueType > Id (const typename tensor< N, ValueType >::size_type) noexcept
static TFEL_HOST_DEVICE constexpr void buildFromFortranMatrix (tensor< N, ValueType > &, const base_type< ValueType > *const) noexcept
 Build a tensor from a fortran matrix.
static TFEL_HOST_DEVICE constexpr tensor< N, ValueType > buildFromFortranMatrix (const base_type< ValueType > *const) noexcept
 Build a tensor from a fortran matrix.
Static Public Member Functions inherited from tfel::math::GenericFixedSizeArray< tensor< N, ValueType >, FixedSizeVectorPolicy< TensorDimeToSize< N >::value, ValueType > >
static TFEL_HOST_DEVICE constexpr tensor< N, ValueType > zero ()

Additional Inherited Members

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

Member Typedef Documentation

◆ GenericFixedSizeArrayBase

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

a simple alias

Member Function Documentation

◆ buildFromFortranMatrix() [1/2]

template<unsigned short N, typename ValueType>
TFEL_HOST_DEVICE constexpr tensor< N, ValueType > tfel::math::tensor< N, ValueType >::buildFromFortranMatrix ( const base_type< ValueType > * const )
staticconstexprnoexcept

Build a tensor from a fortran matrix.

Parameters
[in]ttensor to be filled
[in]vpointer to an array used to initialise the components of the tensor. This array is left unchanged.

◆ buildFromFortranMatrix() [2/2]

template<unsigned short N, typename ValueType>
TFEL_HOST_DEVICE constexpr void tfel::math::tensor< N, ValueType >::buildFromFortranMatrix ( tensor< N, ValueType > & ,
const base_type< ValueType > * const  )
staticconstexprnoexcept

Build a tensor from a fortran matrix.

Parameters
[in]ttensor to be filled
[in]vpointer to an array used to initialise the components of the tensor. This array is left unchanged.

◆ Id() [1/2]

template<unsigned short N, typename T>
TFEL_HOST_DEVICE constexpr tensor< N, base_type< T > > tfel::math::tensor< N, T >::Id ( )
staticconstexprnoexcept
Returns
the identity tensor

◆ Id() [2/2]

template<unsigned short N, typename ValueType>
TFEL_HOST_DEVICE constexpr base_type< ValueType > tfel::math::tensor< N, ValueType >::Id ( const typename tensor< N, ValueType >::size_type )
staticconstexprnoexcept
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

◆ operator()() [1/3]

template<unsigned short N, typename ValueType>
TFEL_HOST_DEVICE constexpr ValueType tfel::math::tensor< N, ValueType >::operator() ( const typename tensor< N, ValueType >::size_type i) const
constexprnoexcept

access operator

Parameters
[in]iindex

◆ operator()() [2/3]

template<unsigned short N, typename ValueType>
TFEL_HOST_DEVICE constexpr ValueType & tfel::math::tensor< N, ValueType >::operator() ( const typename tensor< N, ValueType >::size_type i)
constexprnoexcept

access operator

Parameters
[in]iindex

◆ operator()() [3/3]

template<unsigned short N, typename ValueType>
TFEL_HOST constexpr ValueType tfel::math::tensor< N, ValueType >::operator() ( const typename tensor< N, ValueType >::size_type i,
const typename tensor< N, ValueType >::size_type j ) const
constexpr

matrix-like access operator

Parameters
[in]irow number
[in]jcolumn number

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