Commit 39a91046 authored by Thomas Witkowski's avatar Thomas Witkowski
Browse files

Small bugfix for 4th-3D elements.

parent 643968b8
......@@ -351,35 +351,48 @@ namespace AMDiS {
{
FUNCNAME("Tetrahedron::getNonVertexDofs()");
BoundaryObject nextBound = bound;
nextBound.elType = (bound.elType + 1) % 3;
if (child[0]) {
int childFace0 = sideOfChild[bound.elType][0][bound.ithObj];
int childFace1 = sideOfChild[bound.elType][1][bound.ithObj];
TEST_EXIT(childFace0 != -1 || childFace1 != -1)
("No new face for child elements!\n");
if (childFace0 != -1) {
nextBound.ithObj = childFace0;
child[0]->getNonVertexDofs(feSpace, nextBound, dofs);
}
switch (bound.subObj) {
case VERTEX:
return;
break;
case EDGE:
break;
case FACE:
{
BoundaryObject nextBound = bound;
nextBound.elType = (bound.elType + 1) % 3;
if (childFace1 != -1) {
nextBound.ithObj = childFace1;
child[1]->getNonVertexDofs(feSpace, nextBound, dofs);
if (child[0]) {
int childFace0 = sideOfChild[bound.elType][0][bound.ithObj];
int childFace1 = sideOfChild[bound.elType][1][bound.ithObj];
TEST_EXIT(childFace0 != -1 || childFace1 != -1)
("No new face for child elements!\n");
if (childFace0 != -1) {
nextBound.ithObj = childFace0;
child[0]->getNonVertexDofs(feSpace, nextBound, dofs);
}
if (childFace1 != -1) {
nextBound.ithObj = childFace1;
child[1]->getNonVertexDofs(feSpace, nextBound, dofs);
}
} else {
ElementDofIterator elDofIter(feSpace, true);
elDofIter.reset(this);
do {
if (elDofIter.getCurrentPos() == 2 &&
elDofIter.getCurrentElementPos() == bound.ithObj) {
ERROR_EXIT("Check this, if it will really work!\n");
dofs.push_back(elDofIter.getDofPtr());
}
} while(elDofIter.next());
}
}
} else {
ElementDofIterator elDofIter(feSpace, true);
elDofIter.reset(this);
do {
if (elDofIter.getCurrentPos() == 2 &&
elDofIter.getCurrentElementPos() == bound.ithObj) {
ERROR_EXIT("Check this, if it will really work!\n");
dofs.push_back(elDofIter.getDofPtr());
}
} while(elDofIter.next());
break;
case default:
ERROR_EXIT("Should not happen!\n");
}
}
......
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