LehrFEM++ 1.0.0
A simple Finite Element Library for teaching
|
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>
A MeshFunction is a function object that can be evaluated at any point on the mesh.
MF | The type which should fulfill the MeshFunction concept. |
R | If specified, check additionally, that the MeshFunction returns objects of type R . If R is void , the MeshFunction can return any type. |
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:
Here
e
is a mesh entitylocal
is a matrix of size (e.RefEl().Dimension()) x NumPoints
and lists the local coordinates of the evaluation points (with respect to the reference element e.RefEl()
).R
is more or less arbitrary type such as a double
or a Eigen::Matrix2d
The return type of operator()
is a std::vector<R>
with NumPoints
length.
The type MF
satisfies the concept MeshFunction
if
Given
R
, the type of objects returned by the mesh functione
, a mesh entity of type lf::mesh::Entity
,local
, a set of local coordinates of type Eigen::MatrixXd
mf
object of type const MF
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 |
The concept of a MeshFunction is used widely in the lf::uscalfe
module:
R
of a mesh function.Definition at line 149 of file mesh_function_traits.h.