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

default implementation of a function whose values are TFEL's tensorial objects More...

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

Inheritance diagram for mgis::function::TensorialFunction< Space, TensorType >:
mgis::PreconditionsChecker< TensorialFunction< Space, TensorType > > mgis::function::Function< Space, tfel::math::getUnderlyingArrayMinimalSize< TensorType::indexing_policy >()> mgis::function::TensorView< Function< Space, tfel::math::getUnderlyingArrayMinimalSize< TensorType::indexing_policy >()>, TensorType > mgis::PreconditionsChecker< TensorView< FunctionType, TensorType > >

Public Types

using UnderlyingFunctionType
 type of the function which owns the values
using UnderlyingTensorView
 type of the view through which the values are returned
Public Types inherited from mgis::function::TensorView< Function< Space, tfel::math::getUnderlyingArrayMinimalSize< TensorType::indexing_policy >()>, TensorType >
using Space
 type of the space on which the underlying function is defined
using ConstructorArgumentType
 a simple alias used to workaround what seems to be a bug in gcc 16.x: the underlying function is passed to the constructors by value if it is a lightweight view and by reference otherwise

Public Member Functions

constexpr TensorialFunction (const Space &)
 constructor from a space, checking the preconditions
template<bool doPreconditionsCheck>
requires (LinearElementSpaceConcept<Space> || LinearQuadratureSpaceConcept<Space>)
constexpr TensorialFunction (const PreconditionsCheck< doPreconditionsCheck > &, const Space &)
 constructor from a space
constexpr TensorialFunction (TensorialFunction &&)
 move constructor: moves the values of the function and rebinds the view to them
constexpr TensorialFunction (const TensorialFunction &)
 copy constructor: copies the values of the function and rebinds the view to them
constexpr UnderlyingTensorView & view () &MGIS_NOEXCEPT
 return a view of the function
constexpr const UnderlyingTensorView & view () const &MGIS_NOEXCEPT
 return a view of the function
auto view () &&=delete
 creating a view of a temporary function is forbidden
constexpr ~TensorialFunction ()
 fill the structure using raw data
constexpr auto operator() (const element_index< Space > &) const
 inherit the call operators of the view
constexpr auto operator() (const element_workspace< Space > &, const element_index< Space > &) const
 inherit the call operators of the view
constexpr auto operator() (const cell_index< Space > &, const quadrature_point_index< Space > &) const
 inherit the call operators of the view
constexpr auto operator() (const cell_workspace< Space > &, const cell_index< Space > &, const quadrature_point_index< Space > &) const
 inherit the call operators of the view
constexpr auto operator() (const element_index< Space > &)
 inherit the call operators of the view
constexpr auto operator() (const element_workspace< Space > &, const element_index< Space > &)
 inherit the call operators of the view
constexpr auto operator() (const cell_index< Space > &, const quadrature_point_index< Space > &)
 inherit the call operators of the view
constexpr auto operator() (const cell_workspace< Space > &, const cell_index< Space > &, const quadrature_point_index< Space > &)
 inherit the call operators of the view
Public Member Functions inherited from mgis::function::TensorView< Function< Space, tfel::math::getUnderlyingArrayMinimalSize< TensorType::indexing_policy >()>, TensorType >
constexpr TensorView (ConstructorArgumentType)
 constructor, checking the preconditions
constexpr bool check (AbstractErrorHandler &) const
 perform consistency checks
constexpr const Space & getSpace () const
 return the underlying space
constexpr size_type getNumberOfComponents () const MGIS_NOEXCEPT
constexpr auto operator() (const element_index< Space > &) const
 call operator

Static Public Member Functions

static constexpr bool checkPreconditions (AbstractErrorHandler &, const Space &)
 check that the preconditions to build the function are met
Static Public Member Functions inherited from mgis::function::TensorView< Function< Space, tfel::math::getUnderlyingArrayMinimalSize< TensorType::indexing_policy >()>, TensorType >
static constexpr bool checkPreconditions (AbstractErrorHandler &, const FunctionType &)
 method checking that the preconditions of the constructor are met

Detailed Description

template<FunctionalSpaceConcept Space, TensorConcept TensorType>
requires (LinearElementSpaceConcept<Space> || LinearQuadratureSpaceConcept<Space>)
struct mgis::function::TensorialFunction< Space, TensorType >

default implementation of a function whose values are TFEL's tensorial objects

A TensorialFunction stores its values in a Function, whose number of components is the minimal size of the array of values required to store a TensorType, as computed by the tfel::math::getUnderlyingArrayMinimalSize function, and derives from the corresponding TensorView, so it can be called like a function and returns its values as tensorial objects viewing its storage.

Template Parameters
Spacetype of the functional space
TensorTypetype of the tensorial objects returned by the function, which must match the TensorConcept concept
Note
the data stride is equal to the data size

Member Typedef Documentation

◆ UnderlyingFunctionType

template<FunctionalSpaceConcept Space, TensorConcept TensorType>
using mgis::function::TensorialFunction< Space, TensorType >::UnderlyingFunctionType
Initial value:
tfel::math::getUnderlyingArrayMinimalSize<
typename TensorType::indexing_policy>()>

type of the function which owns the values

◆ UnderlyingTensorView

template<FunctionalSpaceConcept Space, TensorConcept TensorType>
using mgis::function::TensorialFunction< Space, TensorType >::UnderlyingTensorView
Initial value:
tfel::math::getUnderlyingArrayMinimalSize<
typename TensorType::indexing_policy>()>,
TensorType
type of tensor that are supported
Definition TensorOperations.hxx:50

type of the view through which the values are returned

Constructor & Destructor Documentation

◆ TensorialFunction() [1/4]

template<FunctionalSpaceConcept Space, TensorConcept TensorType>
requires (LinearElementSpaceConcept<Space> || LinearQuadratureSpaceConcept<Space>)
mgis::function::TensorialFunction< Space, TensorType >::TensorialFunction ( const Space & s)
constexpr

constructor from a space, checking the preconditions

Parameters
[in]sspace on which the function is defined

◆ TensorialFunction() [2/4]

template<FunctionalSpaceConcept Space, TensorConcept TensorType>
requires (LinearElementSpaceConcept<Space> || LinearQuadratureSpaceConcept<Space>)
template<bool doPreconditionsCheck>
requires (LinearElementSpaceConcept<Space> || LinearQuadratureSpaceConcept<Space>)
mgis::function::TensorialFunction< Space, TensorType >::TensorialFunction ( const PreconditionsCheck< doPreconditionsCheck > & pcheck,
const Space & s )
constexpr

constructor from a space

Template Parameters
doPreconditionsCheckboolean stating if the preconditions must be checked
Parameters
[in]pcheckobject stating if preconditions must be checked
[in]sspace on which the function is defined

◆ TensorialFunction() [3/4]

template<FunctionalSpaceConcept Space, TensorConcept TensorType>
requires (LinearElementSpaceConcept<Space> || LinearQuadratureSpaceConcept<Space>)
mgis::function::TensorialFunction< Space, TensorType >::TensorialFunction ( TensorialFunction< Space, TensorType > && src)
constexpr

move constructor: moves the values of the function and rebinds the view to them

Parameters
[in]ffunction to move

◆ TensorialFunction() [4/4]

template<FunctionalSpaceConcept Space, TensorConcept TensorType>
requires (LinearElementSpaceConcept<Space> || LinearQuadratureSpaceConcept<Space>)
mgis::function::TensorialFunction< Space, TensorType >::TensorialFunction ( const TensorialFunction< Space, TensorType > & src)
constexpr

copy constructor: copies the values of the function and rebinds the view to them

Parameters
[in]ffunction to copy

◆ ~TensorialFunction()

template<FunctionalSpaceConcept Space, TensorConcept TensorType>
requires (LinearElementSpaceConcept<Space> || LinearQuadratureSpaceConcept<Space>)
mgis::function::TensorialFunction< Space, TensorType >::~TensorialFunction ( )
constexprdefault

fill the structure using raw data

Parameters
[in]eherror handler
[in]valuesraw data

fill the structure using raw data

Parameters
[in]eherror handler
[in]valuesraw data

destructor

Member Function Documentation

◆ checkPreconditions()

template<FunctionalSpaceConcept Space, TensorConcept TensorType>
requires (LinearElementSpaceConcept<Space> || LinearQuadratureSpaceConcept<Space>)
bool mgis::function::TensorialFunction< Space, TensorType >::checkPreconditions ( AbstractErrorHandler & ,
const Space &  )
staticnodiscardconstexpr

check that the preconditions to build the function are met

Parameters
[in]ehunused error handler
[in]sunused space
Returns
always true: no check is required

◆ view() [1/2]

template<FunctionalSpaceConcept Space, TensorConcept TensorType>
requires (LinearElementSpaceConcept<Space> || LinearQuadratureSpaceConcept<Space>)
TensorView< Function< Space, tfel::math::getUnderlyingArrayMinimalSize< typename TensorType::indexing_policy >()>, TensorType > & mgis::function::TensorialFunction< Space, TensorType >::view ( ) &
constexpr

return a view of the function

Returns
a mutable view of the values of the function

◆ view() [2/2]

template<FunctionalSpaceConcept Space, TensorConcept TensorType>
requires (LinearElementSpaceConcept<Space> || LinearQuadratureSpaceConcept<Space>)
const TensorView< Function< Space, tfel::math::getUnderlyingArrayMinimalSize< typename TensorType::indexing_policy >()>, TensorType > & mgis::function::TensorialFunction< Space, TensorType >::view ( ) const &
constexpr

return a view of the function

Returns
a read-only view of the values of the function

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