diff --git a/dumux/assembly/staggeredlocalassembler.hh b/dumux/assembly/staggeredlocalassembler.hh index a848fca6419690f77eb76b3e677b4179911f2443..7fee790e90021ea1791e3480475ffeb2338e619d 100644 --- a/dumux/assembly/staggeredlocalassembler.hh +++ b/dumux/assembly/staggeredlocalassembler.hh @@ -26,12 +26,8 @@ #define DUMUX_STAGGERED_LOCAL_ASSEMBLER_HH #include <dune/common/version.hh> -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) #include <dune/common/hybridutilities.hh> #include <dune/common/rangeutilities.hh> -#else -#include <dumux/common/intrange.hh> -#endif #include <dune/istl/matrixindexset.hh> #include <dune/istl/bvector.hh> @@ -601,11 +597,7 @@ protected: static auto priVarIndices_(typename FVGridGeometry::DofTypeIndices::CellCenterIdx) { constexpr auto numEqCellCenter = GET_PROP_VALUE(TypeTag, NumEqCellCenter); -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) return Dune::range(0, numEqCellCenter); -#else - return IntRange(0, numEqCellCenter); -#endif } //! Helper function that returns an iterable range of primary variable indices. @@ -613,11 +605,7 @@ protected: static auto priVarIndices_(typename FVGridGeometry::DofTypeIndices::FaceIdx) { constexpr auto numEqFace = GET_PROP_VALUE(TypeTag, NumEqFace); - #if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) return Dune::range(0, numEqFace); - #else - return IntRange(0, numEqFace); - #endif } private: diff --git a/dumux/common/defaultmappertraits.hh b/dumux/common/defaultmappertraits.hh index 9686dbed964eb121948da40a9b398f6a32dc5907..e36274aea316b88b68a376596f294642ad7b5cbb 100644 --- a/dumux/common/defaultmappertraits.hh +++ b/dumux/common/defaultmappertraits.hh @@ -32,13 +32,8 @@ namespace Dumux { template <class GridView> struct DefaultMapperTraits { -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) using ElementMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView>; using VertexMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView>; -#else - using ElementMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView, Dune::MCMGElementLayout>; - using VertexMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView, Dune::MCMGVertexLayout>; -#endif }; } // namespace Dumux diff --git a/dumux/common/geometry/geometricentityset.hh b/dumux/common/geometry/geometricentityset.hh index acc4537516fb1a1bd95e6dcbe7d628b01cd32462..686c59e4edf33d31f0081d581a2e741e038f3d8f 100644 --- a/dumux/common/geometry/geometricentityset.hh +++ b/dumux/common/geometry/geometricentityset.hh @@ -40,21 +40,12 @@ namespace Dumux { template <class GridView, int codim = 0> class GridViewGeometricEntitySet { -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) using Mapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView>; -#else - // Only works for codim == 0, fixed in dune version 2.6 - using Mapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView, Dune::MCMGElementLayout>; -#endif using Entity = typename GridView::template Codim<codim>::Entity; public: GridViewGeometricEntitySet(const GridView& gridView) : gridView_(gridView) -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) , mapper_(gridView, Dune::mcmgLayout(Dune::Codim<codim>())) -#else - , mapper_(gridView) -#endif , entityMap_(std::make_shared<EntityMap<GridView, codim>>(gridView.grid(), mapper_)) {} diff --git a/dumux/common/geometry/geometryintersection.hh b/dumux/common/geometry/geometryintersection.hh index 669cda7caf9b9b2f31207dbf993195eae9b7eb79..deabdfb94ee7026d22e96a78650abccf102fefa7 100644 --- a/dumux/common/geometry/geometryintersection.hh +++ b/dumux/common/geometry/geometryintersection.hh @@ -228,13 +228,8 @@ public: using PolyhedronFaceGeometry = Dune::MultiLinearGeometry<ctype, 2, dimworld>; using SegGeometry = Dune::MultiLinearGeometry<ctype, 1, dimworld>; -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) const auto referenceElement1 = ReferenceElementsGeo1::general(geo1.type()); const auto referenceElement2 = ReferenceElementsGeo2::general(geo2.type()); -#else - const auto& referenceElement1 = ReferenceElementsGeo1::general(geo1.type()); - const auto& referenceElement2 = ReferenceElementsGeo2::general(geo2.type()); -#endif // add intersection points of all polyhedron edges (codim dim-1) with the polygon for (int i = 0; i < referenceElement1.size(dim1-1); ++i) @@ -242,12 +237,7 @@ public: const auto localEdgeGeom = referenceElement1.template geometry<dim1-1>(i); const auto p = geo1.global(localEdgeGeom.corner(0)); const auto q = geo1.global(localEdgeGeom.corner(1)); -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) const auto segGeo = SegGeometry(Dune::GeometryTypes::line, std::vector<Point>{p, q}); -#else - static const Dune::GeometryType gt(1); - const auto segGeo = SegGeometry(gt, std::vector<Point>{p, q}); -#endif using PolySegTest = GeometryIntersection<Geometry2, SegGeometry>; typename PolySegTest::IntersectionType intersection; @@ -267,24 +257,16 @@ public: const auto b = geo1.global(localFaceGeo.corner(1)); const auto c = geo1.global(localFaceGeo.corner(2)); const auto d = geo1.global(localFaceGeo.corner(3)); -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) + return PolyhedronFaceGeometry(Dune::GeometryTypes::cube(2), std::vector<Point>{a, b, c, d}); -#else - static const Dune::GeometryType gt(Dune::GeometryType::cube, 2); - return PolyhedronFaceGeometry(gt, std::vector<Point>{a, b, c, d}); -#endif } else { const auto a = geo1.global(localFaceGeo.corner(0)); const auto b = geo1.global(localFaceGeo.corner(1)); const auto c = geo1.global(localFaceGeo.corner(2)); -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) + return PolyhedronFaceGeometry(Dune::GeometryTypes::simplex(2), std::vector<Point>{a, b, c}); -#else - static const Dune::GeometryType gt(Dune::GeometryType::simplex, 2); - return PolyhedronFaceGeometry(gt, std::vector<Point>{a, b, c}); -#endif } }(); @@ -293,12 +275,8 @@ public: const auto localEdgeGeom = referenceElement2.template geometry<1>(j); const auto p = geo2.global(localEdgeGeom.corner(0)); const auto q = geo2.global(localEdgeGeom.corner(1)); -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) + const auto segGeo = SegGeometry(Dune::GeometryTypes::line, std::vector<Point>{p, q}); -#else - static const Dune::GeometryType gt(1); - const auto segGeo = SegGeometry(gt, std::vector<Point>{p, q}); -#endif using PolySegTest = GeometryIntersection<PolyhedronFaceGeometry, SegGeometry>; typename PolySegTest::IntersectionType intersection; diff --git a/dumux/common/geometry/makegeometry.hh b/dumux/common/geometry/makegeometry.hh index c766fdb00c25ea063a9f64e783ff8a7608352051..ba1471ac5de458ea067a7b4968c4a78cb11bac57 100644 --- a/dumux/common/geometry/makegeometry.hh +++ b/dumux/common/geometry/makegeometry.hh @@ -126,14 +126,7 @@ auto makeDuneQuadrilaterial(const std::vector<Dune::FieldVector<Scalar, 3>>& poi // if no sanity check if desired, use the given points directly to construct the geometry if(!enableSanityCheck) -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) return GeometryType(Dune::GeometryTypes::quadrilateral, points); -#else - { - static Dune::GeometryType gt(Dune::GeometryType::cube, dim); - return GeometryType(gt, points); - } -#endif // otherwise, perform a number of checks and corrections if(!pointsAreCoplanar(points)) @@ -146,12 +139,7 @@ auto makeDuneQuadrilaterial(const std::vector<Dune::FieldVector<Scalar, 3>>& poi if(std::any_of(orientations.begin(), orientations.end(), [](auto i){ return i == 0; })) DUNE_THROW(Dune::InvalidStateException, "More than two points lie on the same line."); -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) const auto quadrilateral = GeometryType(Dune::GeometryTypes::quadrilateral, corners); -#else - static Dune::GeometryType gt(Dune::GeometryType::cube, dim); - const auto quadrilateral = GeometryType(gt, corners); -#endif const auto eps = 1e-20; if(quadrilateral.volume() < eps) diff --git a/dumux/common/intersectionmapper.hh b/dumux/common/intersectionmapper.hh index 5599c97eee00f46e206a6ff0087bf28c21fad1ec..8bad3ff9e6ad8a6c8b6284b42dfbdbcaa454a019 100644 --- a/dumux/common/intersectionmapper.hh +++ b/dumux/common/intersectionmapper.hh @@ -188,20 +188,12 @@ class IntersectionMapper enum {dim=Grid::dimension}; using Element = typename Grid::template Codim<0>::Entity; using Intersection = typename GridView::Intersection; -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) using ElementMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView>; -#else - using ElementMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView, Dune::MCMGElementLayout>; -#endif public: IntersectionMapper(const GridView& gridview) : gridView_(gridview) -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) , elementMapper_(gridView_, Dune::mcmgElementLayout()) -#else - , elementMapper_(gridView_) -#endif , size_(gridView_.size(1)) , intersectionMapGlobal_(gridView_.size(0)) , intersectionMapLocal_(gridView_.size(0)) diff --git a/dumux/common/staggeredfvproblem.hh b/dumux/common/staggeredfvproblem.hh index a517417d81c0234901f11337bf1668effe789188..d5b669f9b0f0ab1ca8a58d04e8787da0d8070f29 100644 --- a/dumux/common/staggeredfvproblem.hh +++ b/dumux/common/staggeredfvproblem.hh @@ -25,11 +25,7 @@ #define DUMUX_STAGGERD_FV_PROBLEM_HH #include <dune/common/version.hh> -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) #include <dune/common/rangeutilities.hh> -#else -#include <dumux/common/intrange.hh> -#endif #include <dumux/common/properties.hh> #include <dumux/common/fvproblem.hh> @@ -227,11 +223,7 @@ protected: static auto priVarIndices_(typename FVGridGeometry::DofTypeIndices::CellCenterIdx) { constexpr auto numEqCellCenter = GET_PROP_VALUE(TypeTag, NumEqCellCenter); -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) return Dune::range(0, numEqCellCenter); -#else - return IntRange(0, numEqCellCenter); -#endif } //! Helper function that returns an iterable range of primary variable indices. @@ -239,11 +231,7 @@ protected: static auto priVarIndices_(typename FVGridGeometry::DofTypeIndices::FaceIdx) { constexpr auto numEqFace = GET_PROP_VALUE(TypeTag, NumEqFace); -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) return Dune::range(0, numEqFace); -#else - return IntRange(0, numEqFace); -#endif } }; diff --git a/dumux/discretization/basefvgridgeometry.hh b/dumux/discretization/basefvgridgeometry.hh index b7fd9c2e0076fd66b76e3fb8dffe6259e3f270ad..d0a6b4b9d2250ff3ccabc399c54bef3fe701e860 100644 --- a/dumux/discretization/basefvgridgeometry.hh +++ b/dumux/discretization/basefvgridgeometry.hh @@ -67,13 +67,8 @@ public: //! Constructor computes the bouding box of the entire domain, for e.g. setting boundary conditions BaseFVGridGeometry(const GridView& gridView) : gridView_(gridView) -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) , elementMapper_(gridView, Dune::mcmgElementLayout()) , vertexMapper_(gridView, Dune::mcmgVertexLayout()) -#else - , elementMapper_(gridView) - , vertexMapper_(gridView) -#endif , bBoxMin_(std::numeric_limits<double>::max()) , bBoxMax_(-std::numeric_limits<double>::max()) { diff --git a/dumux/discretization/box/boxgeometryhelper.hh b/dumux/discretization/box/boxgeometryhelper.hh index 9d72c54b0b9de5aea3ec31b650bdf44156519946..d1fadc2d0495efc5961e92dbc98b6cd969cf9b7f 100644 --- a/dumux/discretization/box/boxgeometryhelper.hh +++ b/dumux/discretization/box/boxgeometryhelper.hh @@ -141,11 +141,7 @@ public: : elementGeometry_(geometry) , corners_(geometry.corners()) { -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) const auto referenceElement = ReferenceElements::general(geometry.type()); -#else - const auto& referenceElement = ReferenceElements::general(geometry.type()); -#endif // the element center p[0] = geometry.center(); @@ -255,11 +251,7 @@ public: const typename Intersection::Geometry& isGeom, unsigned int indexInIntersection) const { -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) const auto referenceElement = ReferenceElements::general(elementGeometry_.type()); -#else - const auto& referenceElement = ReferenceElements::general(elementGeometry_.type()); -#endif const auto vIdxLocal = referenceElement.subEntity(is.indexInInside(), 1, indexInIntersection, dim); if (indexInIntersection == 0) @@ -368,11 +360,7 @@ public: : elementGeometry_(geometry) , corners_(geometry.corners()) { -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) const auto referenceElement = ReferenceElements::general(geometry.type()); -#else - const auto& referenceElement = ReferenceElements::general(geometry.type()); -#endif // the element center p[0] = geometry.center(); @@ -517,14 +505,8 @@ public: const typename Intersection::Geometry& geometry, unsigned int indexInIntersection) const { - -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) const auto referenceElement = ReferenceElements::general(elementGeometry_.type()); const auto faceRefElem = FaceReferenceElements::general(geometry.type()); -#else - const auto& referenceElement = ReferenceElements::general(elementGeometry_.type()); - const auto& faceRefElem = FaceReferenceElements::general(geometry.type()); -#endif GlobalPosition pi[9]; auto corners = geometry.corners(); diff --git a/dumux/discretization/box/fvelementgeometry.hh b/dumux/discretization/box/fvelementgeometry.hh index fd1df112b82c9d38baa9a82863a6a75207ee25e6..c4ef5e65895b44d0de204846c05d5350703420a4 100644 --- a/dumux/discretization/box/fvelementgeometry.hh +++ b/dumux/discretization/box/fvelementgeometry.hh @@ -272,11 +272,7 @@ private: // get the element geometry auto elementGeometry = element.geometry(); -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) const auto referenceElement = ReferenceElements::general(elementGeometry.type()); -#else - const auto& referenceElement = ReferenceElements::general(elementGeometry.type()); -#endif // get the sub control volume geometries of this element GeometryHelper geometryHelper(elementGeometry); diff --git a/dumux/discretization/box/fvgridgeometry.hh b/dumux/discretization/box/fvgridgeometry.hh index 06429cb2db05b58981c15058850340b89f136faa..964191b76adb1bc62837c8d4037138ce3d501af1 100644 --- a/dumux/discretization/box/fvgridgeometry.hh +++ b/dumux/discretization/box/fvgridgeometry.hh @@ -165,11 +165,7 @@ public: // get the element geometry auto elementGeometry = element.geometry(); -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) const auto referenceElement = ReferenceElements::general(elementGeometry.type()); -#else - const auto& referenceElement = ReferenceElements::general(elementGeometry.type()); -#endif // instantiate the geometry helper GeometryHelper geometryHelper(elementGeometry); @@ -362,11 +358,7 @@ public: numScvf_ += element.subEntities(dim-1); const auto elementGeometry = element.geometry(); -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) const auto referenceElement = ReferenceElements::general(elementGeometry.type()); -#else - const auto& referenceElement = ReferenceElements::general(elementGeometry.type()); -#endif // store the sub control volume face indices on the domain boundary for (const auto& intersection : intersections(this->gridView(), element)) diff --git a/dumux/discretization/box/subcontrolvolume.hh b/dumux/discretization/box/subcontrolvolume.hh index b3811e9c6e333992684d834253757d857dc08db3..68e10116976f3bffaa8c0cc38cc5e9bada435413 100644 --- a/dumux/discretization/box/subcontrolvolume.hh +++ b/dumux/discretization/box/subcontrolvolume.hh @@ -138,11 +138,7 @@ public: // e.g. for integration Geometry geometry() const { -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) return Geometry(Dune::GeometryTypes::cube(dim), corners_); -#else - return Geometry(Dune::GeometryType(Dune::GeometryType::cube, dim), corners_); -#endif } //! The element-local index of the dof this scv is embedded in diff --git a/dumux/discretization/box/subcontrolvolumeface.hh b/dumux/discretization/box/subcontrolvolumeface.hh index f5709a5d395591ee124c0a776f5cfdb68d850fd8..9a0a0420233dd454a750615408cfbd1123c0af30 100644 --- a/dumux/discretization/box/subcontrolvolumeface.hh +++ b/dumux/discretization/box/subcontrolvolumeface.hh @@ -210,11 +210,7 @@ public: //! The geometry of the sub control volume face Geometry geometry() const { -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) return Geometry(Dune::GeometryTypes::cube(Geometry::mydimension), corners_); -#else - return Geometry(Dune::GeometryType(Dune::GeometryType::cube, Geometry::mydimension), corners_); -#endif } //! Return the boundary flag diff --git a/dumux/discretization/cellcentered/mpfa/fvelementgeometry.hh b/dumux/discretization/cellcentered/mpfa/fvelementgeometry.hh index 1d0a9f19c829b3a1243924fbaec1046e23561144..be31dde46ce7514ddb6a052a23bc74a6b8f273d6 100644 --- a/dumux/discretization/cellcentered/mpfa/fvelementgeometry.hh +++ b/dumux/discretization/cellcentered/mpfa/fvelementgeometry.hh @@ -368,11 +368,7 @@ private: const auto& e = useNeighbor ? is.outside() : element; const auto indexInElement = useNeighbor ? is.indexInOutside() : is.indexInInside(); const auto eg = e.geometry(); -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) const auto refElement = ReferenceElements::general(eg.type()); -#else - const auto& refElement = ReferenceElements::general(eg.type()); -#endif // Set up a container with all relevant positions for scvf corner computation const auto numCorners = is.geometry().corners(); @@ -452,11 +448,7 @@ private: const auto& e = useNeighbor ? is.outside() : element; const auto indexInElement = useNeighbor ? is.indexInOutside() : is.indexInInside(); const auto eg = e.geometry(); -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) const auto refElement = ReferenceElements::general(eg.type()); -#else - const auto& refElement = ReferenceElements::general(eg.type()); -#endif // Set up a container with all relevant positions for scvf corner computation const auto numCorners = is.geometry().corners(); diff --git a/dumux/discretization/cellcentered/mpfa/fvgridgeometry.hh b/dumux/discretization/cellcentered/mpfa/fvgridgeometry.hh index d4290f0068cf4b5f33d7d99a22c436437896e0c1..80a8cf99e0a0f52ae3b656da117f87274e32acc1 100644 --- a/dumux/discretization/cellcentered/mpfa/fvgridgeometry.hh +++ b/dumux/discretization/cellcentered/mpfa/fvgridgeometry.hh @@ -226,11 +226,7 @@ public: const auto& e = useNeighbor ? is.outside() : element; const auto indexInElement = useNeighbor ? is.indexInOutside() : indexInInside; const auto eg = e.geometry(); -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) const auto refElement = ReferenceElements::general(eg.type()); -#else - const auto& refElement = ReferenceElements::general(eg.type()); -#endif // Set up a container with all relevant positions for scvf corner computation const auto numCorners = is.geometry().corners(); @@ -585,11 +581,7 @@ public: const auto& e = useNeighbor ? is.outside() : element; const auto indexInElement = useNeighbor ? is.indexInOutside() : indexInInside; const auto eg = e.geometry(); -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) const auto refElement = ReferenceElements::general(eg.type()); -#else - const auto& refElement = ReferenceElements::general(eg.type()); -#endif // evaluate if vertices on this intersection use primary/secondary IVs const bool isBranchingPoint = dim < dimWorld ? outsideIndices[indexInInside].size() > 1 : false; diff --git a/dumux/discretization/cellcentered/mpfa/helper.hh b/dumux/discretization/cellcentered/mpfa/helper.hh index dac6e546245690ca97c9da50c658cfe2050b0581..3e7858c563679884de182eb74a8d15197fd8de92 100644 --- a/dumux/discretization/cellcentered/mpfa/helper.hh +++ b/dumux/discretization/cellcentered/mpfa/helper.hh @@ -106,7 +106,6 @@ public: */ static std::size_t getGlobalNumScvf(const GridView& gridView) { -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) assert(gridView.size(Dune::GeometryTypes::triangle) + gridView.size(Dune::GeometryTypes::quadrilateral) == gridView.size(0)); @@ -114,13 +113,6 @@ public: * getNumLocalScvfs(Dune::GeometryTypes::triangle) + gridView.size(Dune::GeometryTypes::quadrilateral) * getNumLocalScvfs(Dune::GeometryTypes::quadrilateral); -#else - assert(gridView.size(Dune::GeometryType(Dune::GeometryType::simplex, 2)) - + gridView.size(Dune::GeometryType(Dune::GeometryType::cube, 2)) == gridView.size(0)); - - return gridView.size(Dune::GeometryType(Dune::GeometryType::simplex, 2))*6 - + gridView.size(Dune::GeometryType(Dune::GeometryType::cube, 2))*8; -#endif } /*! @@ -200,21 +192,12 @@ public: */ static std::size_t getNumLocalScvfs(const Dune::GeometryType gt) { -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) if (gt == Dune::GeometryTypes::triangle) return 6; else if (gt == Dune::GeometryTypes::quadrilateral) return 8; else DUNE_THROW(Dune::NotImplemented, "Mpfa for 2d geometry type " << gt); -#else - if (gt.isTriangle()) - return 6; - else if (gt.isQuadrilateral()) - return 8; - else - DUNE_THROW(Dune::NotImplemented, "Mpfa for 2d geometry type " << gt); -#endif } }; @@ -347,7 +330,6 @@ public: */ static std::size_t getGlobalNumScvf(const GridView& gridView) { -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) assert(gridView.size(Dune::GeometryTypes::tetrahedron) + gridView.size(Dune::GeometryTypes::pyramid) + gridView.size(Dune::GeometryTypes::prism) @@ -361,17 +343,6 @@ public: * getNumLocalScvfs(Dune::GeometryTypes::prism) + gridView.size(Dune::GeometryTypes::hexahedron) * getNumLocalScvfs(Dune::GeometryTypes::hexahedron); -#else - assert(gridView.size(Dune::GeometryType(Dune::GeometryType::simplex, 3)) - + gridView.size(Dune::GeometryType(Dune::GeometryType::pyramid, 3)) - + gridView.size(Dune::GeometryType(Dune::GeometryType::prism, 3)) - + gridView.size(Dune::GeometryType(Dune::GeometryType::cube, 3)) == gridView.size(0)); - - return gridView.size(Dune::GeometryType(Dune::GeometryType::simplex, 3))*12 - + gridView.size(Dune::GeometryType(Dune::GeometryType::pyramid, 3))*16 - + gridView.size(Dune::GeometryType(Dune::GeometryType::prism, 3))*18 - + gridView.size(Dune::GeometryType(Dune::GeometryType::cube, 3))*24; -#endif } /*! @@ -522,7 +493,6 @@ public: */ static std::size_t getNumLocalScvfs(const Dune::GeometryType gt) { -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) if (gt == Dune::GeometryTypes::tetrahedron) return 12; else if (gt == Dune::GeometryTypes::pyramid) @@ -531,16 +501,6 @@ public: return 18; else if (gt == Dune::GeometryTypes::hexahedron) return 24; -#else - if (gt == Dune::GeometryType(Dune::GeometryType::simplex, 3)) - return 12; - else if (gt == Dune::GeometryType(Dune::GeometryType::pyramid, 3)) - return 16; - else if (gt == Dune::GeometryType(Dune::GeometryType::prism, 3)) - return 18; - else if (gt == Dune::GeometryType(Dune::GeometryType::cube, 3)) - return 24; -#endif else DUNE_THROW(Dune::NotImplemented, "Mpfa for 3d geometry type " << gt); } @@ -617,11 +577,8 @@ public: { if (!is.neighbor() && !is.boundary()) { -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) const auto refElement = ReferenceElements::general(element.geometry().type()); -#else - const auto& refElement = ReferenceElements::general(element.geometry().type()); -#endif + for (int isVertex = 0; isVertex < is.geometry().corners(); ++isVertex) { const auto vIdxLocal = refElement.subEntity(is.indexInInside(), 1, isVertex, dim); diff --git a/dumux/discretization/cellcentered/mpfa/subcontrolvolumeface.hh b/dumux/discretization/cellcentered/mpfa/subcontrolvolumeface.hh index 96122d5982967a9d3676e64ad73ac1729b78ab3e..f39d2d0b4124234fbbf0bdccd2844a3eeeb2eda7 100644 --- a/dumux/discretization/cellcentered/mpfa/subcontrolvolumeface.hh +++ b/dumux/discretization/cellcentered/mpfa/subcontrolvolumeface.hh @@ -202,11 +202,7 @@ public: const GlobalPosition& unitOuterNormal() const { return unitOuterNormal_; } //! The geometry of the sub control volume face -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) Geometry geometry() const { return Geometry(Dune::GeometryTypes::cube(Geometry::mydimension), corners_); } -#else - Geometry geometry() const { return Geometry(Dune::GeometryType(Dune::GeometryType::cube, Geometry::mydimension), corners_); } -#endif private: bool boundary_; diff --git a/dumux/discretization/staggered/freeflow/staggeredgeometryhelper.hh b/dumux/discretization/staggered/freeflow/staggeredgeometryhelper.hh index 7606017b8ead01d249be3dc54c13c84f354cc648..34a7a3d979075ff44ffaae92d15308c2bf6d8692 100644 --- a/dumux/discretization/staggered/freeflow/staggeredgeometryhelper.hh +++ b/dumux/discretization/staggered/freeflow/staggeredgeometryhelper.hh @@ -294,11 +294,7 @@ private: void setPairInfo_(const int isIdx, const Element& element, const bool isParallel) { -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) const auto referenceElement = ReferenceElements::general(element_.geometry().type()); -#else - const auto& referenceElement = ReferenceElements::general(element_.geometry().type()); -#endif // iterate over facets sub-entities for(int i = 0; i < numFacetSubEntities; ++i) diff --git a/dumux/freeflow/navierstokes/staggered/fluxoversurface.hh b/dumux/freeflow/navierstokes/staggered/fluxoversurface.hh index 3894e3106dc01bfba572b3f6f7fca913ea45d5d3..39c9add1cc2d7c79365e759e54d64dca82ce6f64 100644 --- a/dumux/freeflow/navierstokes/staggered/fluxoversurface.hh +++ b/dumux/freeflow/navierstokes/staggered/fluxoversurface.hh @@ -211,14 +211,7 @@ public: */ static SurfaceGeometryType makeSurface(const std::vector<Dune::FieldVector<Scalar, 2>>& corners) { -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) return SurfaceGeometryType(Dune::GeometryTypes::line, corners); -#else - { - static Dune::GeometryType gt2d(Dune::GeometryType::simplex, dim-1); - return SurfaceGeometryType(gt2d, corners); - } -#endif } /*! diff --git a/dumux/io/adaptivegridrestart.hh b/dumux/io/adaptivegridrestart.hh index c0166c1f1528d8c212b7abbafb6beddcfc27a30d..9c3e9ca504922716f77a69f43babce1c7b387fd7 100644 --- a/dumux/io/adaptivegridrestart.hh +++ b/dumux/io/adaptivegridrestart.hh @@ -31,9 +31,6 @@ #endif #include <dune/grid/common/backuprestore.hh> -#if ! DUNE_VERSION_NEWER(DUNE_COMMON, 2, 5) -#include <dune/grid/utility/grapedataioformattypes.hh> -#endif #include <dumux/common/exceptions.hh> #include <dumux/common/properties.hh> @@ -109,11 +106,8 @@ public: #if HAVE_DUNE_ALUGRID Dune::BackupRestoreFacility<Grid>::backup(problem.grid(), gridName); #else - problem.grid().template writeGrid -#if ! DUNE_VERSION_NEWER(DUNE_COMMON, 2, 5) - <Dune::xdr> -#endif // Dune < 3.0 - (gridName, problem.timeManager().time() + problem.timeManager().timeStepSize()); + problem.grid().template writeGrid(gridName, problem.timeManager().time() + + problem.timeManager().timeStepSize()); #endif } diff --git a/dumux/io/cakegridcreator.hh b/dumux/io/cakegridcreator.hh index 89aebc5bc58628b52a010ee68ace9f16d4d73d6b..0d928cf2fc39840e3f5b12d670bcd85bb137d720 100644 --- a/dumux/io/cakegridcreator.hh +++ b/dumux/io/cakegridcreator.hh @@ -275,11 +275,8 @@ public: std::vector<Scalar> dA = polarCoordinates[1]; GridFactory gridFactory; -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) constexpr auto type = Dune::GeometryTypes::cube(dim); -#else - Dune::GeometryType type; type.makeCube(dim); -#endif + // create nodes if (dim == 3) { diff --git a/dumux/io/gridcreator.hh b/dumux/io/gridcreator.hh index 2ba6582726c3e6991855ab1b2158cbc481157b85..970c5aefcef398ddd323c217a1a0ebb98160cea1 100644 --- a/dumux/io/gridcreator.hh +++ b/dumux/io/gridcreator.hh @@ -66,11 +66,7 @@ #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/properties.hh> @@ -1231,11 +1227,7 @@ public: // make the grid (structured interval grid in dimworld space) Dune::GridFactory<Grid> factory; -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) constexpr auto geomType = Dune::GeometryTypes::line; -#else - auto geomType = Dune::GeometryType(1); -#endif // create a step vector GlobalPosition step = upperRight; diff --git a/dumux/io/vtkmultiwriter.hh b/dumux/io/vtkmultiwriter.hh index f3d26f3fdca46902f72031ae339daeef2eff56a8..473d0eb3cf4e5f6719ebc59f7d3544775013d765 100644 --- a/dumux/io/vtkmultiwriter.hh +++ b/dumux/io/vtkmultiwriter.hh @@ -62,26 +62,16 @@ template<class GridView, Dune::VTK::OutputType OutputValue = Dune::VTK::ascii > class DUNE_DEPRECATED_MSG("Use VtkOutputModule instead!") VtkMultiWriter { enum { dim = GridView::dimension }; -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) using VertexMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView>; using ElementMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView>; -#else - using VertexMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView, Dune::MCMGVertexLayout>; - using ElementMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView, Dune::MCMGElementLayout>; -#endif public: using VtkWriter = Dune::VTKWriter<GridView>; VtkMultiWriter(const GridView &gridView, const std::string &simName = "", std::string multiFileName = "") : gridView_(gridView) -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) , elementMapper_(gridView, Dune::mcmgElementLayout()) , vertexMapper_(gridView, Dune::mcmgVertexLayout()) -#else - , elementMapper_(gridView) - , vertexMapper_(gridView) -#endif { simName_ = (simName.empty())?"sim":simName; multiFileName_ = multiFileName; diff --git a/dumux/linear/seqsolverbackend.hh b/dumux/linear/seqsolverbackend.hh index bab4fb229b29a0d20ac8b01f597f270d78a9c5c8..c3365903cdeb436951c3db9d00c2f210ca87eb7b 100644 --- a/dumux/linear/seqsolverbackend.hh +++ b/dumux/linear/seqsolverbackend.hh @@ -172,11 +172,7 @@ public: template<int precondBlockLevel = 1, class Matrix, class Vector> bool solve(const Matrix& A, Vector& x, const Vector& b) { -#if DUNE_VERSION_NEWER(DUNE_ISTL,2,6) using Preconditioner = Dune::SeqILU<Matrix, Vector, Vector, precondBlockLevel>; -#else - using Preconditioner = Dune::SeqILUn<Matrix, Vector, Vector, precondBlockLevel>; -#endif using Solver = Dune::BiCGSTABSolver<Vector>; return IterativePreconditionedSolverImpl::template solve<Preconditioner, Solver>(*this, A, x, b, this->paramGroup()); @@ -364,11 +360,7 @@ public: template<int precondBlockLevel = 1, class Matrix, class Vector> bool solve(const Matrix& A, Vector& x, const Vector& b) { -#if DUNE_VERSION_NEWER(DUNE_ISTL,2,6) using Preconditioner = Dune::SeqILU<Matrix, Vector, Vector, precondBlockLevel>; -#else - using Preconditioner = Dune::SeqILUn<Matrix, Vector, Vector, precondBlockLevel>; -#endif using Solver = Dune::CGSolver<Vector>; return IterativePreconditionedSolverImpl::template solve<Preconditioner, Solver>(*this, A, x, b, this->paramGroup()); @@ -590,11 +582,7 @@ public: template<int precondBlockLevel = 1, class Matrix, class Vector> bool solve(const Matrix& A, Vector& x, const Vector& b) { -#if DUNE_VERSION_NEWER(DUNE_ISTL,2,6) using Preconditioner = Dune::SeqILU<Matrix, Vector, Vector, precondBlockLevel>; -#else - using Preconditioner = Dune::SeqILU0<Matrix, Vector, Vector, precondBlockLevel>; -#endif using Solver = Dune::BiCGSTABSolver<Vector>; return IterativePreconditionedSolverImpl::template solveWithILU0Prec<Preconditioner, Solver>(*this, A, x, b, this->paramGroup()); @@ -630,11 +618,7 @@ public: template<int precondBlockLevel = 1, class Matrix, class Vector> bool solve(const Matrix& A, Vector& x, const Vector& b) { -#if DUNE_VERSION_NEWER(DUNE_ISTL,2,6) using Preconditioner = Dune::SeqILU<Matrix, Vector, Vector, precondBlockLevel>; -#else - using Preconditioner = Dune::SeqILU0<Matrix, Vector, Vector, precondBlockLevel>; -#endif using Solver = Dune::CGSolver<Vector>; return IterativePreconditionedSolverImpl::template solveWithILU0Prec<Preconditioner, Solver>(*this, A, x, b, this->paramGroup()); @@ -671,11 +655,7 @@ public: template<int precondBlockLevel = 1, class Matrix, class Vector> bool solve(const Matrix& A, Vector& x, const Vector& b) { -#if DUNE_VERSION_NEWER(DUNE_ISTL,2,6) using Preconditioner = Dune::SeqILU<Matrix, Vector, Vector, precondBlockLevel>; -#else - using Preconditioner = Dune::SeqILU0<Matrix, Vector, Vector, precondBlockLevel>; -#endif using Solver = Dune::RestartedGMResSolver<Vector>; return IterativePreconditionedSolverImpl::template solveWithILU0PrecGMRes<Preconditioner, Solver>(*this, A, x, b, this->paramGroup()); @@ -713,11 +693,7 @@ public: template<int precondBlockLevel = 1, class Matrix, class Vector> bool solve(const Matrix& A, Vector& x, const Vector& b) { -#if DUNE_VERSION_NEWER(DUNE_ISTL,2,6) using Preconditioner = Dune::SeqILU<Matrix, Vector, Vector, precondBlockLevel>; -#else - using Preconditioner = Dune::SeqILUn<Matrix, Vector, Vector, precondBlockLevel>; -#endif using Solver = Dune::RestartedGMResSolver<Vector>; return IterativePreconditionedSolverImpl::template solveWithGMRes<Preconditioner, Solver>(*this, A, x, b, this->paramGroup()); diff --git a/dumux/material/constraintsolvers/compositionfromfugacities.hh b/dumux/material/constraintsolvers/compositionfromfugacities.hh index 7efae4f4d119191195b1acaf8f07910818413a98..8c0119eb39d1774c0d503fc9e14257c3688d248a 100644 --- a/dumux/material/constraintsolvers/compositionfromfugacities.hh +++ b/dumux/material/constraintsolvers/compositionfromfugacities.hh @@ -107,7 +107,7 @@ public: solveIdealMix_(fluidState, paramCache, phaseIdx, targetFug); return; } -#if !DUNE_VERSION_NEWER(DUNE_COMMON,2,7) +#if DUNE_VERSION_LT(DUNE_COMMON, 2, 7) Dune::FMatrixPrecision<Scalar>::set_singular_limit(1e-25); #endif // save initial composition in case something goes wrong diff --git a/dumux/material/constraintsolvers/immiscibleflash.hh b/dumux/material/constraintsolvers/immiscibleflash.hh index ebc40dda476c2b5c612c4520c5f5741c4ba74945..f2e54c27dfe0c495f2006b9bbdf71e18d3b0cbdb 100644 --- a/dumux/material/constraintsolvers/immiscibleflash.hh +++ b/dumux/material/constraintsolvers/immiscibleflash.hh @@ -121,7 +121,7 @@ public: const typename MaterialLaw::Params &matParams, const ComponentVector &globalMolarities) { -#if !DUNE_VERSION_NEWER(DUNE_COMMON,2,7) +#if DUNE_VERSION_LT(DUNE_COMMON, 2, 7) Dune::FMatrixPrecision<Scalar>::set_singular_limit(1e-25); #endif diff --git a/dumux/material/constraintsolvers/ncpflash.hh b/dumux/material/constraintsolvers/ncpflash.hh index aaf143152dd5ca5fac7414d8433908cae9916ca1..17a19b8bd4c9829873f70f363728893c8d907ded 100644 --- a/dumux/material/constraintsolvers/ncpflash.hh +++ b/dumux/material/constraintsolvers/ncpflash.hh @@ -147,7 +147,7 @@ public: const typename MaterialLaw::Params &matParams, const ComponentVector &globalMolarities) { -#if !DUNE_VERSION_NEWER(DUNE_COMMON,2,7) +#if DUNE_VERSION_LT(DUNE_COMMON, 2, 7) Dune::FMatrixPrecision<Scalar>::set_singular_limit(1e-25); #endif diff --git a/dumux/material/spatialparams/gstatrandomfield.hh b/dumux/material/spatialparams/gstatrandomfield.hh index a3611abd25de38b78552c6ab78bb0c4973e61075..a5fcc7907f4000e587383ebe30245f6977822290 100644 --- a/dumux/material/spatialparams/gstatrandomfield.hh +++ b/dumux/material/spatialparams/gstatrandomfield.hh @@ -55,11 +55,7 @@ class GstatRandomField using DataVector = std::vector<Scalar>; using Element = typename GridView::Traits::template Codim<0>::Entity; -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) using ElementMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView>; -#else - using ElementMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView, Dune::MCMGElementLayout>; -#endif public: // Add field types if you want to implement e.g. tensor permeabilities. diff --git a/dumux/porousmediumflow/1p/sequential/diffusion/cellcentered/velocity.hh b/dumux/porousmediumflow/1p/sequential/diffusion/cellcentered/velocity.hh index c1a4b8f51e991a7c58566716ca8bb9a8e69bce93..1c8fbc235de806e5e38f964c279ac14139fc67b3 100644 --- a/dumux/porousmediumflow/1p/sequential/diffusion/cellcentered/velocity.hh +++ b/dumux/porousmediumflow/1p/sequential/diffusion/cellcentered/velocity.hh @@ -122,15 +122,12 @@ public: CellData& cellData = problem_.variables().cellData(eIdxGlobal); const typename Element::Geometry& geometry = element.geometry(); + // get corresponding reference element using ReferenceElements = Dune::ReferenceElements<Scalar, dim>; -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) const auto refElement = ReferenceElements::general(geometry.type()); -#else - const auto& refElement = ReferenceElements::general(geometry.type()); -#endif - const int numberOfFaces = refElement.size(1); + const int numberOfFaces = refElement.size(1); std::vector<Scalar> flux(numberOfFaces,0); // run through all intersections with neighbors and boundary diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/cellcentered/velocity.hh b/dumux/porousmediumflow/2p/sequential/diffusion/cellcentered/velocity.hh index 0248b476ddf3c477401dc20f623890b2a1a28061..04ae4c5a9e15207fc4974ec075c820ceebaa7995 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/cellcentered/velocity.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/cellcentered/velocity.hh @@ -200,15 +200,12 @@ public: CellData& cellData = problem_.variables().cellData(eIdxGlobal); const typename Element::Geometry& geometry = element.geometry(); + // get corresponding reference element using ReferenceElements = Dune::ReferenceElements<Scalar, dim>; -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) const auto refElement = ReferenceElements::general(geometry.type()); -#else - const auto& refElement = ReferenceElements::general(geometry.type()); -#endif - const int numberOfFaces=refElement.size(1); + const int numberOfFaces=refElement.size(1); std::vector<Scalar> fluxW(numberOfFaces,0); std::vector<Scalar> fluxNw(numberOfFaces,0); diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/croperator.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/croperator.hh index b2de67970ba7bd4760fae86f421cd11420c4f100..17d52e48f2ecfa3dedb76b8c16d73760bbec0884 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/croperator.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/croperator.hh @@ -83,11 +83,7 @@ class CROperatorAssemblerTwoP using coliterator = typename MatrixType::ColIterator; using BCBlockType = std::array<BoundaryConditions::Flags, 1>; // componentwise boundary conditions using SatType = Dune::BlockVector< Dune::FieldVector<double, 1> >; -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) using FaceMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView>; -#else - using FaceMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView, FaceLayout>; -#endif using Indices = typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices; enum @@ -106,11 +102,7 @@ public: CROperatorAssemblerTwoP (const GridView& gridview) : gridView_(gridview) -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) , faceMapper_(gridView_, Dune::mcmgLayout(Dune::Codim<1>())) -#else - , faceMapper_(gridView_) -#endif , size_(faceMapper_.size()) , A_(size_, size_, nnz() , RepresentationType::random) diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/pressure.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/pressure.hh index 0b09d32acbfead84893c6ce0a14d867ce17c40d2..259d24297f2bd7899779a19ce954d0414276c748 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/pressure.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/pressure.hh @@ -289,15 +289,12 @@ public: } const typename Element::Geometry& geometry = element.geometry(); + // get corresponding reference element using ReferenceElements = Dune::ReferenceElements<Scalar, dim>; -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) const auto refElement = ReferenceElements::general(geometry.type()); -#else - const auto& refElement = ReferenceElements::general(geometry.type()); -#endif - const int numberOfFaces=refElement.size(1); + const int numberOfFaces=refElement.size(1); std::vector<Scalar> fluxW(numberOfFaces,0); std::vector<Scalar> fluxNw(numberOfFaces,0); diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/pressureadaptive.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/pressureadaptive.hh index efde8796f4296a6a2d9b44b671f23a3ec106dc8f..7e501315e01121a2f2dce6701e1c78207c7c0d42 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/pressureadaptive.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mimetic/pressureadaptive.hh @@ -304,15 +304,12 @@ public: } const typename Element::Geometry& geometry = element.geometry(); + // get corresponding reference element using ReferenceElements = Dune::ReferenceElements<Scalar, dim>; -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) const auto refElement = ReferenceElements::general(geometry.type()); -#else - const auto& refElement = ReferenceElements::general(geometry.type()); -#endif - const int numberOfFaces=refElement.size(1); + const int numberOfFaces=refElement.size(1); std::vector<Scalar> fluxW(numberOfFaces,0); std::vector<Scalar> fluxNw(numberOfFaces,0); diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressure.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressure.hh index 0f6f2c520a950d96bf77f441f31b05b83b5a8aa6..15942fda28b7d537a7d6f8bd0c4f692813fa4d24 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressure.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressure.hh @@ -733,11 +733,7 @@ void FvMpfaL2dPressure2p<TypeTag>::storeInteractionVolumeInfo() // get the intersection node /bar^{x_3} between 'intersection12' // and 'intersection14', denoted as 'corner1234' -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) const auto referenceElement = ReferenceElements::general(element.geometry().type()); -#else - const auto& referenceElement = ReferenceElements::general(element.geometry().type()); -#endif GlobalPosition corner1234(0); @@ -1639,11 +1635,7 @@ void FvMpfaL2dPressure2p<TypeTag>::assemble() { int boundaryFaceIdx = interactionVolume.getIndexOnElement(elemIdx, fIdx); -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) const auto referenceElement = ReferenceElements::general(element.geometry().type()); -#else - const auto& referenceElement = ReferenceElements::general(element.geometry().type()); -#endif const LocalPosition& localPos = referenceElement.position(boundaryFaceIdx, 1); diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressureadaptive.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressureadaptive.hh index 57be291cd3f7f15a652fcb9bf07d2e37d6d30fc5..694fb7da924e70fe96fe987ea7afafe2c69f2fea 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressureadaptive.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressureadaptive.hh @@ -778,11 +778,7 @@ void FvMpfaL2dPressure2pAdaptive<TypeTag>::storeInteractionVolumeInfo() // get index int eIdxGlobal1 = problem_.variables().index(element); -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) const auto referenceElement = ReferenceElements::general(element.geometry().type()); -#else - const auto& referenceElement = ReferenceElements::general(element.geometry().type()); -#endif const auto isEndIt12 = problem_.gridView().iend(element); for (auto isIt12 = problem_.gridView().ibegin(element); isIt12 != isEndIt12; ++isIt12) @@ -2356,11 +2352,7 @@ void FvMpfaL2dPressure2pAdaptive<TypeTag>::assemble() { int boundaryFaceIdx = interactionVolume.getIndexOnElement(elemIdx, fIdx); -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) const auto referenceElement = ReferenceElements::general(element.geometry().type()); -#else - const auto& referenceElement = ReferenceElements::general(element.geometry().type()); -#endif const LocalPosition& localPos = referenceElement.position(boundaryFaceIdx, 1); diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressurevelocity.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressurevelocity.hh index fc70f09b3b9c83c0b5ec4b30e3ecc90a2d00fabc..8b3fcf77301c9e1725d7446b315f5d1dfaefec04 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressurevelocity.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressurevelocity.hh @@ -304,11 +304,7 @@ void FvMpfaL2dPressureVelocity2p<TypeTag>::calculateVelocity(const Intersection& CellData& cellDataJ = problem_.variables().cellData(eIdxGlobalJ); -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) const auto referenceElement = ReferenceElements::general(elementI.geometry().type()); -#else - const auto& referenceElement = ReferenceElements::general(elementI.geometry().type()); -#endif int indexInInside = intersection.indexInInside(); int indexInOutside = intersection.indexInOutside(); diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressurevelocityadaptive.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressurevelocityadaptive.hh index 59b7279d8f8bb164831d917760af6df5cbe6554d..55e4c6d0b81f21bfbf58a3bbc1656d0d7079552e 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressurevelocityadaptive.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dpressurevelocityadaptive.hh @@ -342,11 +342,7 @@ void FvMpfaL2dPressureVelocity2pAdaptive<TypeTag>::calculateVelocity(const Inter CellData& cellDataJ = problem_.variables().cellData(eIdxGlobalJ); -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) const auto referenceElement = ReferenceElements::general(elementI.geometry().type()); -#else - const auto& referenceElement = ReferenceElements::general(elementI.geometry().type()); -#endif int indexInInside = intersection.indexInInside(); int indexInOutside = intersection.indexInOutside(); diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dvelocity.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dvelocity.hh index 9fa7d84ba6df9d115a064220579c35c9d7d45d03..80910bfdc71f868ffcff09ef611de76bc220d853 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dvelocity.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/2dvelocity.hh @@ -754,11 +754,7 @@ void FvMpfaL2dVelocity2p<TypeTag>::calculateBoundaryInteractionVolumeVelocity(In { int boundaryFaceIdx = interactionVolume.getIndexOnElement(elemIdx, fIdx); -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) const auto referenceElement = ReferenceElements::general(element.geometry().type()); -#else - const auto& referenceElement = ReferenceElements::general(element.geometry().type()); -#endif const LocalPosition& localPos = referenceElement.position(boundaryFaceIdx, 1); @@ -867,11 +863,7 @@ void FvMpfaL2dVelocity2p<TypeTag>::calculateBoundaryInteractionVolumeVelocity(In { int boundaryFaceIdx = interactionVolume.getIndexOnElement(elemIdx, fIdx); -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) const auto referenceElement = ReferenceElements::general(element.geometry().type()); -#else - const auto& referenceElement = ReferenceElements::general(element.geometry().type()); -#endif const LocalPosition& localPos = referenceElement.position(boundaryFaceIdx, 1); diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dinteractionvolumecontainer.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dinteractionvolumecontainer.hh index da0a4aed443dc2da8721e8348beb6ae08b173f1d..90482362db87554c18f86be5500806af8476ddbf 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dinteractionvolumecontainer.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dinteractionvolumecontainer.hh @@ -375,11 +375,7 @@ void FvMpfaL3dInteractionVolumeContainer<TypeTag>::storeIntersectionInfo(const E const ElementGeometry& geometry = element.geometry(); -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) const auto referenceElement = ReferenceElements::general(geometry.type()); -#else - const auto& referenceElement = ReferenceElements::general(geometry.type()); -#endif int levelI = element.level(); @@ -1355,11 +1351,7 @@ void FvMpfaL3dInteractionVolumeContainer<TypeTag>::storeInnerInteractionVolume(I const ElementGeometry& geometry1 = element1.geometry(); const ElementGeometry& geometry8 = element8.geometry(); -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) const auto referenceElement = ReferenceElements::general(geometry1.type()); -#else - const auto& referenceElement = ReferenceElements::general(geometry1.type()); -#endif DimVector edgeCoord(geometry1.global(referenceElement.position(9, dim - 1))); interactionVolume.setEdgePosition(edgeCoord, 2); diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dinteractionvolumecontaineradaptive.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dinteractionvolumecontaineradaptive.hh index 90ae5aae56ddc7df9db4e03112f0b03fbd9af7ae..e6e821f9dfafa55463f7498f4dd9d42fb07f4916 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dinteractionvolumecontaineradaptive.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dinteractionvolumecontaineradaptive.hh @@ -190,11 +190,7 @@ void FvMpfaL3dInteractionVolumeContainerAdaptive<TypeTag>::storeInnerInteraction const ElementGeometry& geometry = element.geometry(); -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) const auto referenceElement = ReferenceElements::general(geometry.type()); -#else - const auto& referenceElement = ReferenceElements::general(geometry.type()); -#endif switch (idx) { @@ -355,11 +351,7 @@ void FvMpfaL3dInteractionVolumeContainerAdaptive<TypeTag>::storeHangingNodeInter const ElementGeometry& geometry = element.geometry(); -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) const auto referenceElement = ReferenceElements::general(geometry.type()); -#else - const auto& referenceElement = ReferenceElements::general(geometry.type()); -#endif switch (idx) { @@ -1131,11 +1123,7 @@ void FvMpfaL3dInteractionVolumeContainerAdaptive<TypeTag>::storeHangingNodeInter const ElementGeometry& geometry = element5.geometry(); -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) const auto referenceElement = ReferenceElements::general(geometry.type()); -#else - const auto& referenceElement = ReferenceElements::general(geometry.type()); -#endif int oldSubVolumElemIdx = IndexTranslator::getOldElemIdxFromNewFaceIdxto0(zeroFaceIdx, 4); int oldEdgeIdx = IndexTranslator::getOldEdgeIdxFromNewFaceIdxto0(zeroFaceIdx, 1); diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dpressurevelocity.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dpressurevelocity.hh index c04b54ca3c67f80f384975d3f8cac5765de18429..e91b75cc8189c2f71641aebe0b6f174140273e9c 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dpressurevelocity.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/lmethod/3dpressurevelocity.hh @@ -305,11 +305,7 @@ void FvMpfaL3dPressureVelocity2p<TypeTag>::calculateVelocity(const Intersection& CellData& cellDataJ = problem_.variables().cellData(eIdxGlobalJ); -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) const auto referenceElement = ReferenceElements::general(elementI.geometry().type()); -#else - const auto& referenceElement = ReferenceElements::general(elementI.geometry().type()); -#endif int indexInInside = intersection.indexInInside(); int indexInOutside = intersection.indexInOutside(); diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/omethod/2dpressure.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/omethod/2dpressure.hh index f3c3b5a5661c83f286ad00ac53f77a6b3d026bd7..6fea5f1c047eb3df9eafe25581b3700a43a1bed2 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/omethod/2dpressure.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/omethod/2dpressure.hh @@ -731,11 +731,7 @@ void FvMpfaO2dPressure2p<TypeTag>::storeInteractionVolumeInfo() // get the intersection node /bar^{x_3} between 'isIt12' and 'isIt14', denoted as 'corner1234' // initialization of corner1234 -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) const auto referenceElement = ReferenceElements::general(element.geometry().type()); -#else - const auto& referenceElement = ReferenceElements::general(element.geometry().type()); -#endif GlobalPosition corner1234(0); @@ -1736,11 +1732,7 @@ void FvMpfaO2dPressure2p<TypeTag>::assemble() { int boundaryFaceIdx = interactionVolume.getIndexOnElement(elemIdx, fIdx); -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) const auto referenceElement = ReferenceElements::general(element.geometry().type()); -#else - const auto& referenceElement = ReferenceElements::general(element.geometry().type()); -#endif const LocalPosition& localPos = referenceElement.position(boundaryFaceIdx, 1); diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/omethod/2dpressurevelocity.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/omethod/2dpressurevelocity.hh index 99ac32de2d345736cf5eb1ac25b21e40bbbf4ead..6d422752d184b29e77a5df6e70b078168badb62d 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/omethod/2dpressurevelocity.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/omethod/2dpressurevelocity.hh @@ -303,11 +303,7 @@ void FvMpfaO2dPressureVelocity2p<TypeTag>::calculateVelocity(const Intersection& CellData& cellDataJ = problem_.variables().cellData(eIdxGlobalJ); -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) const auto referenceElement = ReferenceElements::general(elementI.geometry().type()); -#else - const auto& referenceElement = ReferenceElements::general(elementI.geometry().type()); -#endif int indexInInside = intersection.indexInInside(); int indexInOutside = intersection.indexInOutside(); diff --git a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/omethod/2dvelocity.hh b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/omethod/2dvelocity.hh index 90b442f8f58e6469fa5d1b8c903a763c7cecd16b..b1066bf581b9f9b0bf08abda8b7b4c0ba657f25c 100644 --- a/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/omethod/2dvelocity.hh +++ b/dumux/porousmediumflow/2p/sequential/diffusion/mpfa/omethod/2dvelocity.hh @@ -587,11 +587,7 @@ void FvMpfaO2dVelocity2P<TypeTag>::calculateBoundaryInteractionVolumeVelocity(In { int boundaryFaceIdx = interactionVolume.getIndexOnElement(elemIdx, fIdx); -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) const auto referenceElement = ReferenceElements::general(element.geometry().type()); -#else - const auto& referenceElement = ReferenceElements::general(element.geometry().type()); -#endif const LocalPosition& localPos = referenceElement.position(boundaryFaceIdx, 1); @@ -700,11 +696,7 @@ void FvMpfaO2dVelocity2P<TypeTag>::calculateBoundaryInteractionVolumeVelocity(In { int boundaryFaceIdx = interactionVolume.getIndexOnElement(elemIdx, fIdx); -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) const auto referenceElement = ReferenceElements::general(element.geometry().type()); -#else - const auto& referenceElement = ReferenceElements::general(element.geometry().type()); -#endif const LocalPosition& localPos = referenceElement.position(boundaryFaceIdx, 1); diff --git a/dumux/porousmediumflow/2p2c/sequential/fv3dpressureadaptive.hh b/dumux/porousmediumflow/2p2c/sequential/fv3dpressureadaptive.hh index dd116c55e756777a19e12c0f5129b00e21f4cb92..acadc586def13afa20ed8e6191b39ff327bda1ea 100644 --- a/dumux/porousmediumflow/2p2c/sequential/fv3dpressureadaptive.hh +++ b/dumux/porousmediumflow/2p2c/sequential/fv3dpressureadaptive.hh @@ -1430,11 +1430,8 @@ int FV3dPressure2P2CAdaptive<TypeTag>::computeTransmissibilities(const Intersect int localFace24 = face24->indexInInside(); int localFace26 = face26->indexInInside(); -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) const auto referenceElement = ReferenceElementContainer::general(neighbor.geometry().type()); -#else - const auto& referenceElement = ReferenceElementContainer::general(neighbor.geometry().type()); -#endif + //find 'x'5 = edgeCoord1226 int edge1226; // search through edges of face 12 diff --git a/dumux/porousmediumflow/sequential/properties.hh b/dumux/porousmediumflow/sequential/properties.hh index 858eaefdbfd516c6dac0116add440d4440b93397..cfc7a6e4899ce7e226eb72107cf9f2540c6ffa02 100644 --- a/dumux/porousmediumflow/sequential/properties.hh +++ b/dumux/porousmediumflow/sequential/properties.hh @@ -192,20 +192,12 @@ public: /*! * \brief Mapper for the grid view's vertices. */ -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) using VertexMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView>; -#else - using VertexMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView, Dune::MCMGVertexLayout>; -#endif /*! * \brief Mapper for the grid view's elements. */ -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) using ElementMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView>; -#else - using ElementMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView, Dune::MCMGElementLayout>; -#endif /*! * \brief The type of a solution at a fixed time. diff --git a/dumux/porousmediumflow/sequential/variableclass.hh b/dumux/porousmediumflow/sequential/variableclass.hh index ffe6d65cceef3e897e8eee89e8ffbe19dfa0cd73..c0c5ddefe74b35d1580e75325d5ffcfc0a777775 100644 --- a/dumux/porousmediumflow/sequential/variableclass.hh +++ b/dumux/porousmediumflow/sequential/variableclass.hh @@ -80,13 +80,8 @@ public: */ VariableClass(const GridView& gridView) : gridView_(gridView), -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) elementMapper_(gridView, Dune::mcmgElementLayout()), vertexMapper_(gridView, Dune::mcmgVertexLayout()) -#else - elementMapper_(gridView), - vertexMapper_(gridView) -#endif {} //! Initializes the variable class diff --git a/dumux/porousmediumflow/velocityoutput.hh b/dumux/porousmediumflow/velocityoutput.hh index cb10fe222a47853c0903f559014dbc97aef3aaef..cc6c86ef7cf46c6e8099ff4752c8e3a7904343dd 100644 --- a/dumux/porousmediumflow/velocityoutput.hh +++ b/dumux/porousmediumflow/velocityoutput.hh @@ -184,11 +184,7 @@ public: } // get the transposed Jacobian of the element mapping -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) const auto referenceElement = ReferenceElements::general(geomType); -#else - const auto& referenceElement = ReferenceElements::general(geomType); -#endif const auto& localPos = referenceElement.position(0, 0); const auto jacobianT2 = geometry.jacobianTransposed(localPos); diff --git a/test/common/boundingboxtree/test_bboxtree.cc b/test/common/boundingboxtree/test_bboxtree.cc index b89f7490e8f1019f6c6c957a5968ef9f00d51797..b3a2c75155b9bdc6d50a81477ca68d59dcbcc3d4 100644 --- a/test/common/boundingboxtree/test_bboxtree.cc +++ b/test/common/boundingboxtree/test_bboxtree.cc @@ -12,11 +12,7 @@ #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> @@ -241,11 +237,7 @@ int main (int argc, char *argv[]) try // make the grid (structured interval grid in dimworld space) Dune::GridFactory<NetworkGrid> factory; - #if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) constexpr auto geomType = Dune::GeometryTypes::line; - #else - auto geomType = Dune::GeometryType(1); - #endif // create a step vector auto step = upperRightNW; diff --git a/test/common/boundingboxtree/test_geometry_fracture.cc b/test/common/boundingboxtree/test_geometry_fracture.cc index 09697e6f9a8c204c549569675356875e3c5a0404..45638708a560901addb057d93d679c0c6a3cab58 100644 --- a/test/common/boundingboxtree/test_geometry_fracture.cc +++ b/test/common/boundingboxtree/test_geometry_fracture.cc @@ -12,11 +12,7 @@ #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 #include <dumux/common/exceptions.hh> #include <dumux/common/geometry/boundingboxtree.hh> diff --git a/test/common/geometry/test_1d3d_intersection.cc b/test/common/geometry/test_1d3d_intersection.cc index 57550467630a2139907f9ab3d764161e5ada677f..45eb434e8c7f2aeac6b28bafe386ff3dd7d1da3d 100644 --- a/test/common/geometry/test_1d3d_intersection.cc +++ b/test/common/geometry/test_1d3d_intersection.cc @@ -18,11 +18,7 @@ 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> @@ -59,16 +55,8 @@ int main (int argc, char *argv[]) try {0.0, 0.0, 1.0}, {1.0, 0.0, 1.0}, {0.0, 1.0, 1.0}, {1.0, 1.0, 1.0} }); -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) Dune::MultiLinearGeometry<double, dim, dimworld> cube(Dune::GeometryTypes::cube(dimworld), cubeCorners); -#else - Dune::GeometryType geomType; - geomType.makeCube(3); - Dune::MultiLinearGeometry<double, dim, dimworld> - cube(geomType, cubeCorners); -#endif - // collect returns to determine exit code std::vector<bool> returns; diff --git a/test/common/geometry/test_2d3d_intersection.cc b/test/common/geometry/test_2d3d_intersection.cc index 5a697fec3254f1c57aa50d4174065ed30887d98d..a8a681af4953a7b2547ed3a078a913f937c10077 100644 --- a/test/common/geometry/test_2d3d_intersection.cc +++ b/test/common/geometry/test_2d3d_intersection.cc @@ -89,18 +89,9 @@ int main(int argc, char* argv[]) try {-0.1, -0.1, 0.3}, {1.1, -0.1, 0.3}, {0.5, 2.0, 0.8} }); -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) - Geometry3D cube(Dune::GeometryTypes::cube(dimworld), cubeCorners); - Geometry2D quad(Dune::GeometryTypes::cube(dimworld-1), quadCorners); - Geometry2D tri(Dune::GeometryTypes::simplex(dimworld-1), triCorners); -#else - Dune::GeometryType geomType; geomType.makeCube(dimworld); - Dune::GeometryType geomType2; geomType2.makeCube(dimworld-1); - Dune::GeometryType geomType3; geomType3.makeSimplex(dimworld-1); - Geometry3D cube(geomType, cubeCorners); - Geometry2D quad(geomType2, quadCorners); - Geometry2D tri(geomType3, triCorners); -#endif + Geometry3D cube(Dune::GeometryTypes::cube(dimworld), cubeCorners); + Geometry2D quad(Dune::GeometryTypes::cube(dimworld-1), quadCorners); + Geometry2D tri(Dune::GeometryTypes::simplex(dimworld-1), triCorners); if (Test::intersection(cube, quad, intersections)) { diff --git a/test/io/gridcreator/test_gridcreator_gmsh.cc b/test/io/gridcreator/test_gridcreator_gmsh.cc index 8399279a716d6d7f76ef24c817336ef77eec7fc4..3ac92c60a193a8ff58ef80071f621b3298abb677 100644 --- a/test/io/gridcreator/test_gridcreator_gmsh.cc +++ b/test/io/gridcreator/test_gridcreator_gmsh.cc @@ -57,22 +57,15 @@ class GridCreatorGmshTest static const int dim = Grid::dimension; using GridCreator = typename Dumux::GridCreator<TypeTag>; using ReferenceElements = typename Dune::ReferenceElements<Scalar, dim>; -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) using VertexMapper = typename Dune::MultipleCodimMultipleGeomTypeMapper<typename Grid::LeafGridView>; -#else - using VertexMapper = typename Dune::MultipleCodimMultipleGeomTypeMapper<typename Grid::LeafGridView, Dune::MCMGVertexLayout>; -#endif public: static void getBoundaryDomainMarkers(std::vector<int>& boundaryMarker) { const auto& gridView = GridCreator::grid().leafGridView(); -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) VertexMapper vertexMapper(gridView, Dune::mcmgVertexLayout()); -#else - VertexMapper vertexMapper(gridView); -#endif + boundaryMarker.clear(); boundaryMarker.resize(gridView.size(dim)); for(auto eIt = gridView.template begin<0>(); eIt != gridView.template end<0>(); ++eIt) @@ -81,11 +74,9 @@ public: { if(!isIt->boundary()) continue; -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) + const auto refElement = ReferenceElements::general(eIt->geometry().type()); -#else - const auto& refElement = ReferenceElements::general(eIt->geometry().type()); -#endif + // loop over vertices of the intersection facet for(int vIdx = 0; vIdx < refElement.size(isIt->indexInInside(), 1, dim); vIdx++) { diff --git a/test/porousmediumflow/1p/sequential/resultevaluation3d.hh b/test/porousmediumflow/1p/sequential/resultevaluation3d.hh index 41870db56e19d2839a931e6e5734820e2b2220ad..d163d1afc02e2ce36a290b3f8af5fde7c9958e42 100644 --- a/test/porousmediumflow/1p/sequential/resultevaluation3d.hh +++ b/test/porousmediumflow/1p/sequential/resultevaluation3d.hh @@ -86,12 +86,7 @@ public: using Geometry = typename Entity::Geometry; using GV = typename Grid::LevelGridView; using IS = typename GV::IndexSet; -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) using Mapper = Dune::MultipleCodimMultipleGeomTypeMapper<GV>; -#else - using ElementMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GV, Dune::MCMGElementLayout>; - using FaceMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GV, FaceLayout>; -#endif using ct = typename Grid::ctype; enum{dim = Grid::dimension}; @@ -100,13 +95,8 @@ public: using ReferenceElements = Dune::ReferenceElements<ct, dim>; const GV& gridview(grid.levelGridView(grid.maxLevel())); const IS& indexset(gridview.indexSet()); -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) Mapper elementMapper(gridview, Dune::mcmgElementLayout()); Mapper faceMapper(gridview, Dune::mcmgLayout(Dune::Codim<1>())); -#else - ElementMapper elementMapper(gridview); - FaceMapper faceMapper(gridview); -#endif SolutionType& exactSol(grid.levelGridView(grid.maxLevel())); uMean = 0; @@ -432,20 +422,12 @@ public: enum {dim=Grid::dimension}; using Element = typename Grid::template Codim<0>::Entity; using Geometry = typename Element::Geometry; -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) using ElementMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView>; -#else - using ElementMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView, Dune::MCMGElementLayout>; -#endif using SolVector = Dune::BlockVector<Dune::FieldVector<Scalar, 1> >; using JacobianInverseTransposed = typename Geometry::JacobianInverseTransposed; using ReferenceElements = Dune::ReferenceElements<Scalar, dim>; -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) ElementMapper elementMapper(gridView, Dune::mcmgElementLayout()); -#else - ElementMapper elementMapper(gridView); -#endif SolVector exactSol(gridView.size(0)); @@ -726,19 +708,11 @@ public: enum {dim=Grid::dimension, maxIntersections = 12}; using Element = typename Grid::template Codim<0>::Entity; using Geometry = typename Element::Geometry; -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) using ElementMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView>; -#else - using ElementMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView, Dune::MCMGElementLayout>; -#endif using ReferenceElements = Dune::ReferenceElements<Scalar, dim>; using ReferenceFaces = Dune::ReferenceElements<Scalar, dim-1>; -#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) ElementMapper elementMapper(gridView, Dune::mcmgElementLayout()); -#else - ElementMapper elementMapper(gridView); -#endif uMinExact = 1e100; uMaxExact = -1e100;