MGIS 3.1.0
Loading...
Searching...
No Matches
BinaryOperationEvaluatorBase.hxx File Reference

This file declares the BinaryOperationEvaluatorBase class, a base class used to build an evaluator by applying a binary operation to the values returned by two evaluators. More...

Classes

struct  mgis::function::BinaryOperationEvaluatorBase< Child, FirstEvaluatorType, SecondEvaluatorType >
 a base class to construct an evaluator by applying a binary operation on the results of two evaluators More...

Namespaces

namespace  mgis
 the namespace mgis encloses all the MGIS project.

Functions

template<typename Child, EvaluatorConcept FirstEvaluatorType, EvaluatorConcept SecondEvaluatorType>
constexpr decltype(auto) mgis::function::getSpace (const BinaryOperationEvaluatorBase< Child, FirstEvaluatorType, SecondEvaluatorType > &)
 return the underlying space
template<typename Child, EvaluatorConcept FirstEvaluatorType, EvaluatorConcept SecondEvaluatorType>
constexpr bool mgis::function::check (AbstractErrorHandler &, const BinaryOperationEvaluatorBase< Child, FirstEvaluatorType, SecondEvaluatorType > &)
 perform consistency checks

Variables

template<EvaluatorConcept FirstEvaluatorType, EvaluatorConcept SecondEvaluatorType>
constexpr auto mgis::function::BinaryOperationEvaluatorBaseRequirement
 the set of requirements that must be satisfied by both operands of a binary operation on evaluators

Detailed Description

This file declares the BinaryOperationEvaluatorBase class, a base class used to build an evaluator by applying a binary operation to the values returned by two evaluators.

Author
Thomas Helfer
Date
07/05/2025

Function Documentation

◆ check()

template<typename Child, EvaluatorConcept FirstEvaluatorType, EvaluatorConcept SecondEvaluatorType>
bool mgis::function::check ( AbstractErrorHandler & eh,
const BinaryOperationEvaluatorBase< Child, FirstEvaluatorType, SecondEvaluatorType > & e )
nodiscardconstexpr

perform consistency checks

forwards the call to the check member function

Template Parameters
Childtype of the class deriving from this base class
FirstEvaluatorTypeevaluator used to compute the first argument of the binary operation
SecondEvaluatorTypeevaluator used to compute the second argument of the binary operation
Parameters
[in]eherror handler used to report the errors
[in]eevaluator of the result of the binary operation
Returns
true if the values computed by the evaluator are valid

◆ getSpace()

template<typename Child, EvaluatorConcept FirstEvaluatorType, EvaluatorConcept SecondEvaluatorType>
decltype(auto) mgis::function::getSpace ( const BinaryOperationEvaluatorBase< Child, FirstEvaluatorType, SecondEvaluatorType > & e)
nodiscardconstexpr

return the underlying space

forwards the call to the getSpace member function

Template Parameters
Childtype of the class deriving from this base class
FirstEvaluatorTypeevaluator used to compute the first argument of the binary operation
SecondEvaluatorTypeevaluator used to compute the second argument of the binary operation
Parameters
[in]eevaluator of the result of the binary operation
Returns
the space on which the two evaluators are defined

Variable Documentation

◆ BinaryOperationEvaluatorBaseRequirement

template<EvaluatorConcept FirstEvaluatorType, EvaluatorConcept SecondEvaluatorType>
auto mgis::function::BinaryOperationEvaluatorBaseRequirement
inlineconstexpr
Initial value:
=
(std::same_as<evaluator_space<FirstEvaluatorType>,
std::decay_t< decltype(getSpace(std::declval< EvaluatorType >()))> evaluator_space
alias giving the type of the space on which an evaluator is defined
Definition EvaluatorConcept.hxx:357
concept defining evaluators working on an element space
Definition EvaluatorConcept.hxx:337
concept defining evaluators working on a quadrature space
Definition EvaluatorConcept.hxx:347

the set of requirements that must be satisfied by both operands of a binary operation on evaluators

The two evaluators must be defined on the same space and must either both match the ElementEvaluatorConcept concept or both the QuadratureEvaluatorConcept concept: the values of the two operands are always computed at the same integration point.

Template Parameters
FirstEvaluatorTypeevaluator used to compute the first argument of the binary operation
SecondEvaluatorTypeevaluator used to compute the second argument of the binary operation