Commit a0a753a6 authored by Christoph Grueninger's avatar Christoph Grueninger
Browse files

Fix tests using AMG linear solver backend when PDELab is not present.

(reviewed by bernd)


git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@10261 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent 19a4bec9
......@@ -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
......@@ -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
......@@ -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
......
......@@ -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
......@@ -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
......
......@@ -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
......@@ -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
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