1 #ifndef DUNE_ALU3DGRIDTOPOLOGY_HH
2 #define DUNE_ALU3DGRIDTOPOLOGY_HH
13 template <ALU3dGr
idElementType type>
19 enum {numVertices = 4};
21 enum {numVerticesPerFace = 3};
22 enum {numEdgesPerFace = 3};
28 enum {numVertices = 8};
30 enum {numVerticesPerFace = 4};
31 enum {numEdgesPerFace = 4};
37 template <ALU3dGr
idElementType type>
98 const static int dune2aluFace_[
numFaces];
99 const static int alu2duneFace_[
numFaces];
101 const static int dune2aluEdge_[
numEdges];
102 const static int alu2duneEdge_[
numEdges];
107 static const int generic2aluFace_[
numFaces ];
108 static const int alu2genericFace_[
numFaces ];
110 static const int generic2aluVertex_[
numVertices ];
111 static const int alu2genericVertex_[
numVertices ];
113 const static int faceOrientation_[
numFaces];
123 template <ALU3dGr
idElementType type>
152 static int twist(
int index,
int faceTwist);
153 static int invTwist(
int index,
int faceTwist);
172 template <ALU3dGr
idElementType type>
174 assert(index >= 0 && index < numFaces);
175 return dune2aluFace_[index];
178 template <ALU3dGr
idElementType type>
180 assert(index >= 0 && index < numFaces);
181 return alu2duneFace_[index];
184 template <ALU3dGr
idElementType type>
186 assert(index >= 0 && index < numEdges);
187 return dune2aluEdge_[index];
190 template <ALU3dGr
idElementType type>
192 assert(index >= 0 && index < numEdges);
193 return alu2duneEdge_[index];
196 template <ALU3dGr
idElementType type>
199 assert(index >= 0 && index < numVertices);
200 return dune2aluVertex_[index];
203 template <ALU3dGr
idElementType type>
205 assert(index >= 0 && index < numVertices);
206 return alu2duneVertex_[index];
209 template< ALU3dGr
idElementType type >
212 assert( (index >= 0) && (index < numFaces) );
213 return generic2aluFace_[ index ];
216 template< ALU3dGr
idElementType type >
219 assert( (index >= 0) && (index < numFaces) );
220 return alu2genericFace_[ index ];
223 template< ALU3dGr
idElementType type >
226 assert( (index >= 0) && (index < numVertices) );
227 return generic2aluVertex_[ index ];
230 template< ALU3dGr
idElementType type >
233 assert( (index >= 0) && (index < numVertices) );
234 return alu2genericVertex_[ index ];
237 template <ALU3dGr
idElementType type>
239 assert(index >= 0 && index < numVertices);
240 return faceOrientation_[index];
243 template <ALU3dGr
idElementType type>
246 assert(face >= 0 && face < numFaces);
247 assert(localVertex >= 0 && localVertex < numVerticesPerFace);
248 return dune2aluFaceVertex_[face][localVertex];
251 template <ALU3dGr
idElementType type>
254 assert(face >= 0 && face < numFaces);
255 assert(localVertex >= 0 && localVertex < numVerticesPerFace);
256 return alu2duneFaceVertex_[face][localVertex];
259 template< ALU3dGr
idElementType type >
262 assert( (face >= 0) && (face < numFaces) );
263 assert( (local >= 0) && (local < numVerticesPerFace) );
264 return faceVertex_[ face ][ local ];
268 template <ALU3dGr
idElementType type>
271 return dune2aluVertex_[index];
274 template <ALU3dGr
idElementType type>
277 return invTwist(dune2aluVertex_[index], twist);
280 template <ALU3dGr
idElementType type>
283 return alu2duneVertex_[index];
286 template <ALU3dGr
idElementType type>
290 return alu2duneVertex_[invTwist(index, twist)];
293 template <ALU3dGr
idElementType type>
296 return alu2duneEdge_[index];
299 template <ALU3dGr
idElementType type>
306 return aluTwistMap_[ aluTwist + ((type ==
tetra) ? 3 : 4) ];
309 template <ALU3dGr
idElementType type>
316 const int twist = alu2duneTwist_[ aluTwist + 3 ];
317 return alu2duneVertex( dune2aluVertex(duneIdx) , twist );
320 return alu2duneVertex( dune2aluVertex(duneIdx) , aluTwist );
323 template <ALU3dGr
idElementType type>
326 return dune2aluEdge_[index];