MGIS 3.1.0
Loading...
Searching...
No Matches
mgis::function::internals::tensor_modifier< TensorType > Struct Template Reference

modifier exposing the values computed by an evaluator, or the values of a function, as a tensorial object of type TensorType More...

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

Public Types

using Tag = ::mgis::function::EvaluatorModifierTag
 this alias allows to match the Evaluator Modifier concept

Public Member Functions

template<ViewableFunctionArgumentConcept QualifiedFunctionArgumentType>
requires (internals::checkNumberOfComponentsCompatibility< QualifiedFunctionArgumentType, compile_time_size<TensorType>>())
constexpr auto operator() (QualifiedFunctionArgumentType &&) const
 expose the values of a function argument as a tensorial object
template<EvaluatorConcept EvaluatorType>
requires ( (areTensorModifierRequirementsSatisfied<TensorType, std::decay_t<EvaluatorType>>))
constexpr auto operator() (const EvaluatorType &) const
 expose the values computed by an evaluator as a tensorial object

Detailed Description

template<TensorConcept TensorType>
struct mgis::function::internals::tensor_modifier< TensorType >

modifier exposing the values computed by an evaluator, or the values of a function, as a tensorial object of type TensorType

This is the modifier behind the as_stensor, as_tensor, ... variables defined below. It is stateless, which allows those variables to be defined as constexpr global variables.

Template Parameters
TensorTypetype of the tensorial object to be exposed, which must match the TensorConcept concept

Member Function Documentation

◆ operator()() [1/2]

template<TensorConcept TensorType>
requires ( (areTensorModifierRequirementsSatisfied<TensorType, std::decay_t<EvaluatorType>>))
template<EvaluatorConcept EvaluatorType>
requires ( (areTensorModifierRequirementsSatisfied<TensorType, std::decay_t<EvaluatorType>>))
auto mgis::function::internals::tensor_modifier< TensorType >::operator() ( const EvaluatorType & e) const
constexpr

expose the values computed by an evaluator as a tensorial object

Template Parameters
EvaluatorTypetype of the underlying evaluator
Parameters
[in]eevaluator whose values are exposed
Returns
a TensorModifier returning the values computed by the evaluator as objects of type TensorType
Note
only available if the requirements of the TensorModifier class are satisfied for TensorType and the given evaluator type
Template Parameters
TensorTypetype of the tensorial object to be exposed
EvaluatorTypetype of the underlying evaluator
Parameters
[in]eevaluator whose values are exposed
Returns
a TensorModifier returning the values computed by the evaluator as objects of type TensorType

◆ operator()() [2/2]

template<TensorConcept TensorType>
requires (internals::checkNumberOfComponentsCompatibility< QualifiedFunctionArgumentType, compile_time_size<TensorType>>())
template<ViewableFunctionArgumentConcept QualifiedFunctionArgumentType>
requires (internals::checkNumberOfComponentsCompatibility< QualifiedFunctionArgumentType, compile_time_size<TensorType>>())
auto mgis::function::internals::tensor_modifier< TensorType >::operator() ( QualifiedFunctionArgumentType && f) const
constexpr

expose the values of a function argument as a tensorial object

Template Parameters
QualifiedFunctionArgumentTypetype of the function argument, which may be a qualified type
Parameters
[in]ffunction argument whose values are exposed
Returns
a TensorView of type TensorType viewing the values of the function argument
Note
only available if the number of components of the function argument is compatible with that of TensorType (the check always succeeds when the number of components is only known at run time)
Template Parameters
TensorTypetype of the tensorial object to be exposed
QualifiedFunctionArgumentTypetype of the function argument, which may be a qualified type
Parameters
[in]ffunction argument whose values are exposed
Returns
a TensorView viewing the values of the function argument

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