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

[test_navierstokes, tutorial_coupled]

Fix compilation without ALUGrid.
(reviewied by bernd)


git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@9039 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent a71279f9
......@@ -31,6 +31,10 @@
#warning UG or ALUGrid necessary for this test.
#endif
#if !HAVE_SUPERLU
#warning SuperLU necessary for this test.
#endif
#include <dune/grid/io/file/dgfparser.hh>
#include <dumux/material/fluidsystems/h2on2fluidsystem.hh>
......@@ -55,6 +59,8 @@ namespace Dumux
SET_TYPE_PROP(NavierStokesTestProblem, Grid, Dune::ALUGrid<2, 2, Dune::cube, Dune::nonconforming>);
#elif HAVE_UG
SET_TYPE_PROP(NavierStokesTestProblem, Grid, Dune::UGGrid<2>);
#else
SET_TYPE_PROP(NavierStokesTestProblem, Grid, Dune::YaspGrid<2>);
#endif
// Set the problem property
......
......@@ -51,12 +51,11 @@ void usage(const char *progName, const std::string &errorMsg)
int main(int argc, char** argv)
{
#if HAVE_SUPERLU
#if HAVE_SUPERLU && (HAVE_ALUGRID || HAVE_UG)
typedef TTAG(NavierStokesTestProblem) ProblemTypeTag;
return Dumux::start<ProblemTypeTag>(argc, argv, usage);
#else
#warning "No SuperLU installed. Stokes currently only works with SuperLU."
std::cout << "No SuperLU installed. Stokes currently only works with SuperLU." << std::endl;
return 1;
std::cout << "Test skipped, it needs SuperLU and ALUGrid or UG." << std::endl;
return 77;
#endif
}
......@@ -31,7 +31,11 @@
#include <dumux/boxmodels/common/porousmediaboxproblem.hh>
// The DUNE grid used
#if HAVE_ALUGRID
#include <dune/grid/alugrid.hh>
#else
#include <dune/grid/yaspgrid.hh>
#endif // HAVE_ALUGRID
// Spatially dependent parameters
#include "tutorialspatialparams_coupled.hh"
......@@ -55,7 +59,12 @@ SET_PROP(TutorialProblemCoupled, Problem) /*@\label{tutorial-coupled:set-problem
{ typedef Dumux::TutorialProblemCoupled<TypeTag> type;};
// Set grid and the grid creator to be used
#if HAVE_ALUGRID
SET_TYPE_PROP(TutorialProblemCoupled, Grid, Dune::ALUCubeGrid</*dim=*/2,2>); /*@\label{tutorial-coupled:set-grid}@*/
#else
SET_TYPE_PROP(TutorialProblemCoupled, Grid, Dune::YaspGrid<2>);
#warning If you want to use adaptivity, install and use ALUGrid.
#endif // HAVE_ALUGRID
SET_TYPE_PROP(TutorialProblemCoupled, GridCreator, Dumux::CubeGridCreator<TypeTag>); /*@\label{tutorial-coupled:set-gridcreator}@*/
// Set the wetting phase
......
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