/home/runner/work/DiFfRG_current/DiFfRG_current/DiFfRG/include/DiFfRG/timestepping/linear_solver/abstract_linear_solver.hh Source File#

DiFfRG: /home/runner/work/DiFfRG_current/DiFfRG_current/DiFfRG/include/DiFfRG/timestepping/linear_solver/abstract_linear_solver.hh Source File
DiFfRG
Discretization Framework for functional Renormalization Group flows
abstract_linear_solver.hh
Go to the documentation of this file.
1#pragma once
2
4
5// external libraries
6#include <deal.II/lac/sparse_matrix.h>
7
8namespace DiFfRG
9{
10 template <typename SparseMatrixType, typename VectorType> class AbstractLinearSolver
11 {
12 public:
14
16 void set_report_port(ReportPort port) { report_port = std::move(port); }
17
18 void init(const SparseMatrixType &matrix)
19 {
20 (void)matrix;
21 throw std::runtime_error("AbstractLinearSolver::init: not implemented");
22 };
23
24 bool invert()
25 {
26 throw std::runtime_error("AbstractLinearSolver::invert: not implemented");
27 return false;
28 };
29
30 int solve(const VectorType &src, const VectorType &dst, const double tol)
31 {
32 (void)src;
33 (void)dst;
34 (void)tol;
35 throw std::runtime_error("AbstractLinearSolver::solve: not implemented");
36 return -1;
37 };
38
39 protected:
41 };
42} // namespace DiFfRG
Definition abstract_linear_solver.hh:11
bool invert()
Definition abstract_linear_solver.hh:24
int solve(const VectorType &src, const VectorType &dst, const double tol)
Definition abstract_linear_solver.hh:30
ReportPort report_port
Definition abstract_linear_solver.hh:40
void set_report_port(ReportPort port)
Definition abstract_linear_solver.hh:16
void init(const SparseMatrixType &matrix)
Definition abstract_linear_solver.hh:18
AbstractLinearSolver()
Definition abstract_linear_solver.hh:13
Definition run_reporter.hh:96
Definition complex_math.hh:10