From fbc362e1bdea9652135a0d71a5155aa56af8faa5 Mon Sep 17 00:00:00 2001 From: Timo Koch Date: Sat, 8 May 2021 12:31:44 +0000 Subject: [PATCH] [amg] Add warning for minimal setup without direct solver --- dumux/linear/amgbackend.hh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/dumux/linear/amgbackend.hh b/dumux/linear/amgbackend.hh index d3a9b1d8bd..d4984e82ea 100644 --- a/dumux/linear/amgbackend.hh +++ b/dumux/linear/amgbackend.hh @@ -60,6 +60,8 @@ public: { if (isParallel_) DUNE_THROW(Dune::InvalidStateException, "Using sequential constructor for parallel run. Use signature with gridView and dofMapper!"); + + checkAvailabilityOfDirectSolver_(); } /*! @@ -81,6 +83,7 @@ public: if (isParallel_) phelper_ = std::make_unique>(gridView, dofMapper); #endif + checkAvailabilityOfDirectSolver_(); } /*! @@ -118,6 +121,16 @@ public: } private: + //! see https://gitlab.dune-project.org/core/dune-istl/-/issues/62 + void checkAvailabilityOfDirectSolver_() + { +#if !HAVE_SUPERLU && !HAVE_UMFPACK + std::cout << "\nAMGBiCGSTABBackend: No direct solver backend found. Using iterative solver as coarse grid solver.\n" + << "Note that dune-istl currently hard-codes a tolerance of 1e-2 for the iterative coarse grid solver.\n" + << "This may result in reduced accuracy or performance depending on your setup.\nConsider installing " + << "UMFPack (SuiteSparse) or SuperLU or apply the istl patch, see dumux/patches/README.md." << std::endl; +#endif + } #if HAVE_MPI template -- GitLab