1#ifndef HLDO_SPHERE_ASSEMBLE_WHITNEY_TWO_VECTOR_PROVIDER_H
2#define HLDO_SPHERE_ASSEMBLE_WHITNEY_TWO_VECTOR_PROVIDER_H
8#include <lf/mesh/entity.h>
9#include <lf/mesh/utils/mesh_data_set.h>
10#include <lf/quad/quad.h>
11#include <lf/uscalfe/lagr_fe.h>
48template <
typename SCALAR>
57 const std::function<SCALAR(
const Eigen::Vector3d &)> &f)
67 Eigen::Matrix<SCALAR, Eigen::Dynamic, 1>
Eval(
69 const auto *
const geom = entity.
Geometry();
73 "Unsupported cell type " << entity.
RefEl());
83 const Eigen::MatrixXd points = geom->Global(quadrule.Points());
84 const Eigen::VectorXd weights =
85 (geom->IntegrationElement(quadrule.Points()).array() *
86 quadrule.Weights().array())
91 Eigen::VectorXd x = points.col(n);
92 sum += weights[n] *
f_(x);
95 Eigen::Matrix<SCALAR, 1, 1> element_vector;
96 element_vector(0) = sum;
98 return element_vector;
107 const std::function<SCALAR(
const Eigen::Vector3d &)>
f_;
const Eigen::MatrixXd & NodeCoords() const
Get the coordinates of the nodes of this reference element.
static constexpr RefEl kTria()
Returns the reference triangle.
Interface class representing a topological entity in a cellular complex
virtual const geometry::Geometry * Geometry() const =0
Describes the geometry of this entity.
virtual base::RefEl RefEl() const =0
Describes the reference element type of this entity.
Represents a Quadrature Rule over one of the Reference Elements.
Element vector provider for piecewise constant whitney two forms.
const std::function< SCALAR(const Eigen::Vector3d &)> f_
bool isActive(const lf::mesh::Entity &entity) const
All entities are regarded as active.
WhitneyTwoVectorProvider(const std::function< SCALAR(const Eigen::Vector3d &)> &f)
Constructor.
Eigen::Matrix< SCALAR, Eigen::Dynamic, 1 > Eval(const lf::mesh::Entity &entity) const
Compute the element vector for some trinagle of the mesh.
unsigned int size_type
general type for variables related to size of arrays
QuadRule make_TriaQR_EdgeMidpointRule()
edge midpoint quadrature rule for reference triangles
Implementation of the thesis Hogde Laplacians and Dirac Operators on the surface of the 3-Sphere.