Skip to content
Snippets Groups Projects
Commit 22f4a9a8 authored by Timo Koch's avatar Timo Koch
Browse files

Merge branch 'Fix/compilation-fails-with-missing-umfpack' into 'master'

[sovler] Fix preprocessor guards in case UMFPack is not present

Closes #857

See merge request !1962
parents 1a5ffc50 7f286673
No related branches found
No related tags found
1 merge request!1962[sovler] Fix preprocessor guards in case UMFPack is not present
......@@ -91,7 +91,6 @@ class SeqUzawa : public Dune::Preconditioner<X,Y>
using LinearOperator = Dune::MatrixAdapter<A, U, U>;
using Smoother = Dune::SeqSSOR<A, U, U>;
using AMGSolverForA = Dune::Amg::AMG<LinearOperator, U, Smoother, Comm>;
using UMFPackSolverForA = Dune::UMFPack<A>;
public:
//! \brief The matrix type the preconditioner is for.
......@@ -217,7 +216,7 @@ private:
{
#if HAVE_UMFPACK
using namespace Dune::Indices;
umfPackSolverForA_ = std::make_unique<UMFPackSolverForA>(matrix_[_0][_0]);
umfPackSolverForA_ = std::make_unique<Dune::UMFPack<A>>(matrix_[_0][_0]);
#else
DUNE_THROW(Dune::InvalidStateException, "UMFPack not available. Use LinearSolver.Preconditioner.DirectVelocitySolver = false.");
#endif
......@@ -324,7 +323,7 @@ private:
std::unique_ptr<AMGSolverForA> amgSolverForA_;
#if HAVE_UMFPACK
std::unique_ptr<UMFPackSolverForA> umfPackSolverForA_;
std::unique_ptr<Dune::UMFPack<A>> umfPackSolverForA_;
#endif
const std::string paramGroup_;
const bool useDirectVelocitySolverForA_;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment