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