From c36321b0d381ad2252761ebf5a2d254e87a288d0 Mon Sep 17 00:00:00 2001 From: Thomas Witkowski <thomas.witkowski@gmx.de> Date: Fri, 4 May 2012 07:14:54 +0000 Subject: [PATCH] And go back to juropa --- AMDiS/src/parallel/InteriorBoundary.cc | 2 +- AMDiS/src/parallel/MeshDistributor.cc | 10 ++++++---- AMDiS/src/parallel/ParallelDebug.cc | 8 ++++---- AMDiS/src/parallel/ParallelDebug.h | 4 ++-- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/AMDiS/src/parallel/InteriorBoundary.cc b/AMDiS/src/parallel/InteriorBoundary.cc index 453678cf..3436156d 100644 --- a/AMDiS/src/parallel/InteriorBoundary.cc +++ b/AMDiS/src/parallel/InteriorBoundary.cc @@ -63,7 +63,7 @@ namespace AMDiS { for (map<int, ElementObjectData>::iterator it = objData.begin(); it != objData.end(); ++it) { if (it->first != globalMpiRank && levelRanks.count(it->first)) { - boundaryWithinMpiGroup == true; + boundaryWithinMpiGroup = true; break; } } diff --git a/AMDiS/src/parallel/MeshDistributor.cc b/AMDiS/src/parallel/MeshDistributor.cc index 99d86579..da24936a 100644 --- a/AMDiS/src/parallel/MeshDistributor.cc +++ b/AMDiS/src/parallel/MeshDistributor.cc @@ -1470,7 +1470,6 @@ namespace AMDiS { ParallelDebug::testDoubleDofs(mesh); ParallelDebug::testInteriorBoundary(*this); ParallelDebug::testPeriodicBoundary(*this); - ParallelDebug::printBoundaryInfo(*this); MSG("Debug mode tests finished!\n"); #endif @@ -1514,13 +1513,16 @@ namespace AMDiS { elObjDb.updateRankData(); intBoundary.create(levelData, 0, elObjDb); +#if (DEBUG != 0) + ParallelDebug::printBoundaryInfo(intBoundary); +#endif - if (levelData.getLevelNumber() > 1) + if (levelData.getLevelNumber() > 1) { intBoundarySd.create(levelData, 1, elObjDb); - #if (DEBUG != 0) - ParallelDebug::printBoundaryInfo(*this); + ParallelDebug::printBoundaryInfo(intBoundarySd, 0, true); #endif + } } diff --git a/AMDiS/src/parallel/ParallelDebug.cc b/AMDiS/src/parallel/ParallelDebug.cc index c309e5c7..c8844a1d 100644 --- a/AMDiS/src/parallel/ParallelDebug.cc +++ b/AMDiS/src/parallel/ParallelDebug.cc @@ -715,7 +715,7 @@ namespace AMDiS { } - void ParallelDebug::printBoundaryInfo(MeshDistributor &pdb, + void ParallelDebug::printBoundaryInfo(InteriorBoundary &intBoundary, int level, bool force) { @@ -728,7 +728,7 @@ namespace AMDiS { MSG("Interior boundary info:\n"); - for (InteriorBoundary::iterator it(pdb.intBoundary.own, level); + for (InteriorBoundary::iterator it(intBoundary.own, level); !it.end(); ++it) { MSG("Rank owned boundary with rank %d: \n", it.getRank()); MSG(" ranks obj-ind: %d sub-obj: %d ith-obj: %d\n", @@ -737,7 +737,7 @@ namespace AMDiS { it->neighObj.elIndex, it->neighObj.subObj, it->neighObj.ithObj); } - for (InteriorBoundary::iterator it(pdb.intBoundary.other, level); + for (InteriorBoundary::iterator it(intBoundary.other, level); !it.end(); ++it) { MSG("Other owned boundary with rank %d: \n", it.getRank()); MSG(" ranks obj-ind: %d sub-obj: %d ith-obj: %d\n", @@ -746,7 +746,7 @@ namespace AMDiS { it->neighObj.elIndex, it->neighObj.subObj, it->neighObj.ithObj); } - for (InteriorBoundary::iterator it(pdb.intBoundary.periodic, level); + for (InteriorBoundary::iterator it(intBoundary.periodic, level); !it.end(); ++it) { MSG("Periodic boundary (ID %d) with rank %d: \n", it->type, it.getRank()); diff --git a/AMDiS/src/parallel/ParallelDebug.h b/AMDiS/src/parallel/ParallelDebug.h index ee87bfc4..ea39f13d 100644 --- a/AMDiS/src/parallel/ParallelDebug.h +++ b/AMDiS/src/parallel/ParallelDebug.h @@ -141,7 +141,7 @@ namespace AMDiS { * This functions prints all information about all interior boundaries on * all ranks. * - * \param[in] pdb Parallel problem definition used for debugging. + * \param[in] intBoundary The boundary object to be printed. * \param[in] level Mesh level number for which the boundary should * be printed. * \param[in] force If true, the information is always printed to @@ -150,7 +150,7 @@ namespace AMDiS { * parameter "parallel->debug->print boundary info" * is set. */ - static void printBoundaryInfo(MeshDistributor &pdb, + static void printBoundaryInfo(InteriorBoundary &intBoundary, int level = 0, bool force = false); -- GitLab