Skip to content

Commit f3ce409

Browse files
committed
fixes the hangup in shape correction
When adapting meshes on 100+ processors FaceVertFixer in shape correction used to cause hangup.
1 parent 233afd5 commit f3ce409

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

ma/maShape.cc

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,10 @@ class FaceVertFixer : public TetFixerBase
294294
edges[0] = 0;
295295
edges[1] = 0;
296296
edges[2] = 0;
297+
verts[0] = 0;
298+
verts[1] = 0;
299+
verts[2] = 0;
300+
verts[3] = 0;
297301
face = 0;
298302
oppVert = 0;
299303
tet = 0;
@@ -308,17 +312,18 @@ class FaceVertFixer : public TetFixerBase
308312
are too close, the key edges are those that bound
309313
face v(0,1,2) */
310314
apf::findTriDown(mesh,v,edges);
311-
face = apf::findUpward(mesh, apf::Mesh::TRIANGLE, edges);
312315
tet = apf::findElement(mesh, apf::Mesh::TET, v);
313316
oppVert = v[3];
317+
verts[0] = v[0];
318+
verts[1] = v[1];
319+
verts[2] = v[2];
320+
verts[3] = v[3];
314321
}
315322
virtual bool requestLocality(apf::CavityOp* o)
316323
{
317-
/* Request locality for edges (for swaps) and v[3] (for face-split-
318-
collapse, the face is already handled by the edges) */
319-
bool edgesLocalized = o->requestLocality(edges,3);
320-
bool oppVertLocalized = o->requestLocality(&oppVert,1);
321-
return edgesLocalized && oppVertLocalized;
324+
/* by requesting locality for all the verts we can be sure
325+
* that all the desired entities for this operator are local */
326+
return o->requestLocality(verts,4);
322327
}
323328
virtual bool run()
324329
{
@@ -328,6 +333,7 @@ class FaceVertFixer : public TetFixerBase
328333
++nes;
329334
return true;
330335
}
336+
face = apf::findUpward(mesh, apf::Mesh::TRIANGLE, edges);
331337
if (faceSplitCollapse.run(face, tet))
332338
{
333339
++nfsc;
@@ -339,6 +345,7 @@ class FaceVertFixer : public TetFixerBase
339345
private:
340346
Mesh* mesh;
341347
Entity* edges[3];
348+
Entity* verts[4];
342349
Entity *face, *oppVert;
343350
Entity* tet;
344351
FaceSplitCollapse faceSplitCollapse;

0 commit comments

Comments
 (0)