Skip to content
GitLab
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
1cf6beea
Commit
1cf6beea
authored
Jan 29, 2018
by
Simon Scholz
Committed by
Timo Koch
Jan 29, 2018
Browse files
[geometry] Make backward compatible with dune 2.5
parent
8e443e64
Changes
1
Hide whitespace changes
Inline
Side-by-side
dumux/common/geometry/geometryintersection.hh
View file @
1cf6beea
...
...
@@ -241,7 +241,12 @@ 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
;
...
...
@@ -261,14 +266,24 @@ 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
}
}();
...
...
@@ -277,7 +292,12 @@ 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
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment