LehrFEM++ 1.0.0
A simple Finite Element Library for teaching
Public Types | Public Member Functions | Private Attributes | List of all members
projects::dpg::FluxElementMatrixProvider< SCALAR, DIFF_COEFF > Class Template Reference

class for local quadrature based computations of sub element matrices corresponding to element matrices associated to a flux variable in the trial space More...

#include <projects/dpg/loc_comp_dpg.h>

Inheritance diagram for projects::dpg::FluxElementMatrixProvider< SCALAR, DIFF_COEFF >:
projects::dpg::SubElementMatrixProvider< SCALAR >

Public Types

using elem_mat_t = typename SubElementMatrixProvider< SCALAR >::elem_mat_t
 inherited types for element matrices More...
 
using ElemMat = typename SubElementMatrixProvider< SCALAR >::ElemMat
 
- Public Types inherited from projects::dpg::SubElementMatrixProvider< SCALAR >
using size_type = lf::uscalfe::size_type
 
using elem_mat_t = Eigen::Matrix< SCALAR, Eigen::Dynamic, Eigen::Dynamic >
 internal type for element matrices More...
 
using ElemMat = elem_mat_t
 

Public Member Functions

 FluxElementMatrixProvider (const FluxElementMatrixProvider &)=delete
 
 FluxElementMatrixProvider (FluxElementMatrixProvider &&) noexcept=default
 
FluxElementMatrixProvideroperator= (const FluxElementMatrixProvider &)=delete
 
FluxElementMatrixProvideroperator= (FluxElementMatrixProvider &&)=delete
 
 FluxElementMatrixProvider (std::shared_ptr< ProductUniformFESpace< SCALAR > > fe_space_trial, std::shared_ptr< ProductUniformFESpace< SCALAR > > fe_space_test, size_type trial_component, size_type test_component, DIFF_COEFF alpha)
 Constructor: performs cell-independent precomputations. More...
 
ElemMat Eval (const lf::mesh::Entity &cell) override
 main routine for the computation of element matrices More...
 
size_type TrialComponent () const override
 returns the index of the trial space component \( u_{i_k} \) which is the trial space for the bilinear form \( b_k \) More...
 
size_type TestComponent () const override
 returns the index of the test space component \( v_{j_k} \) which is the test space for the bilinear form \( b_k \) More...
 
 ~FluxElementMatrixProvider () override=default
 
- Public Member Functions inherited from projects::dpg::SubElementMatrixProvider< SCALAR >
 SubElementMatrixProvider ()=default
 
virtual ~SubElementMatrixProvider ()=default
 
 SubElementMatrixProvider (const SubElementMatrixProvider &)=delete
 standard constructors More...
 
 SubElementMatrixProvider (SubElementMatrixProvider &&) noexcept=default
 
SubElementMatrixProvideroperator= (const SubElementMatrixProvider &)=delete
 
SubElementMatrixProvideroperator= (SubElementMatrixProvider &&)=delete
 
virtual bool isActive (const lf::mesh::Entity &)
 All cells are considered active in the default implementation. More...
 
virtual ElemMat Eval (const lf::mesh::Entity &cell)=0
 main routine for the computation of (sub) element matrices More...
 
virtual size_type TrialComponent () const =0
 returns the index of the trial space component \( u_{i_k} \) which is the trial space for the bilinear form \( b_k \) More...
 
virtual size_type TestComponent () const =0
 returns the index of the test space component \( v_{j_k} \) which is the test space for the bilinear form \( b_k \) More...
 

Private Attributes

DIFF_COEFF alpha_
 functor providing the coefficient invoved in the bilinear form More...
 
std::array< lf::uscalfe::PrecomputedScalarReferenceFiniteElement< SCALAR >, 5 > fe_precomp_trial_
 array containing the precomputed information for the trial space flux component: fe_precomp_trial[i] contains the precomputed reference finite element of flux which is used in the computations of element matrices on cells of ref_el i. Note that the actual precomputed reference finite element is associated with ref_el lf::base::RefEl::kSegment(). More...
 
std::array< std::vector< lf::uscalfe::PrecomputedScalarReferenceFiniteElement< SCALAR > >, 5 > fe_precomp_test_
 array containing the precomputed information for the trial space: fe_precomp_trial[i][j] contains the precomputed reference finite element of \( v \) for ref_el i, evaluated on the quadrature points transformed to edge j of the boundary of the reference element More...
 
size_type trial_component_
 index of the trial component \( \hat{q}_n \) More...
 
size_type test_component_
 index of test component v More...
 
PrescribedSignProvider sign_provider_
 helper class, to evaluate the sgn_K function More...
 

Detailed Description

template<typename SCALAR, typename DIFF_COEFF>
class projects::dpg::FluxElementMatrixProvider< SCALAR, DIFF_COEFF >

class for local quadrature based computations of sub element matrices corresponding to element matrices associated to a flux variable in the trial space

Template Parameters
SCALARtype for the entries of the element matrices. Must be a field type such as double or std::complex<double>
DIFF_COEFFa MeshFunction that defines the coefficient \( \alpha \). It should scalar valued.
Note
This class complies with the type requirements for the template argument ENTITY_MATRIX_PROVIDER of the function lf::assemble::AssembleMatrixLocally().

The element matrix corresponds to the (local) bilinear form

\[ (\hat{q}_n,v) \mapsto\int\limits_{\partial K} \hat{q}_n \mathrm{sgn}_K(\mathbf{x}) \alpha(\mathbf{x}) v \mathrm{d}\mathbf{x} \;, \]

\( \hat{q_n} \) is a flux component of the trial space and \( v\) is a component of the test space. *We assume that the flux is represented by discontinuous (interior) local shape functions on segments.

Template parameter requirement

Definition at line 789 of file loc_comp_dpg.h.

Member Typedef Documentation

◆ elem_mat_t

template<typename SCALAR , typename DIFF_COEFF >
using projects::dpg::FluxElementMatrixProvider< SCALAR, DIFF_COEFF >::elem_mat_t = typename SubElementMatrixProvider<SCALAR>::elem_mat_t

inherited types for element matrices

Definition at line 794 of file loc_comp_dpg.h.

◆ ElemMat

template<typename SCALAR , typename DIFF_COEFF >
using projects::dpg::FluxElementMatrixProvider< SCALAR, DIFF_COEFF >::ElemMat = typename SubElementMatrixProvider<SCALAR>::ElemMat

Definition at line 795 of file loc_comp_dpg.h.

Constructor & Destructor Documentation

◆ FluxElementMatrixProvider() [1/3]

template<typename SCALAR , typename DIFF_COEFF >
projects::dpg::FluxElementMatrixProvider< SCALAR, DIFF_COEFF >::FluxElementMatrixProvider ( const FluxElementMatrixProvider< SCALAR, DIFF_COEFF > &  )
delete

◆ FluxElementMatrixProvider() [2/3]

template<typename SCALAR , typename DIFF_COEFF >
projects::dpg::FluxElementMatrixProvider< SCALAR, DIFF_COEFF >::FluxElementMatrixProvider ( FluxElementMatrixProvider< SCALAR, DIFF_COEFF > &&  )
defaultnoexcept

◆ FluxElementMatrixProvider() [3/3]

template<typename SCALAR , typename DIFF_COEFF >
projects::dpg::FluxElementMatrixProvider< SCALAR, DIFF_COEFF >::FluxElementMatrixProvider ( std::shared_ptr< ProductUniformFESpace< SCALAR > >  fe_space_trial,
std::shared_ptr< ProductUniformFESpace< SCALAR > >  fe_space_test,
size_type  trial_component,
size_type  test_component,
DIFF_COEFF  alpha 
)

Constructor: performs cell-independent precomputations.

Parameters
fe_space_trialcollection of specifications for the trial fe space
fe_space_testcollection of specification for the test fe space
trial_componentIndex of the trial space component \(\hat{q}_n\). This component should represent a flux and be described via local discontinuous (interior) shape functions on the reference line segment.
test_componentIndex of the test space component \(v\)
alphamesh function for the scalar valued coefficient involved in the bilinear form.

This constructur uses local quadrature rules. On each edge of the boundary a quadrature rule with degree of exactness chosen as the sum of the polynomial degree of the two components \( \hat{q}_n \) and \( v \) is used.

Definition at line 888 of file loc_comp_dpg.h.

References projects::dpg::BoundaryQuadRule(), projects::dpg::FluxElementMatrixProvider< SCALAR, DIFF_COEFF >::fe_precomp_test_, projects::dpg::FluxElementMatrixProvider< SCALAR, DIFF_COEFF >::fe_precomp_trial_, lf::base::RefEl::kQuad(), lf::base::RefEl::kSegment(), lf::base::RefEl::kTria(), lf::quad::make_QuadRule(), projects::dpg::FluxElementMatrixProvider< SCALAR, DIFF_COEFF >::test_component_, and projects::dpg::FluxElementMatrixProvider< SCALAR, DIFF_COEFF >::trial_component_.

◆ ~FluxElementMatrixProvider()

template<typename SCALAR , typename DIFF_COEFF >
projects::dpg::FluxElementMatrixProvider< SCALAR, DIFF_COEFF >::~FluxElementMatrixProvider ( )
overridedefault

Member Function Documentation

◆ Eval()

template<typename SCALAR , typename DIFF_COEFF >
FluxElementMatrixProvider< SCALAR, DIFF_COEFF >::ElemMat projects::dpg::FluxElementMatrixProvider< SCALAR, DIFF_COEFF >::Eval ( const lf::mesh::Entity cell)
overridevirtual

main routine for the computation of element matrices

Parameters
cellreference to a (triangular or quadrilateral) cell for which the element matirx should be computed.
Returns
small dense matrix containing the element matrix

Actual computation is based on numerical quadrature and mapping techniques.

Throws an assertion, in case any specification is missing for the type of cell.

Implements projects::dpg::SubElementMatrixProvider< SCALAR >.

Definition at line 947 of file loc_comp_dpg.h.

References lf::geometry::Geometry::DimLocal(), lf::mesh::Entity::Geometry(), lf::base::RefEl::Id(), lf::base::RefEl::NumSubEntities(), lf::mesh::Entity::RefEl(), lf::mesh::Entity::SubEntities(), and lf::geometry::Geometry::SubGeometry().

◆ operator=() [1/2]

template<typename SCALAR , typename DIFF_COEFF >
FluxElementMatrixProvider & projects::dpg::FluxElementMatrixProvider< SCALAR, DIFF_COEFF >::operator= ( const FluxElementMatrixProvider< SCALAR, DIFF_COEFF > &  )
delete

◆ operator=() [2/2]

template<typename SCALAR , typename DIFF_COEFF >
FluxElementMatrixProvider & projects::dpg::FluxElementMatrixProvider< SCALAR, DIFF_COEFF >::operator= ( FluxElementMatrixProvider< SCALAR, DIFF_COEFF > &&  )
delete

◆ TestComponent()

template<typename SCALAR , typename DIFF_COEFF >
size_type projects::dpg::FluxElementMatrixProvider< SCALAR, DIFF_COEFF >::TestComponent ( ) const
inlineoverridevirtual

returns the index of the test space component \( v_{j_k} \) which is the test space for the bilinear form \( b_k \)

Implements projects::dpg::SubElementMatrixProvider< SCALAR >.

Definition at line 842 of file loc_comp_dpg.h.

References projects::dpg::FluxElementMatrixProvider< SCALAR, DIFF_COEFF >::test_component_.

◆ TrialComponent()

template<typename SCALAR , typename DIFF_COEFF >
size_type projects::dpg::FluxElementMatrixProvider< SCALAR, DIFF_COEFF >::TrialComponent ( ) const
inlineoverridevirtual

returns the index of the trial space component \( u_{i_k} \) which is the trial space for the bilinear form \( b_k \)

Implements projects::dpg::SubElementMatrixProvider< SCALAR >.

Definition at line 838 of file loc_comp_dpg.h.

References projects::dpg::FluxElementMatrixProvider< SCALAR, DIFF_COEFF >::trial_component_.

Member Data Documentation

◆ alpha_

template<typename SCALAR , typename DIFF_COEFF >
DIFF_COEFF projects::dpg::FluxElementMatrixProvider< SCALAR, DIFF_COEFF >::alpha_
private

functor providing the coefficient invoved in the bilinear form

Definition at line 850 of file loc_comp_dpg.h.

◆ fe_precomp_test_

template<typename SCALAR , typename DIFF_COEFF >
std::array< std::vector<lf::uscalfe::PrecomputedScalarReferenceFiniteElement<SCALAR> >, 5> projects::dpg::FluxElementMatrixProvider< SCALAR, DIFF_COEFF >::fe_precomp_test_
private

array containing the precomputed information for the trial space: fe_precomp_trial[i][j] contains the precomputed reference finite element of \( v \) for ref_el i, evaluated on the quadrature points transformed to edge j of the boundary of the reference element

Definition at line 868 of file loc_comp_dpg.h.

Referenced by projects::dpg::FluxElementMatrixProvider< SCALAR, DIFF_COEFF >::FluxElementMatrixProvider().

◆ fe_precomp_trial_

template<typename SCALAR , typename DIFF_COEFF >
std::array<lf::uscalfe::PrecomputedScalarReferenceFiniteElement<SCALAR>, 5> projects::dpg::FluxElementMatrixProvider< SCALAR, DIFF_COEFF >::fe_precomp_trial_
private

array containing the precomputed information for the trial space flux component: fe_precomp_trial[i] contains the precomputed reference finite element of flux which is used in the computations of element matrices on cells of ref_el i. Note that the actual precomputed reference finite element is associated with ref_el lf::base::RefEl::kSegment().

Definition at line 859 of file loc_comp_dpg.h.

Referenced by projects::dpg::FluxElementMatrixProvider< SCALAR, DIFF_COEFF >::FluxElementMatrixProvider().

◆ sign_provider_

template<typename SCALAR , typename DIFF_COEFF >
PrescribedSignProvider projects::dpg::FluxElementMatrixProvider< SCALAR, DIFF_COEFF >::sign_provider_
private

helper class, to evaluate the sgn_K function

Definition at line 875 of file loc_comp_dpg.h.

◆ test_component_

template<typename SCALAR , typename DIFF_COEFF >
size_type projects::dpg::FluxElementMatrixProvider< SCALAR, DIFF_COEFF >::test_component_
private

◆ trial_component_

template<typename SCALAR , typename DIFF_COEFF >
size_type projects::dpg::FluxElementMatrixProvider< SCALAR, DIFF_COEFF >::trial_component_
private

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