1#ifndef DUNE_MMESH_MISC_TWISTUTILITY_HH
2#define DUNE_MMESH_MISC_TWISTUTILITY_HH
4#include <dune/geometry/type.hh>
10 class MMeshInterfaceGrid;
14 template<
class LeafIntersection >
15 static inline int twistInSelf(
const LeafIntersection& intersection)
20 template<
class LeafIntersection >
21 static inline int twistInNeighbor(
const LeafIntersection& intersection )
27 namespace MMeshInterfaceTwist
29 template<
class LeafIntersection >
30 static inline int twistInSelf(
const LeafIntersection& intersection)
35 template<
class LeafIntersection >
36 static inline int twistInNeighbor(
const LeafIntersection& intersection )
45 template<
class Gr
id >
50 template<
class HostGr
id,
int dim >
51 struct TwistUtility<
MMesh< HostGrid, dim > >
54 typedef typename GridType::Traits::LeafIntersectionIterator LeafIntersectionIterator;
55 typedef typename LeafIntersectionIterator::Intersection LeafIntersection;
56 typedef typename GridType::Traits::LevelIntersectionIterator LevelIntersectionIterator;
57 typedef typename LevelIntersectionIterator::Intersection LevelIntersection;
63 return MMeshTwist::twistInSelf(intersection);
69 return MMeshTwist::twistInNeighbor(intersection);
73 template <
class Intersection>
74 static inline GeometryType
77 return Dune::GeometryTypes::simplex(dim);
81 TwistUtility(
const TwistUtility&);
82 TwistUtility& operator=(
const TwistUtility&);
88 template<
class MMesh >
92 static constexpr int dim = GridType::dimension;
93 typedef typename GridType::Traits::LeafIntersectionIterator LeafIntersectionIterator;
94 typedef typename LeafIntersectionIterator::Intersection LeafIntersection;
95 typedef typename GridType::Traits::LevelIntersectionIterator LevelIntersectionIterator;
96 typedef typename LevelIntersectionIterator::Intersection LevelIntersection;
102 return MMeshInterfaceTwist::twistInSelf(intersection);
108 return MMeshInterfaceTwist::twistInNeighbor(intersection);
112 template <
class Intersection>
113 static inline GeometryType
116 return Dune::GeometryTypes::simplex(dim);
120 TwistUtility(
const TwistUtility&);
121 TwistUtility& operator=(
const TwistUtility&);
Provides a DUNE grid interface class for the interface of a MMesh interface grid.
Definition: grid.hh:97
The MMesh class templatized by the CGAL host grid type and the dimension.
Definition: mmesh.hh:140
static int twistInNeighbor(const GridType &grid, const LeafIntersection &intersection)
return twist for outer face
Definition: twistutility.hh:106
static GeometryType elementGeometry(const Intersection &intersection, const bool inside)
return element geometry type of inside or outside entity
Definition: twistutility.hh:114
static int twistInSelf(const GridType &grid, const LeafIntersection &intersection)
return twist for inner face
Definition: twistutility.hh:100
static int twistInNeighbor(const GridType &grid, const LeafIntersection &intersection)
return twist for outer face
Definition: twistutility.hh:67
static GeometryType elementGeometry(const Intersection &intersection, const bool inside)
return element geometry type of inside or outside entity
Definition: twistutility.hh:75
static int twistInSelf(const GridType &grid, const LeafIntersection &intersection)
return twist for inner face
Definition: twistutility.hh:61