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