LehrFEM++ 1.0.0
A simple Finite Element Library for teaching
|
Local computation of general element (load) vector for scalar finite elements; volume contributions only. More...
#include <lf/fe/fe.h>
Public Types | |
using | scalar_t |
using | ElemVec = Eigen::Matrix<scalar_t, Eigen::Dynamic, 1> |
Public Member Functions | |
ScalarLoadElementVectorProvider (std::shared_ptr< const ScalarFESpace< SCALAR > > fe_space, MESH_FUNCTION f) | |
Constructor, performs precomputations. | |
bool | isActive (const lf::mesh::Entity &) const |
all cells are active | |
ElemVec | Eval (const lf::mesh::Entity &cell) const |
~ScalarLoadElementVectorProvider ()=default | |
standard constructors | |
ScalarLoadElementVectorProvider (const ScalarLoadElementVectorProvider &)=delete | |
ScalarLoadElementVectorProvider (ScalarLoadElementVectorProvider &&) noexcept=default | |
ScalarLoadElementVectorProvider & | operator= (const ScalarLoadElementVectorProvider &)=delete |
ScalarLoadElementVectorProvider & | operator= (ScalarLoadElementVectorProvider &&)=delete |
Private Attributes | |
MESH_FUNCTION | f_ |
An object providing the source function. | |
std::shared_ptr< const ScalarFESpace< SCALAR > > | fe_space_ |
quad::QuadRuleCache | qr_cache_ |
Local computation of general element (load) vector for scalar finite elements; volume contributions only.
SCALAR | underlying scalar type of the ScalarFESpace, usually double or complex<double> |
MESH_FUNCTION | MeshFunction which defines the source function \( f \) |
The underlying local linear form is
\[ v \mapsto \int_K f(\mathbf{x})\,\overline{v(\mathbf{x})}\,\mathrm{d}\mathbf{x}\;, \]
where \(f\) is supposed to be a locally continuous source function.
Computation is based on a quadrature rules supplied by the LehrFEM++ lf::quad::QuadRule module.
This class complies with the requirements for the template parameter ELEM_VEC_COMP
of the function assemble::AssembleVectorLocally().
The following code snippet computes the solution of the BVP
\begin{align} - \Delta u &= 1 && \text{on }\Omega := [0,1]^2 \\ u &= 0 && \text{on }\partial \Omega \end{align}
Definition at line 569 of file loc_comp_ellbvp.h.
using lf::fe::ScalarLoadElementVectorProvider< SCALAR, MESH_FUNCTION >::ElemVec = Eigen::Matrix<scalar_t, Eigen::Dynamic, 1> |
Definition at line 575 of file loc_comp_ellbvp.h.
using lf::fe::ScalarLoadElementVectorProvider< SCALAR, MESH_FUNCTION >::scalar_t |
Definition at line 571 of file loc_comp_ellbvp.h.
|
delete |
|
defaultnoexcept |
lf::fe::ScalarLoadElementVectorProvider< SCALAR, MESH_FUNCTION >::ScalarLoadElementVectorProvider | ( | std::shared_ptr< const ScalarFESpace< SCALAR > > | fe_space, |
MESH_FUNCTION | f ) |
Constructor, performs precomputations.
fe_space | specification of local shape functions |
f | functor object for source function |
Uses quadrature rule of double the degree of exactness compared to the degree of the finite element space.
Definition at line 634 of file loc_comp_ellbvp.h.
|
default |
ScalarLoadElementVectorProvider< SCALAR, MESH_FUNCTION >::ElemVec lf::fe::ScalarLoadElementVectorProvider< SCALAR, MESH_FUNCTION >::Eval | ( | const lf::mesh::Entity & | cell | ) | const |
Definition at line 644 of file loc_comp_ellbvp.h.
References lf::geometry::Geometry::DimLocal(), lf::mesh::Entity::Geometry(), lf::geometry::Geometry::Global(), lf::geometry::Geometry::IntegrationElement(), lf::base::RefEl::NodeCoords(), lf::quad::QuadRule::NumPoints(), lf::quad::QuadRule::Points(), lf::mesh::Entity::RefEl(), lf::fe::ScalarLoadElementVectorProviderLogger(), and lf::quad::QuadRule::Weights().
|
inline |
all cells are active
Definition at line 600 of file loc_comp_ellbvp.h.
|
delete |
|
delete |
|
private |
An object providing the source function.
Definition at line 614 of file loc_comp_ellbvp.h.
|
private |
Definition at line 616 of file loc_comp_ellbvp.h.
|
private |
Definition at line 618 of file loc_comp_ellbvp.h.