Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
dumux-repositories
dumux
Commits
cc844f07
Commit
cc844f07
authored
May 02, 2018
by
Timo Koch
Browse files
Merge branch 'remove-dune25-compatibility' into 'master'
Drop support for dune 2.5 See merge request
!939
parents
83eb8048
3e56a006
Changes
59
Hide whitespace changes
Inline
Side-by-side
dumux/assembly/staggeredlocalassembler.hh
View file @
cc844f07
...
...
@@ -25,13 +25,8 @@
#ifndef DUMUX_STAGGERED_LOCAL_ASSEMBLER_HH
#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 +596,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 +604,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:
...
...
dumux/common/defaultmappertraits.hh
View file @
cc844f07
...
...
@@ -24,7 +24,6 @@
#ifndef DUMUX_DEFAULT_MAPPER_TRAITS_HH
#define DUMUX_DEFAULT_MAPPER_TRAITS_HH
#include
<dune/common/version.hh>
#include
<dune/grid/common/mcmgmapper.hh>
namespace
Dumux
{
...
...
@@ -32,13 +31,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
...
...
dumux/common/fvproblem.hh
View file @
cc844f07
...
...
@@ -27,7 +27,6 @@
#include
<memory>
#include
<map>
#include
<dune/common/version.hh>
#include
<dune/common/fvector.hh>
#include
<dune/grid/common/gridenums.hh>
...
...
dumux/common/geometry/geometricentityset.hh
View file @
cc844f07
...
...
@@ -25,7 +25,6 @@
#define DUMUX_GRIDVIEW_GEOMETRIC_ENTITY_SET_HH
#include
<memory>
#include
<dune/common/version.hh>
#include
<dune/grid/common/mcmgmapper.hh>
#include
<dumux/common/entitymap.hh>
...
...
@@ -40,21 +39,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_
))
{}
...
...
dumux/common/geometry/geometryintersection.hh
View file @
cc844f07
...
...
@@ -23,7 +23,6 @@
#ifndef DUMUX_GEOMETRY_INTERSECTION_HH
#define DUMUX_GEOMETRY_INTERSECTION_HH
#include
<dune/common/version.hh>
#include
<dune/common/exceptions.hh>
#include
<dune/common/promotiontraits.hh>
#include
<dune/geometry/referenceelements.hh>
...
...
@@ -228,13 +227,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 +236,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 +256,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 +274,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
;
...
...
dumux/common/geometry/makegeometry.hh
View file @
cc844f07
...
...
@@ -26,7 +26,6 @@
#include
<array>
#include
<dune/common/fvector.hh>
#include
<dune/common/fmatrix.hh>
#include
<dune/common/version.hh>
#include
<dune/geometry/multilineargeometry.hh>
#include
<dumux/common/math.hh>
#include
<dumux/common/geometry/grahamconvexhull.hh>
...
...
@@ -126,14 +125,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 +138,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
)
...
...
dumux/common/intersectionmapper.hh
View file @
cc844f07
...
...
@@ -29,7 +29,6 @@
#include
<dune/grid/common/mcmgmapper.hh>
#include
<dune/grid/common/rangegenerators.hh>
#include
<dune/common/version.hh>
namespace
Dumux
{
...
...
@@ -188,20 +187,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
))
...
...
dumux/common/properties/grid.hh
View file @
cc844f07
...
...
@@ -24,7 +24,6 @@
#ifndef DUMUX_GRID_PROPERTIES_HH
#define DUMUX_GRID_PROPERTIES_HH
#include
<dune/common/version.hh>
#include
<dune/common/fvector.hh>
#include
<dumux/common/properties.hh>
...
...
dumux/common/staggeredfvproblem.hh
View file @
cc844f07
...
...
@@ -24,12 +24,7 @@
#ifndef DUMUX_STAGGERD_FV_PROBLEM_HH
#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 +222,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 +230,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
}
};
...
...
dumux/discretization/basefvgridgeometry.hh
View file @
cc844f07
...
...
@@ -24,7 +24,6 @@
#ifndef DUMUX_DISCRETIZATION_BASE_FV_GRID_GEOMETRY_HH
#define DUMUX_DISCRETIZATION_BASE_FV_GRID_GEOMETRY_HH
#include
<dune/common/version.hh>
#include
<dune/grid/common/mcmgmapper.hh>
#include
<dumux/common/properties.hh>
...
...
@@ -67,13 +66,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
())
{
...
...
dumux/discretization/box/boxgeometryhelper.hh
View file @
cc844f07
...
...
@@ -25,7 +25,6 @@
#define DUMUX_DISCRETIZATION_BOX_GEOMETRY_HELPER_HH
#include
<array>
#include
<dune/common/version.hh>
#include
<dune/geometry/referenceelements.hh>
#include
<dumux/common/math.hh>
...
...
@@ -141,11 +140,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 +250,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 +359,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 +504,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
();
...
...
dumux/discretization/box/fvelementgeometry.hh
View file @
cc844f07
...
...
@@ -26,7 +26,6 @@
#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>
...
...
@@ -272,11 +271,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
);
...
...
dumux/discretization/box/fvgridgeometry.hh
View file @
cc844f07
...
...
@@ -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
))
...
...
dumux/discretization/box/subcontrolvolume.hh
View file @
cc844f07
...
...
@@ -24,7 +24,6 @@
#ifndef DUMUX_DISCRETIZATION_BOX_SUBCONTROLVOLUME_HH
#define DUMUX_DISCRETIZATION_BOX_SUBCONTROLVOLUME_HH
#include
<dune/common/version.hh>
#include
<dune/geometry/multilineargeometry.hh>
#include
<dumux/discretization/subcontrolvolumebase.hh>
...
...
@@ -138,11 +137,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
...
...
dumux/discretization/box/subcontrolvolumeface.hh
View file @
cc844f07
...
...
@@ -26,7 +26,6 @@
#include
<utility>
#include
<dune/geometry/type.hh>
#include
<dune/common/version.hh>
#include
<dune/geometry/multilineargeometry.hh>
#include
<dumux/common/boundaryflag.hh>
...
...
@@ -210,11 +209,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
...
...
dumux/discretization/cellcentered/mpfa/fvelementgeometry.hh
View file @
cc844f07
...
...
@@ -26,7 +26,6 @@
#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>
...
...
@@ -368,11 +367,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 +447,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
();
...
...
dumux/discretization/cellcentered/mpfa/fvgridgeometry.hh
View file @
cc844f07
...
...
@@ -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
;
...
...
dumux/discretization/cellcentered/mpfa/helper.hh
View file @
cc844f07
...
...
@@ -24,7 +24,6 @@
#ifndef DUMUX_DISCRETIZATION_CC_MPFA_HELPER_HH
#define DUMUX_DISCRETIZATION_CC_MPFA_HELPER_HH
#include
<dune/common/version.hh>
#include
<dune/common/exceptions.hh>
#include
<dune/common/fvector.hh>
#include
<dune/common/fmatrix.hh>
...
...
@@ -106,7 +105,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 +112,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 +191,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 +329,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 +342,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 +492,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 +500,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
))