LehrFEM++ 1.0.0
A simple Finite Element Library for teaching
piecewise_const_element_vector_provider.h
1#ifndef THESIS_ASSEMBLE_PIECEWISE_CONST_ELEMENT_VECTOR_PROVIDER_H
2#define THESIS_ASSEMBLE_PIECEWISE_CONST_ELEMENT_VECTOR_PROVIDER_H
3
10#include <lf/mesh/entity.h>
11#include <lf/mesh/utils/mesh_data_set.h>
12#include <lf/quad/quad_rule.h>
13
14#include <Eigen/Dense>
15#include <functional>
16#include <utility>
17
18namespace projects::ipdg_stokes {
19
20namespace assemble {
21
36 public:
48 double sigma, std::function<Eigen::Vector2d(const Eigen::Vector2d &)> f,
49 lf::quad::QuadRule quadrule,
52
60 Eigen::VectorXd Eval(const lf::mesh::Entity &entity) const;
61
65 bool isActive(const lf::mesh::Entity &entity) const { return true; }
66
67 private:
68 const double sigma_;
69 const std::function<Eigen::Vector2d(const Eigen::Vector2d &)> f_;
73};
74
75} // end namespace assemble
76
77} // end namespace projects::ipdg_stokes
78
79#endif // THESIS_ASSEMBLE_PIECEWISE_CONST_ELEMENT_VECTOR_PROVIDER_H
Interface class representing a topological entity in a cellular complex
Definition: entity.h:39
Represents a Quadrature Rule over one of the Reference Elements.
Definition: quad_rule.h:58
bool isActive(const lf::mesh::Entity &entity) const
All entities are regarded as active.
Eigen::VectorXd Eval(const lf::mesh::Entity &entity) const
Compute the element vector for some entity of the mesh.
PiecewiseConstElementVectorProvider(double sigma, std::function< Eigen::Vector2d(const Eigen::Vector2d &)> f, lf::quad::QuadRule quadrule, const lf::mesh::utils::MeshDataSet< bool > &boundary, const lf::mesh::utils::MeshDataSet< Eigen::Vector2d > &dirichlet_data)
Constructor.