/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
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 (void)matrix;
16 throw std::runtime_error("AbstractLinearSolver::init: not implemented");
17 };
18
19 bool invert()
20 {
21 throw std::runtime_error("AbstractLinearSolver::invert: not implemented");
22 return false;
23 };
24
25 int solve(const VectorType &src, const VectorType &dst, const double tol)
26 {
27 (void)src;
28 (void)dst;
29 (void)tol;
30 throw std::runtime_error("AbstractLinearSolver::solve: not implemented");
31 return -1;
32 };
33 };
34} // namespace DiFfRG
Definition abstract_linear_solver.hh:9
bool invert()
Definition abstract_linear_solver.hh:19
int solve(const VectorType &src, const VectorType &dst, const double tol)
Definition abstract_linear_solver.hh:25
void init(const SparseMatrixType &matrix)
Definition abstract_linear_solver.hh:13
AbstractLinearSolver()
Definition abstract_linear_solver.hh:11
Definition complex_math.hh:10