From 9f154450485a9922477ca9069188d042d1ee4a68 Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@uliege.be> Date: Wed, 1 Jun 2022 22:48:05 +0200 Subject: [PATCH] create ghost cells in the usual way in PartitionUsingThisSplit() if they are not explicitly specified --- CHANGELOG.txt | 2 +- src/mesh/meshPartition.cpp | 18 ++++++++++-------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index e9ff502157..16fbb5e7d9 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,4 +1,4 @@ -(Work-in-progress): +4.10.4 (Work-in-progress): small bug fixes. * New API function: mesh/removeDuplicateElements diff --git a/src/mesh/meshPartition.cpp b/src/mesh/meshPartition.cpp index fd29e358eb..b390585a98 100644 --- a/src/mesh/meshPartition.cpp +++ b/src/mesh/meshPartition.cpp @@ -220,7 +220,8 @@ public: return elements; } - std::vector<GEntity *> createGhostEntities() { + std::vector<GEntity *> createGhostEntities() + { std::vector<GEntity *> ghostEntities(_nparts, (GEntity *)nullptr); int elementaryNumber = _model->getMaxElementaryNumber(_dim); for(std::size_t i = 1; i <= _nparts; i++) { @@ -899,6 +900,7 @@ divideNonConnectedEntities(GModel *model, int dim, std::set<GVertex *, GEntityPtrLessThan> &vertices) { bool ret = false; + // Loop over points if(dim < 0 || dim == 0) { int elementaryNumber = model->getMaxElementaryNumber(0); @@ -1022,12 +1024,12 @@ divideNonConnectedEntities(GModel *model, int dim, } // Move B-Rep if(BRepFaces.size() > 0) { - std::size_t i = 0; + std::size_t j = 0; for(auto itBRep = BRepFaces.begin(); itBRep != BRepFaces.end(); ++itBRep) { - (*itBRep)->setEdge(pedge, oldOrientations[i]); + (*itBRep)->setEdge(pedge, oldOrientations[j]); pedge->addFace(*itBRep); - i++; + j++; } } } @@ -1118,12 +1120,12 @@ divideNonConnectedEntities(GModel *model, int dim, } // Move B-Rep if(BRepRegions.size() > 0) { - std::size_t i = 0; + std::size_t j = 0; for(auto itBRep = BRepRegions.begin(); itBRep != BRepRegions.end(); ++itBRep) { - (*itBRep)->setFace(pface, oldOrientations[i]); + (*itBRep)->setFace(pface, oldOrientations[j]); pface->addRegion(*itBRep); - i++; + j++; } } } @@ -2604,7 +2606,7 @@ int PartitionUsingThisSplit(GModel *model, } else if(CTX::instance()->mesh.partitionCreateGhostCells) { graph.clearDualGraph(); - graph.createDualGraph(false); + graph.createDualGraph(true); graph.assignGhostCells(); } elmToPartition.clear(); -- GitLab