Skip to content
Snippets Groups Projects
Commit b748162a authored by oliver.sander_at_tu-dresden.de's avatar oliver.sander_at_tu-dresden.de
Browse files

Introduce LinearSolver interface class

A LinearSolver is a solver for a linear system of equations.
In particular, LinearSolver objects can be given a matrix
and a right-hand-side vector.
parent c3dda5c6
No related branches found
No related tags found
No related merge requests found
...@@ -3,6 +3,7 @@ install(FILES ...@@ -3,6 +3,7 @@ install(FILES
iterativesolver.cc iterativesolver.cc
iterativesolver.hh iterativesolver.hh
linearipopt.hh linearipopt.hh
linearsolver.hh
loopsolver.cc loopsolver.cc
loopsolver.hh loopsolver.hh
quadraticipopt.hh quadraticipopt.hh
......
// -*- 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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment