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::uscalfe::MassEdgeMatrixProvider< SCALAR, COEFF, EDGESELECTOR > Class Template Reference

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

#include <lf/uscalfe/uscalfe.h>

Public Types

using scalar_t
 Scalar type of the element matrix.
 
using ElemMat = Eigen::Matrix<scalar_t, Eigen::Dynamic, Eigen::Dynamic>
 

Public Member Functions

 MassEdgeMatrixProvider (std::shared_ptr< const UniformScalarFESpace< SCALAR > > fe_space, COEFF gamma, EDGESELECTOR edge_selector=base::PredicateTrue{})
 Constructor performing cell-independent initializations and choosing a suitable 1D quadrature rule.
 
 MassEdgeMatrixProvider (std::shared_ptr< const UniformScalarFESpace< SCALAR > > fe_space, COEFF gamma, lf::quad::QuadRule quadrule, EDGESELECTOR edge_selector=base::PredicateTrue{})
 Constructor performing cell-independent initializations.
 
bool isActive (const lf::mesh::Entity &edge)
 If true, then an edge is taken into account during assembly.
 
ElemMat Eval (const lf::mesh::Entity &edge)
 actual computation of edge mass matrix
 
virtual ~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_
 
PrecomputedScalarReferenceFiniteElement< SCALAR > fe_precomp_
 

Detailed Description

template<base::Scalar SCALAR, mesh::utils::MeshFunction COEFF, typename EDGESELECTOR>
class lf::uscalfe::MassEdgeMatrixProvider< SCALAR, COEFF, EDGESELECTOR >

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

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

This helper 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.

Logger

This class logs additional information to MassEdgeMatrixProviderLogger(). See Loggers and Debug output for more information.

Definition at line 369 of file loc_comp_ellbvp.h.

Member Typedef Documentation

◆ ElemMat

template<base::Scalar SCALAR, mesh::utils::MeshFunction COEFF, typename EDGESELECTOR >
using lf::uscalfe::MassEdgeMatrixProvider< SCALAR, COEFF, EDGESELECTOR >::ElemMat = Eigen::Matrix<scalar_t, Eigen::Dynamic, Eigen::Dynamic>

Definition at line 375 of file loc_comp_ellbvp.h.

◆ scalar_t

template<base::Scalar SCALAR, mesh::utils::MeshFunction COEFF, typename EDGESELECTOR >
using lf::uscalfe::MassEdgeMatrixProvider< SCALAR, COEFF, EDGESELECTOR >::scalar_t
Initial value:
decltype(static_cast<SCALAR>(0) *
static_cast<mesh::utils::MeshFunctionReturnType<COEFF>>(0))

Scalar type of the element matrix.

Definition at line 372 of file loc_comp_ellbvp.h.

Constructor & Destructor Documentation

◆ MassEdgeMatrixProvider() [1/4]

template<base::Scalar SCALAR, mesh::utils::MeshFunction COEFF, typename EDGESELECTOR >
lf::uscalfe::MassEdgeMatrixProvider< SCALAR, COEFF, EDGESELECTOR >::MassEdgeMatrixProvider ( const MassEdgeMatrixProvider< SCALAR, COEFF, EDGESELECTOR > & )
delete

◆ MassEdgeMatrixProvider() [2/4]

template<base::Scalar SCALAR, mesh::utils::MeshFunction COEFF, typename EDGESELECTOR >
lf::uscalfe::MassEdgeMatrixProvider< SCALAR, COEFF, EDGESELECTOR >::MassEdgeMatrixProvider ( MassEdgeMatrixProvider< SCALAR, COEFF, EDGESELECTOR > && )
defaultnoexcept

◆ MassEdgeMatrixProvider() [3/4]

template<base::Scalar SCALAR, mesh::utils::MeshFunction COEFF, typename EDGESELECTOR >
lf::uscalfe::MassEdgeMatrixProvider< SCALAR, COEFF, EDGESELECTOR >::MassEdgeMatrixProvider ( std::shared_ptr< const UniformScalarFESpace< 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 space.

Definition at line 396 of file loc_comp_ellbvp.h.

◆ MassEdgeMatrixProvider() [4/4]

template<base::Scalar SCALAR, mesh::utils::MeshFunction COEFF, typename EDGESELECTOR >
lf::uscalfe::MassEdgeMatrixProvider< SCALAR, COEFF, EDGESELECTOR >::MassEdgeMatrixProvider ( std::shared_ptr< const UniformScalarFESpace< SCALAR > > fe_space,
COEFF gamma,
lf::quad::QuadRule quadrule,
EDGESELECTOR edge_selector = base::PredicateTrue{} )
inline

Constructor performing cell-independent initializations.

Parameters
fe_spaceDescribes the shapefunctions
gammacoefficient function through functor object
quadrulequadrature rule for EDGE entities
edge_selectorpredicate object selecting active to be covered in the assembly

This constructor takes a user-supplied quadrature rule.

Definition at line 420 of file loc_comp_ellbvp.h.

◆ ~MassEdgeMatrixProvider()

template<base::Scalar SCALAR, mesh::utils::MeshFunction COEFF, typename EDGESELECTOR >
virtual lf::uscalfe::MassEdgeMatrixProvider< SCALAR, COEFF, EDGESELECTOR >::~MassEdgeMatrixProvider ( )
virtualdefault

Member Function Documentation

◆ Eval()

template<base::Scalar SCALAR, mesh::utils::MeshFunction COEFF, class EDGESELECTOR >
MassEdgeMatrixProvider< SCALAR, COEFF, EDGESELECTOR >::ElemMat lf::uscalfe::MassEdgeMatrixProvider< SCALAR, COEFF, EDGESELECTOR >::Eval ( const lf::mesh::Entity & edge)

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 494 of file loc_comp_ellbvp.h.

References lf::mesh::Entity::Geometry(), lf::geometry::Geometry::IntegrationElement(), lf::base::RefEl::kSegment(), and lf::mesh::Entity::RefEl().

◆ isActive()

template<base::Scalar SCALAR, mesh::utils::MeshFunction COEFF, typename EDGESELECTOR >
bool lf::uscalfe::MassEdgeMatrixProvider< SCALAR, COEFF, EDGESELECTOR >::isActive ( const lf::mesh::Entity & edge)
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 441 of file loc_comp_ellbvp.h.

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

◆ operator=() [1/2]

template<base::Scalar SCALAR, mesh::utils::MeshFunction COEFF, typename EDGESELECTOR >
MassEdgeMatrixProvider & lf::uscalfe::MassEdgeMatrixProvider< SCALAR, COEFF, EDGESELECTOR >::operator= ( const MassEdgeMatrixProvider< SCALAR, COEFF, EDGESELECTOR > & )
delete

◆ operator=() [2/2]

template<base::Scalar SCALAR, mesh::utils::MeshFunction COEFF, typename EDGESELECTOR >
MassEdgeMatrixProvider & lf::uscalfe::MassEdgeMatrixProvider< SCALAR, COEFF, EDGESELECTOR >::operator= ( MassEdgeMatrixProvider< SCALAR, COEFF, EDGESELECTOR > && )
delete

Member Data Documentation

◆ edge_sel_

template<base::Scalar SCALAR, mesh::utils::MeshFunction COEFF, typename EDGESELECTOR >
EDGESELECTOR lf::uscalfe::MassEdgeMatrixProvider< SCALAR, COEFF, EDGESELECTOR >::edge_sel_
private

◆ fe_precomp_

template<base::Scalar SCALAR, mesh::utils::MeshFunction COEFF, typename EDGESELECTOR >
PrecomputedScalarReferenceFiniteElement<SCALAR> lf::uscalfe::MassEdgeMatrixProvider< SCALAR, COEFF, EDGESELECTOR >::fe_precomp_
private

Definition at line 470 of file loc_comp_ellbvp.h.

◆ gamma_

template<base::Scalar SCALAR, mesh::utils::MeshFunction COEFF, typename EDGESELECTOR >
COEFF lf::uscalfe::MassEdgeMatrixProvider< SCALAR, COEFF, EDGESELECTOR >::gamma_
private

Definition at line 467 of file loc_comp_ellbvp.h.


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