Skip to content
Snippets Groups Projects
Commit 9f154450 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

create ghost cells in the usual way in PartitionUsingThisSplit() if they are...

create ghost cells in the usual way in PartitionUsingThisSplit() if they are not explicitly specified
parent 0484eb27
No related branches found
No related tags found
No related merge requests found
(Work-in-progress): 4.10.4 (Work-in-progress): small bug fixes.
* New API function: mesh/removeDuplicateElements * New API function: mesh/removeDuplicateElements
......
...@@ -220,7 +220,8 @@ public: ...@@ -220,7 +220,8 @@ public:
return elements; return elements;
} }
std::vector<GEntity *> createGhostEntities() { std::vector<GEntity *> createGhostEntities()
{
std::vector<GEntity *> ghostEntities(_nparts, (GEntity *)nullptr); std::vector<GEntity *> ghostEntities(_nparts, (GEntity *)nullptr);
int elementaryNumber = _model->getMaxElementaryNumber(_dim); int elementaryNumber = _model->getMaxElementaryNumber(_dim);
for(std::size_t i = 1; i <= _nparts; i++) { for(std::size_t i = 1; i <= _nparts; i++) {
...@@ -899,6 +900,7 @@ divideNonConnectedEntities(GModel *model, int dim, ...@@ -899,6 +900,7 @@ divideNonConnectedEntities(GModel *model, int dim,
std::set<GVertex *, GEntityPtrLessThan> &vertices) std::set<GVertex *, GEntityPtrLessThan> &vertices)
{ {
bool ret = false; bool ret = false;
// Loop over points // Loop over points
if(dim < 0 || dim == 0) { if(dim < 0 || dim == 0) {
int elementaryNumber = model->getMaxElementaryNumber(0); int elementaryNumber = model->getMaxElementaryNumber(0);
...@@ -1022,12 +1024,12 @@ divideNonConnectedEntities(GModel *model, int dim, ...@@ -1022,12 +1024,12 @@ divideNonConnectedEntities(GModel *model, int dim,
} }
// Move B-Rep // Move B-Rep
if(BRepFaces.size() > 0) { if(BRepFaces.size() > 0) {
std::size_t i = 0; std::size_t j = 0;
for(auto itBRep = BRepFaces.begin(); itBRep != BRepFaces.end(); for(auto itBRep = BRepFaces.begin(); itBRep != BRepFaces.end();
++itBRep) { ++itBRep) {
(*itBRep)->setEdge(pedge, oldOrientations[i]); (*itBRep)->setEdge(pedge, oldOrientations[j]);
pedge->addFace(*itBRep); pedge->addFace(*itBRep);
i++; j++;
} }
} }
} }
...@@ -1118,12 +1120,12 @@ divideNonConnectedEntities(GModel *model, int dim, ...@@ -1118,12 +1120,12 @@ divideNonConnectedEntities(GModel *model, int dim,
} }
// Move B-Rep // Move B-Rep
if(BRepRegions.size() > 0) { if(BRepRegions.size() > 0) {
std::size_t i = 0; std::size_t j = 0;
for(auto itBRep = BRepRegions.begin(); for(auto itBRep = BRepRegions.begin();
itBRep != BRepRegions.end(); ++itBRep) { itBRep != BRepRegions.end(); ++itBRep) {
(*itBRep)->setFace(pface, oldOrientations[i]); (*itBRep)->setFace(pface, oldOrientations[j]);
pface->addRegion(*itBRep); pface->addRegion(*itBRep);
i++; j++;
} }
} }
} }
...@@ -2604,7 +2606,7 @@ int PartitionUsingThisSplit(GModel *model, ...@@ -2604,7 +2606,7 @@ int PartitionUsingThisSplit(GModel *model,
} }
else if(CTX::instance()->mesh.partitionCreateGhostCells) { else if(CTX::instance()->mesh.partitionCreateGhostCells) {
graph.clearDualGraph(); graph.clearDualGraph();
graph.createDualGraph(false); graph.createDualGraph(true);
graph.assignGhostCells(); graph.assignGhostCells();
} }
elmToPartition.clear(); elmToPartition.clear();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment