Commit 1880b10d authored by Thomas Witkowski's avatar Thomas Witkowski
Browse files

Fixed some small bugs in multilevel FETI-DP.

parent e81c50d2
...@@ -113,9 +113,12 @@ namespace AMDiS { ...@@ -113,9 +113,12 @@ namespace AMDiS {
{ {
if (level > 0) { if (level > 0) {
int r = levelData->mapRank(mapIt->first, level - 1, level); int r = levelData->mapRank(mapIt->first, level - 1, level);
TEST_EXIT_DBG(r >= 0) TEST_EXIT_DBG(r >= 0)
("Mapping rank %d from level % to level %d does not work!\n", ("Mapping rank %d from level % to level %d does not work!\n",
mapIt->first, level - 1, level); mapIt->first, level - 1, level);
return r;
} }
return mapIt->first; return mapIt->first;
......
...@@ -1873,7 +1873,8 @@ namespace AMDiS { ...@@ -1873,7 +1873,8 @@ namespace AMDiS {
} }
void MeshDistributor::createBoundaryDofs(const FiniteElemSpace *feSpace, int level) void MeshDistributor::createBoundaryDofs(const FiniteElemSpace *feSpace,
int level)
{ {
FUNCNAME("MeshDistributor::createBoundaryDofs()"); FUNCNAME("MeshDistributor::createBoundaryDofs()");
...@@ -1893,7 +1894,8 @@ namespace AMDiS { ...@@ -1893,7 +1894,8 @@ namespace AMDiS {
DofContainer dofs; DofContainer dofs;
it->rankObj.el->getAllDofs(feSpace, it->rankObj, dofs); it->rankObj.el->getAllDofs(feSpace, it->rankObj, dofs);
DofContainer& tmp = sendDofs.getDofContainer(it.getRank(), feSpace, level); DofContainer& tmp =
sendDofs.getDofContainer(it.getRank(), feSpace, level);
tmp.insert(tmp.end(), dofs.begin(), dofs.end()); tmp.insert(tmp.end(), dofs.begin(), dofs.end());
if (createBoundaryDofFlag.isSet(BOUNDARY_FILL_INFO_SEND_DOFS)) if (createBoundaryDofFlag.isSet(BOUNDARY_FILL_INFO_SEND_DOFS))
...@@ -1910,7 +1912,8 @@ namespace AMDiS { ...@@ -1910,7 +1912,8 @@ namespace AMDiS {
DofContainer dofs; DofContainer dofs;
it->rankObj.el->getAllDofs(feSpace, it->rankObj, dofs); it->rankObj.el->getAllDofs(feSpace, it->rankObj, dofs);
DofContainer& tmp = recvDofs.getDofContainer(it.getRank(), feSpace, level); DofContainer& tmp =
recvDofs.getDofContainer(it.getRank(), feSpace, level);
tmp.insert(tmp.end(), dofs.begin(), dofs.end()); tmp.insert(tmp.end(), dofs.begin(), dofs.end());
if (createBoundaryDofFlag.isSet(BOUNDARY_FILL_INFO_RECV_DOFS)) if (createBoundaryDofFlag.isSet(BOUNDARY_FILL_INFO_RECV_DOFS))
......
...@@ -87,6 +87,7 @@ namespace AMDiS { ...@@ -87,6 +87,7 @@ namespace AMDiS {
// === other ranks that also include this DOF. === // === other ranks that also include this DOF. ===
StdMpi<vector<int> > stdMpi(levelData->getMpiComm(level)); StdMpi<vector<int> > stdMpi(levelData->getMpiComm(level));
for (DofComm::Iterator it(*sendDofs, level, feSpace); for (DofComm::Iterator it(*sendDofs, level, feSpace);
!it.end(); it.nextRank()) !it.end(); it.nextRank())
for (; !it.endDofIter(); it.nextDof()) for (; !it.endDofIter(); it.nextDof())
...@@ -108,7 +109,7 @@ namespace AMDiS { ...@@ -108,7 +109,7 @@ namespace AMDiS {
} }
} }
if (recvFromRank) if (recvFromRank)
stdMpi.recv(it.getRank()); stdMpi.recv(it.getRank());
} }
...@@ -159,6 +160,8 @@ namespace AMDiS { ...@@ -159,6 +160,8 @@ namespace AMDiS {
{ {
FUNCNAME("ParallelDofMapping::clear()"); FUNCNAME("ParallelDofMapping::clear()");
TEST_EXIT_DBG(levelData)("No mesh level data object defined!\n");
for (vector<const FiniteElemSpace*>::iterator it = feSpacesUnique.begin(); for (vector<const FiniteElemSpace*>::iterator it = feSpacesUnique.begin();
it != feSpacesUnique.end(); ++it) it != feSpacesUnique.end(); ++it)
data[*it].clear(); data[*it].clear();
......
...@@ -284,29 +284,35 @@ namespace AMDiS { ...@@ -284,29 +284,35 @@ namespace AMDiS {
dualDofMap.clear(); dualDofMap.clear();
lagrangeMap.clear(); lagrangeMap.clear();
localDofMap.clear(); localDofMap.clear();
interiorDofMap.clear(); if (fetiPreconditioner == FETI_DIRICHLET)
interiorDofMap.clear();
primalDofMap.setDofComm(meshDistributor->getSendDofs(),
meshDistributor->getRecvDofs());
lagrangeMap.setDofComm(meshDistributor->getSendDofs(),
meshDistributor->getRecvDofs());
for (unsigned int i = 0; i < meshDistributor->getFeSpaces().size(); i++) { for (unsigned int i = 0; i < meshDistributor->getFeSpaces().size(); i++) {
const FiniteElemSpace *feSpace = meshDistributor->getFeSpace(i); const FiniteElemSpace *feSpace = meshDistributor->getFeSpace(i);
createPrimals(feSpace); createPrimals(feSpace);
createDuals(feSpace); createDuals(feSpace);
createLagrange(feSpace);
createIndexB(feSpace); createIndexB(feSpace);
} }
primalDofMap.setDofComm(meshDistributor->getSendDofs(),
meshDistributor->getRecvDofs());
lagrangeMap.setDofComm(meshDistributor->getSendDofs(),
meshDistributor->getRecvDofs());
primalDofMap.update(); primalDofMap.update();
dualDofMap.update(); dualDofMap.update();
lagrangeMap.update();
localDofMap.update(); localDofMap.update();
if (fetiPreconditioner != FETI_NONE) if (fetiPreconditioner != FETI_NONE)
interiorDofMap.update(); interiorDofMap.update();
for (unsigned int i = 0; i < meshDistributor->getFeSpaces().size(); i++) {
const FiniteElemSpace *feSpace = meshDistributor->getFeSpace(i);
createLagrange(feSpace);
}
lagrangeMap.update();
for (unsigned int i = 0; i < meshDistributor->getFeSpaces().size(); i++) { for (unsigned int i = 0; i < meshDistributor->getFeSpaces().size(); i++) {
const FiniteElemSpace *feSpace = meshDistributor->getFeSpace(i); const FiniteElemSpace *feSpace = meshDistributor->getFeSpace(i);
MSG("FETI-DP data for %d-ith FE space:\n", i); MSG("FETI-DP data for %d-ith FE space:\n", i);
......
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