From 2c7c8595bf6c87c69ce32d221bb0d9edff78b3c5 Mon Sep 17 00:00:00 2001 From: Thomas Witkowski <thomas.witkowski@gmx.de> Date: Fri, 22 Jan 2010 14:25:46 +0000 Subject: [PATCH] Solved edge interior boundary problem in domain parallelization, part 2. --- AMDiS/src/ParallelDomainBase.cc | 2 -- AMDiS/src/Tetrahedron.cc | 49 +++++++++++++++++++++++++++++---- 2 files changed, 43 insertions(+), 8 deletions(-) diff --git a/AMDiS/src/ParallelDomainBase.cc b/AMDiS/src/ParallelDomainBase.cc index 6c6ec96b..dcabd23b 100644 --- a/AMDiS/src/ParallelDomainBase.cc +++ b/AMDiS/src/ParallelDomainBase.cc @@ -765,8 +765,6 @@ namespace AMDiS { // === Because the mesh has been changed, update the DOF numbering and mappings. === updateLocalGlobalNumbering(); - - // exit(0); } diff --git a/AMDiS/src/Tetrahedron.cc b/AMDiS/src/Tetrahedron.cc index 8d2c2efd..89d0f631 100644 --- a/AMDiS/src/Tetrahedron.cc +++ b/AMDiS/src/Tetrahedron.cc @@ -193,7 +193,7 @@ namespace AMDiS { switch (bound.subObj) { case EDGE: - // ERROR_EXIT("Not yet implemented: %d\n", bound.elIndex); + getVertexDofsAtEdge(feSpace, bound, dofs, parentVertices); break; case FACE: getVertexDofsAtFace(feSpace, bound, dofs, parentVertices); @@ -293,17 +293,54 @@ namespace AMDiS { DofContainer& dofs, bool parentVertices) const { + FUNCNAME("Tetrahedron::getVertexDofsAtEdge()"); + + if (parentVertices) { + ERROR_EXIT("Einbau notIncludedSubStructures!\n"); + } + + if (!child[0]) + return; + + BoundaryObject nextBound0 = bound, nextBound1 = bound; + prepareNextBound(nextBound0, 0); + prepareNextBound(nextBound1, 1); + + if (bound.ithObj == 0) { + child[0]->getVertexDofs(feSpace, nextBound0, dofs); + dofs.push_back(child[0]->getDOF(3)); + child[1]->getVertexDofs(feSpace, nextBound1, dofs); + } else { + if (nextBound0.ithObj != -1) + child[0]->getVertexDofs(feSpace, nextBound0, dofs); + + if (nextBound0.ithObj != -1) + child[1]->getVertexDofs(feSpace, nextBound1, dofs); + } } void Tetrahedron::prepareNextBound(BoundaryObject &bound, int ithChild) const { - for (std::vector<int>::iterator it = bound.notIncludedSubStructures.begin(); - it != bound.notIncludedSubStructures.end(); ++it) - *it = edgeOfChild[bound.elType][ithChild][*it]; + FUNCNAME("Tetrahedron::prepareNextBound()"); - bound.ithObj = sideOfChild[bound.elType][ithChild][bound.ithObj]; - bound.elType = (bound.elType + 1) % 3; + switch (bound.subObj) { + case FACE: + for (std::vector<int>::iterator it = bound.notIncludedSubStructures.begin(); + it != bound.notIncludedSubStructures.end(); ++it) + *it = edgeOfChild[bound.elType][ithChild][*it]; + + bound.ithObj = sideOfChild[bound.elType][ithChild][bound.ithObj]; + bound.elType = (bound.elType + 1) % 3; + + break; + case EDGE: + bound.ithObj = edgeOfChild[bound.elType][ithChild][bound.ithObj]; + bound.elType = (bound.elType + 1) % 3; + break; + default: + ERROR_EXIT("Should not happen!\n"); + } } -- GitLab