diff --git a/dune/solvers/solvers/CMakeLists.txt b/dune/solvers/solvers/CMakeLists.txt index 652164b1a155c8957671ef8b1e9c676f67620e17..8946f69c27e1d3f23338cd864ef976d2c81e7134 100644 --- a/dune/solvers/solvers/CMakeLists.txt +++ b/dune/solvers/solvers/CMakeLists.txt @@ -3,6 +3,7 @@ install(FILES iterativesolver.cc iterativesolver.hh linearipopt.hh + linearsolver.hh loopsolver.cc loopsolver.hh quadraticipopt.hh diff --git a/dune/solvers/solvers/linearsolver.hh b/dune/solvers/solvers/linearsolver.hh new file mode 100644 index 0000000000000000000000000000000000000000..299b559456c49c82eef82c73d841bcffa7de4102 --- /dev/null +++ b/dune/solvers/solvers/linearsolver.hh @@ -0,0 +1,37 @@ +// -*- tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- +// vi: set et ts=8 sw=4 sts=4: +#ifndef DUNE_SOLVERS_SOLVERS_LINEARSOLVER_HH +#define DUNE_SOLVERS_SOLVERS_LINEARSOLVER_HH + +#include <dune/solvers/solvers/solver.hh> + +namespace Dune { + +namespace Solvers { + +/** \brief Abstract base class for solvers that solve linear problems + * + * Linear problems are problems that involve a fixed matrix and a right-hand-side + * vector. Additional constraints are allowed. + */ +template <class Matrix, class Vector> +class LinearSolver : public Solver +{ +public: + /** \brief Constructor taking all relevant data */ + LinearSolver(VerbosityMode verbosity) + : Solver(verbosity) + {} + + /** \brief Set up the linear problem to solve */ + virtual void setProblem(const Matrix& matrix, + Vector& x, + const Vector& rhs) = 0; + +}; + +} // namespace Solvers + +} // namespace Dune + +#endif