From 4b57d1478beb9c491ee545a929bc246ae76e3701 Mon Sep 17 00:00:00 2001 From: Timo Koch <timo.koch@iws.uni-stuttgart.de> Date: Mon, 11 Dec 2017 10:30:13 +0100 Subject: [PATCH] [test] Bboxtree test doesn't need property system --- dumux/common/boundingboxtree.hh | 1 + test/common/boundingboxtree/test_bboxtree.cc | 35 +++++++++----------- 2 files changed, 17 insertions(+), 19 deletions(-) diff --git a/dumux/common/boundingboxtree.hh b/dumux/common/boundingboxtree.hh index 777f644e68..fe9ee19ad6 100644 --- a/dumux/common/boundingboxtree.hh +++ b/dumux/common/boundingboxtree.hh @@ -31,6 +31,7 @@ #include <dune/common/timer.hh> #include <dune/common/exceptions.hh> #include <dumux/common/math.hh> +#include <dumux/common/exceptions.hh> #include <dumux/common/geometrycollision.hh> namespace Dumux { diff --git a/test/common/boundingboxtree/test_bboxtree.cc b/test/common/boundingboxtree/test_bboxtree.cc index 7829e41ce8..0cdccae1a3 100644 --- a/test/common/boundingboxtree/test_bboxtree.cc +++ b/test/common/boundingboxtree/test_bboxtree.cc @@ -1,32 +1,30 @@ #include <config.h> #include <iostream> -#include <unordered_map> -#include <dune/common/parametertreeparser.hh> #include <dune/grid/utility/structuredgridfactory.hh> #include <dune/common/parallel/mpihelper.hh> #include <dune/grid/io/file/vtk.hh> +#include <dune/grid/io/file/gmshreader.hh> +#include <dune/grid/yaspgrid.hh> -#include <dumux/io/gridcreator.hh> -#include <dumux/common/basicproperties.hh> +#if HAVE_DUNE_FOAMGRID +#include <dune/foamgrid/foamgrid.hh> +#include <dune/common/version.hh> +#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) +#include <dune/foamgrid/dgffoam.hh> +#else +#include <dune/foamgrid/dgffoam.cc> +#endif +#endif + +#include <dumux/common/exceptions.hh> #include <dumux/common/boundingboxtree.hh> namespace Dumux { -namespace Properties -{ - NEW_TYPE_TAG(BBoxTreeTest, INHERITS_FROM(NumericModel)); -#if HAVE_UG - SET_TYPE_PROP(BBoxTreeTest, Grid, Dune::UGGrid<3>); -#else - SET_TYPE_PROP(BBoxTreeTest, Grid, Dune::YaspGrid<3>); -#endif -} - -template<class TypeTag> +template<class Grid> class BBoxTreeTests { - using Grid = typename GET_PROP_TYPE(TypeTag, Grid); using GridView = typename Grid::LeafGridView; using Scalar = typename Grid::ctype; enum { dimWorld = Grid::dimensionworld }; @@ -128,8 +126,7 @@ int main (int argc, char *argv[]) try Dune::MPIHelper::instance(argc, argv); // Some aliases two type tags for tests using two grids - using TypeTag = TTAG(BBoxTreeTest); - using Grid = GET_PROP_TYPE(TypeTag, Grid); + using Grid = Dune::YaspGrid<3>; using Scalar = Grid::ctype; enum { dimWorld = Grid::dimensionworld }; enum { dim = Grid::dimension }; @@ -137,7 +134,7 @@ int main (int argc, char *argv[]) try // collect returns to determine exit code std::vector<int> returns; - Dumux::BBoxTreeTests<TypeTag> test; + Dumux::BBoxTreeTests<Grid> test; for (const auto scaling : {1e10, 1.0, 1e-3, 1e-10}) { -- GitLab