diff --git a/dumux/linear/amgbackend.hh b/dumux/linear/amgbackend.hh index a8992acbb47a14352d5a0a92cc8de277c14c7d00..f23477f426a4bc548ea52d4715c439da2712099b 100644 --- a/dumux/linear/amgbackend.hh +++ b/dumux/linear/amgbackend.hh @@ -24,6 +24,8 @@ #ifndef DUMUX_AMGBACKEND_HH #define DUMUX_AMGBACKEND_HH +#if HAVE_DUNE_PDELAB + #include <dune/pdelab/gridoperator/gridoperator.hh> #include <dune/pdelab/backend/novlpistlsolverbackend.hh> #include <dune/pdelab/backend/ovlpistlsolverbackend.hh> @@ -404,4 +406,5 @@ private: } // namespace Dumux -#endif +#endif // HAVE_DUNE_PDELAB +#endif // DUMUX_AMGBACKEND_HH diff --git a/test/decoupled/2p/test_impesadaptive.cc b/test/decoupled/2p/test_impesadaptive.cc index eb29603786b35a22df545d8730864085397f76df..07389c83eb87c618b242e599887a067f1baaa323 100644 --- a/test/decoupled/2p/test_impesadaptive.cc +++ b/test/decoupled/2p/test_impesadaptive.cc @@ -65,6 +65,6 @@ int main(int argc, char** argv) int main() { std::cerr << "You need to have ALUGrid installed to run this test\n"; - return 1; + return 77; } -#endif +#endif // HAVE_ALUGRID diff --git a/test/decoupled/2p/test_impesproblem.hh b/test/decoupled/2p/test_impesproblem.hh index a1bd73b71742b2341f18d1c4b3714e056f9c21b7..52f35a5dc1dd9103c669fb5e43254a5b2364066b 100644 --- a/test/decoupled/2p/test_impesproblem.hh +++ b/test/decoupled/2p/test_impesproblem.hh @@ -49,8 +49,12 @@ #include<dumux/decoupled/2p/transport/fv/evalcflfluxcoats.hh> #ifdef USE_AMGBACKEND +#if HAVE_DUNE_PDELAB #include <dumux/linear/amgbackend.hh> -#endif +#else // HAVE_DUNE_PDELAB +#warning You have to install dune-pdelab to use the AMG backend. +#endif // HAVE_DUNE_PDELAB +#endif //USE_AMGBACKEND namespace Dumux { @@ -128,7 +132,7 @@ SET_TYPE_PROP(IMPESTestProblem, EvalCflFluxFunction, Dumux::EvalCflFluxCoats<Typ SET_SCALAR_PROP(IMPESTestProblem, ImpetCFLFactor, 0.95); -#ifdef USE_AMGBACKEND +#if defined(USE_AMGBACKEND) && HAVE_DUNE_PDELAB // set up an additional problem where the AMG backend is used NEW_TYPE_TAG(IMPESTestProblemWithAMG, INHERITS_FROM(IMPESTestProblem)); // use the AMG backend for the corresponding test diff --git a/test/decoupled/2p/test_impeswithamg.cc b/test/decoupled/2p/test_impeswithamg.cc index e8b7b98055dae9443e8d85f9bc21afdf1b698c4e..2f3b8d81f9e1a417387f3c6a90badaada604ec17 100644 --- a/test/decoupled/2p/test_impeswithamg.cc +++ b/test/decoupled/2p/test_impeswithamg.cc @@ -24,6 +24,8 @@ */ #include "config.h" +#if HAVE_DUNE_PDELAB + #include "test_impesproblem.hh" #include <dumux/common/start.hh> @@ -63,3 +65,15 @@ int main(int argc, char** argv) typedef TTAG(IMPESTestProblemWithAMG) ProblemTypeTag; return Dumux::start<ProblemTypeTag>(argc, argv, usage); } +#else + +#warning You need to have dune-pdelab installed to run this test + +#include <iostream> + +int main() +{ + std::cerr << "You need to have dune-pdelab installed to run this test\n"; + return 77; +} +#endif // HAVE_DUNE_PDELAB diff --git a/test/implicit/1p/1ptestproblem.hh b/test/implicit/1p/1ptestproblem.hh index b52ee62df123116912c4f095e3192bebd938bd4a..35b8a048b6e48c063727d996f6ac783151037832 100644 --- a/test/implicit/1p/1ptestproblem.hh +++ b/test/implicit/1p/1ptestproblem.hh @@ -39,9 +39,14 @@ #include <dumux/implicit/common/implicitporousmediaproblem.hh> #include <dumux/material/components/simpleh2o.hh> #include <dumux/material/fluidsystems/liquidphase.hh> + #ifdef USE_AMGBACKEND +#if HAVE_DUNE_PDELAB #include <dumux/linear/amgbackend.hh> -#endif +#else // HAVE_DUNE_PDELAB +#warning You have to install dune-pdelab to use the AMG backend. +#endif // HAVE_DUNE_PDELAB +#endif //USE_AMGBACKEND #include "1ptestspatialparams.hh" @@ -87,7 +92,7 @@ SET_INT_PROP(OnePTestProblem, LinearSolverVerbosity, 0); SET_INT_PROP(OnePTestProblem, LinearSolverPreconditionerIterations, 1); SET_SCALAR_PROP(OnePTestProblem, LinearSolverPreconditionerRelaxation, 1.0); -#ifdef USE_AMGBACKEND +#if defined(USE_AMGBACKEND) && HAVE_DUNE_PDELAB NEW_TYPE_TAG(OnePTestBoxProblemWithAMG, INHERITS_FROM(OnePTestBoxProblem)); NEW_TYPE_TAG(OnePTestCCProblemWithAMG, INHERITS_FROM(OnePTestCCProblem)); // Solver settings for the tests using AMG diff --git a/test/implicit/1p/test_box1pwithamg.cc b/test/implicit/1p/test_box1pwithamg.cc index d37ee109c6298cd8656edd4a653a8d3b3213ea30..43def75bcf8bcc933439208511a5faa32b5a689c 100644 --- a/test/implicit/1p/test_box1pwithamg.cc +++ b/test/implicit/1p/test_box1pwithamg.cc @@ -21,6 +21,8 @@ * * \brief test for the one-phase box model */ +#if HAVE_DUNE_PDELAB + #include "config.h" #include "1ptestproblem.hh" #include <dumux/common/start.hh> @@ -62,3 +64,15 @@ int main(int argc, char** argv) typedef TTAG(OnePTestBoxProblemWithAMG) ProblemTypeTag; return Dumux::start<ProblemTypeTag>(argc, argv, usage); } +#else + +#warning You need to have dune-pdelab installed to run this test + +#include <iostream> + +int main() +{ + std::cerr << "You need to have dune-pdelab installed to run this test\n"; + return 77; +} +#endif // HAVE_DUNE_PDELAB diff --git a/test/implicit/1p/test_cc1pwithamg.cc b/test/implicit/1p/test_cc1pwithamg.cc index 22ed34dae32923e86cd7706208b79f061d4c0f25..b0122c6203fbf85914a3734be21d45ce713083c6 100644 --- a/test/implicit/1p/test_cc1pwithamg.cc +++ b/test/implicit/1p/test_cc1pwithamg.cc @@ -21,6 +21,8 @@ * * \brief test for the one-phase box model */ +#if HAVE_DUNE_PDELAB + #include "config.h" #include "1ptestproblem.hh" #include <dumux/common/start.hh> @@ -62,3 +64,15 @@ int main(int argc, char** argv) typedef TTAG(OnePTestCCProblemWithAMG) ProblemTypeTag; return Dumux::start<ProblemTypeTag>(argc, argv, usage); } +#else + +#warning You need to have dune-pdelab installed to run this test + +#include <iostream> + +int main() +{ + std::cerr << "You need to have dune-pdelab installed to run this test\n"; + return 77; +} +#endif // HAVE_DUNE_PDELAB