1#ifndef HLDO_SPHERE_OPERATORS_DIRAC_OPERATOR_H
2#define HLDO_SPHERE_OPERATORS_DIRAC_OPERATOR_H
8#include <lf/assemble/assembler.h>
9#include <lf/assemble/coomatrix.h>
10#include <lf/assemble/dofhandler.h>
11#include <lf/mesh/entity.h>
12#include <lf/mesh/hybrid2d/mesh.h>
13#include <lf/mesh/hybrid2d/mesh_factory.h>
14#include <lf/mesh/mesh_interface.h>
15#include <lf/quad/quad.h>
16#include <load_vector_provider.h>
17#include <rot_whitney_one_div_matrix_provider.h>
18#include <sphere_triag_mesh_builder.h>
19#include <whitney_one_grad_matrix_provider.h>
20#include <whitney_one_vector_provider.h>
21#include <whitney_two_vector_provider.h>
71 std::unique_ptr<lf::mesh::MeshFactory> factory =
72 std::make_unique<lf::mesh::hybrid2d::MeshFactory>(3);
73 std::shared_ptr<projects::hldo_sphere::mesh::SphereTriagMeshBuilder>
74 sphere = std::make_shared<
82 auto f_0 = [](Eigen::Matrix<double, 3, 1> x) ->
complex {
return 0; };
84 [](Eigen::Matrix<double, 3, 1> x) -> Eigen::Matrix<complex, 3, 1> {
85 return Eigen::Matrix<complex, 3, 1>::Zero();
87 auto f_2 = [](Eigen::Matrix<double, 3, 1> x) ->
complex {
return 0; };
109 void SetMesh(std::shared_ptr<const lf::mesh::Mesh> mesh_p);
118 std::function<
complex(
const Eigen::Matrix<double, 3, 1> &)> f0,
120 Eigen::Matrix<complex, 3, 1>(
const Eigen::Matrix<double, 3, 1> &)>
122 std::function<
complex(
const Eigen::Matrix<double, 3, 1> &)> f2) {
151 std::shared_ptr<const lf::mesh::Mesh>
mesh_p_;
152 std::function<
complex(
const Eigen::Matrix<double, 3, 1> &)>
f0_;
153 std::function<Eigen::Matrix<complex, 3, 1>(
154 const Eigen::Matrix<double, 3, 1> &)>
156 std::function<
complex(
const Eigen::Matrix<double, 3, 1> &)>
f2_;
158 Eigen::Matrix<complex, Eigen::Dynamic, 1>
phi_;
A mesh builder for regular 3-Sphere.
void setRefinementLevel(lf::base::size_type n)
Set the refinement level.
Computes the Galerkin LSE for the Dirac Operator and the load vector.
std::function< complex(const Eigen::Matrix< double, 3, 1 > &)> f0_
void SetMesh(std::shared_ptr< const lf::mesh::Mesh > mesh_p)
Sets the mesh and creates dof_handler.
std::shared_ptr< const lf::mesh::Mesh > mesh_p_
Eigen::Matrix< complex, Eigen::Dynamic, 1 > phi_
lf::assemble::COOMatrix< complex > GetGalerkinMatrix()
returns the Galerkin Matrix
Eigen::Matrix< complex, Eigen::Dynamic, 1 > GetLoadVector()
returns the Loadvector
std::function< complex(const Eigen::Matrix< double, 3, 1 > &)> f2_
std::function< Eigen::Matrix< complex, 3, 1 >(const Eigen::Matrix< double, 3, 1 > &)> f1_
void SetLoadFunctions(std::function< complex(const Eigen::Matrix< double, 3, 1 > &)> f0, std::function< Eigen::Matrix< complex, 3, 1 >(const Eigen::Matrix< double, 3, 1 > &)> f1, std::function< complex(const Eigen::Matrix< double, 3, 1 > &)> f2)
Sets the load functions.
void Compute()
Computes the Galerkin LSE.
lf::assemble::COOMatrix< complex > coo_matrix_
DiracOperator()
Constructor creates basic mesh (Octaeder with radius 1.0) and zero valued functions f.
std::complex< double > complex
Implementation of the thesis Hogde Laplacians and Dirac Operators on the surface of the 3-Sphere.