Work on general mesh partitioner interface.
... | ... | @@ -92,6 +92,8 @@ namespace AMDiS { |
tmp = 0; | ||
GET_PARAMETER(0, name + "->log main rank", "%d", &tmp); | ||
Msg::outputMainRank = (tmp > 0); | ||
partitioner = new ParMetisPartitioner(&mpiComm); | ||
} | ||
... | ... | @@ -120,18 +122,12 @@ namespace AMDiS { |
macroElIndexMap.clear(); | ||
macroElIndexTypeMap.clear(); | ||
map<int, bool>& elementInRank = partitioner->getElementInRank(); | ||
for (vector<MacroElement*>::iterator it = allMacroElements.begin(); | ||
it != allMacroElements.end(); ++it) { | ||
elementInRank[(*it)->getIndex()] = false; | ||
macroElIndexMap[(*it)->getIndex()] = (*it)->getElement(); | ||
macroElIndexTypeMap[(*it)->getIndex()] = (*it)->getElType(); | ||
} | ||
for (deque<MacroElement*>::iterator it = mesh->getMacroElements().begin(); | ||
it != mesh->getMacroElements().end(); ++it) | ||
elementInRank[(*it)->getIndex()] = true; | ||
return; | ||
} | ||
... | ... | @@ -146,7 +142,7 @@ namespace AMDiS { |
createMacroElementInfo(); | ||
// create an initial partitioning of the mesh | ||
partitioner->createPartitionData(); | ||
partitioner->createInitialPartitioning(); | ||
// set the element weights, which are 1 at the very first begin | ||
setInitialElementWeights(); | ||
... | ... | @@ -316,7 +312,7 @@ namespace AMDiS { |
ERROR_EXIT("This should not happen for dim = %d!\n", mesh->getDim()); | ||
} | ||
partitioner = new ParMetisPartitioner(mesh, &mpiComm); | ||
partitioner->setMesh(mesh); | ||
} | ||
// Create parallel serialization file writer, if needed. | ||
... | ... | @@ -699,9 +695,7 @@ namespace AMDiS { |
updateLocalGlobalNumbering(); | ||
// === Update periodic mapping, if there are periodic boundaries. === | ||
createPeriodicMap(); | ||
INFO(info, 8)("Parallel mesh adaption needed %.5f seconds\n", | ||
... | ... | @@ -981,6 +975,8 @@ namespace AMDiS { |
for (std::set<MacroElement*>::iterator it = newMacroEl.begin(); | ||
it != newMacroEl.end(); ++it) { | ||
MSG("NEW MACRO EL: %d\n", (*it)->getIndex()); | ||
MacroElement *mel = *it; | ||
// First, reset all neighbour relations. The correct neighbours will be set later. | ||
... | ... | @@ -1100,6 +1096,8 @@ namespace AMDiS { |
("Could not find macro element %d\n", *elIt); | ||
deleteMacroElements.insert(elIndexMap[*elIt]); | ||
MSG("REMOVE MACRO EL: %d\n", *elIt); | ||
} | ||
} | ||
... | ... | @@ -1114,12 +1112,93 @@ namespace AMDiS { |
MeshManipulation meshManipulation(feSpace); | ||
meshManipulation.deleteDoubleDofs(newMacroEl, elObjects); | ||
mesh->dofCompress(); | ||
#if 0 | ||
< |