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

Make UMFPackSolver inherit from LinearSolver

Now we can you RTTI to figure out that the solver
has the setProblem(A,x,b) method.
parent dc3e323e
No related branches found
No related tags found
No related merge requests found
......@@ -18,7 +18,7 @@
#include <dune/istl/io.hh>
#include <dune/solvers/common/canignore.hh>
#include <dune/solvers/solvers/solver.hh>
#include <dune/solvers/solvers/linearsolver.hh>
namespace Dune
{
......@@ -29,7 +29,7 @@ namespace Solvers
/** \brief Wraps the UMFPack sparse direct solver */
template <class MatrixType, class VectorType>
class UMFPackSolver
: public Solver, public CanIgnore<Dune::BitSetVector<VectorType::block_type::dimension> >
: public LinearSolver<MatrixType,VectorType>, public CanIgnore<Dune::BitSetVector<VectorType::block_type::dimension> >
{
enum {blocksize = VectorType::block_type::dimension};
......@@ -42,7 +42,7 @@ public:
/** \brief Default constructor */
UMFPackSolver ()
: Solver(NumProc::FULL)
: LinearSolver<MatrixType,VectorType>(NumProc::FULL)
{}
/** \brief Constructor for a linear problem */
......@@ -50,7 +50,7 @@ public:
VectorType& x,
const VectorType& rhs,
NumProc::VerbosityMode verbosity=NumProc::FULL)
: Solver(verbosity),
: LinearSolver<MatrixType,VectorType>(verbosity),
matrix_(&matrix),
x_(&x),
rhs_(&rhs)
......@@ -58,7 +58,7 @@ public:
void setProblem(const MatrixType& matrix,
VectorType& x,
const VectorType& rhs)
const VectorType& rhs) override
{
matrix_ = &matrix;
x_ = &x;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment