|
MGIS 3.1.0
|
File which defines the concept a function must satisfy and the helpers used to query the space, the type of the values and the view of a function. More...
#include <span>#include <array>#include <utility>#include <concepts>#include <type_traits>#include "MGIS/Config.hxx"#include "MGIS/Function/CompileTimeSize.hxx"#include "MGIS/Function/SpaceConcept.hxx"#include "MGIS/Function/EvaluatorConcept.hxx"#include "MGIS/Function/FunctionConcept.ixx"#include "MGIS/Function/FixedSizeView.hxx"#include "MGIS/Function/FixedSizeModifier.hxx"Classes | |
| struct | mgis::function::internals::FunctionResultTypeTraits< T > |
| traits that must be specialized to allow functions to return this type. More... | |
| struct | mgis::function::internals::FunctionResultTypeTraits< real & > |
| partial specialization for reference to a scalar value More... | |
| struct | mgis::function::internals::FunctionResultTypeTraits< std::span< real, N > > |
| partial specialization for a mutable span More... | |
| struct | mgis::function::internals::FunctionResultTypeTraits< std::array< real, N > & > |
| partial specialization for a reference to a mutable array More... | |
| struct | mgis::function::internals::FunctionResultQueryImplementation1< bool, FunctionType > |
| helper class used to determine the type returned by a function called with an element index, which is an invalid type if the function cannot be called this way More... | |
| struct | mgis::function::internals::FunctionResultQueryImplementation1< true, FunctionType > |
| specialization used when the function can be called this way More... | |
| struct | mgis::function::internals::FunctionResultQueryImplementation2< bool, FunctionType > |
| helper class used to determine the type returned by a function called with an element workspace and an element index, which is an invalid type if the function cannot be called this way More... | |
| struct | mgis::function::internals::FunctionResultQueryImplementation2< true, FunctionType > |
| specialization used when the function can be called this way More... | |
| struct | mgis::function::internals::FunctionResultQueryImplementation3< bool, FunctionType > |
| helper class used to determine the type returned by a function called with a cell index and a quadrature point index, which is an invalid type if the function cannot be called this way More... | |
| struct | mgis::function::internals::FunctionResultQueryImplementation3< true, FunctionType > |
| specialization used when the function can be called this way More... | |
| struct | mgis::function::internals::FunctionResultQueryImplementation4< bool, FunctionType > |
| helper class used to determine the type returned by a function called with a cell workspace, a cell index and a quadrature point index, which is an invalid type if the function cannot be called this way More... | |
| struct | mgis::function::internals::FunctionResultQueryImplementation4< true, FunctionType > |
| specialization used when the function can be called this way More... | |
| struct | mgis::function::internals::FunctionResultQueryImplementation< bool, FunctionType > |
| helper class used to determine how a function can be called and the type of the values it returns More... | |
| struct | mgis::function::internals::FunctionResultQueryImplementation< true, FunctionType > |
| specialization used when the function provides a getSpace function More... | |
| struct | mgis::function::internals::FunctionResultQuery< FunctionType > |
| alias used to determine how a function can be called and the type of the values it returns More... | |
| struct | mgis::function::LightweightViewTraits< FunctionType > |
| traits defining the functions which are their own view More... | |
| struct | mgis::function::internals::ViewResultType< bool, FunctionType > |
| helper structure used to determine the type of the view of a function which is not its own view More... | |
| struct | mgis::function::internals::ViewResultType< false, FunctionType > |
| specialization used when a view is required More... | |
| struct | mgis::function::internals::NumberOfComponents< FunctionType > |
| number of components of a function when known at compile-time, dynamic_extent otherwise More... | |
| struct | mgis::function::internals::fixed_size_modifier< N > |
| structure used to modify a function or an evaluator so that it returns a fixed number of components More... | |
Namespaces | |
| namespace | mgis |
| the namespace mgis encloses all the MGIS project. | |
Concepts | |
| concept | mgis::function::internals::mutable_return_value |
| concept defining the types a function may return | |
| concept | mgis::function::LightweightViewConcept |
| concept defining the functions which are their own view | |
| concept | mgis::function::FunctionConcept |
| a concept that must satisfy a function | |
| concept | mgis::function::LightweightFunctionConcept |
| concept defining the functions which are their own view | |
| concept | mgis::function::NonLightweightFunctionConcept |
| concept defining the functions which are not their own view | |
| concept | mgis::function::ViewableFunctionArgumentConcept |
| concept defining the arguments of the algorithms which can be viewed as a mutable function | |
| concept | mgis::function::ElementFunctionConcept |
| concept defining functions which can be called on an element space, i.e. with an element index or with an element workspace and an element index | |
| concept | mgis::function::QuadratureFunctionConcept |
| concept defining functions which can be called on a quadrature space, i.e. with a cell index and a quadrature point index or with a cell workspace, a cell index and a quadrature point index | |
Typedefs | |
| template<FunctionConcept FunctionType> | |
| using | mgis::function::function_view |
| an alias which returns a view corresponding to the given function type | |
| template<FunctionConcept FunctionType> | |
| using | mgis::function::function_space |
| alias giving the type of the space on which a function is defined | |
| template<FunctionConcept FunctionType> | |
| using | mgis::function::function_result |
| type of the result of a function, i.e. the type of the values returned by the function, which can be a scalar value, a std::span or a std::array | |
| template<FunctionConcept FunctionType> | |
| using | mgis::function::function_const_result |
| type of the result of a constant function, i.e. the type of the values returned by a constant function, which can be a scalar value, a constant std::span or a constant std::array | |
Functions | |
| template<ViewableFunctionArgumentConcept FunctionType> | |
| constexpr function_view< std::decay_t< FunctionType > > | mgis::function::make_view (FunctionType &&f) |
| an helper function to create a view when required | |
| template<FunctionConcept FunctionType> requires (!EvaluatorConcept<FunctionType>) | |
| constexpr decltype(auto) | mgis::function::internals::disambiguateGetSpace (const FunctionType &f) |
| This helper function allows to disambiguate the call to the getSpace function. | |
| template<FunctionConcept FunctionType> requires (!EvaluatorConcept<FunctionType>) | |
| constexpr mgis::size_type | mgis::function::internals::disambiguateGetNumberOfComponents (const FunctionType &f) |
| This helper function allows to disambiguate the call to the getNumberOfComponents function. | |
| template<ViewableFunctionArgumentConcept QualifiedFunctionArgumentType, size_type N> | |
| constexpr bool | mgis::function::internals::checkNumberOfComponentsCompatibility () MGIS_NOEXCEPT |
| checks if the number of components of a function is compatible with the number of components expected by a modifier | |
| template<EvaluatorConcept EvaluatorType, ViewableFunctionArgumentConcept FunctionType> requires ( std::same_as<evaluator_space<EvaluatorType>, function_space<std::decay_t<FunctionType>>>) | |
| bool | mgis::function::operator| (EvaluatorType e, FunctionType &&f) |
| assign an evaluator to a mutable function | |
| template<ViewableFunctionArgumentConcept QualifiedFunctionArgumentType, size_type N> requires (internals::checkNumberOfComponentsCompatibility< QualifiedFunctionArgumentType, N>()) | |
| constexpr auto | mgis::function::operator| (QualifiedFunctionArgumentType &&f, const internals::fixed_size_modifier< N > &m) |
| create a view returning a fixed number of components | |
Variables | |
| template<FunctionConcept FunctionType> | |
| constexpr auto | mgis::function::isFunctionResultTypeMappable |
| true if the result of a function is a mappable type, i.e. a type for which the getDataPointer function returns a mutable pointer | |
| template<FunctionConcept FunctionType> | |
| constexpr auto | mgis::function::isFunctionConstResultTypeMappable |
| true if the result of a constant function is a mappable type, i.e. a type for which the getDataPointer function returns a constant pointer | |
| template<size_type N> | |
| constexpr auto | mgis::function::as_array = internals::fixed_size_modifier<N>{} |
| modifier used to return a fixed number of components of a function or an evaluator | |
| constexpr auto | mgis::function::as_scalar = internals::fixed_size_modifier<1>{} |
| modifier used to return the first component of a function or an evaluator | |
File which defines the concept a function must satisfy and the helpers used to query the space, the type of the values and the view of a function.
| using mgis::function::function_const_result |
type of the result of a constant function, i.e. the type of the values returned by a constant function, which can be a scalar value, a constant std::span or a constant std::array
| FunctionType | function type |
| using mgis::function::function_result |
type of the result of a function, i.e. the type of the values returned by the function, which can be a scalar value, a std::span or a std::array
| FunctionType | function type |
| using mgis::function::function_space |
alias giving the type of the space on which a function is defined
| FunctionType | function type |
| using mgis::function::function_view |
an alias which returns a view corresponding to the given function type
| FunctionType | function type |
|
nodiscardconstexpr |
checks if the number of components of a function is compatible with the number of components expected by a modifier
The check is always satisfied if the number of components of the function is only known at run time.
| QualifiedFunctionArgumentType | type of the function argument, which may be a qualified type (reference, const, etc...) |
| N | number of components expected by the modifier |
|
constexpr |
This helper function allows to disambiguate the call to the getNumberOfComponents function.
forwards the call to the getNumberOfComponents function
| FunctionType | function type |
| [in] | f | function |
|
constexpr |
This helper function allows to disambiguate the call to the getSpace function.
forwards the call to the getSpace function of the function
| FunctionType | function type |
| [in] | f | function |
|
constexpr |
an helper function to create a view when required
| FunctionType | type of the function, which may be a qualified type (reference, const, etc...) |
| [in] | f | function |
|
nodiscard |
assign an evaluator to a mutable function
implementation of the operator| which assigns the values computed by an evaluator to the values of a function
| EvaluatorType | evaluator type |
| FunctionType | type of the function, which may be a qualified type (reference, const, etc...) |
| [in] | e | evaluator |
| [in,out] | f | function |
|
constexpr |
create a view returning a fixed number of components
| QualifiedFunctionArgumentType | type of the function, which may be a qualified type (reference, const, etc...) |
| N | number of components |
| [in] | f | function |
| [in] | m | modifier |
|
inlineconstexpr |
modifier used to return a fixed number of components of a function or an evaluator
| N | number of components |
|
inlineconstexpr |
true if the result of a constant function is a mappable type, i.e. a type for which the getDataPointer function returns a constant pointer
| FunctionType | function type |
|
inlineconstexpr |
true if the result of a function is a mappable type, i.e. a type for which the getDataPointer function returns a mutable pointer
| FunctionType | function type |