DiFfRG
Loading...
Searching...
No Matches
abstract_linear_solver.hh
Go to the documentation of this file.
1#pragma once
2
3// external libraries
4#include <deal.II/lac/sparse_matrix.h>
5
6namespace DiFfRG
7{
8 template <typename SparseMatrixType, typename VectorType> class AbstractLinearSolver
9 {
10 public:
12
13 void init(const SparseMatrixType &matrix)
14 {
15 throw std::runtime_error("AbstractLinearSolver::init: not implemented");
16 };
17
18 bool invert()
19 {
20 throw std::runtime_error("AbstractLinearSolver::invert: not implemented");
21 return false;
22 };
23
24 int solve(const VectorType &src, const VectorType &dst, const double tol)
25 {
26 throw std::runtime_error("AbstractLinearSolver::solve: not implemented");
27 return -1;
28 };
29 };
30} // namespace DiFfRG
Definition abstract_linear_solver.hh:9
bool invert()
Definition abstract_linear_solver.hh:18
int solve(const VectorType &src, const VectorType &dst, const double tol)
Definition abstract_linear_solver.hh:24
void init(const SparseMatrixType &matrix)
Definition abstract_linear_solver.hh:13
AbstractLinearSolver()
Definition abstract_linear_solver.hh:11
Definition complex_math.hh:14