dune-mmesh 1.4.1-git
Loading...
Searching...
No Matches
twistutility.hh
Go to the documentation of this file.
1#ifndef DUNE_MMESH_MISC_TWISTUTILITY_HH
2#define DUNE_MMESH_MISC_TWISTUTILITY_HH
3
5
6namespace Dune {
7
8template <class Grid>
9class MMeshInterfaceGrid;
10
11namespace MMeshTwist {
12template <class LeafIntersection>
13static inline int twistInSelf(const LeafIntersection& intersection) {
14 return 0;
15}
16
17template <class LeafIntersection>
18static inline int twistInNeighbor(const LeafIntersection& intersection) {
19 return 0;
20}
21} // namespace MMeshTwist
22
23namespace MMeshInterfaceTwist {
24template <class LeafIntersection>
25static inline int twistInSelf(const LeafIntersection& intersection) {
26 return 0;
27}
28
29template <class LeafIntersection>
30static inline int twistInNeighbor(const LeafIntersection& intersection) {
31 return 0;
32}
33} // namespace MMeshInterfaceTwist
34
35namespace Fem {
36
37template <class Grid>
38struct TwistUtility;
39
42template <class HostGrid, int dim>
43struct TwistUtility<MMesh<HostGrid, dim> > {
47 typedef typename LeafIntersectionIterator::Intersection LeafIntersection;
50 typedef typename LevelIntersectionIterator::Intersection LevelIntersection;
51
52 public:
54 static inline int twistInSelf(const GridType& grid,
55 const LeafIntersection& intersection) {
56 return MMeshTwist::twistInSelf(intersection);
57 }
58
60 static inline int twistInNeighbor(const GridType& grid,
61 const LeafIntersection& intersection) {
62 return MMeshTwist::twistInNeighbor(intersection);
63 }
64
66 template <class Intersection>
67 static inline GeometryType elementGeometry(const Intersection& intersection,
68 const bool inside) {
69 return Dune::GeometryTypes::simplex(dim);
70 }
71
72 private:
75};
76
79template <class MMesh>
82 static constexpr int dim = GridType::dimension;
85 typedef typename LeafIntersectionIterator::Intersection LeafIntersection;
88 typedef typename LevelIntersectionIterator::Intersection LevelIntersection;
89
90 public:
92 static inline int twistInSelf(const GridType& grid,
93 const LeafIntersection& intersection) {
94 return MMeshInterfaceTwist::twistInSelf(intersection);
95 }
96
98 static inline int twistInNeighbor(const GridType& grid,
99 const LeafIntersection& intersection) {
100 return MMeshInterfaceTwist::twistInNeighbor(intersection);
101 }
102
104 template <class Intersection>
105 static inline GeometryType elementGeometry(const Intersection& intersection,
106 const bool inside) {
107 return Dune::GeometryTypes::simplex(dim);
108 }
109
110 private:
113};
114
115} // namespace Fem
116
117} // namespace Dune
118
119#endif // #ifndef DUNE_MMESH_MISC_TWISTUTILITY_HH
static int twistInNeighbor(const LeafIntersection &intersection)
Definition twistutility.hh:18
static int twistInSelf(const LeafIntersection &intersection)
Definition twistutility.hh:13
static int twistInSelf(const LeafIntersection &intersection)
Definition twistutility.hh:25
static int twistInNeighbor(const LeafIntersection &intersection)
Definition twistutility.hh:30
SLList< T, A > & operator=(const SLList< T, A > &other)
size_type dim() const
static constexpr int dimension
GridFamily::Traits::LeafIntersectionIterator LeafIntersectionIterator
GridFamily::Traits::LevelIntersectionIterator LevelIntersectionIterator
The MMesh class templatized by the CGAL host grid type and the dimension. .
Definition grid/mmesh.hh:158
Provides a DUNE grid interface class for the interface of a MMesh interface grid .
Definition mmesh/interface/grid.hh:90
GridType::Traits::LeafIntersectionIterator LeafIntersectionIterator
Definition twistutility.hh:46
MMesh< HostGrid, dim > GridType
Definition twistutility.hh:44
LeafIntersectionIterator::Intersection LeafIntersection
Definition twistutility.hh:47
static int twistInNeighbor(const GridType &grid, const LeafIntersection &intersection)
return twist for outer face
Definition twistutility.hh:60
GridType::Traits::LevelIntersectionIterator LevelIntersectionIterator
Definition twistutility.hh:49
static GeometryType elementGeometry(const Intersection &intersection, const bool inside)
return element geometry type of inside or outside entity
Definition twistutility.hh:67
LevelIntersectionIterator::Intersection LevelIntersection
Definition twistutility.hh:50
static int twistInSelf(const GridType &grid, const LeafIntersection &intersection)
return twist for inner face
Definition twistutility.hh:54
MMeshInterfaceGrid< MMesh > GridType
Definition twistutility.hh:81
static int twistInNeighbor(const GridType &grid, const LeafIntersection &intersection)
return twist for outer face
Definition twistutility.hh:98
LevelIntersectionIterator::Intersection LevelIntersection
Definition twistutility.hh:88
static GeometryType elementGeometry(const Intersection &intersection, const bool inside)
return element geometry type of inside or outside entity
Definition twistutility.hh:105
LeafIntersectionIterator::Intersection LeafIntersection
Definition twistutility.hh:85
static int twistInSelf(const GridType &grid, const LeafIntersection &intersection)
return twist for inner face
Definition twistutility.hh:92
GridType::Traits::LevelIntersectionIterator LevelIntersectionIterator
Definition twistutility.hh:87
GridType::Traits::LeafIntersectionIterator LeafIntersectionIterator
Definition twistutility.hh:84