Commit 747d6c0f authored by Bernd Flemisch's avatar Bernd Flemisch
Browse files

Set a preprocessor variable USE_AMGBACKEND for the tests that use the

AMG backend. Checking for this variable avoids that PDELab has to be
patched even if one does not want to use the backend. Not a very elegant
solution, better ones are welcome. 
Brought to attention by Markus. 


git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@10183 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent 3073ff8b
......@@ -12,6 +12,7 @@ test_impes_SOURCES = test_impes.cc
test_impesadaptive_SOURCES = test_impesadaptive.cc
test_impeswithamg_SOURCES = test_impeswithamg.cc
test_impeswithamg_CXXFLAGS = -DUSE_AMGBACKEND
test_transport_SOURCES = test_transport.cc
......
......@@ -48,7 +48,7 @@
#include<dumux/decoupled/2p/transport/fv/evalcflfluxcoats.hh>
#if HAVE_DUNE_PDELAB
#ifdef USE_AMGBACKEND
#include <dumux/linear/amgbackend.hh>
#endif
......@@ -128,7 +128,7 @@ SET_TYPE_PROP(IMPESTestProblem, EvalCflFluxFunction, Dumux::EvalCflFluxCoats<Typ
SET_SCALAR_PROP(IMPESTestProblem, ImpetCFLFactor, 0.95);
#if HAVE_DUNE_PDELAB
#ifdef USE_AMGBACKEND
// 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
......
......@@ -39,7 +39,9 @@
#include <dumux/implicit/common/implicitporousmediaproblem.hh>
#include <dumux/material/components/simpleh2o.hh>
#include <dumux/material/fluidsystems/liquidphase.hh>
#ifdef USE_AMGBACKEND
#include <dumux/linear/amgbackend.hh>
#endif
#include "1ptestspatialparams.hh"
......@@ -53,8 +55,6 @@ namespace Properties
NEW_TYPE_TAG(OnePTestProblem, INHERITS_FROM(OneP));
NEW_TYPE_TAG(OnePTestBoxProblem, INHERITS_FROM(BoxModel, OnePTestProblem));
NEW_TYPE_TAG(OnePTestCCProblem, INHERITS_FROM(CCModel, OnePTestProblem));
NEW_TYPE_TAG(OnePTestBoxProblemWithAMG, INHERITS_FROM(OnePTestBoxProblem));
NEW_TYPE_TAG(OnePTestCCProblemWithAMG, INHERITS_FROM(OnePTestCCProblem));
SET_PROP(OnePTestProblem, Fluid)
{
......@@ -87,9 +87,13 @@ SET_INT_PROP(OnePTestProblem, LinearSolverVerbosity, 0);
SET_INT_PROP(OnePTestProblem, LinearSolverPreconditionerIterations, 1);
SET_SCALAR_PROP(OnePTestProblem, LinearSolverPreconditionerRelaxation, 1.0);
#ifdef USE_AMGBACKEND
NEW_TYPE_TAG(OnePTestBoxProblemWithAMG, INHERITS_FROM(OnePTestBoxProblem));
NEW_TYPE_TAG(OnePTestCCProblemWithAMG, INHERITS_FROM(OnePTestCCProblem));
// Solver settings for the tests using AMG
SET_TYPE_PROP(OnePTestBoxProblemWithAMG, LinearSolver, Dumux::AMGBackend<TypeTag> );
SET_TYPE_PROP(OnePTestCCProblemWithAMG, LinearSolver, Dumux::AMGBackend<TypeTag> );
#endif
// Enable gravity
SET_BOOL_PROP(OnePTestProblem, ProblemEnableGravity, true);
......
......@@ -4,8 +4,13 @@ noinst_HEADERS = *.hh
EXTRA_DIST=*reference.vtu *.input grids/*.dgf CMakeLists.txt
test_box1p_SOURCES = test_box1p.cc
test_cc1p_SOURCES = test_cc1p.cc
test_box1pwithamg_SOURCES = test_box1pwithamg.cc
test_box1pwithamg_CXXFLAGS = -DUSE_AMGBACKEND
test_cc1pwithamg_SOURCES = test_cc1pwithamg.cc
test_cc1pwithamg_CXXFLAGS = -DUSE_AMGBACKEND
include $(top_srcdir)/am/global-rules
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment