MGIS 3.1.0
Loading...
Searching...
No Matches
mgis::function::FunctionDataLayout< layout > Struct Template Reference

a simple data structure describing how the data of a function is mapped in memory More...

#include </home/runner/work/MFrontGenericInterfaceSupport/MFrontGenericInterfaceSupport/include/MGIS/Function/Function.hxx>

Inheritance diagram for mgis::function::FunctionDataLayout< layout >:
mgis::function::FunctionDataSize< layout.data_size > mgis::function::FunctionDataStride< layout.data_stride > mgis::function::FunctionView< Space, FunctionDataLayoutDescription{.data_size=1,.data_stride=1}, is_mutable > mgis::function::FunctionView< Space, layout, false > mgis::function::FunctionView< Space, simple_data_layout_description< N >, true > mgis::function::FunctionView< BasicLinearSpace, FunctionDataLayoutDescription{}, false > mgis::function::Function< Space, tfel::math::getUnderlyingArrayMinimalSize< typename TensorType::indexing_policy >()> mgis::function::Function< Space, tfel::math::getUnderlyingArrayMinimalSize< TensorType::indexing_policy >()> mgis::function::Function< Space, N > mgis::function::TensorialFunction< Space, tfel::math::stensor< N, real > > mgis::function::TensorialFunction< Space, tfel::math::tensor< N, real > > mgis::function::TensorialFunction< Space, tfel::math::st2tost2< N, real > > mgis::function::TensorialFunction< Space, tfel::math::t2tost2< N, real > > mgis::function::TensorialFunction< Space, tfel::math::st2tot2< N, real > > mgis::function::TensorialFunction< Space, tfel::math::t2tot2< N, real > > mgis::function::TensorialFunction< Space, TensorType >

Public Member Functions

 FunctionDataLayout ()=default
 default constructor
 FunctionDataLayout (FunctionDataLayout &&)=default
 move constructor
 FunctionDataLayout (const FunctionDataLayout &)=default
 copy constructor
FunctionDataLayout & operator= (FunctionDataLayout &&)=default
 move assignment operator
FunctionDataLayout & operator= (const FunctionDataLayout &)=default
 copy assignment operator
 ~FunctionDataLayout ()=default
 destructor
Public Member Functions inherited from mgis::function::FunctionDataSize< layout.data_size >
constexpr bool isScalar () const MGIS_NOEXCEPT
constexpr size_type getNumberOfComponents () const MGIS_NOEXCEPT
Public Member Functions inherited from mgis::function::FunctionDataStride< layout.data_stride >
constexpr size_type getDataStride () const MGIS_NOEXCEPT

Protected Member Functions

constexpr size_type getDataOffset (const size_type) const MGIS_NOEXCEPT
 the data offset of an integration point is its offset multiplied by the stride, which is taken from the template parameter when it is known at compile time, from the FunctionDataStride base class otherwise

Detailed Description

template<FunctionDataLayoutDescription layout>
requires ((layout.data_size > 0) && (layout.data_stride > 0) && ((layout.data_size == dynamic_extent) || (layout.data_stride == dynamic_extent) || (layout.data_size <= layout.data_stride)))
struct mgis::function::FunctionDataLayout< layout >

a simple data structure describing how the data of a function is mapped in memory

This class gathers the number of components and the stride of the data of a function through the FunctionDataSize and FunctionDataStride base classes, which store those properties at compile time or at run time depending on the value of layout.

Template Parameters
layoutdata layout description. The requires clause states that the data size and the data stride are greater than zero and that the data size is not greater than the data stride when both are known at compile time.

Member Function Documentation

◆ getDataOffset()

template<FunctionDataLayoutDescription layout>
requires ((layout.data_size > 0) && (layout.data_stride > 0) && ((layout.data_size == dynamic_extent) || (layout.data_stride == dynamic_extent) || (layout.data_size <= layout.data_stride)))
size_type mgis::function::FunctionDataLayout< layout >::getDataOffset ( const size_type i) const
nodiscardconstexprprotected

the data offset of an integration point is its offset multiplied by the stride, which is taken from the template parameter when it is known at compile time, from the FunctionDataStride base class otherwise

Returns
the data offset associated with the given integration point.
Parameters
[in]iintegration point

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