1#ifndef DUNE_ALU3DGRIDTOPOLOGY_HH
2#define DUNE_ALU3DGRIDTOPOLOGY_HH
6#include <dune/alugrid/common/alugrid_assert.hh>
12 enum ALU3dGridElementType { tetra = 4, hexa = 7, mixed, error };
14 template <ALU3dGr
idElementType type>
15 struct EntityCount {};
18 struct EntityCount<tetra> {
20 enum {numVertices = 4};
22 enum {numVerticesPerFace = 3};
23 enum {numEdgesPerFace = 3};
27 struct EntityCount<hexa> {
29 enum {numVertices = 8};
31 enum {numVerticesPerFace = 4};
32 enum {numEdgesPerFace = 4};
38 template <ALU3dGr
idElementType type>
42 enum { numFaces = EntityCount<type>::numFaces };
43 enum { numVertices = EntityCount<type>::numVertices };
44 enum { numEdges = EntityCount<type>::numEdges };
45 enum { numVerticesPerFace = EntityCount<type>::numVerticesPerFace };
62 static int generic2aluFace (
const int index );
63 static int alu2genericFace (
const int index );
65 static int generic2aluVertex (
const int index );
66 static int alu2genericVertex (
const int index );
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];
127 const static int dune2aluVertex_[numVertices];
128 const static int alu2duneVertex_[numVertices];
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];
138 const static int dune2aluFaceVertex_[numFaces][numVerticesPerFace];
139 const static int alu2duneFaceVertex_[numFaces][numVerticesPerFace];
141 static const int duneFaceTwist_[ numFaces ];
143 static const int duneEdgeMap_[ numEdges ][ 2 ];
145 static const int faceVertex_[ numFaces ][ numVerticesPerFace ];
150 template <ALU3dGr
idElementType type>
179 static int twist(
int index,
int faceTwist);
180 static int invTwist(
int index,
int faceTwist);
182 static int twistedDuneIndex(
const int idx,
const int twist );
185 static int aluTwistMap(
const int aluTwist);
187 const static int dune2aluVertex_[EntityCount<type>::numVerticesPerFace];
188 const static int alu2duneVertex_[EntityCount<type>::numVerticesPerFace];
190 const static int dune2aluEdge_[EntityCount<type>::numEdgesPerFace];
191 const static int alu2duneEdge_[EntityCount<type>::numEdgesPerFace];
193 const static int alu2duneTwist_[ 2 * EntityCount<type>::numVerticesPerFace ];
194 const static int aluTwistMap_[ 2 * EntityCount<type>::numVerticesPerFace ];
Definition: topology.hh:40
static int duneFaceTwist(int face)
obtain twist of ALU reference face with respect to DUNE reference face
Definition: topology.cc:474
static int alu2duneVertex(int index)
Maps vertex index from ALU3dGrid onto Dune reference element.
Definition: topology.cc:418
static int dune2aluEdge(int index)
Maps edge index from Dune onto ALU3dGrid reference element.
Definition: topology.cc:399
static int alu2duneFace(int index)
Maps face index from ALU3dGrid onto Dune reference element.
Definition: topology.cc:393
static int alu2duneFaceVertex(int face, int localVertex)
Definition: topology.cc:467
static int faceOrientation(int index)
Definition: topology.cc:452
static int alu2duneEdge(int index)
Maps edge index from ALU3dGrid onto Dune reference element.
Definition: topology.cc:405
static int dune2aluFaceVertex(int face, int localVertex)
Definition: topology.cc:459
static int faceVertex(int face, int local)
Maps a local vertex on a face onto a global vertex.
Definition: topology.cc:488
static int dune2aluVertex(int index)
Maps vertex index from Dune onto ALU3dGrid reference element.
Definition: topology.cc:411
static int dune2aluFace(int index)
Maps face index from Dune onto ALU3dGrid reference element.
Definition: topology.cc:387
Definition: topology.hh:151
static int alu2duneEdge(int index)
Maps edge index from ALU3dGrid onto Dune reference face.
Definition: topology.cc:522
static int dune2aluEdge(int index)
Maps edge index from Dune onto ALU3dGrid reference face.
Definition: topology.cc:552
static int alu2duneVertex(int index)
Maps vertex index from ALU3dGrid onto Dune reference face.
Definition: topology.cc:509
static int dune2aluVertex(int index)
Maps vertex index from Dune onto ALU3dGrid reference face.
Definition: topology.cc:497
Dune namespace.
Definition: alignedallocator.hh:13