LehrFEM++ 1.0.0
A simple Finite Element Library for teaching
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Attributes | List of all members
lf::fe::MassEdgeMatrixProvider< SCALAR, COEFF, EDGESELECTOR > Class Template Referencefinal

Quadrature-based computation of local mass matrix for an edge. More...

#include <lf/fe/fe.h>

Public Types

using scalar_t
 
using ElemMat = Eigen::Matrix<scalar_t, Eigen::Dynamic, Eigen::Dynamic>
 

Public Member Functions

 MassEdgeMatrixProvider (std::shared_ptr< const ScalarFESpace< SCALAR > > fe_space, COEFF gamma, EDGESELECTOR edge_selector=base::PredicateTrue{})
 Constructor performing cell-independent initializations and choosing a suitable 1D quadrature rule.
 
bool isActive (const lf::mesh::Entity &edge) const
 If true, then an edge is taken into account during assembly.
 
ElemMat Eval (const lf::mesh::Entity &edge) const
 actual computation of edge mass matrix
 
 ~MassEdgeMatrixProvider ()=default
 
standard constructors
 MassEdgeMatrixProvider (const MassEdgeMatrixProvider &)=delete
 
 MassEdgeMatrixProvider (MassEdgeMatrixProvider &&) noexcept=default
 
MassEdgeMatrixProvideroperator= (const MassEdgeMatrixProvider &)=delete
 
MassEdgeMatrixProvideroperator= (MassEdgeMatrixProvider &&)=delete
 

Private Attributes

COEFF gamma_
 
EDGESELECTOR edge_sel_
 
std::shared_ptr< const ScalarFESpace< SCALAR > > fe_space_
 
quad::QuadRuleCache qr_cache_
 

Detailed Description

template<typename SCALAR, typename COEFF, typename EDGESELECTOR>
class lf::fe::MassEdgeMatrixProvider< SCALAR, COEFF, EDGESELECTOR >

Quadrature-based computation of local mass matrix for an edge.

Template Parameters
SCALARunderlying scalar type of the ScalarFESpace, usually double or complex<double>
COEFFMeshFunction that defines the scalar valued coefficient \( \gamma \)
EDGESELECTORpredicate defining which edges are included

This EntityMatrixProvider class corresponds to the the element matrix for the bilinear form

\[ (u,v) \mapsto \int\limits_e \gamma(x)u(x)\overline{v(x)}\,\mathrm{d}S(x)\;, \]

where \(e\) is an edge of the mesh, and \(\gamma\) a scalar-valued coefficient function.

Note
If you intend to use this matrix provider with FE Spaces from lf::uscalfe please consider switching to lf::uscalfe::ReactionDiffusionElementMatrixProvider provided there, as it is specifically optimized for uniform FE Spaces.

Definition at line 412 of file loc_comp_ellbvp.h.

Member Typedef Documentation

◆ ElemMat

template<typename SCALAR , typename COEFF , typename EDGESELECTOR >
using lf::fe::MassEdgeMatrixProvider< SCALAR, COEFF, EDGESELECTOR >::ElemMat = Eigen::Matrix<scalar_t, Eigen::Dynamic, Eigen::Dynamic>

Definition at line 416 of file loc_comp_ellbvp.h.

◆ scalar_t

template<typename SCALAR , typename COEFF , typename EDGESELECTOR >
using lf::fe::MassEdgeMatrixProvider< SCALAR, COEFF, EDGESELECTOR >::scalar_t
Initial value:
decltype(SCALAR(0) * mesh::utils::MeshFunctionReturnType<COEFF>(0))

Definition at line 414 of file loc_comp_ellbvp.h.

Constructor & Destructor Documentation

◆ MassEdgeMatrixProvider() [1/3]

template<typename SCALAR , typename COEFF , typename EDGESELECTOR >
lf::fe::MassEdgeMatrixProvider< SCALAR, COEFF, EDGESELECTOR >::MassEdgeMatrixProvider ( const MassEdgeMatrixProvider< SCALAR, COEFF, EDGESELECTOR > & )
delete

◆ MassEdgeMatrixProvider() [2/3]

template<typename SCALAR , typename COEFF , typename EDGESELECTOR >
lf::fe::MassEdgeMatrixProvider< SCALAR, COEFF, EDGESELECTOR >::MassEdgeMatrixProvider ( MassEdgeMatrixProvider< SCALAR, COEFF, EDGESELECTOR > && )
defaultnoexcept

◆ MassEdgeMatrixProvider() [3/3]

template<typename SCALAR , typename COEFF , typename EDGESELECTOR >
lf::fe::MassEdgeMatrixProvider< SCALAR, COEFF, EDGESELECTOR >::MassEdgeMatrixProvider ( std::shared_ptr< const ScalarFESpace< SCALAR > > fe_space,
COEFF gamma,
EDGESELECTOR edge_selector = base::PredicateTrue{} )
inline

Constructor performing cell-independent initializations and choosing a suitable 1D quadrature rule.

Parameters
fe_spaceDescribes the shapefunctions
gammacoefficient function through functor object
edge_selectorpredicate object selecting active to be covered in the assembly

This constructor chooses a local quadature rule with double the degree of exactness as the polynomial degree of the finite element.

Definition at line 437 of file loc_comp_ellbvp.h.

◆ ~MassEdgeMatrixProvider()

template<typename SCALAR , typename COEFF , typename EDGESELECTOR >
lf::fe::MassEdgeMatrixProvider< SCALAR, COEFF, EDGESELECTOR >::~MassEdgeMatrixProvider ( )
default

Member Function Documentation

◆ Eval()

template<class SCALAR , class COEFF , class EDGESELECTOR >
MassEdgeMatrixProvider< SCALAR, COEFF, EDGESELECTOR >::ElemMat lf::fe::MassEdgeMatrixProvider< SCALAR, COEFF, EDGESELECTOR >::Eval ( const lf::mesh::Entity & edge) const

actual computation of edge mass matrix

Parameters
edgereference to the edge for which the mass matrix is needed
Returns
a small dense matrix, containing the element matrix.

Actual computation of the local edge mass based on numerical quadrature and mapping techniques. The order of the quadrature rule is tied to the polynomial degree of the underlying Lagrangian finite element spaces: for polynomial degree p a quadrature rule is chosen that is exact for polynomials o degree 2p.

Definition at line 503 of file loc_comp_ellbvp.h.

References lf::mesh::Entity::Geometry(), lf::geometry::Geometry::IntegrationElement(), lf::quad::QuadRule::NumPoints(), lf::quad::QuadRule::Points(), lf::mesh::Entity::RefEl(), and lf::quad::QuadRule::Weights().

◆ isActive()

template<typename SCALAR , typename COEFF , typename EDGESELECTOR >
bool lf::fe::MassEdgeMatrixProvider< SCALAR, COEFF, EDGESELECTOR >::isActive ( const lf::mesh::Entity & edge) const
inline

If true, then an edge is taken into account during assembly.

The information about "active" edges is supplied through the edge_selector argument of the constructor.

Definition at line 450 of file loc_comp_ellbvp.h.

References lf::fe::MassEdgeMatrixProvider< SCALAR, COEFF, EDGESELECTOR >::edge_sel_, lf::base::RefEl::kSegment(), and lf::mesh::Entity::RefEl().

◆ operator=() [1/2]

template<typename SCALAR , typename COEFF , typename EDGESELECTOR >
MassEdgeMatrixProvider & lf::fe::MassEdgeMatrixProvider< SCALAR, COEFF, EDGESELECTOR >::operator= ( const MassEdgeMatrixProvider< SCALAR, COEFF, EDGESELECTOR > & )
delete

◆ operator=() [2/2]

template<typename SCALAR , typename COEFF , typename EDGESELECTOR >
MassEdgeMatrixProvider & lf::fe::MassEdgeMatrixProvider< SCALAR, COEFF, EDGESELECTOR >::operator= ( MassEdgeMatrixProvider< SCALAR, COEFF, EDGESELECTOR > && )
delete

Member Data Documentation

◆ edge_sel_

template<typename SCALAR , typename COEFF , typename EDGESELECTOR >
EDGESELECTOR lf::fe::MassEdgeMatrixProvider< SCALAR, COEFF, EDGESELECTOR >::edge_sel_
private

◆ fe_space_

template<typename SCALAR , typename COEFF , typename EDGESELECTOR >
std::shared_ptr<const ScalarFESpace<SCALAR> > lf::fe::MassEdgeMatrixProvider< SCALAR, COEFF, EDGESELECTOR >::fe_space_
private

Definition at line 479 of file loc_comp_ellbvp.h.

◆ gamma_

template<typename SCALAR , typename COEFF , typename EDGESELECTOR >
COEFF lf::fe::MassEdgeMatrixProvider< SCALAR, COEFF, EDGESELECTOR >::gamma_
private

Definition at line 476 of file loc_comp_ellbvp.h.

◆ qr_cache_

template<typename SCALAR , typename COEFF , typename EDGESELECTOR >
quad::QuadRuleCache lf::fe::MassEdgeMatrixProvider< SCALAR, COEFF, EDGESELECTOR >::qr_cache_
private

Definition at line 481 of file loc_comp_ellbvp.h.


The documentation for this class was generated from the following file: