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

an evaluator returning the values computed by an evaluator as TFEL's tensorial objects More...

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

Inheritance diagram for mgis::function::TensorModifier< TensorType, EvaluatorType >:
mgis::function::EvaluatorModifierBase< TensorModifier< TensorType, EvaluatorType >, EvaluatorType >

Public Member Functions

constexpr bool check (AbstractErrorHandler &) const
 perform consistency checks
constexpr size_type getNumberOfComponents () const MGIS_NOEXCEPT
constexpr auto apply (const evaluator_result< EvaluatorType > &) const
 transform the value computed by the underlying evaluator at a given integration point into a tensorial object
Public Member Functions inherited from mgis::function::EvaluatorModifierBase< TensorModifier< TensorType, EvaluatorType >, EvaluatorType >
constexpr EvaluatorModifierBase (const EvaluatorType &)
 constructor
constexpr decltype(auto) getSpace () const
 return the underlying space
constexpr bool check (AbstractErrorHandler &) const
 perform consistency checks
constexpr auto operator() (const element_index< Space > &) const
 call operator: the value computed by the underlying evaluator is passed to the apply member function of the derived class

Additional Inherited Members

Public Types inherited from mgis::function::EvaluatorModifierBase< TensorModifier< TensorType, EvaluatorType >, EvaluatorType >
using Space
 type of the space on which the underlying evaluator is defined
Protected Attributes inherited from mgis::function::EvaluatorModifierBase< TensorModifier< TensorType, EvaluatorType >, EvaluatorType >
EvaluatorType evaluator
 underlying evaluator

Detailed Description

template<TensorConcept TensorType, EvaluatorConcept EvaluatorType>
requires (areTensorModifierRequirementsSatisfied<TensorType, EvaluatorType>)
struct mgis::function::TensorModifier< TensorType, EvaluatorType >

an evaluator returning the values computed by an evaluator as TFEL's tensorial objects

The modifier is built from an evaluator whose number of components must be compatible with the tensorial type TensorType. Its call operators pass the value computed by the evaluator at a given integration point to the apply member function, which returns it as a tensorial object: a read-only tensor viewing the computed values if they are stored in memory owned by another object, a tensor owning a copy of these values otherwise.

Only the call operators which match the way the underlying evaluator can be called are available.

Template Parameters
TensorTypetype of the tensorial object to be exposed, which must match the TensorConcept concept
EvaluatorTypetype of the underlying evaluator
Note
only available if the requirements stated by the areTensorModifierRequirementsSatisfied variable are satisfied

Member Function Documentation

◆ apply()

template<TensorConcept TensorType, EvaluatorConcept EvaluatorType>
requires (areTensorModifierRequirementsSatisfied<TensorType, EvaluatorType>)
auto mgis::function::TensorModifier< TensorType, EvaluatorType >::apply ( const evaluator_result< EvaluatorType > & values) const
constexpr

transform the value computed by the underlying evaluator at a given integration point into a tensorial object

Parameters
[in]valuesvalue computed by the underlying evaluator at the given integration point
Returns
a tensor viewing the computed values if they are stored in memory owned by another object, a tensor owning a copy of these values otherwise

◆ check()

template<TensorConcept TensorType, EvaluatorConcept EvaluatorType>
requires (areTensorModifierRequirementsSatisfied<TensorType, EvaluatorType>)
bool mgis::function::TensorModifier< TensorType, EvaluatorType >::check ( AbstractErrorHandler & eh) const
nodiscardconstexpr

perform consistency checks

Parameters
[in]eherror handler the detected errors are reported to
Returns
true if the values computed by the underlying evaluator are valid and if its number of components is compatible with the tensorial type

◆ getNumberOfComponents()

template<TensorConcept TensorType, EvaluatorConcept EvaluatorType>
requires (areTensorModifierRequirementsSatisfied<TensorType, EvaluatorType>)
size_type mgis::function::TensorModifier< TensorType, EvaluatorType >::getNumberOfComponents ( ) const
constexpr
Returns
the number of components of the values returned by the modifier, which is the number of components of the tensorial type

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