Commit 6f7099bc authored by Thomas Witkowski's avatar Thomas Witkowski
Browse files

And one fix more.

parent fdc6689c
...@@ -461,12 +461,14 @@ namespace AMDiS { ...@@ -461,12 +461,14 @@ namespace AMDiS {
{ {
FUNCNAME("ElementObjectDatabase::updateRankData()"); FUNCNAME("ElementObjectDatabase::updateRankData()");
TEST_EXIT(macroElementRankMap)("Should not happen!\n");
vertexInRank.clear(); vertexInRank.clear();
for (map<DegreeOfFreedom, vector<ElementObjectData> >::iterator it = vertexElements.begin(); for (map<DegreeOfFreedom, vector<ElementObjectData> >::iterator it = vertexElements.begin();
it != vertexElements.end(); ++it) { it != vertexElements.end(); ++it) {
for (vector<ElementObjectData>::iterator it2 = it->second.begin(); for (vector<ElementObjectData>::iterator it2 = it->second.begin();
it2 != it->second.end(); ++it2) { it2 != it->second.end(); ++it2) {
int elementInRank =(* macroElementRankMap)[it2->elIndex]; int elementInRank = (*macroElementRankMap)[it2->elIndex];
if (it2->elIndex > vertexInRank[it->first][elementInRank].elIndex) if (it2->elIndex > vertexInRank[it->first][elementInRank].elIndex)
vertexInRank[it->first][elementInRank] = *it2; vertexInRank[it->first][elementInRank] = *it2;
} }
......
...@@ -415,6 +415,13 @@ namespace AMDiS { ...@@ -415,6 +415,13 @@ namespace AMDiS {
return macroElIndexTypeMap[index]; return macroElIndexTypeMap[index];
} }
void setData(map<int, int> &rankMap,
MeshLevelData& ld)
{
macroElementRankMap = &rankMap;
levelData = &ld;
}
/// Write the element database to disk. /// Write the element database to disk.
void serialize(ostream &out); void serialize(ostream &out);
......
...@@ -163,6 +163,9 @@ namespace AMDiS { ...@@ -163,6 +163,9 @@ namespace AMDiS {
elObjDb.setFeSpace(feSpaces[0]); elObjDb.setFeSpace(feSpaces[0]);
// If required, create hierarchical mesh level structure.
createMeshLevelStructure();
// If the problem has been already read from a file, we need only to set // If the problem has been already read from a file, we need only to set
// isRankDofs to all matrices and rhs vector and to remove periodic // isRankDofs to all matrices and rhs vector and to remove periodic
// boundary conditions (if there are some). // boundary conditions (if there are some).
...@@ -179,6 +182,8 @@ namespace AMDiS { ...@@ -179,6 +182,8 @@ namespace AMDiS {
setRankDofs(); setRankDofs();
elObjDb.setData(partitionMap, levelData);
#if (DEBUG != 0) #if (DEBUG != 0)
ParallelDebug::writeDebugFile(feSpaces[feSpaces.size() - 1], dofMap, ParallelDebug::writeDebugFile(feSpaces[feSpaces.size() - 1], dofMap,
debugOutputDir + "mpi-dbg", "dat"); debugOutputDir + "mpi-dbg", "dat");
...@@ -229,9 +234,6 @@ namespace AMDiS { ...@@ -229,9 +234,6 @@ namespace AMDiS {
} }
} }
// If required, create hierarchical mesh level structure.
createMeshLevelStructure();
// Create interior boundary information. // Create interior boundary information.
createInteriorBoundary(true); createInteriorBoundary(true);
......
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