From 6963543f289f984934312d9ef7efb5cca670807c Mon Sep 17 00:00:00 2001 From: Timo Koch <timo.koch@iws.uni-stuttgart.de> Date: Tue, 23 Jan 2018 14:12:52 +0100 Subject: [PATCH] [test] Make backward compatible with dune 2.5 --- test/common/geometry/test_1d3d_intersection.cc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/test/common/geometry/test_1d3d_intersection.cc b/test/common/geometry/test_1d3d_intersection.cc index 8f7cf4d6ca..6bd7c148c6 100644 --- a/test/common/geometry/test_1d3d_intersection.cc +++ b/test/common/geometry/test_1d3d_intersection.cc @@ -4,6 +4,7 @@ #include <algorithm> #include <initializer_list> +#include <dune/common/version.hh> #include <dune/common/exceptions.hh> #include <dune/common/parallel/mpihelper.hh> #include <dune/common/fvector.hh> @@ -17,7 +18,11 @@ template<int dimworld = 3> Dune::MultiLinearGeometry<double, 1, dimworld> makeLine(std::initializer_list<Dune::FieldVector<double, dimworld>>&& c) { +#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) return {Dune::GeometryTypes::line, c}; +#else + return {Dune::GeometryType(1), c}; +#endif } template<int dimworld = 3> @@ -55,8 +60,12 @@ int main (int argc, char *argv[]) try }); Dune::MultiLinearGeometry<double, dim, dimworld> +#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) cube(Dune::GeometryTypes::cube(dimworld), cubeCorners); - +#else + Dune::GeometryType geomType; geomType.makeCube(3); + cube(geomType, cubeCorners); +#endif // collect returns to determine exit code -- GitLab