Commit 60c678f8 authored by Bernd Flemisch's avatar Bernd Flemisch
Browse files

test_diffusion3d: allow either ALUGrid or UGGrid, but not YaspGrid. Add proper...

test_diffusion3d: allow either ALUGrid or UGGrid, but not YaspGrid. Add proper preprocessor decisions. Add flags for CMake test.

git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@11492 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent 995fd03b
......@@ -18,6 +18,8 @@ add_test(test_diffusion
3)
add_executable("test_diffusion3d" EXCLUDE_FROM_ALL test_diffusion3d.cc)
add_dune_alugrid_flags(test_diffusion3d)
add_dune_ug_flags(test_diffusion3d)
add_test(test_diffusion3d
${CMAKE_SOURCE_DIR}/bin/runTest.sh
${CMAKE_SOURCE_DIR}/bin/fuzzycomparevtu.py
......
......@@ -25,7 +25,8 @@
*/
#include "config.h"
#include <iostream>
#include <boost/format.hpp>
#if HAVE_ALUGRID | HAVE_UGGRID
#include <dune/common/exceptions.hh>
#include <dune/common/version.hh>
......@@ -230,3 +231,13 @@ int main(int argc, char** argv)
return 3;
}
#else
#warning You need to have ALUGrid or UG installed to run this test
int main()
{
std::cerr << "You need to have ALUGrid or UG installed to run this test\n";
return 77;
}
#endif // HAVE_ALUGRID | HAVE_UGGRID
......@@ -22,11 +22,10 @@
#ifndef DUMUX_TEST_DIFFUSION_3D_PROBLEM_HH
#define DUMUX_TEST_DIFFUSION_3D_PROBLEM_HH
#if HAVE_ALUGRID
#include <dune/grid/alugrid/3d/alugrid.hh>
#endif
#include <dune/grid/yaspgrid.hh>
#if HAVE_ALUGRID | HAVE_UGGRID
#include <dune/grid/alugrid/3d/alugrid.hh>
#include <dune/grid/uggrid.hh>
#include <dumux/material/components/unit.hh>
#include <dumux/decoupled/2p/diffusion/fv/fvpressureproperties2p.hh>
......@@ -54,14 +53,11 @@ namespace Properties
NEW_TYPE_TAG(DiffusionTestProblem, INHERITS_FROM(DecoupledTwoP, TestDiffusionSpatialParams3d));
// Set the grid type
SET_PROP(DiffusionTestProblem, Grid)
{
#if HAVE_ALUGRID
typedef Dune::ALUGrid<3, 3, Dune::cube, Dune::nonconforming> type;
SET_TYPE_PROP(DiffusionTestProblem, Grid, Dune::ALUGrid<3, 3, Dune::cube, Dune::nonconforming>);
#else
typedef Dune::YaspGrid<3> type;
SET_TYPE_PROP(DiffusionTestProblem, Grid, Dune::UGGrid<3>);
#endif
};
SET_TYPE_PROP(DiffusionTestProblem, Problem, Dumux::TestDiffusion3DProblem<TypeTag>);
......@@ -276,4 +272,6 @@ private:
};
} //end namespace
#endif // HAVE_ALUGRID | HAVE_UGGRID
#endif
......@@ -171,6 +171,8 @@ int main(int argc, char** argv)
std::cout<<"Default to finite volume MPFA l-method model\n";
return startReturn;
}
return 0;
}
#else
......
......@@ -65,7 +65,8 @@ NEW_TYPE_TAG(ThreeDTwoPTestProblem, INHERITS_FROM(Test3d2pSpatialParams));
// Set the grid type
SET_PROP(ThreeDTwoPTestProblem, Grid)
{
typedef Dune::ALUGrid<3, 3, Dune::cube, Dune::nonconforming> type;
typedef Dune::UGGrid<3> type;
// typedef Dune::ALUGrid<3, 3, Dune::cube, Dune::nonconforming> type;
};
// Set the problem property
......
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