LehrFEM++ 1.0.0
A simple Finite Element Library for teaching
dirac_convergence_test.h
1#ifndef HLDO_SPHERE_DEBUG_DIRAC_CONVERGENCE_H
2#define HLDO_SPHERE_DEBUG_DIRAC_CONVERGENCE_H
3
10#include <dirac_operator_source_problem.h>
11#include <lf/io/vtk_writer.h>
12#include <lf/mesh/hybrid2d/mesh_factory.h>
13#include <lf/mesh/utils/tp_triag_mesh_builder.h>
14#include <lf/mesh/utils/utils.h>
15#include <lf/quad/quad.h>
16#include <lf/refinement/refinement.h>
17#include <lf/uscalfe/uscalfe.h>
18#include <mesh_function_whitney_one.h>
19#include <mesh_function_whitney_two.h>
20#include <mesh_function_whitney_zero.h>
21#include <norms.h>
22#include <results_processing.h>
23#include <sphere_triag_mesh_builder.h>
24
25#include <cstdlib>
26#include <cstring>
27#include <iostream>
28#include <string>
29#include <vector>
30
31namespace projects::hldo_sphere {
32namespace debugging {
33
34using complex = std::complex<double>;
35
40 std::vector<Eigen::Matrix<complex, Eigen::Dynamic, 1>> mu_zero;
41 std::vector<Eigen::Matrix<complex, Eigen::Dynamic, 1>> mu_one;
42 std::vector<Eigen::Matrix<complex, Eigen::Dynamic, 1>> mu_two;
43};
44
60 public:
73 std::function<complex(const Eigen::Matrix<double, 3, 1> &)> f_zero,
74 std::function<
75 Eigen::Matrix<complex, 3, 1>(const Eigen::Matrix<double, 3, 1> &)>
76 f_one,
77 std::function<complex(const Eigen::Matrix<double, 3, 1> &)> f_two,
78 double &k)
79 : f_zero_(f_zero), f_one_(f_one), f_two_(f_two), k_(k) {}
80
89 void Compute(unsigned refinement_levels);
90
91 private:
92 std::function<complex(const Eigen::Matrix<double, 3, 1> &)> f_zero_;
93 std::function<Eigen::Matrix<complex, 3, 1>(
94 const Eigen::Matrix<double, 3, 1> &)>
96 std::function<complex(const Eigen::Matrix<double, 3, 1> &)> f_two_;
97 double &k_;
98};
99} // namespace debugging
100} // namespace projects::hldo_sphere
101
102#endif // HLDO_SPHERE_DEBUG_DIRAC_CONVERGENCE_H
Class to test the convergence of the Dirac operator.
DiracConvergenceTest(std::function< complex(const Eigen::Matrix< double, 3, 1 > &)> f_zero, std::function< Eigen::Matrix< complex, 3, 1 >(const Eigen::Matrix< double, 3, 1 > &)> f_one, std::function< complex(const Eigen::Matrix< double, 3, 1 > &)> f_two, double &k)
Constructor setting all the functions and the reference k.
std::function< complex(const Eigen::Matrix< double, 3, 1 > &)> f_zero_
std::function< Eigen::Matrix< complex, 3, 1 >(const Eigen::Matrix< double, 3, 1 > &)> f_one_
std::function< complex(const Eigen::Matrix< double, 3, 1 > &)> f_two_
void Compute(unsigned refinement_levels)
Solves the dirac opeartor source problems up to the given refinement_level.
Implementation of the thesis Hogde Laplacians and Dirac Operators on the surface of the 3-Sphere.
Definition: assemble.h:15
stores solutions for a number of refinement levels
std::vector< Eigen::Matrix< complex, Eigen::Dynamic, 1 > > mu_one
std::vector< Eigen::Matrix< complex, Eigen::Dynamic, 1 > > mu_zero
std::vector< Eigen::Matrix< complex, Eigen::Dynamic, 1 > > mu_two