Skip to content
Snippets Groups Projects
Commit 6f780a3f authored by Thomas Witkowski's avatar Thomas Witkowski
Browse files

Small bugfix for serialization in context with periodic bc in parallel computation.

parent f96caf23
No related branches found
No related tags found
No related merge requests found
...@@ -277,15 +277,10 @@ namespace AMDiS { ...@@ -277,15 +277,10 @@ namespace AMDiS {
int localPetscRowIdx = int localPetscRowIdx =
petscRowIdx - meshDistributor->getRstart() * nComponents; petscRowIdx - meshDistributor->getRstart() * nComponents;
#if (DEBUG != 0) TEST_EXIT_DBG(localPetscRowIdx >= 0 && localPetscRowIdx < nRankRows)
if (localPetscRowIdx < 0 || localPetscRowIdx >= nRankRows) { ("Should not happen! Wrong r = %d %d %d %d %d\n",
std::cout << "ERROR in rank: " << meshDistributor->getMpiRank() << std::endl; localPetscRowIdx, meshDistributor->getRstart(), *cursor,
std::cout << " Wrong r = " << localPetscRowIdx << " " << *cursor meshDistributor->mapLocalToGlobal(*cursor), nRankRows);
<< " " << meshDistributor->mapLocalToGlobal(*cursor) << " "
<< nRankRows << std::endl;
ERROR_EXIT("Should not happen!\n");
}
#endif
// Traverse all non zero entries in this row. // Traverse all non zero entries in this row.
for (icursor_type icursor = begin<nz>(cursor), for (icursor_type icursor = begin<nz>(cursor),
......
...@@ -2146,6 +2146,7 @@ namespace AMDiS { ...@@ -2146,6 +2146,7 @@ namespace AMDiS {
SerUtil::deserialize(in, isRankDof); SerUtil::deserialize(in, isRankDof);
deserialize(in, vertexDof, dofMap); deserialize(in, vertexDof, dofMap);
deserialize(in, periodicDof);
SerUtil::deserialize(in, rstart); SerUtil::deserialize(in, rstart);
SerUtil::deserialize(in, macroElementStructureConsisten); SerUtil::deserialize(in, macroElementStructureConsisten);
...@@ -2174,6 +2175,7 @@ namespace AMDiS { ...@@ -2174,6 +2175,7 @@ namespace AMDiS {
int mapSize = 0; int mapSize = 0;
SerUtil::deserialize(in, mapSize); SerUtil::deserialize(in, mapSize);
for (int i = 0; i < mapSize; i++) { for (int i = 0; i < mapSize; i++) {
DegreeOfFreedom dof = 0; DegreeOfFreedom dof = 0;
std::set<DegreeOfFreedom> dofSet; std::set<DegreeOfFreedom> dofSet;
......
...@@ -343,6 +343,8 @@ namespace AMDiS { ...@@ -343,6 +343,8 @@ namespace AMDiS {
template<typename T> template<typename T>
void serialize(std::ostream &out, std::map<const DegreeOfFreedom*, T> &data) void serialize(std::ostream &out, std::map<const DegreeOfFreedom*, T> &data)
{ {
FUNCNAME("ParallelDomainBase::serialize()");
int mapSize = data.size(); int mapSize = data.size();
SerUtil::serialize(out, mapSize); SerUtil::serialize(out, mapSize);
for (typename std::map<const DegreeOfFreedom*, T>::iterator it = data.begin(); for (typename std::map<const DegreeOfFreedom*, T>::iterator it = data.begin();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment