MGIS 3.1.0
Loading...
Searching...
No Matches
mgis::function::CoalescedMemoryAccessTensorView< Space, TensorType, is_mutable > Struct Template Reference

a coalesced memory access view which acts as a function returning TFEL's tensorial objects More...

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

Inheritance diagram for mgis::function::CoalescedMemoryAccessTensorView< Space, TensorType, is_mutable >:
mgis::function::CoalescedMemoryAccessFunctionViewBase< Space, internals::CompileTimeSize< TensorType >::value, true > mgis::PreconditionsChecker< CoalescedMemoryAccessFunctionViewBase< Space, N, is_mutable > >

Public Types

using MutableValues = tfel::math::CoalescedView<TensorType>
 type returned by the mutable call operators
using ConstValues = tfel::math::CoalescedView<const TensorType>
 type returned by the constant call operators
Public Types inherited from mgis::function::CoalescedMemoryAccessFunctionViewBase< Space, internals::CompileTimeSize< TensorType >::value, true >
using MutableValues
 array of the addresses of the values of size mutable components at a given integration point
using ConstValues
 array of the addresses of the values of size constant components at a given integration point
using ScalarComponentFunctionView
 type of the function view associated with a single component, whose values are stored contiguously for the different points of the space

Public Member Functions

constexpr MutableValues operator() (const size_type)
constexpr MutableValues operator() (const size_type, const size_type)
constexpr ConstValues operator() (const size_type) const
constexpr ConstValues operator() (const size_type, const size_type) const
Public Member Functions inherited from mgis::function::CoalescedMemoryAccessFunctionViewBase< Space, internals::CompileTimeSize< TensorType >::value, true >
constexpr CoalescedMemoryAccessFunctionViewBase< Space, N, is_mutable >::template MutableValues< size > getValuesPointers (const size_type i)
constexpr CoalescedMemoryAccessFunctionViewBase< Space, N, is_mutable >::template MutableValues< size > getValuesPointers (const size_type e, const size_type q)
constexpr CoalescedMemoryAccessFunctionViewBase< Space, N, is_mutable >::template ConstValues< size > getValuesPointers (const size_type i) const
constexpr CoalescedMemoryAccessFunctionViewBase< Space, N, is_mutable >::template ConstValues< size > getValuesPointers (const size_type e, const size_type q) const
constexpr CoalescedMemoryAccessFunctionViewBase (const std::array< ScalarComponentFunctionView, N > &)
 constructor, checking that the components share the same space
constexpr const Space & getSpace () const MGIS_NOEXCEPT
 return the underlying space
constexpr real * getValuePointer (const size_type)

Additional Inherited Members

Static Public Member Functions inherited from mgis::function::CoalescedMemoryAccessFunctionViewBase< Space, internals::CompileTimeSize< TensorType >::value, true >
static constexpr bool checkPreconditions (AbstractErrorHandler &, const std::array< ScalarComponentFunctionView, N > &)
 check that the preconditions to build the view are met
Static Protected Member Functions inherited from mgis::function::CoalescedMemoryAccessFunctionViewBase< Space, internals::CompileTimeSize< TensorType >::value, true >
static constexpr auto splitValues (const Space &, std::span< real >)
 split the values into N mutable scalar function views
Protected Attributes inherited from mgis::function::CoalescedMemoryAccessFunctionViewBase< Space, internals::CompileTimeSize< TensorType >::value, true >
std::array< ScalarComponentFunctionView, N > function_components
 function's view for each component

Detailed Description

template<FunctionalSpaceConcept Space, TensorConcept TensorType, bool is_mutable = true>
struct mgis::function::CoalescedMemoryAccessTensorView< Space, TensorType, is_mutable >

a coalesced memory access view which acts as a function returning TFEL's tensorial objects

The view is built either from the views of the N scalar components of a tensorial object, N being the number of components of TensorType, or from a space and an array of values split into such views, as described by the CoalescedMemoryAccessFunctionViewBase class. The values of each component are stored contiguously for the different points of the space, so the values of the different components at a given integration point are not contiguous in memory.

The call operators return a tfel::math::CoalescedView of the tensorial type, which gathers the addresses of the values of the components at a given integration point and allows the tensor to be read, or written for mutable views, in a single operation.

Only the call operators which match the way the space can be addressed are available.

Template Parameters
Spacefunctional space on which the view is defined
TensorTypetype of the tensorial object mapped, which must match the TensorConcept concept
is_mutableboolean stating if the view can return mutable values

Member Function Documentation

◆ operator()() [1/4]

template<FunctionalSpaceConcept Space, TensorConcept TensorType, bool is_mutable>
requires ( is_mutable&& LinearElementSpaceConcept<Space> && (!hasElementWorkspace<Space>))
CoalescedMemoryAccessTensorView< Space, TensorType, is_mutable >::MutableValues mgis::function::CoalescedMemoryAccessTensorView< Space, TensorType, is_mutable >::operator() ( const size_type i)
nodiscardconstexpr
Returns
the values of all the components at the given integration point, as a mutable coalesced view of the tensorial type
Parameters
[in]ioffset associated with the integration point
Note
only available for mutable views defined on a linear element space without element workspace

◆ operator()() [2/4]

template<FunctionalSpaceConcept Space, TensorConcept TensorType, bool is_mutable>
requires (LinearElementSpaceConcept<Space> && (!hasElementWorkspace<Space>))
CoalescedMemoryAccessTensorView< Space, TensorType, is_mutable >::ConstValues mgis::function::CoalescedMemoryAccessTensorView< Space, TensorType, is_mutable >::operator() ( const size_type i) const
nodiscardconstexpr
Returns
the values of all the components at the given integration point, as a read-only coalesced view of the tensorial type
Parameters
[in]ioffset associated with the integration point
Note
only available for views defined on a linear element space without element workspace

◆ operator()() [3/4]

template<FunctionalSpaceConcept Space, TensorConcept TensorType, bool is_mutable>
requires ( is_mutable&& LinearQuadratureSpaceConcept<Space> && (!hasCellWorkspace<Space>))
CoalescedMemoryAccessTensorView< Space, TensorType, is_mutable >::MutableValues mgis::function::CoalescedMemoryAccessTensorView< Space, TensorType, is_mutable >::operator() ( const size_type e,
const size_type q )
nodiscardconstexpr
Returns
the values of all the components at the given integration point, as a mutable coalesced view of the tensorial type
Parameters
[in]ecell index
[in]qquadrature point index
Note
only available for mutable views defined on a linear quadrature space without cell workspace

◆ operator()() [4/4]

template<FunctionalSpaceConcept Space, TensorConcept TensorType, bool is_mutable>
requires (LinearQuadratureSpaceConcept<Space> && (!hasCellWorkspace<Space>))
CoalescedMemoryAccessTensorView< Space, TensorType, is_mutable >::ConstValues mgis::function::CoalescedMemoryAccessTensorView< Space, TensorType, is_mutable >::operator() ( const size_type e,
const size_type q ) const
nodiscardconstexpr
Returns
the values of all the components at the given integration point, as a read-only coalesced view of the tensorial type
Parameters
[in]ecell index
[in]qquadrature point index
Note
only available for views defined on a linear quadrature space without cell workspace

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