MGIS 3.1.0
Loading...
Searching...
No Matches
Function.ixx File Reference

Inline implementation of the classes declared in MGIS/Function/Function.hxx, which includes this file at its end. More...

#include <iostream>
#include <concepts>
#include <algorithm>
#include "MGIS/Raise.hxx"

Namespaces

namespace  mgis
 the namespace mgis encloses all the MGIS project.

Functions

constexpr bool mgis::function::has_dynamic_properties (const FunctionDataLayoutDescription &)
 checks if the given data layout description has properties which are only known at run time
template<LinearFunctionalSpaceConcept Space, FunctionDataLayoutDescription layout, bool is_mutable>
constexpr bool mgis::function::check (AbstractErrorHandler &, const FunctionView< Space, layout, is_mutable > &) MGIS_NOEXCEPT
 a noop function allowing FunctionView to match the EvaluatorConcept concept
template<LinearFunctionalSpaceConcept Space, FunctionDataLayoutDescription layout, bool is_mutable>
constexpr mgis::size_type mgis::function::getNumberOfComponents (const FunctionView< Space, layout, is_mutable > &) MGIS_NOEXCEPT
 return the number of components of the given view
template<LinearFunctionalSpaceConcept Space, size_type N>
constexpr auto mgis::function::view (Function< Space, N > &)
 convert a function to a mutable view
template<size_type N, LinearFunctionalSpaceConcept Space, size_type N2>
requires ((N > 0) && (N != dynamic_extent) && (N == N2))
constexpr auto mgis::function::view (Function< Space, N2 > &)
 convert a function to a mutable view
template<LinearFunctionalSpaceConcept Space, size_type N>
constexpr auto mgis::function::view (const Function< Space, N > &)
 convert a function to an immutable view
template<size_type N, LinearFunctionalSpaceConcept Space, size_type N2>
requires ((N > 0) && (N != dynamic_extent) && (N == N2))
constexpr auto mgis::function::view (const Function< Space, N2 > &)
 convert a function to an immutable view
template<LinearFunctionalSpaceConcept Space, FunctionDataLayoutDescription layout, bool is_mutable>
constexpr const auto & mgis::function::getSpace (const FunctionView< Space, layout, is_mutable > &)
 return the space on which the given view is defined

Detailed Description

Inline implementation of the classes declared in MGIS/Function/Function.hxx, which includes this file at its end.

Author
Thomas Helfer
Date
10/03/2021

Function Documentation

◆ check()

template<LinearFunctionalSpaceConcept Space, FunctionDataLayoutDescription layout, bool is_mutable>
bool mgis::function::check ( AbstractErrorHandler & ,
const FunctionView< Space, layout, is_mutable > &  )
nodiscardconstexpr

a noop function allowing FunctionView to match the EvaluatorConcept concept

Template Parameters
Spacetype of the discretization space
layoutdata layout description
is_mutablemutability flag of the view
Parameters
[in]ehunused error handler
[in]eview to be checked
Returns
always true: the values held by a view are always valid

◆ getNumberOfComponents()

template<LinearFunctionalSpaceConcept Space, FunctionDataLayoutDescription layout, bool is_mutable>
mgis::size_type mgis::function::getNumberOfComponents ( const FunctionView< Space, layout, is_mutable > & e)
nodiscardconstexpr

return the number of components of the given view

Template Parameters
Spacetype of the discretization space
layoutdata layout description
is_mutablemutability flag of the view
Parameters
[in]eview whose number of components is queried
Returns
the number of components of the values of the view

◆ getSpace()

template<LinearFunctionalSpaceConcept Space, FunctionDataLayoutDescription layout, bool is_mutable>
const auto & mgis::function::getSpace ( const FunctionView< Space, layout, is_mutable > & f)
nodiscardconstexpr

return the space on which the given view is defined

Template Parameters
Spacetype of the discretization space
layoutdata layout description
is_mutablemutability flag of the view
Parameters
[in]fview whose space is queried
Returns
the space on which the view is defined

◆ has_dynamic_properties()

bool mgis::function::has_dynamic_properties ( const FunctionDataLayoutDescription & layout)
nodiscardconstexpr

checks if the given data layout description has properties which are only known at run time

Parameters
[in]layoutdata layout description
Returns
true if the data size or the data stride is dynamic_extent

◆ view() [1/4]

template<LinearFunctionalSpaceConcept Space, size_type N>
auto mgis::function::view ( const Function< Space, N > & f)
nodiscardconstexpr

convert a function to an immutable view

Template Parameters
Spacetype of the functional space
Nnumber of components of the function
Parameters
[in]ffunction to convert
Returns
an immutable view of the function values

◆ view() [2/4]

template<size_type N, LinearFunctionalSpaceConcept Space, size_type N2>
requires ((N > 0) && (N != dynamic_extent) && (N == N2))
auto mgis::function::view ( const Function< Space, N2 > & f)
nodiscardconstexpr

convert a function to an immutable view

Template Parameters
Nnumber of components of the view, which must be greater than zero and known at compile time
Spacetype of the functional space
N2number of components of the function
Parameters
[in]ffunction to convert
Returns
an immutable view of the function values
Note
the requires clause makes this overload viable only when the number of components of the function is known at compile time and equal to N

◆ view() [3/4]

template<LinearFunctionalSpaceConcept Space, size_type N>
auto mgis::function::view ( Function< Space, N > & f)
nodiscardconstexpr

convert a function to a mutable view

Template Parameters
Spacetype of the functional space
Nnumber of components of the function
Parameters
[in]ffunction to convert
Returns
a mutable view of the function, which shares its values

◆ view() [4/4]

template<size_type N, LinearFunctionalSpaceConcept Space, size_type N2>
requires ((N > 0) && (N != dynamic_extent) && (N == N2))
auto mgis::function::view ( Function< Space, N2 > & f)
nodiscardconstexpr

convert a function to a mutable view

Template Parameters
Nnumber of components of the view, which must be greater than zero and known at compile time
Spacetype of the functional space
N2number of components of the function
Parameters
[in]ffunction to convert
Returns
a mutable view of the function, which shares its values
Note
the requires clause makes this overload viable only when the number of components of the function is known at compile time and equal to N