LehrFEM++ 1.0.0
A simple Finite Element Library for teaching
Loading...
Searching...
No Matches
lf::mesh::utils::MeshFunction Concept Reference

A MeshFunction is a function object that can be evaluated at any point on the mesh. More...

#include <lf/mesh/utils/mesh_function_traits.h>

Concept definition

template<class MF, class R void>
std::is_object_v<MF> && std::copy_constructible<MF> &&
internal::IsMeshFunctionCallable<MF, R>(0)
A MeshFunction is a function object that can be evaluated at any point on the mesh.

Detailed Description

A MeshFunction is a function object that can be evaluated at any point on the mesh.

Template Parameters
MFThe type which should fulfill the MeshFunction concept.
RIf specified, check additionally, that the MeshFunction returns objects of type R. If R is void, the MeshFunction can return any type.

Description

Conceptually, a mesh function assigns to every point on the mesh an object of type R (e.g. double or an Eigen::Matrix2d).

For efficiency reasons, a mesh function is normally evaluated at a number of points at once. Hence a mesh function must overload the bracket operator as follows:

std::vector<R> operator()(
const lf::mesh::Entity& e, const Eigen::MatrixXd& local) const
Interface class representing a topological entity in a cellular complex
Definition entity.h:42

Here

The return type of operator() is a std::vector<R> with NumPoints length.

Requirements

The type MF satisfies the concept MeshFunction if

Given

the following expressions are valid:

expression return type semantics
MF(a) MF Creates a copy of a
MF(std::move(a)) MF "steals" a to create a new MeshFunction
a(e, local) std::vector<R> Evaluates mesh function at points local on the entity e

Usage scenarios

The concept of a MeshFunction is used widely in the lf::uscalfe module:

Archetype

See also

Classes modelling the MeshFunction concept

Definition at line 149 of file mesh_function_traits.h.