|
MGIS 3.1.0
|
base class for views whose components are stored contiguously in separate memory regions More...
#include </home/runner/work/MFrontGenericInterfaceSupport/MFrontGenericInterfaceSupport/include/MGIS/Function/CoalescedMemoryAccessFunctionViewBase.hxx>
Public Types | |
| template<size_type size> | |
| using | MutableValues = std::array<real*, size> |
| array of the addresses of the values of size mutable components at a given integration point | |
| template<size_type size> | |
| using | ConstValues = std::array<const real*, size> |
| 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 | CoalescedMemoryAccessFunctionViewBase (const std::array< ScalarComponentFunctionView, N > &) |
| constructor, checking that the components share the same space | |
| constexpr | CoalescedMemoryAccessFunctionViewBase (const Space &, std::span< const real >) |
| constructor splitting the values into N constant scalar function views, available only for constant views | |
| constexpr | CoalescedMemoryAccessFunctionViewBase (const Space &, std::span< real >) |
| constructor splitting the values into N scalar function views | |
| constexpr const Space & | getSpace () const MGIS_NOEXCEPT |
| return the underlying space | |
| constexpr MutableValues< N > | getValuesPointers (const size_type) |
| constexpr MutableValues< N > | getValuesPointers (const size_type, const size_type) |
| constexpr ConstValues< N > | getValuesPointers (const size_type) const |
| constexpr ConstValues< N > | getValuesPointers (const size_type, const size_type) const |
| template<size_type begin, size_type size> requires ((begin + size <= N) && is_mutable && LinearElementSpaceConcept<Space> && (!hasElementWorkspace<Space>)) | |
| constexpr MutableValues< size > | getValuesPointers (const size_type) |
| template<size_type begin, size_type size> requires ((begin + size <= N) && is_mutable && LinearQuadratureSpaceConcept<Space> && (!hasCellWorkspace<Space>)) | |
| constexpr MutableValues< size > | getValuesPointers (const size_type, const size_type) |
| template<size_type begin, size_type size> requires ((begin + size <= N) && LinearElementSpaceConcept<Space> && (!hasElementWorkspace<Space>)) | |
| constexpr ConstValues< size > | getValuesPointers (const size_type) const |
| template<size_type begin, size_type size> requires ((begin + size <= N) && LinearQuadratureSpaceConcept<Space> && (!hasCellWorkspace<Space>)) | |
| constexpr ConstValues< size > | getValuesPointers (const size_type, const size_type) const |
| template<size_type offset> requires ((offset < N) && is_mutable && LinearElementSpaceConcept<Space> && (!hasElementWorkspace<Space>)) | |
| constexpr real * | getValuePointer (const size_type) |
| template<size_type offset> requires ((offset < N) && is_mutable && LinearQuadratureSpaceConcept<Space> && (!hasCellWorkspace<Space>)) | |
| constexpr real * | getValuePointer (const size_type, const size_type) |
| template<size_type offset> requires ((offset < N) && LinearElementSpaceConcept<Space> && (!hasElementWorkspace<Space>)) | |
| constexpr const real * | getValuePointer (const size_type) const |
| template<size_type offset> requires ((offset < N) && LinearQuadratureSpaceConcept<Space> && (!hasCellWorkspace<Space>)) | |
| constexpr const real * | getValuePointer (const size_type, const size_type) const |
|
template<size_type begin, size_type size> requires (N > 0) ((begin + size <= N) && is_mutable && LinearElementSpaceConcept<Space> && (!hasElementWorkspace<Space>)) | |
| constexpr CoalescedMemoryAccessFunctionViewBase< Space, N, is_mutable >::template MutableValues< size > | getValuesPointers (const size_type i) |
|
template<size_type begin, size_type size> requires (N > 0) ((begin + size <= N) && is_mutable && LinearQuadratureSpaceConcept<Space> && (!hasCellWorkspace<Space>)) | |
| constexpr CoalescedMemoryAccessFunctionViewBase< Space, N, is_mutable >::template MutableValues< size > | getValuesPointers (const size_type e, const size_type q) |
|
template<size_type begin, size_type size> requires (N > 0) ((begin + size <= N) && LinearElementSpaceConcept<Space> && (!hasElementWorkspace<Space>)) | |
| constexpr CoalescedMemoryAccessFunctionViewBase< Space, N, is_mutable >::template ConstValues< size > | getValuesPointers (const size_type i) const |
|
template<size_type begin, size_type size> requires (N > 0) ((begin + size <= N) && LinearQuadratureSpaceConcept<Space> && (!hasCellWorkspace<Space>)) | |
| constexpr CoalescedMemoryAccessFunctionViewBase< Space, N, is_mutable >::template ConstValues< size > | getValuesPointers (const size_type e, const size_type q) const |
Static Public Member Functions | |
| static constexpr bool | checkPreconditions (AbstractErrorHandler &, const std::array< ScalarComponentFunctionView, N > &) |
| check that the preconditions to build the view are met | |
| static constexpr bool | checkPreconditions (AbstractErrorHandler &, const Space &space, std::span< const real >) |
| check that the preconditions to build the view are met | |
| static constexpr bool | checkPreconditions (AbstractErrorHandler &, const Space &, std::span< real >) |
| check that the preconditions to build the view are met | |
Protected Member Functions | |
| template<bool doPreconditionsCheck> requires (N > 0) | |
| constexpr | CoalescedMemoryAccessFunctionViewBase (const PreconditionsCheck< doPreconditionsCheck > &, const std::array< ScalarComponentFunctionView, N > &) |
| constructor | |
| template<bool doPreconditionsCheck> requires (!is_mutable) | |
| constexpr | CoalescedMemoryAccessFunctionViewBase (const PreconditionsCheck< doPreconditionsCheck > &, const Space &, std::span< const real >) |
| constructor | |
| template<bool doPreconditionsCheck> requires (N > 0) | |
| constexpr | CoalescedMemoryAccessFunctionViewBase (const PreconditionsCheck< doPreconditionsCheck > &, const Space &, std::span< real >) |
| constructor | |
Static Protected Member Functions | |
| static constexpr auto | splitValues (const Space &, std::span< real >) |
| split the values into N mutable scalar function views | |
| static constexpr auto | splitValues (const Space &, std::span< const real >) |
| split the values into N constant scalar function views | |
Protected Attributes | |
| std::array< ScalarComponentFunctionView, N > | function_components |
| function's view for each component | |
base class for views whose components are stored contiguously in separate memory regions
Each component is described by a scalar function view whose data are stored contiguously for the different points of the space, as illustrated by the following scheme:
The values of the different components at a given integration point are not contiguous: the getValuesPointers function gathers the addresses of those values, which allows the values of all the components at a given integration point to be read or written in a single operation. This scheme is used by the CoalescedMemoryAccessTensorView class to map tensorial objects whose components are stored in separate contiguous memory regions.
| Space | type of the space on which the views are defined |
| N | number of components, which must be strictly positive |
| is_mutable | boolean stating if the view can return mutable pointers |
| using mgis::function::CoalescedMemoryAccessFunctionViewBase< Space, N, is_mutable >::ConstValues = std::array<const real*, size> |
array of the addresses of the values of size constant components at a given integration point
| size | number of components |
| using mgis::function::CoalescedMemoryAccessFunctionViewBase< Space, N, is_mutable >::MutableValues = std::array<real*, size> |
array of the addresses of the values of size mutable components at a given integration point
| size | number of components |
| using mgis::function::CoalescedMemoryAccessFunctionViewBase< Space, N, is_mutable >::ScalarComponentFunctionView |
type of the function view associated with a single component, whose values are stored contiguously for the different points of the space
|
constexpr |
constructor, checking that the components share the same space
| [in] | components | views of the components |
|
constexpr |
constructor splitting the values into N constant scalar function views, available only for constant views
| [in] | space | space on which the view is defined |
| [in] | values | constant values |
|
constexpr |
constructor splitting the values into N scalar function views
| [in] | space | space on which the view is defined |
| [in] | values | values |
|
constexprprotected |
constructor
| doPreconditionsCheck | boolean stating if the preconditions must be checked |
| [in] | pcheck | object stating if preconditions must be checked |
| [in] | components | views of the components |
|
constexprprotected |
constructor
| doPreconditionsCheck | boolean stating if the preconditions must be checked |
| [in] | pcheck | object stating if preconditions must be checked |
| [in] | space | space on which the view is defined |
| [in] | values | constant values |
|
constexprprotected |
constructor
| doPreconditionsCheck | boolean stating if the preconditions must be checked |
| [in] | pcheck | object stating if preconditions must be checked |
| [in] | space | space on which the view is defined |
| [in] | values | values |
|
staticnodiscardconstexpr |
check that the preconditions to build the view are met
| [in] | eh | error handler used to report the errors |
| [in] | space | space on which the view is defined |
| [in] | values | values |
|
staticnodiscardconstexpr |
check that the preconditions to build the view are met
| [in] | eh | error handler used to report the errors |
| [in] | space | space on which the view is defined |
| [in] | values | constant values |
|
staticnodiscardconstexpr |
check that the preconditions to build the view are met
| [in] | eh | error handler used to report the errors |
| [in] | components | views of the components |
|
nodiscardconstexpr |
return the underlying space
|
nodiscardconstexpr |
| offset | index of the component, strictly smaller than N |
| [in] | i | offset associated with the integration point |
|
nodiscardconstexpr |
| offset | index of the component, strictly smaller than N |
| [in] | i | offset associated with the integration point |
|
nodiscardconstexpr |
| offset | index of the component, strictly smaller than N |
| [in] | e | cell index |
| [in] | q | quadrature point index |
|
nodiscardconstexpr |
| offset | index of the component, strictly smaller than N |
| [in] | e | cell index |
| [in] | q | quadrature point index |
|
nodiscardconstexpr |
| begin | index of the first component |
| size | number of components, such that begin + size is not greater than N |
| [in] | i | offset associated with the integration point |
|
nodiscardconstexpr |
| [in] | i | offset associated with the integration point |
|
nodiscardconstexpr |
| begin | index of the first component |
| size | number of components, such that begin + size is not greater than N |
| [in] | i | offset associated with the integration point |
|
nodiscardconstexpr |
| [in] | i | offset associated with the integration point |
|
nodiscardconstexpr |
| begin | index of the first component |
| size | number of components, such that begin + size is not greater than N |
| [in] | e | cell index |
| [in] | q | quadrature point index |
|
nodiscardconstexpr |
| [in] | e | cell index |
| [in] | q | quadrature point index |
|
nodiscardconstexpr |
| begin | index of the first component |
| size | number of components, such that begin + size is not greater than N |
| [in] | e | cell index |
| [in] | q | quadrature point index |
|
nodiscardconstexpr |
| [in] | e | cell index |
| [in] | q | quadrature point index |
|
staticconstexprprotected |
split the values into N constant scalar function views
| [in] | space | space on which the views are defined |
| [in] | values | constant values, whose number of values must be equal to N * getSpaceSize(space) |
|
staticconstexprprotected |
split the values into N mutable scalar function views
| [in] | space | space on which the views are defined |
| [in] | values | values, whose number of values must be equal to N * getSpaceSize(space) |