1 #ifndef DUNE_ALU3DGRIDTOPOLOGY_HH
2 #define DUNE_ALU3DGRIDTOPOLOGY_HH
14 template <ALU3dGr
idElementType type>
20 enum {numVertices = 4};
22 enum {numVerticesPerFace = 3};
23 enum {numEdgesPerFace = 3};
29 enum {numVertices = 8};
31 enum {numVerticesPerFace = 4};
32 enum {numEdgesPerFace = 4};
38 template <ALU3dGr
idElementType type>
109 static std::pair< int, int >
duneEdgeMap (
int edge );
118 static int faceVertex (
int face,
int local );
121 const static int dune2aluFace_[
numFaces];
122 const static int alu2duneFace_[
numFaces];
124 const static int dune2aluEdge_[
numEdges];
125 const static int alu2duneEdge_[
numEdges];
130 static const int generic2aluFace_[
numFaces ];
131 static const int alu2genericFace_[
numFaces ];
133 static const int generic2aluVertex_[
numVertices ];
134 static const int alu2genericVertex_[
numVertices ];
136 const static int faceOrientation_[
numFaces];
141 static const int duneFaceTwist_[
numFaces ];
143 static const int duneEdgeMap_[
numEdges ][ 2 ];
150 template <ALU3dGr
idElementType type>
179 static int twist(
int index,
int faceTwist);
199 template <ALU3dGr
idElementType type>
202 return dune2aluFace_[index];
205 template <ALU3dGr
idElementType type>
208 return alu2duneFace_[index];
211 template <ALU3dGr
idElementType type>
214 return dune2aluEdge_[index];
217 template <ALU3dGr
idElementType type>
220 return alu2duneEdge_[index];
223 template <ALU3dGr
idElementType type>
227 return dune2aluVertex_[index];
230 template <ALU3dGr
idElementType type>
233 return alu2duneVertex_[index];
236 template< ALU3dGr
idElementType type >
240 return generic2aluFace_[ index ];
243 template< ALU3dGr
idElementType type >
247 return alu2genericFace_[ index ];
250 template< ALU3dGr
idElementType type >
254 return generic2aluVertex_[ index ];
257 template< ALU3dGr
idElementType type >
261 return alu2genericVertex_[ index ];
264 template <ALU3dGr
idElementType type>
267 return faceOrientation_[index];
270 template <ALU3dGr
idElementType type>
274 alugrid_assert (localVertex >= 0 && localVertex < numVerticesPerFace);
275 return dune2aluFaceVertex_[face][localVertex];
278 template <ALU3dGr
idElementType type>
282 alugrid_assert (localVertex >= 0 && localVertex < numVerticesPerFace);
283 return alu2duneFaceVertex_[face][localVertex];
286 template< ALU3dGr
idElementType type >
290 return duneFaceTwist_[ face ];
293 template< ALU3dGr
idElementType type >
297 return std::make_pair( duneEdgeMap_[ edge ][ 0 ], duneEdgeMap_[ edge ][ 1 ] );
300 template< ALU3dGr
idElementType type >
305 return faceVertex_[ face ][ local ];
309 template <ALU3dGr
idElementType type>
312 return dune2aluVertex_[index];
315 template <ALU3dGr
idElementType type>
318 return invTwist(dune2aluVertex_[index], twist);
321 template <ALU3dGr
idElementType type>
324 return alu2duneVertex_[index];
327 template <ALU3dGr
idElementType type>
331 return alu2duneVertex_[invTwist(index, twist)];
334 template <ALU3dGr
idElementType type>
337 return alu2duneEdge_[index];
340 template <ALU3dGr
idElementType type>
347 return aluTwistMap_[ aluTwist + ((type ==
tetra) ? 3 : 4) ];
350 template <ALU3dGr
idElementType type>
357 const int twist = alu2duneTwist_[ aluTwist + 3 ];
358 return alu2duneVertex( dune2aluVertex(duneIdx) , twist );
361 return alu2duneVertex( dune2aluVertex(duneIdx) , aluTwist );
364 template <ALU3dGr
idElementType type>
367 return dune2aluEdge_[index];
#define alugrid_assert(EX)
Definition: alugrid_assert.hh:20
Definition: alu3dinclude.hh:80
ALU3dGridElementType
Definition: topology.hh:12
@ error
Definition: topology.hh:12
@ hexa
Definition: topology.hh:12
@ tetra
Definition: topology.hh:12
@ mixed
Definition: topology.hh:12
Definition: topology.hh:15
Definition: topology.hh:40
@ numVertices
Definition: topology.hh:43
static int alu2genericFace(const int index)
Definition: topology.hh:244
static int duneFaceTwist(int face)
obtain twist of ALU reference face with respect to DUNE reference face
Definition: topology.hh:287
static int generic2aluFace(const int index)
Definition: topology.hh:237
static int alu2duneVertex(int index)
Maps vertex index from ALU3dGrid onto Dune reference element.
Definition: topology.hh:231
static int dune2aluEdge(int index)
Maps edge index from Dune onto ALU3dGrid reference element.
Definition: topology.hh:212
@ numVerticesPerFace
Definition: topology.hh:45
static int alu2duneFace(int index)
Maps face index from ALU3dGrid onto Dune reference element.
Definition: topology.hh:206
static int alu2duneFaceVertex(int face, int localVertex)
Definition: topology.hh:280
@ numFaces
Definition: topology.hh:42
static int faceOrientation(int index)
Definition: topology.hh:265
static int alu2duneEdge(int index)
Maps edge index from ALU3dGrid onto Dune reference element.
Definition: topology.hh:218
static int generic2aluVertex(const int index)
Definition: topology.hh:251
@ numEdges
Definition: topology.hh:44
static int alu2genericVertex(const int index)
Definition: topology.hh:258
static std::pair< int, int > duneEdgeMap(int edge)
Definition: topology.hh:294
static int dune2aluFaceVertex(int face, int localVertex)
Definition: topology.hh:272
static int faceVertex(int face, int local)
Maps a local vertex on a face onto a global vertex.
Definition: topology.hh:301
static int dune2aluVertex(int index)
Maps vertex index from Dune onto ALU3dGrid reference element.
Definition: topology.hh:224
static int dune2aluFace(int index)
Maps face index from Dune onto ALU3dGrid reference element.
Definition: topology.hh:200
Definition: topology.hh:151
static int invTwist(int index, int faceTwist)
static int aluTwistMap(const int aluTwist)
Definition: topology.hh:342
static int alu2duneEdge(int index)
Maps edge index from ALU3dGrid onto Dune reference face.
Definition: topology.hh:335
static int twistedDuneIndex(const int idx, const int twist)
Definition: topology.hh:352
static int dune2aluEdge(int index)
Maps edge index from Dune onto ALU3dGrid reference face.
Definition: topology.hh:365
static int alu2duneVertex(int index)
Maps vertex index from ALU3dGrid onto Dune reference face.
Definition: topology.hh:322
static int twist(int index, int faceTwist)
static int dune2aluVertex(int index)
Maps vertex index from Dune onto ALU3dGrid reference face.
Definition: topology.hh:310