TRIQS/triqs_Nevanlinna 4.0.0
A TRIQS application
Loading...
Searching...
No Matches
kernel.hpp
1#ifndef TRIQS_NEVANLINNA_KERNEL_HPP
2#define TRIQS_NEVANLINNA_KERNEL_HPP
3#include <complex>
4
5#include <nda/nda.hpp>
6#include "Nevanlinna_error.hpp"
7#include "types.hpp"
8
9namespace triqs_Nevanlinna {
10 class kernel {
11 public:
12 virtual ~kernel() = default;
13 kernel([[maybe_unused]] int precision = mp_digits) {
14#ifdef WITH_MPFR
15 boost::multiprecision::mpfr_float::default_precision(precision);
16#else
17 std::cerr << "Precision cannot be selected for boost multiprecision implementation. To set precision rebuild code with MPFR library support."
18 << std::endl;
19#endif
20 };
21
22 // Copy/Move construction
23 kernel(kernel const &) = default;
24 kernel(kernel &&) = default;
25
27 kernel &operator=(kernel const &) = default;
28 kernel &operator=(kernel &&) = default;
29
30 virtual void init(nda::vector_const_view<std::complex<double>> /*mesh*/, nda::array_const_view<std::complex<double>, 3> /*data*/) {
31 throw Nevanlinna_error("This method is not implemented in the base class.");
32 };
33 [[nodiscard]] virtual nda::array<std::complex<double>, 3> evaluate(nda::vector_const_view<std::complex<double>> /*grid*/) {
34 throw Nevanlinna_error("This method is not implemented in the base class.");
35 };
36 [[nodiscard]] virtual nda::array<std::complex<double>, 3> evaluate(nda::vector_const_view<std::complex<double>> /*grid*/,
37 nda::array_const_view<std::complex<double>, 3> /*theta*/) {
38 throw Nevanlinna_error("This method is not implemented in the base class.");
39 };
40
41 [[nodiscard]] virtual size_t size() const { return 0; };
42 [[nodiscard]] virtual nda::vector<double> get_Pick_eigenvalues() const {
43 throw Nevanlinna_error("This method is not implemented in the base class.");
44 };
45 };
46
47} // namespace triqs_Nevanlinna
48#endif //TRIQS_NEVANLINNA_KERNEL_HPP