LehrFEM++ 1.0.0
A simple Finite Element Library for teaching
sub_element_matrix_provider.h
1#ifndef PROJECTS_DPG_SUB_ELEMENT_MATRIX_PROVIDER
2#define PROJECTS_DPG_SUB_ELEMENT_MATRIX_PROVIDER
3
13#include <lf/mesh/mesh.h>
14#include <lf/uscalfe/uscalfe.h>
15
16#include "dpg.h"
17
18namespace projects::dpg {
19
54template <typename SCALAR>
56 public:
59 using elem_mat_t = Eigen::Matrix<SCALAR, Eigen::Dynamic, Eigen::Dynamic>;
62
64 virtual ~SubElementMatrixProvider() = default;
65
71
78 virtual bool isActive(const lf::mesh::Entity& /*cell*/) { return true; }
79
87 virtual ElemMat Eval(const lf::mesh::Entity& cell) = 0;
88
93 [[nodiscard]] virtual size_type TrialComponent() const = 0;
94
99 [[nodiscard]] virtual size_type TestComponent() const = 0;
100};
101
102} // namespace projects::dpg
103
104#endif // PROJECTS_DPG_SUB_ELEMENT_MATRIX_PROVIDER
Interface class representing a topological entity in a cellular complex
Definition: entity.h:39
Interface class providing sub element matrices associated with bilinear forms between components of C...
virtual bool isActive(const lf::mesh::Entity &)
All cells are considered active in the default implementation.
virtual ElemMat Eval(const lf::mesh::Entity &cell)=0
main routine for the computation of (sub) element matrices
virtual size_type TrialComponent() const =0
returns the index of the trial space component which is the trial space for the bilinear form
virtual size_type TestComponent() const =0
returns the index of the test space component which is the test space for the bilinear form
SubElementMatrixProvider(SubElementMatrixProvider &&) noexcept=default
Eigen::Matrix< SCALAR, Eigen::Dynamic, Eigen::Dynamic > elem_mat_t
internal type for element matrices
SubElementMatrixProvider(const SubElementMatrixProvider &)=delete
standard constructors
lf::assemble::size_type size_type
Definition: lagr_fe.h:30
Definition: assemble.h:30
Contains functionality for the implementation of DPG methods.
Definition: primal_dpg.h:33