Skip to content
Snippets Groups Projects
Commit 4b57d147 authored by Timo Koch's avatar Timo Koch
Browse files

[test] Bboxtree test doesn't need property system

parent f25a014f
No related branches found
No related tags found
1 merge request!617[WIP] Next
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include <dune/common/timer.hh> #include <dune/common/timer.hh>
#include <dune/common/exceptions.hh> #include <dune/common/exceptions.hh>
#include <dumux/common/math.hh> #include <dumux/common/math.hh>
#include <dumux/common/exceptions.hh>
#include <dumux/common/geometrycollision.hh> #include <dumux/common/geometrycollision.hh>
namespace Dumux { namespace Dumux {
......
#include <config.h> #include <config.h>
#include <iostream> #include <iostream>
#include <unordered_map>
#include <dune/common/parametertreeparser.hh>
#include <dune/grid/utility/structuredgridfactory.hh> #include <dune/grid/utility/structuredgridfactory.hh>
#include <dune/common/parallel/mpihelper.hh> #include <dune/common/parallel/mpihelper.hh>
#include <dune/grid/io/file/vtk.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> #if HAVE_DUNE_FOAMGRID
#include <dumux/common/basicproperties.hh> #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> #include <dumux/common/boundingboxtree.hh>
namespace Dumux { namespace Dumux {
namespace Properties template<class Grid>
{
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>
class BBoxTreeTests class BBoxTreeTests
{ {
using Grid = typename GET_PROP_TYPE(TypeTag, Grid);
using GridView = typename Grid::LeafGridView; using GridView = typename Grid::LeafGridView;
using Scalar = typename Grid::ctype; using Scalar = typename Grid::ctype;
enum { dimWorld = Grid::dimensionworld }; enum { dimWorld = Grid::dimensionworld };
...@@ -128,8 +126,7 @@ int main (int argc, char *argv[]) try ...@@ -128,8 +126,7 @@ int main (int argc, char *argv[]) try
Dune::MPIHelper::instance(argc, argv); Dune::MPIHelper::instance(argc, argv);
// Some aliases two type tags for tests using two grids // Some aliases two type tags for tests using two grids
using TypeTag = TTAG(BBoxTreeTest); using Grid = Dune::YaspGrid<3>;
using Grid = GET_PROP_TYPE(TypeTag, Grid);
using Scalar = Grid::ctype; using Scalar = Grid::ctype;
enum { dimWorld = Grid::dimensionworld }; enum { dimWorld = Grid::dimensionworld };
enum { dim = Grid::dimension }; enum { dim = Grid::dimension };
...@@ -137,7 +134,7 @@ int main (int argc, char *argv[]) try ...@@ -137,7 +134,7 @@ int main (int argc, char *argv[]) try
// collect returns to determine exit code // collect returns to determine exit code
std::vector<int> returns; std::vector<int> returns;
Dumux::BBoxTreeTests<TypeTag> test; Dumux::BBoxTreeTests<Grid> test;
for (const auto scaling : {1e10, 1.0, 1e-3, 1e-10}) for (const auto scaling : {1e10, 1.0, 1e-3, 1e-10})
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment