Skip to content
Snippets Groups Projects
Commit aedab540 authored by Bernd Flemisch's avatar Bernd Flemisch
Browse files

Bugfix: the decoupled AMG test now also compiles with an unpatched PDELab....

Bugfix: the decoupled AMG test now also compiles with an unpatched PDELab. This is achieved by setting a corresponding macro in a PDELab header. This should be replaced by a proper configure test after the release. Reviewed by Christoph.

git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@10357 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent 86db3c3f
No related branches found
No related tags found
No related merge requests found
...@@ -48,13 +48,17 @@ ...@@ -48,13 +48,17 @@
#include<dumux/decoupled/2p/transport/fv/evalcflfluxcoats.hh> #include<dumux/decoupled/2p/transport/fv/evalcflfluxcoats.hh>
#ifdef USE_AMGBACKEND
#if HAVE_DUNE_PDELAB #if HAVE_DUNE_PDELAB
// Check if DUNE-PDELab has been patched for our needs.
// TODO: this should be replaced by a proper configure test.
#include <dune/pdelab/backend/istlvectorbackend.hh>
#ifdef DUNE_PDELAB_IS_PATCHED_FOR_DUMUX
#include <dumux/linear/amgbackend.hh> #include <dumux/linear/amgbackend.hh>
#else // HAVE_DUNE_PDELAB #endif // DUNE_PDELAB_IS_PATCHED_FOR_DUMUX
#warning You have to install dune-pdelab to use the AMG backend.
#endif // HAVE_DUNE_PDELAB #endif // HAVE_DUNE_PDELAB
#endif //USE_AMGBACKEND
namespace Dumux namespace Dumux
{ {
...@@ -75,7 +79,7 @@ SET_TYPE_PROP(IMPESTestProblem, GridCreator, Dumux::CubeGridCreator<TypeTag>); ...@@ -75,7 +79,7 @@ SET_TYPE_PROP(IMPESTestProblem, GridCreator, Dumux::CubeGridCreator<TypeTag>);
// Set the grid type // Set the grid type
SET_PROP(IMPESTestProblem, Grid) SET_PROP(IMPESTestProblem, Grid)
{ {
#if HAVE_UG #if 0//HAVE_UG
typedef Dune::UGGrid<2> type; typedef Dune::UGGrid<2> type;
#else #else
typedef Dune::YaspGrid<2> type; typedef Dune::YaspGrid<2> type;
...@@ -132,7 +136,7 @@ SET_TYPE_PROP(IMPESTestProblem, EvalCflFluxFunction, Dumux::EvalCflFluxCoats<Typ ...@@ -132,7 +136,7 @@ SET_TYPE_PROP(IMPESTestProblem, EvalCflFluxFunction, Dumux::EvalCflFluxCoats<Typ
SET_SCALAR_PROP(IMPESTestProblem, ImpetCFLFactor, 0.95); SET_SCALAR_PROP(IMPESTestProblem, ImpetCFLFactor, 0.95);
#if defined(USE_AMGBACKEND) && HAVE_DUNE_PDELAB #ifdef DUNE_PDELAB_IS_PATCHED_FOR_DUMUX
// set up an additional problem where the AMG backend is used // set up an additional problem where the AMG backend is used
NEW_TYPE_TAG(IMPESTestProblemWithAMG, INHERITS_FROM(IMPESTestProblem)); NEW_TYPE_TAG(IMPESTestProblemWithAMG, INHERITS_FROM(IMPESTestProblem));
// use the AMG backend for the corresponding test // use the AMG backend for the corresponding test
......
...@@ -26,6 +26,11 @@ ...@@ -26,6 +26,11 @@
#if HAVE_DUNE_PDELAB #if HAVE_DUNE_PDELAB
// Check if DUNE-PDELab has been patched for our needs.
// TODO: this should be replaced by a proper configure test.
#include <dune/pdelab/backend/istlvectorbackend.hh>
#ifdef DUNE_PDELAB_IS_PATCHED_FOR_DUMUX
#include "test_impesproblem.hh" #include "test_impesproblem.hh"
#include <dumux/common/start.hh> #include <dumux/common/start.hh>
...@@ -65,15 +70,30 @@ int main(int argc, char** argv) ...@@ -65,15 +70,30 @@ int main(int argc, char** argv)
typedef TTAG(IMPESTestProblemWithAMG) ProblemTypeTag; typedef TTAG(IMPESTestProblemWithAMG) ProblemTypeTag;
return Dumux::start<ProblemTypeTag>(argc, argv, usage); return Dumux::start<ProblemTypeTag>(argc, argv, usage);
} }
#else #else // DUNE_PDELAB_IS_PATCHED_FOR_DUMUX
#warning You need to have a patched dune-pdelab to run this test, see ../../../patches/README for details.
#include <iostream>
int main()
{
std::cerr << "You need to have a patched dune-pdelab to run this test, "
"see ../../../patches/README for details." << std::endl;;
return 77;
}
#endif // DUNE_PDELAB_IS_PATCHED_FOR_DUMUX
#else // HAVE_DUNE_PDELAB
#warning You need to have dune-pdelab installed to run this test #warning You need to have dune-pdelab installed and patched to run this test.
#include <iostream> #include <iostream>
int main() int main()
{ {
std::cerr << "You need to have dune-pdelab installed to run this test\n"; std::cerr << "You need to have dune-pdelab installed and patched to run this test.\n";
return 77; return 77;
} }
#endif // HAVE_DUNE_PDELAB #endif // HAVE_DUNE_PDELAB
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