![]() |
LehrFEM++ 1.0.0
A simple Finite Element Library for teaching
|
Provides the local element matrix for a mesh entity. More...
#include <lf/assemble/assemble.h>
Provides the local element matrix for a mesh entity.
| EMP | Entity-Matrix-Provider (EMP) Type to be tested for satisfaction of the concept |
An EntityMatrixProvider is an object that provides a local element matrix for a given mesh entity. EntityMatrixProvider's are mostly used together with lf::assemble::AssembleMatrixLocally to assemble a sparse system matrix.
The type EMP satisfies the Concept EntityMatrixProvider if given
emp an object of type EMPe a const lf::mesh::Entity objectSCALAR is an Eigen supported scalar datatype (e.g. double)ROWS is the number of rows of the local element matrix or Eigen::DynamicCOLS is the number of columns of the local element matrix or Eigen::Dynamicthe following expressions are valid:
| expression | return type | semantics |
|---|---|---|
emp.isActive(e) | bool | Defines whether the entity e is taken into account by the assembly routine. |
emp.Eval(e) | Eigen::Matrix<SCALAR, ROWS, COLS> | Returns the local element matrix for mesh entity e. Is only called if emp.isActive(e)==true. |
Eval() may sacrifice efficiency because it may entail additional allocation of dynamic memory. However, this design was chosen for the sake of readability of the code and in order to avoid nasty memory access errors that often occur when passing a matrix by reference.The concept of a EntityMatrixProvider is widely used in the lf::assemble and lf::uscalfe modules:
lf::assemble::AssembleMatrixLocally() accepts an EntityMatrixProvider which in turn defines how the (sparse) system matrix is assembled.Definition at line 96 of file assemble_concepts.h.