1#ifndef PROJECTS_DPG_PRODUCT_ELEMENT_MATRIX_PROVIDER
2#define PROJECTS_DPG_PRODUCT_ELEMENT_MATRIX_PROVIDER
13#include <lf/base/base.h>
14#include <lf/quad/quad.h>
15#include <lf/uscalfe/uscalfe.h>
21#include "product_fe_space.h"
22#include "sub_element_matrix_provider.h"
59template <
typename SCALAR>
121 std::vector<std::shared_ptr<SubElementMatrixProvider<SCALAR>>>
subproviders_;
125template <
typename ptr,
typename vector>
131template <
typename SCALAR>
135 LF_ASSERT_MSG(fe_space_trial_ !=
nullptr && fe_space_test_ !=
nullptr,
136 "missing description of trial or test space");
141 elem_mat_t mat(dof_h_test.NumLocalDofs(cell), dof_h_trial.NumLocalDofs(cell));
145 for (
const auto& provider : subproviders_) {
146 LF_ASSERT_MSG(provider !=
nullptr,
147 "invalid submatrix provider, is nullptr");
148 if (provider->isActive(cell)) {
150 size_type trial_component = provider->TrialComponent();
151 size_type test_component = provider->TestComponent();
155 mat.block(dof_h_test.LocalStartIndex(cell, test_component),
156 dof_h_trial.LocalStartIndex(cell, trial_component),
157 sub_mat.rows(), sub_mat.cols()) += sub_mat;
Interface class representing a topological entity in a cellular complex
Class providing element matrices associated with bilinear forms between cartesian/product spaces.
ElemMat Eval(const lf::mesh::Entity &cell)
main routine for the computation of element matrices
std::shared_ptr< ProductUniformFESpace< SCALAR > > fe_space_test_
virtual bool isActive(const lf::mesh::Entity &)
All cells are considered active in the default implementation.
std::shared_ptr< ProductUniformFESpace< SCALAR > > fe_space_trial_
ProductElementMatrixProvider(ProductElementMatrixProvider &&) noexcept=default
typename SubElementMatrixProvider< SCALAR >::ElemMat ElemMat
typename SubElementMatrixProvider< SCALAR >::elem_mat_t elem_mat_t
internal type for element matrices
virtual ~ProductElementMatrixProvider()=default
virtual destructor
ProductElementMatrixProvider(const ProductElementMatrixProvider &)=delete
standard constructors
std::vector< std::shared_ptr< SubElementMatrixProvider< SCALAR > > > subproviders_
Interface class providing sub element matrices associated with bilinear forms between components of C...
Eigen::Matrix< SCALAR, Eigen::Dynamic, Eigen::Dynamic > elem_mat_t
internal type for element matrices
Contains functionality for the implementation of DPG methods.
lf::uscalfe::size_type size_type
Type for vector length/matrix sizes.
ProductElementMatrixProvider(ptr fe_space_tiral, ptr fe_space_test, vector subproviders) -> ProductElementMatrixProvider< typename ptr::element_type::SCALAR >