1#ifndef DUNE_MMESH_MISC_TWISTUTILITY_HH
2#define DUNE_MMESH_MISC_TWISTUTILITY_HH
4#include <dune/geometry/type.hh>
9class MMeshInterfaceGrid;
12template <
class LeafIntersection>
13static inline int twistInSelf(
const LeafIntersection& intersection) {
17template <
class LeafIntersection>
18static inline int twistInNeighbor(
const LeafIntersection& intersection) {
23namespace MMeshInterfaceTwist {
24template <
class LeafIntersection>
25static inline int twistInSelf(
const LeafIntersection& intersection) {
29template <
class LeafIntersection>
30static inline int twistInNeighbor(
const LeafIntersection& intersection) {
42template <
class HostGr
id,
int dim>
43struct TwistUtility<
MMesh<HostGrid, dim> > {
45 typedef typename GridType::Traits::LeafIntersectionIterator
46 LeafIntersectionIterator;
47 typedef typename LeafIntersectionIterator::Intersection LeafIntersection;
48 typedef typename GridType::Traits::LevelIntersectionIterator
49 LevelIntersectionIterator;
50 typedef typename LevelIntersectionIterator::Intersection LevelIntersection;
55 const LeafIntersection& intersection) {
56 return MMeshTwist::twistInSelf(intersection);
61 const LeafIntersection& intersection) {
62 return MMeshTwist::twistInNeighbor(intersection);
66 template <
class Intersection>
69 return Dune::GeometryTypes::simplex(dim);
73 TwistUtility(
const TwistUtility&);
74 TwistUtility& operator=(
const TwistUtility&);
82 static constexpr int dim = GridType::dimension;
83 typedef typename GridType::Traits::LeafIntersectionIterator
84 LeafIntersectionIterator;
85 typedef typename LeafIntersectionIterator::Intersection LeafIntersection;
86 typedef typename GridType::Traits::LevelIntersectionIterator
87 LevelIntersectionIterator;
88 typedef typename LevelIntersectionIterator::Intersection LevelIntersection;
93 const LeafIntersection& intersection) {
94 return MMeshInterfaceTwist::twistInSelf(intersection);
99 const LeafIntersection& intersection) {
100 return MMeshInterfaceTwist::twistInNeighbor(intersection);
104 template <
class Intersection>
107 return Dune::GeometryTypes::simplex(dim);
111 TwistUtility(
const TwistUtility&);
112 TwistUtility& operator=(
const TwistUtility&);
Provides a DUNE grid interface class for the interface of a MMesh interface grid .
Definition: grid.hh:90
The MMesh class templatized by the CGAL host grid type and the dimension. .
Definition: mmesh.hh:158
static int twistInNeighbor(const GridType &grid, const LeafIntersection &intersection)
return twist for outer face
Definition: twistutility.hh:98
static GeometryType elementGeometry(const Intersection &intersection, const bool inside)
return element geometry type of inside or outside entity
Definition: twistutility.hh:105
static int twistInSelf(const GridType &grid, const LeafIntersection &intersection)
return twist for inner face
Definition: twistutility.hh:92
static int twistInNeighbor(const GridType &grid, const LeafIntersection &intersection)
return twist for outer face
Definition: twistutility.hh:60
static GeometryType elementGeometry(const Intersection &intersection, const bool inside)
return element geometry type of inside or outside entity
Definition: twistutility.hh:67
static int twistInSelf(const GridType &grid, const LeafIntersection &intersection)
return twist for inner face
Definition: twistutility.hh:54