diff --git a/dumux/linear/amgbackend.hh b/dumux/linear/amgbackend.hh index 840933a97afea369ecc0b55a7bbe74cf0ba5642e..7c49d40d6b51c1a9273327e65b0c5598014c25fd 100644 --- a/dumux/linear/amgbackend.hh +++ b/dumux/linear/amgbackend.hh @@ -82,8 +82,10 @@ public: const typename LinearSolverTraits::DofMapper& dofMapper, const std::string& paramGroup = "") : LinearSolver(paramGroup) +#if HAVE_MPI , phelper_(std::make_shared<ParallelISTLHelper<LinearSolverTraits>>(gridView, dofMapper)) , isParallel_(Dune::MPIHelper::getCollectiveCommunication().size() > 1) +#endif { reset(); } @@ -224,9 +226,11 @@ private: solver.apply(x, b, result_); } +#if HAVE_MPI std::shared_ptr<ParallelISTLHelper<LinearSolverTraits>> phelper_; +#endif Dune::InverseOperatorResult result_; - bool isParallel_; + bool isParallel_ = false; bool firstCall_; };