3 #ifndef DUNE_ALU3DGRIDTOPOLOGY_HH
4 #define DUNE_ALU3DGRIDTOPOLOGY_HH
15 template <ALU3dGr
idElementType type>
21 enum {numVertices = 4};
23 enum {numVerticesPerFace = 3};
24 enum {numEdgesPerFace = 3};
30 enum {numVertices = 8};
32 enum {numVerticesPerFace = 4};
33 enum {numEdgesPerFace = 4};
39 template <ALU3dGr
idElementType type>
100 const static int dune2aluFace_[
numFaces];
101 const static int alu2duneFace_[
numFaces];
103 const static int dune2aluEdge_[
numEdges];
104 const static int alu2duneEdge_[
numEdges];
109 static const int generic2aluFace_[
numFaces ];
110 static const int alu2genericFace_[
numFaces ];
112 static const int generic2aluVertex_[
numVertices ];
113 static const int alu2genericVertex_[
numVertices ];
115 const static int faceOrientation_[
numFaces];
125 template <ALU3dGr
idElementType type>
154 static int twist(
int index,
int faceTwist);
155 static int invTwist(
int index,
int faceTwist);
174 template <ALU3dGr
idElementType type>
176 assert(index >= 0 && index < numFaces);
177 return dune2aluFace_[index];
180 template <ALU3dGr
idElementType type>
182 assert(index >= 0 && index < numFaces);
183 return alu2duneFace_[index];
186 template <ALU3dGr
idElementType type>
188 assert(index >= 0 && index < numEdges);
189 return dune2aluEdge_[index];
192 template <ALU3dGr
idElementType type>
194 assert(index >= 0 && index < numEdges);
195 return alu2duneEdge_[index];
198 template <ALU3dGr
idElementType type>
201 assert(index >= 0 && index < numVertices);
202 return dune2aluVertex_[index];
205 template <ALU3dGr
idElementType type>
207 assert(index >= 0 && index < numVertices);
208 return alu2duneVertex_[index];
211 template< ALU3dGr
idElementType type >
214 assert( (index >= 0) && (index < numFaces) );
215 return generic2aluFace_[ index ];
218 template< ALU3dGr
idElementType type >
221 assert( (index >= 0) && (index < numFaces) );
222 return alu2genericFace_[ index ];
225 template< ALU3dGr
idElementType type >
228 assert( (index >= 0) && (index < numVertices) );
229 return generic2aluVertex_[ index ];
232 template< ALU3dGr
idElementType type >
235 assert( (index >= 0) && (index < numVertices) );
236 return alu2genericVertex_[ index ];
239 template <ALU3dGr
idElementType type>
241 assert(index >= 0 && index < numVertices);
242 return faceOrientation_[index];
245 template <ALU3dGr
idElementType type>
248 assert(face >= 0 && face < numFaces);
249 assert(localVertex >= 0 && localVertex < numVerticesPerFace);
250 return dune2aluFaceVertex_[face][localVertex];
253 template <ALU3dGr
idElementType type>
256 assert(face >= 0 && face < numFaces);
257 assert(localVertex >= 0 && localVertex < numVerticesPerFace);
258 return alu2duneFaceVertex_[face][localVertex];
261 template< ALU3dGr
idElementType type >
264 assert( (face >= 0) && (face < numFaces) );
265 assert( (local >= 0) && (local < numVerticesPerFace) );
266 return faceVertex_[ face ][ local ];
270 template <ALU3dGr
idElementType type>
273 return dune2aluVertex_[index];
276 template <ALU3dGr
idElementType type>
279 return invTwist(dune2aluVertex_[index], twist);
282 template <ALU3dGr
idElementType type>
285 return alu2duneVertex_[index];
288 template <ALU3dGr
idElementType type>
292 return alu2duneVertex_[invTwist(index, twist)];
295 template <ALU3dGr
idElementType type>
298 return alu2duneEdge_[index];
301 template <ALU3dGr
idElementType type>
308 return aluTwistMap_[ aluTwist + ((type ==
tetra) ? 3 : 4) ];
311 template <ALU3dGr
idElementType type>
318 const int twist = alu2duneTwist_[ aluTwist + 3 ];
319 return alu2duneVertex( dune2aluVertex(duneIdx) , twist );
322 return alu2duneVertex( dune2aluVertex(duneIdx) , aluTwist );
325 template <ALU3dGr
idElementType type>
328 return dune2aluEdge_[index];
static int alu2duneEdge(int index)
Maps edge index from ALU3dGrid onto Dune reference face.
Definition: topology.hh:296
static int alu2duneVertex(int index)
Maps vertex index from ALU3dGrid onto Dune reference element.
Definition: topology.hh:206
static int generic2aluVertex(const int index)
Definition: topology.hh:226
static int dune2aluFaceVertex(int face, int localVertex)
Definition: topology.hh:247
static int dune2aluEdge(int index)
Maps edge index from Dune onto ALU3dGrid reference element.
Definition: topology.hh:187
ALU3dGridElementType
Definition: topology.hh:13
static int alu2genericFace(const int index)
Definition: topology.hh:219
static int alu2duneFaceVertex(int face, int localVertex)
Definition: topology.hh:255
static int aluTwistMap(const int aluTwist)
Definition: topology.hh:303
static int alu2duneEdge(int index)
Maps edge index from ALU3dGrid onto Dune reference element.
Definition: topology.hh:193
static int generic2aluFace(const int index)
Definition: topology.hh:212
static int invTwist(int index, int faceTwist)
static int alu2duneVertex(int index)
Maps vertex index from ALU3dGrid onto Dune reference face.
Definition: topology.hh:283
Definition: topology.hh:13
static int dune2aluVertex(int index)
Maps vertex index from Dune onto ALU3dGrid reference face.
Definition: topology.hh:271
Definition: topology.hh:45
Definition: topology.hh:13
static int dune2aluEdge(int index)
Maps edge index from Dune onto ALU3dGrid reference face.
Definition: topology.hh:326
Definition: topology.hh:126
static int alu2duneFace(int index)
Maps face index from ALU3dGrid onto Dune reference element.
Definition: topology.hh:181
static int faceVertex(int face, int local)
Maps a local vertex on a face onto a global vertex.
Definition: topology.hh:262
Definition: topology.hh:44
Definition: topology.hh:46
Definition: topology.hh:40
static int dune2aluVertex(int index)
Maps vertex index from Dune onto ALU3dGrid reference element.
Definition: topology.hh:199
Definition: topology.hh:16
Definition: topology.hh:13
static int alu2genericVertex(const int index)
Definition: topology.hh:233
Include standard header files.
Definition: agrid.hh:59
static int twistedDuneIndex(const int idx, const int twist)
Definition: topology.hh:313
static int twist(int index, int faceTwist)
static int faceOrientation(int index)
Definition: topology.hh:240
static int dune2aluFace(int index)
Maps face index from Dune onto ALU3dGrid reference element.
Definition: topology.hh:175
Definition: topology.hh:13
Definition: topology.hh:43