Commit 81ef8e5c authored by Thomas Witkowski's avatar Thomas Witkowski
Browse files

First semiworking adaptivity for parallelization.

parent ecdce6c0
......@@ -793,24 +793,35 @@ namespace AMDiS {
stdMpi.startCommunication<unsigned long int>();
#if 0
// === Compare received mesh structure codes. ===
bool meshFitTogether = true;
for (RankToBoundMap::iterator it = otherIntBoundary.boundary.begin();
it != otherIntBoundary.boundary.end(); ++it) {
MeshCodeVec &recvCodes = stdMpi.getRecvData()[it->first];
int i = 0;
for (std::vector<AtomicBoundary>::iterator boundIt = it->second.begin();
boundIt != it->second.end(); ++boundIt) {
MeshStructure elCode;
elCode.init(boundIt->rankObj.el,
boundIt->rankObj.ithObj,
elCode.init(boundIt->rankObj.el, boundIt->rankObj.ithObj,
boundIt->rankObj.elType);
if (elCode.getCode() != recvCodes[i].getCode())
meshFitTogether = false;
i++;
}
}
#endif
std::cout << "MESH HAS BEEN CHANGED!" << std::endl;
exit(0);
if (!meshFitTogether) {
std::cout << "MESH HAS BEEN CHANGED!" << std::endl;
exit(0);
}
lastMeshChangeIndex = mesh->getChangeIndex();
}
......
......@@ -82,12 +82,12 @@ namespace AMDiS {
void makeFromBuf(std::vector<MeshStructure> &data, unsigned long int *buf, int bufSize)
{
int pos = 0;
while (pos < bufSize) {
int codeSize = buf[pos++];
int nElements = buf[pos++];
std::vector<unsigned long int> code;
code.reserve(codeSize);
code.resize(codeSize);
for (int i = 0; i < codeSize; i++)
code[i] = buf[pos++];
......
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