Commit 70cdf13d authored by Bernd Flemisch's avatar Bernd Flemisch
Browse files

avoid deprecation warnings when using Dune 2.6

Use the `DUNE_VERSION*` macros to distinguish between Dune >= 2.6
and < 2.6. Employ the correspondingly correct types, constructors
and function calls for Mappers and ReferenceElements.
parent c2be0703
......@@ -201,8 +201,15 @@ class IntersectionMapper
public:
IntersectionMapper(const GridView& gridview)
: gridView_(gridview), elementMapper_(gridView_), size_(gridView_.size(1)),
intersectionMapGlobal_(gridView_.size(0)), intersectionMapLocal_(gridView_.size(0))
: 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))
{
const auto element = *gridView_.template begin<0>();
......
......@@ -25,6 +25,7 @@
#define DUMUX_DISCRETIZATION_BOX_GEOMETRY_HELPER_HH
#include <array>
#include <dune/common/version.hh>
#include <dune/geometry/multilineargeometry.hh>
#include <dune/geometry/referenceelements.hh>
......@@ -139,7 +140,11 @@ public:
: elementGeometry_(geometry), corners_(geometry.corners())
{
// extract the corners of the sub control volumes
#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();
......@@ -354,7 +359,11 @@ public:
: elementGeometry_(geometry), corners_(geometry.corners())
{
// extract the corners of the sub control volumes
#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();
......@@ -499,7 +508,11 @@ public:
unsigned int indexInIntersection) const
{
// extract the corners of the sub control volumes
#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6)
const auto referenceElement = FaceReferenceElements::general(geometry.type());
#else
const auto& referenceElement = FaceReferenceElements::general(geometry.type());
#endif
GlobalPosition pi[9];
auto corners = geometry.corners();
......
......@@ -25,6 +25,7 @@
#ifndef DUMUX_DISCRETIZATION_BOX_FV_ELEMENT_GEOMETRY_HH
#define DUMUX_DISCRETIZATION_BOX_FV_ELEMENT_GEOMETRY_HH
#include <dune/common/version.hh>
#include <dune/geometry/referenceelements.hh>
#include <dune/localfunctions/lagrange/pqkfactory.hh>
......@@ -278,7 +279,11 @@ 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);
......
......@@ -126,7 +126,11 @@ 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);
......@@ -303,7 +307,11 @@ 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))
......
......@@ -26,6 +26,7 @@
#ifndef DUMUX_DISCRETIZATION_CCMPFA_FV_ELEMENT_GEOMETRY_HH
#define DUMUX_DISCRETIZATION_CCMPFA_FV_ELEMENT_GEOMETRY_HH
#include <dune/common/version.hh>
#include <dune/common/exceptions.hh>
#include <dune/common/iteratorrange.hh>
#include <dune/geometry/referenceelements.hh>
......@@ -375,7 +376,11 @@ 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();
......@@ -455,7 +460,11 @@ 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();
......
......@@ -219,7 +219,11 @@ 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();
......@@ -569,7 +573,11 @@ 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;
......
......@@ -624,7 +624,11 @@ 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);
......
......@@ -293,7 +293,11 @@ 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)
......
......@@ -19,7 +19,8 @@
#ifndef DUMUX_FVVELOCITY1P_HH
#define DUMUX_FVVELOCITY1P_HH
#include<dumux/porousmediumflow/1p/sequential/properties.hh>
#include <dune/common/version.hh>
#include <dumux/porousmediumflow/1p/sequential/properties.hh>
/*!
* \file
......@@ -123,9 +124,12 @@ public:
const typename Element::Geometry& geometry = element.geometry();
// get corresponding reference element
using ReferenceElements = Dune::ReferenceElements<Scalar, dim>;
const Dune::ReferenceElement< Scalar , dim > & refElement =
ReferenceElements::general( geometry.type() );
const int numberOfFaces=refElement.size(1);
#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);
std::vector<Scalar> flux(numberOfFaces,0);
......
......@@ -24,6 +24,7 @@
#ifndef DUMUX_FVVELOCITY2P_HH
#define DUMUX_FVVELOCITY2P_HH
#include <dune/common/version.hh>
#include <dune/common/float_cmp.hh>
#include <dune/grid/common/gridenums.hh>
#include <dumux/porousmediumflow/2p/sequential/diffusion/properties.hh>
......@@ -201,8 +202,11 @@ public:
const typename Element::Geometry& geometry = element.geometry();
// get corresponding reference element
using ReferenceElements = Dune::ReferenceElements<Scalar, dim>;
const Dune::ReferenceElement< Scalar , dim > & refElement =
ReferenceElements::general( geometry.type() );
#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);
std::vector<Scalar> fluxW(numberOfFaces,0);
......
......@@ -83,7 +83,11 @@ 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, Indices);
enum
......@@ -101,8 +105,15 @@ public:
using RepresentationType = MatrixType;
CROperatorAssemblerTwoP (const GridView& gridview)
: gridView_(gridview), faceMapper_(gridView_), size_(faceMapper_.size()),
A_(size_, size_, nnz(), RepresentationType::random)
: gridView_(gridview)
#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6)
, faceMapper_(gridView_, Dune::mcmgLayout(Dune::Codim<dim - 1>()))
#else
, faceMapper_(gridView_)
#endif
, size_(faceMapper_.size())
, A_(size_, size_, nnz()
, RepresentationType::random)
{}
//! initialize the CR operator assembler
......
......@@ -24,6 +24,8 @@
#ifndef DUMUX_MIMETICPRESSURE2P_HH
#define DUMUX_MIMETICPRESSURE2P_HH
#include <dune/common/version.hh>
// dumux environment
#include <dumux/porousmediumflow/sequential/mimetic/properties.hh>
#include <dumux/porousmediumflow/sequential/cellcentered/pressure.hh>
......@@ -116,9 +118,6 @@ template<class TypeTag> class MimeticPressure2P
using DimVector = Dune::FieldVector<Scalar, dim>;
using ReferenceElements = Dune::ReferenceElements<Scalar, dim>;
using ReferenceElement = Dune::ReferenceElement<Scalar, dim>;
//! initializes the matrix to store the system of equations
void initializeMatrix();
......@@ -292,8 +291,11 @@ public:
const typename Element::Geometry& geometry = element.geometry();
// get corresponding reference element
using ReferenceElements = Dune::ReferenceElements<Scalar, dim>;
const Dune::ReferenceElement< Scalar , dim > & refElement =
ReferenceElements::general( geometry.type() );
#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);
std::vector<Scalar> fluxW(numberOfFaces,0);
......
......@@ -24,6 +24,8 @@
#ifndef DUMUX_MIMETICPRESSURE2PADAPTIVE_HH
#define DUMUX_MIMETICPRESSURE2PADAPTIVE_HH
#include <dune/common/version.hh>
// dumux environment
#include <dumux/porousmediumflow/sequential/mimetic/properties.hh>
#include <dumux/porousmediumflow/sequential/cellcentered/pressure.hh>
......@@ -117,9 +119,6 @@ template<class TypeTag> class MimeticPressure2PAdaptive
using Matrix = typename GET_PROP_TYPE(TypeTag, PressureCoefficientMatrix);
using Vector = typename GET_PROP_TYPE(TypeTag, PressureRHSVector);
using ReferenceElements = Dune::ReferenceElements<Scalar, dim>;
using ReferenceElement = Dune::ReferenceElement<Scalar, dim>;
//! initializes the matrix to store the system of equations
void initializeMatrix();
......@@ -307,8 +306,11 @@ public:
const typename Element::Geometry& geometry = element.geometry();
// get corresponding reference element
using ReferenceElements = Dune::ReferenceElements<Scalar, dim>;
const Dune::ReferenceElement< Scalar , dim > & refElement =
ReferenceElements::general( geometry.type() );
#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);
std::vector<Scalar> fluxW(numberOfFaces,0);
......
......@@ -22,6 +22,8 @@
#ifndef DUMUX_FVMPFAL2DPRESSURE2P_HH
#define DUMUX_FVMPFAL2DPRESSURE2P_HH
#include <dune/common/version.hh>
// dumux environment
#include <dumux/porousmediumflow/sequential/cellcentered/pressure.hh>
#include <dumux/porousmediumflow/sequential/cellcentered/mpfa/linteractionvolume.hh>
......@@ -82,7 +84,6 @@ class FvMpfaL2dPressure2p: public FVPressure<TypeTag>
using Problem = typename GET_PROP_TYPE(TypeTag, Problem);
using ReferenceElements = Dune::ReferenceElements<Scalar, dim>;
using ReferenceElement = Dune::ReferenceElement<Scalar, dim>;
using SpatialParams = typename GET_PROP_TYPE(TypeTag, SpatialParams);
using MaterialLaw = typename SpatialParams::MaterialLaw;
......@@ -732,7 +733,11 @@ void FvMpfaL2dPressure2p<TypeTag>::storeInteractionVolumeInfo()
// get the intersection node /bar^{x_3} between 'intersection12'
// and 'intersection14', denoted as 'corner1234'
const ReferenceElement& referenceElement = ReferenceElements::general(element.geometry().type());
#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);
......@@ -1634,8 +1639,11 @@ void FvMpfaL2dPressure2p<TypeTag>::assemble()
{
int boundaryFaceIdx = interactionVolume.getIndexOnElement(elemIdx, fIdx);
const ReferenceElement& referenceElement = ReferenceElements::general(
element.geometry().type());
#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);
......
......@@ -22,6 +22,8 @@
#ifndef DUMUX_FVMPFAL2DPRESSURE2P_ADAPTIVE_HH
#define DUMUX_FVMPFAL2DPRESSURE2P_ADAPTIVE_HH
#include <dune/common/version.hh>
// dumux environment
#include <dumux/porousmediumflow/sequential/cellcentered/pressure.hh>
#include <dumux/porousmediumflow/sequential/cellcentered/mpfa/linteractionvolume.hh>
......@@ -85,7 +87,6 @@ class FvMpfaL2dPressure2pAdaptive: public FVPressure<TypeTag>
using Problem = typename GET_PROP_TYPE(TypeTag, Problem);
using ReferenceElements = Dune::ReferenceElements<Scalar, dim>;
using ReferenceElement = Dune::ReferenceElement<Scalar, dim>;
using SpatialParams = typename GET_PROP_TYPE(TypeTag, SpatialParams);
using MaterialLaw = typename SpatialParams::MaterialLaw;
......@@ -777,7 +778,11 @@ void FvMpfaL2dPressure2pAdaptive<TypeTag>::storeInteractionVolumeInfo()
// get index
int eIdxGlobal1 = problem_.variables().index(element);
const ReferenceElement& referenceElement = ReferenceElements::general(element.geometry().type());
#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)
......@@ -2351,8 +2356,11 @@ void FvMpfaL2dPressure2pAdaptive<TypeTag>::assemble()
{
int boundaryFaceIdx = interactionVolume.getIndexOnElement(elemIdx, fIdx);
const ReferenceElement& referenceElement = ReferenceElements::general(
element.geometry().type());
#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);
......
......@@ -22,6 +22,7 @@
#ifndef DUMUX_MPFAL2DPRESSUREVELOCITY2P_HH
#define DUMUX_MPFAL2DPRESSUREVELOCITY2P_HH
#include <dune/common/version.hh>
#include <dune/common/float_cmp.hh>
#include "2dpressure.hh"
......@@ -61,7 +62,6 @@ template<class TypeTag> class FvMpfaL2dPressureVelocity2p: public FvMpfaL2dPress
using PrimaryVariables = typename SolutionTypes::PrimaryVariables;
using ReferenceElements = Dune::ReferenceElements<Scalar, dim>;
using ReferenceElement = Dune::ReferenceElement<Scalar, dim>;
using SpatialParams = typename GET_PROP_TYPE(TypeTag, SpatialParams);
using MaterialLaw = typename SpatialParams::MaterialLaw;
......@@ -304,7 +304,11 @@ void FvMpfaL2dPressureVelocity2p<TypeTag>::calculateVelocity(const Intersection&
CellData& cellDataJ = problem_.variables().cellData(eIdxGlobalJ);
const ReferenceElement& referenceElement = ReferenceElements::general(elementI.geometry().type());
#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();
......
......@@ -22,6 +22,7 @@
#ifndef DUMUX_MPFAL2DPRESSUREVELOCITIES2P_ADAPTIVE_HH
#define DUMUX_MPFAL2DPRESSUREVELOCITIES2P_ADAPTIVE_HH
#include <dune/common/version.hh>
#include <dune/common/float_cmp.hh>
#include "2dpressureadaptive.hh"
......@@ -63,7 +64,6 @@ template<class TypeTag> class FvMpfaL2dPressureVelocity2pAdaptive: public FvMpfa
using PrimaryVariables = typename SolutionTypes::PrimaryVariables;
using ReferenceElements = Dune::ReferenceElements<Scalar, dim>;
using ReferenceElement = Dune::ReferenceElement<Scalar, dim>;
using SpatialParams = typename GET_PROP_TYPE(TypeTag, SpatialParams);
using MaterialLaw = typename SpatialParams::MaterialLaw;
......@@ -342,7 +342,11 @@ void FvMpfaL2dPressureVelocity2pAdaptive<TypeTag>::calculateVelocity(const Inter
CellData& cellDataJ = problem_.variables().cellData(eIdxGlobalJ);
const ReferenceElement& referenceElement = ReferenceElements::general(elementI.geometry().type());
#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();
......
......@@ -24,6 +24,7 @@
#ifndef DUMUX_FVMPFAL2DVELOCITY2P_HH
#define DUMUX_FVMPFAL2DVELOCITY2P_HH
#include <dune/common/version.hh>
#include <dune/grid/common/gridenums.hh>
#include <dumux/porousmediumflow/2p/sequential/diffusion/properties.hh>
#include <dumux/porousmediumflow/sequential/cellcentered/mpfa/properties.hh>
......@@ -66,7 +67,6 @@ template<class TypeTag> class FvMpfaL2dVelocity2p
using Problem = typename GET_PROP_TYPE(TypeTag, Problem);
using ReferenceElements = Dune::ReferenceElements<Scalar, dim>;
using ReferenceElement = Dune::ReferenceElement<Scalar, dim>;
using SpatialParams = typename GET_PROP_TYPE(TypeTag, SpatialParams);
using MaterialLaw = typename SpatialParams::MaterialLaw;
......@@ -754,8 +754,11 @@ void FvMpfaL2dVelocity2p<TypeTag>::calculateBoundaryInteractionVolumeVelocity(In
{
int boundaryFaceIdx = interactionVolume.getIndexOnElement(elemIdx, fIdx);
const ReferenceElement& referenceElement = ReferenceElements::general(
element.geometry().type());
#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);
......@@ -864,8 +867,11 @@ void FvMpfaL2dVelocity2p<TypeTag>::calculateBoundaryInteractionVolumeVelocity(In
{
int boundaryFaceIdx = interactionVolume.getIndexOnElement(elemIdx, fIdx);
const ReferenceElement& referenceElement = ReferenceElements::general(
element.geometry().type());
#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);
......
......@@ -62,9 +62,6 @@ template<class TypeTag> class FvMpfaL2dVelocity2pAdaptive : public FvMpfaL2dVelo
using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
using Problem = typename GET_PROP_TYPE(TypeTag, Problem);
using ReferenceElements = Dune::ReferenceElements<Scalar, dim>;
using ReferenceElement = Dune::ReferenceElement<Scalar, dim>;
using SpatialParams = typename GET_PROP_TYPE(TypeTag, SpatialParams);
using MaterialLaw = typename SpatialParams::MaterialLaw;
......
......@@ -24,6 +24,8 @@
#ifndef DUMUX_FVMPFAL3D_INTERACTIONVOLUMECONTAINER_HH
#define DUMUX_FVMPFAL3D_INTERACTIONVOLUMECONTAINER_HH
#include <dune/common/version.hh>
// dumux environment
#include <dumux/porousmediumflow/sequential/pressureproperties.hh>
#include <dumux/porousmediumflow/sequential/cellcentered/mpfa/properties.hh>
......@@ -61,7 +63,6 @@ class FvMpfaL3dInteractionVolumeContainer
using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);using Problem = typename GET_PROP_TYPE(TypeTag, Problem);
using ReferenceElements = Dune::ReferenceElements<Scalar, dim>;
using ReferenceElement = Dune::ReferenceElement<Scalar, dim>;
using Indices = typename GET_PROP_TYPE(TypeTag, Indices);
......@@ -380,7 +381,11 @@ void FvMpfaL3dInteractionVolumeContainer<TypeTag>::storeIntersectionInfo(const E
const ElementGeometry& geometry = element.geometry();
const ReferenceElement& referenceElement = ReferenceElements::general(geometry.type());
#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();
......@@ -1356,7 +1361,11 @@ void FvMpfaL3dInteractionVolumeContainer<TypeTag>::storeInnerInteractionVolume(I
const ElementGeometry& geometry1 = element1.geometry();
const ElementGeometry& geometry8 = element8.geometry();
const ReferenceElement& referenceElement = ReferenceElements::general(geometry1.type());
#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);
......