From f8aea9987c46918d893e3bd795cc305ddc2a6fe3 Mon Sep 17 00:00:00 2001 From: Kilian Weishaupt <kilian.weishaupt@iws.uni-stuttgart.de> Date: Wed, 14 Oct 2020 13:47:57 +0200 Subject: [PATCH] [test][bBoxTree] Adapt to change in Dune::AxisAlignedCubeGeometry * for dim != dimworld, an axes object needs to be passed to the ctor --- test/geometry/boundingboxtree/test_bboxtree.cc | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/test/geometry/boundingboxtree/test_bboxtree.cc b/test/geometry/boundingboxtree/test_bboxtree.cc index 4a1339ed65..24bd246f12 100644 --- a/test/geometry/boundingboxtree/test_bboxtree.cc +++ b/test/geometry/boundingboxtree/test_bboxtree.cc @@ -296,7 +296,19 @@ int main (int argc, char *argv[]) using GeometryType = Dune::AxisAlignedCubeGeometry<Scalar, 2, dimWorld>; GlobalPosition lowerLeftCube = upperRight; lowerLeftCube *= 0.4; GlobalPosition upperRightCube = lowerLeftCube; upperRightCube[0] += 0.2*scaling; upperRightCube[1] += 0.2*scaling; - GeometryType cube(lowerLeftCube, upperRightCube); + + GeometryType cube = [&]() + { + if constexpr (dimWorld == 2) + return GeometryType(lowerLeftCube, upperRightCube); + else + { + std::bitset<dimWorld> axes; + axes.set(0); axes.set(1); + return GeometryType(lowerLeftCube, upperRightCube, axes); + } + }(); + using GeometriesEntitySet = Dumux::GeometriesEntitySet<GeometryType>; GeometriesEntitySet entitySet(std::vector<GeometryType>{cube}); Dumux::BoundingBoxTree<GeometriesEntitySet> geometriesTree(std::make_shared<GeometriesEntitySet>(entitySet)); -- GitLab