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

Class for local quadrature based computations sub element matrices corresponding to convection-like element matrices. More...

#include <projects/dpg/loc_comp_dpg.h>

Inheritance diagram for projects::dpg::ConvectionElementMatrixProvider< SCALAR, CONVECTION_COEFF_1, CONVECTION_COEFF_2 >:
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

 ConvectionElementMatrixProvider (const ConvectionElementMatrixProvider &)=delete
 
 ConvectionElementMatrixProvider (ConvectionElementMatrixProvider &&) noexcept=default
 
ConvectionElementMatrixProvideroperator= (const ConvectionElementMatrixProvider &)=delete
 
ConvectionElementMatrixProvideroperator= (ConvectionElementMatrixProvider &&)=delete
 
 ConvectionElementMatrixProvider (std::shared_ptr< ProductUniformFESpace< SCALAR > > fe_space_trial, std::shared_ptr< ProductUniformFESpace< SCALAR > > fe_space_test, size_type trial_component, size_type test_component, CONVECTION_COEFF_1 beta_1, CONVECTION_COEFF_2 beta_2)
 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...
 
 ~ConvectionElementMatrixProvider () 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

CONVECTION_COEFF_1 beta_1_
 functor providing "first" convection coefficient More...
 
CONVECTION_COEFF_2 beta_2_
 functor providing the "second" convection coefficient More...
 
std::array< lf::uscalfe::PrecomputedScalarReferenceFiniteElement< SCALAR >, 5 > fe_precomp_trial_
 array containing the precomputed information for the trial space: fe_precomp_trial[i] contains the precomputed reference finite element of the trial space component u for ref_el i. More...
 
std::array< lf::uscalfe::PrecomputedScalarReferenceFiniteElement< SCALAR >, 5 > fe_precomp_test_
 array containing the precomputed information for the test space: fe_precomp_trial[i] contains the precomputed reference finite element of the test space component v for ref_el i. More...
 
size_type trial_component_
 index of the involved trial component More...
 
size_type test_component_
 index of the involved test component More...
 

Detailed Description

template<typename SCALAR, typename CONVECTION_COEFF_1, typename CONVECTION_COEFF_2>
class projects::dpg::ConvectionElementMatrixProvider< SCALAR, CONVECTION_COEFF_1, CONVECTION_COEFF_2 >

Class for local quadrature based computations sub element matrices corresponding to convection-like element matrices.

Template Parameters
SCALARtype for the entries of the element matrices. Must be a field type such as double or std::complex<double>
CONVECTION_COEFF_1a MeshFunction that defines the "first" convection coefficient \( \mathbf{\beta_1} \). It should be vector valued.
CONVECTION_COEFF_2a MeshFunction that defines the "second" convection coefficient \( \mathbf{\beta_2} \). It should be vector 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

\[ (u,v) \mapsto\int\limits_{K} \mathbf{grad}\,v \cdot \boldsymbol{\beta_1}(\mathbf{x})u + \mathbf{grad}\,u \cdot \boldsymbol{\beta_2}(\mathbf{x})v \mathrm{d}\mathbf{x} \;, \]

with first "convection" coefficient \(\mathbf{\beta_1}\) and second "convection" coefficient \(\mathbf{\beta_2}\). \( u \) is a component of the trial space and \( v\) a component of the test space.

Template parameter requirement

Definition at line 531 of file loc_comp_dpg.h.

Member Typedef Documentation

◆ elem_mat_t

template<typename SCALAR , typename CONVECTION_COEFF_1 , typename CONVECTION_COEFF_2 >
using projects::dpg::ConvectionElementMatrixProvider< SCALAR, CONVECTION_COEFF_1, CONVECTION_COEFF_2 >::elem_mat_t = typename SubElementMatrixProvider<SCALAR>::elem_mat_t

inherited types for element matrices

Definition at line 538 of file loc_comp_dpg.h.

◆ ElemMat

template<typename SCALAR , typename CONVECTION_COEFF_1 , typename CONVECTION_COEFF_2 >
using projects::dpg::ConvectionElementMatrixProvider< SCALAR, CONVECTION_COEFF_1, CONVECTION_COEFF_2 >::ElemMat = typename SubElementMatrixProvider<SCALAR>::ElemMat

Definition at line 539 of file loc_comp_dpg.h.

Constructor & Destructor Documentation

◆ ConvectionElementMatrixProvider() [1/3]

template<typename SCALAR , typename CONVECTION_COEFF_1 , typename CONVECTION_COEFF_2 >
projects::dpg::ConvectionElementMatrixProvider< SCALAR, CONVECTION_COEFF_1, CONVECTION_COEFF_2 >::ConvectionElementMatrixProvider ( const ConvectionElementMatrixProvider< SCALAR, CONVECTION_COEFF_1, CONVECTION_COEFF_2 > &  )
delete

◆ ConvectionElementMatrixProvider() [2/3]

template<typename SCALAR , typename CONVECTION_COEFF_1 , typename CONVECTION_COEFF_2 >
projects::dpg::ConvectionElementMatrixProvider< SCALAR, CONVECTION_COEFF_1, CONVECTION_COEFF_2 >::ConvectionElementMatrixProvider ( ConvectionElementMatrixProvider< SCALAR, CONVECTION_COEFF_1, CONVECTION_COEFF_2 > &&  )
defaultnoexcept

◆ ConvectionElementMatrixProvider() [3/3]

template<typename SCALAR , typename CONVECTION_COEFF_1 , typename CONVECTION_COEFF_2 >
projects::dpg::ConvectionElementMatrixProvider< SCALAR, CONVECTION_COEFF_1, CONVECTION_COEFF_2 >::ConvectionElementMatrixProvider ( std::shared_ptr< ProductUniformFESpace< SCALAR > >  fe_space_trial,
std::shared_ptr< ProductUniformFESpace< SCALAR > >  fe_space_test,
size_type  trial_component,
size_type  test_component,
CONVECTION_COEFF_1  beta_1,
CONVECTION_COEFF_2  beta_2 
)

Constructor: performs cell-independent precomputations.

Parameters
fe_space_trialcollection of specifications for the trial fe space
fe_space_testcollection of specifications for the test fe space
trial_componentIndex of the trial space component \(u\)
test_componentIndex of the test space component \(v\)
beta_1mesh function for the "first" vector valued convection coefficient
beta_2mesh function for the "second" vector valued convection coefficient

This constructur uses local quadrature rules with the degree of exactness chosen as the sum of the polynomial degrees of the two components \( u\) and \( v \)

Definition at line 629 of file loc_comp_dpg.h.

References projects::dpg::ConvectionElementMatrixProvider< SCALAR, CONVECTION_COEFF_1, CONVECTION_COEFF_2 >::fe_precomp_test_, projects::dpg::ConvectionElementMatrixProvider< SCALAR, CONVECTION_COEFF_1, CONVECTION_COEFF_2 >::fe_precomp_trial_, lf::base::RefEl::kQuad(), lf::base::RefEl::kTria(), lf::quad::make_QuadRule(), projects::dpg::ConvectionElementMatrixProvider< SCALAR, CONVECTION_COEFF_1, CONVECTION_COEFF_2 >::test_component_, and projects::dpg::ConvectionElementMatrixProvider< SCALAR, CONVECTION_COEFF_1, CONVECTION_COEFF_2 >::trial_component_.

◆ ~ConvectionElementMatrixProvider()

template<typename SCALAR , typename CONVECTION_COEFF_1 , typename CONVECTION_COEFF_2 >
projects::dpg::ConvectionElementMatrixProvider< SCALAR, CONVECTION_COEFF_1, CONVECTION_COEFF_2 >::~ConvectionElementMatrixProvider ( )
overridedefault

Member Function Documentation

◆ Eval()

template<typename SCALAR , typename CONVECTION_COEFF_1 , typename CONVECTION_COEFF_2 >
ConvectionElementMatrixProvider< SCALAR, CONVECTION_COEFF_1, CONVECTION_COEFF_2 >::ElemMat projects::dpg::ConvectionElementMatrixProvider< SCALAR, CONVECTION_COEFF_1, CONVECTION_COEFF_2 >::Eval ( const lf::mesh::Entity cell)
overridevirtual

◆ operator=() [1/2]

template<typename SCALAR , typename CONVECTION_COEFF_1 , typename CONVECTION_COEFF_2 >
ConvectionElementMatrixProvider & projects::dpg::ConvectionElementMatrixProvider< SCALAR, CONVECTION_COEFF_1, CONVECTION_COEFF_2 >::operator= ( const ConvectionElementMatrixProvider< SCALAR, CONVECTION_COEFF_1, CONVECTION_COEFF_2 > &  )
delete

◆ operator=() [2/2]

template<typename SCALAR , typename CONVECTION_COEFF_1 , typename CONVECTION_COEFF_2 >
ConvectionElementMatrixProvider & projects::dpg::ConvectionElementMatrixProvider< SCALAR, CONVECTION_COEFF_1, CONVECTION_COEFF_2 >::operator= ( ConvectionElementMatrixProvider< SCALAR, CONVECTION_COEFF_1, CONVECTION_COEFF_2 > &&  )
delete

◆ TestComponent()

template<typename SCALAR , typename CONVECTION_COEFF_1 , typename CONVECTION_COEFF_2 >
size_type projects::dpg::ConvectionElementMatrixProvider< SCALAR, CONVECTION_COEFF_1, CONVECTION_COEFF_2 >::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 586 of file loc_comp_dpg.h.

References projects::dpg::ConvectionElementMatrixProvider< SCALAR, CONVECTION_COEFF_1, CONVECTION_COEFF_2 >::test_component_.

◆ TrialComponent()

template<typename SCALAR , typename CONVECTION_COEFF_1 , typename CONVECTION_COEFF_2 >
size_type projects::dpg::ConvectionElementMatrixProvider< SCALAR, CONVECTION_COEFF_1, CONVECTION_COEFF_2 >::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 582 of file loc_comp_dpg.h.

References projects::dpg::ConvectionElementMatrixProvider< SCALAR, CONVECTION_COEFF_1, CONVECTION_COEFF_2 >::trial_component_.

Member Data Documentation

◆ beta_1_

template<typename SCALAR , typename CONVECTION_COEFF_1 , typename CONVECTION_COEFF_2 >
CONVECTION_COEFF_1 projects::dpg::ConvectionElementMatrixProvider< SCALAR, CONVECTION_COEFF_1, CONVECTION_COEFF_2 >::beta_1_
private

functor providing "first" convection coefficient

Definition at line 594 of file loc_comp_dpg.h.

◆ beta_2_

template<typename SCALAR , typename CONVECTION_COEFF_1 , typename CONVECTION_COEFF_2 >
CONVECTION_COEFF_2 projects::dpg::ConvectionElementMatrixProvider< SCALAR, CONVECTION_COEFF_1, CONVECTION_COEFF_2 >::beta_2_
private

functor providing the "second" convection coefficient

Definition at line 596 of file loc_comp_dpg.h.

◆ fe_precomp_test_

template<typename SCALAR , typename CONVECTION_COEFF_1 , typename CONVECTION_COEFF_2 >
std::array<lf::uscalfe::PrecomputedScalarReferenceFiniteElement<SCALAR>, 5> projects::dpg::ConvectionElementMatrixProvider< SCALAR, CONVECTION_COEFF_1, CONVECTION_COEFF_2 >::fe_precomp_test_
private

array containing the precomputed information for the test space: fe_precomp_trial[i] contains the precomputed reference finite element of the test space component v for ref_el i.

Definition at line 607 of file loc_comp_dpg.h.

Referenced by projects::dpg::ConvectionElementMatrixProvider< SCALAR, CONVECTION_COEFF_1, CONVECTION_COEFF_2 >::ConvectionElementMatrixProvider().

◆ fe_precomp_trial_

template<typename SCALAR , typename CONVECTION_COEFF_1 , typename CONVECTION_COEFF_2 >
std::array<lf::uscalfe::PrecomputedScalarReferenceFiniteElement<SCALAR>, 5> projects::dpg::ConvectionElementMatrixProvider< SCALAR, CONVECTION_COEFF_1, CONVECTION_COEFF_2 >::fe_precomp_trial_
private

array containing the precomputed information for the trial space: fe_precomp_trial[i] contains the precomputed reference finite element of the trial space component u for ref_el i.

Definition at line 602 of file loc_comp_dpg.h.

Referenced by projects::dpg::ConvectionElementMatrixProvider< SCALAR, CONVECTION_COEFF_1, CONVECTION_COEFF_2 >::ConvectionElementMatrixProvider().

◆ test_component_

template<typename SCALAR , typename CONVECTION_COEFF_1 , typename CONVECTION_COEFF_2 >
size_type projects::dpg::ConvectionElementMatrixProvider< SCALAR, CONVECTION_COEFF_1, CONVECTION_COEFF_2 >::test_component_
private

◆ trial_component_

template<typename SCALAR , typename CONVECTION_COEFF_1 , typename CONVECTION_COEFF_2 >
size_type projects::dpg::ConvectionElementMatrixProvider< SCALAR, CONVECTION_COEFF_1, CONVECTION_COEFF_2 >::trial_component_
private

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