LehrFEM++ 1.0.0
A simple Finite Element Library for teaching
|
Class for local quadrature based computations of sub element matrices corresponding to element matrices associated to a trace variable in the trial space. More...
#include <projects/dpg/loc_comp_dpg.h>
Public Types | |
using | elem_mat_t = typename SubElementMatrixProvider< SCALAR >::elem_mat_t |
inherited types for element matrices More... | |
using | ElemMat = typename SubElementMatrixProvider< SCALAR >::ElemMat |
![]() | |
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 | |
TraceElementMatrixProvider (const TraceElementMatrixProvider &)=delete | |
TraceElementMatrixProvider (TraceElementMatrixProvider &&) noexcept=default | |
TraceElementMatrixProvider & | operator= (const TraceElementMatrixProvider &)=delete |
TraceElementMatrixProvider & | operator= (TraceElementMatrixProvider &&)=delete |
TraceElementMatrixProvider (std::shared_ptr< ProductUniformFESpace< SCALAR > > fe_space_trial, std::shared_ptr< ProductUniformFESpace< SCALAR > > fe_space_test, size_type trial_component, size_type test_component, COEFF beta) | |
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... | |
~TraceElementMatrixProvider () override=default | |
![]() | |
SubElementMatrixProvider ()=default | |
virtual | ~SubElementMatrixProvider ()=default |
SubElementMatrixProvider (const SubElementMatrixProvider &)=delete | |
standard constructors More... | |
SubElementMatrixProvider (SubElementMatrixProvider &&) noexcept=default | |
SubElementMatrixProvider & | operator= (const SubElementMatrixProvider &)=delete |
SubElementMatrixProvider & | operator= (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 | |
COEFF | beta_ |
functor providing the coefficient invoved in the bilinear form More... | |
std::array< std::vector< lf::uscalfe::PrecomputedScalarReferenceFiniteElement< SCALAR > >, 5 > | fe_precomp_trial_ |
array containing the precomputed information for the trial space: fe_precomp_trial[i][j] contains the precomputed reference finite element of \( \hat{u} \) for ref_el i evaluated on the quadrature points transformed to edge j of the boundary. More... | |
std::array< std::vector< lf::uscalfe::PrecomputedScalarReferenceFiniteElement< SCALAR > >, 5 > | fe_precomp_test_ |
array containing the precomputed information for the test 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. More... | |
std::array< lf::quad::QuadRule, 5 > | segment_qr_ |
the original segment quad rule used to construct the quadrules on ref_el boundaries. segment_qr[i] contains the segment qr for ref_el i. More... | |
size_type | trial_component_ |
index of trial component \( \hat{u} \) More... | |
size_type | test_component_ |
index of test component v More... | |
Class for local quadrature based computations of sub element matrices corresponding to element matrices associated to a trace variable in the trial space.
SCALAR | type for the entries of the element matrices. Must be a field type such as double or std::complex<double> |
COEFF | a MeshFunction that defines a coefficient \( \mathbf{\beta} \). It should be vector valued. |
The element matrix corresponds to the (local) bilinear form
\[ (\hat u,v) \mapsto\int\limits_{\partial K} \hat u \mathbf{n}_K \cdot \boldsymbol{\beta}(\mathbf{x}) v\mathrm{d}\mathbf{x} \;, \]
\( \hat{u} \) is a trace component of the trial space and \( v \) a component of the test space.
double
operator (const Entity &,ref_coord_t)
returning a vector, that is compatible with Eigen's matrices. Usually it will be an Eigen::Vector of variable or fixed size. Definition at line 1053 of file loc_comp_dpg.h.
using projects::dpg::TraceElementMatrixProvider< SCALAR, COEFF >::elem_mat_t = typename SubElementMatrixProvider<SCALAR>::elem_mat_t |
inherited types for element matrices
Definition at line 1058 of file loc_comp_dpg.h.
using projects::dpg::TraceElementMatrixProvider< SCALAR, COEFF >::ElemMat = typename SubElementMatrixProvider<SCALAR>::ElemMat |
Definition at line 1059 of file loc_comp_dpg.h.
|
delete |
|
defaultnoexcept |
projects::dpg::TraceElementMatrixProvider< SCALAR, COEFF >::TraceElementMatrixProvider | ( | std::shared_ptr< ProductUniformFESpace< SCALAR > > | fe_space_trial, |
std::shared_ptr< ProductUniformFESpace< SCALAR > > | fe_space_test, | ||
size_type | trial_component, | ||
size_type | test_component, | ||
COEFF | beta | ||
) |
Constructor: performs cell-independent precomputations.
fe_space_trial | collection of specifications for the trial fe space |
fe_space_test | collection of specifications for the test fe space |
trial_component | Index of the trial space component \(\hat u\) |
test_component | Index of the test space component \(v\) |
beta | mesh function for the vector 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{u} \) and \( v \) is used.
Definition at line 1150 of file loc_comp_dpg.h.
References projects::dpg::BoundaryQuadRule(), projects::dpg::TraceElementMatrixProvider< SCALAR, COEFF >::fe_precomp_test_, projects::dpg::TraceElementMatrixProvider< SCALAR, COEFF >::fe_precomp_trial_, lf::base::RefEl::kQuad(), lf::base::RefEl::kSegment(), lf::base::RefEl::kTria(), lf::quad::make_QuadRule(), projects::dpg::TraceElementMatrixProvider< SCALAR, COEFF >::segment_qr_, projects::dpg::TraceElementMatrixProvider< SCALAR, COEFF >::test_component_, and projects::dpg::TraceElementMatrixProvider< SCALAR, COEFF >::trial_component_.
|
overridedefault |
|
overridevirtual |
main routine for the computation of element matrices
cell | reference to a (triangular or quadrilateral) cell for which the element matirx should be computed. |
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 1207 of file loc_comp_dpg.h.
References lf::geometry::Geometry::DimLocal(), lf::mesh::Entity::Geometry(), lf::base::RefEl::Id(), lf::base::RefEl::NumSubEntities(), projects::dpg::OuterNormals(), lf::mesh::Entity::RefEl(), and lf::geometry::Geometry::SubGeometry().
|
delete |
|
delete |
|
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 1102 of file loc_comp_dpg.h.
References projects::dpg::TraceElementMatrixProvider< SCALAR, COEFF >::test_component_.
|
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 1098 of file loc_comp_dpg.h.
References projects::dpg::TraceElementMatrixProvider< SCALAR, COEFF >::trial_component_.
|
private |
functor providing the coefficient invoved in the bilinear form
Definition at line 1110 of file loc_comp_dpg.h.
|
private |
array containing the precomputed information for the test 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.
Definition at line 1129 of file loc_comp_dpg.h.
Referenced by projects::dpg::TraceElementMatrixProvider< SCALAR, COEFF >::TraceElementMatrixProvider().
|
private |
array containing the precomputed information for the trial space: fe_precomp_trial[i][j] contains the precomputed reference finite element of \( \hat{u} \) for ref_el i evaluated on the quadrature points transformed to edge j of the boundary.
Definition at line 1120 of file loc_comp_dpg.h.
Referenced by projects::dpg::TraceElementMatrixProvider< SCALAR, COEFF >::TraceElementMatrixProvider().
|
private |
the original segment quad rule used to construct the quadrules on ref_el boundaries. segment_qr[i] contains the segment qr for ref_el i.
Definition at line 1133 of file loc_comp_dpg.h.
Referenced by projects::dpg::TraceElementMatrixProvider< SCALAR, COEFF >::TraceElementMatrixProvider().
|
private |
index of test component v
Definition at line 1138 of file loc_comp_dpg.h.
Referenced by projects::dpg::TraceElementMatrixProvider< SCALAR, COEFF >::TestComponent(), and projects::dpg::TraceElementMatrixProvider< SCALAR, COEFF >::TraceElementMatrixProvider().
|
private |
index of trial component \( \hat{u} \)
Definition at line 1136 of file loc_comp_dpg.h.
Referenced by projects::dpg::TraceElementMatrixProvider< SCALAR, COEFF >::TraceElementMatrixProvider(), and projects::dpg::TraceElementMatrixProvider< SCALAR, COEFF >::TrialComponent().