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.
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
a
, b
objects of type 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<T> | Evaluates mesh function at points local |
The concept of a MeshFunction is used widely in the lf::uscalfe
module:
R
of a mesh function. Classes | |
class | lf::fe::MeshFunctionFE< SCALAR_FE, SCALAR_COEFF > |
A MeshFunction representing an element from a ScalarFESpace (e.g. solution of BVP) More... | |
class | lf::fe::MeshFunctionGradFE< SCALAR_FE, SCALAR_COEFF > |
A MeshFunction representing the gradient of a function from a scalar finite element space (e.g. gradient of a solution of BVP). More... | |
class | lf::mesh::utils::MeshFunctionBinary< OP, A, B > |
A MeshFunction which combines two other mesh functions using a binary operator (advanced use). More... | |
class | lf::mesh::utils::MeshFunctionConstant< R > |
A MeshFunction which takes the same constant value on the whole mesh. More... | |
class | lf::mesh::utils::MeshFunctionGlobal< F > |
MeshFunction wrapper for a simple function of physical coordinates. More... | |
class | lf::mesh::utils::MeshFunctionUnary< OP, MF > |
A mesh function representing another mesh function under a pointwise, unary operation. More... | |