Commit 74d7b9b5 authored by Nestler, Michael's avatar Nestler, Michael

Kommentierung RCNeighbourList::fillNeighbourRelations und Einfügen eines else wg Speicherfehler

parent 78a18179
......@@ -113,23 +113,37 @@ namespace AMDiS {
{
FUNCNAME("RCNeighbourList::getNeighOnPatch()");
// for all RC Elements in list
for (int i = 0; i < n_neigh; i++) {
Element *el = rclist[i]->el;
rclist[i]->ith = i;
// for all directions of refinementEdges =? Sides of Refinement Edge
for (int dir = 0; dir < 2; dir++) {
int j = 0;
//Test if other elements in List are Neighbours of active Element
for (; j < n_neigh; j++) {
Element *neigh = rclist[j]->el;
//test-neighbour Element is active element -> skip tests for this elements
if (neigh == el)
continue;
//Test if test-neighbour Element is neighbour of active Element
int k = 0;
for (; k < 2; k++) {
if (neigh->getDof(2 + k) == el->getDof(3 - dir)) {
//Test FACE neighbourhood via oppVertex
// Test only Neighbourhood of Faces 2 & 3(local Indexing)
// Faces next to refinement Edge
// check works by comparing DOFs (rank Indexing)
rclist[i]->neigh[dir] = rclist[j];
rclist[i]->oppVertex[dir] = 3 - k;
break;
} else {
rclist[i]->neigh[dir] = NULL;
rclist[i]->oppVertex[dir] = -1;
}
}
......@@ -137,6 +151,7 @@ namespace AMDiS {
break;
}
//none of the Elements in rcList is FACE neighbour of active Element
if (j >= n_neigh) {
rclist[i]->neigh[dir] = NULL;
rclist[i]->oppVertex[dir] = -1;
......
......@@ -431,6 +431,9 @@ namespace AMDiS {
// === Determine the common edge of the element and its neighbour. ===
int edgeDof0, edgeDof1;
// get local/elementwise DOF indices of Start and End Vertices of EDGE
// on Neighbour Element
for (edgeDof0 = 0; edgeDof0 < vertices; edgeDof0++)
if (neigh->getDof(edgeDof0) == edge[0])
break;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment