Skip to content

Commit f41bcd2

Browse files
committed
test: restore default Nitsche local-h path
Remove the local_h=False workaround from the boundary-normal MPI regression now that Mesh.cell_size() is partition independent. The test again exercises the public local_h=True default and compares its Nitsche solve with a fresh serial process.\n\nRecord the user-visible consequence in the development changelog: the rank-local centroid kd-tree moved the default Nitsche velocity answer by 6.6e-3, while the cell-geometry replacement is identical cell by cell from one through eight ranks.\n\nValidated the focused Nitsche regression at 2, 4 and 8 Open MPI ranks (10.99 s, 7.31 s and 9.60 s respectively).
1 parent accf259 commit f41bcd2

2 files changed

Lines changed: 12 additions & 9 deletions

File tree

docs/developer/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -492,6 +492,11 @@ in `Stokes_Constrained` (#224), then made parallel-correct.
492492
minimum radius, restoring correct stiffness on graded and adapted meshes
493493
(#275).
494494

495+
- The local size now comes from each cell's own geometry instead of a kd-tree
496+
over the centroids held by the current MPI rank. The old field changed at
497+
partition boundaries and moved the default ``local_h=True`` Nitsche velocity
498+
answer by 6.6e-3 between rank counts; the replacement is cell-by-cell
499+
identical from one to eight ranks (#569, #687).
495500
- `mesh.boundary_slip` API with `BoundingSurface` objects for boundary
496501
tangent-slip (#225); `Surface.influence_function` respects finite edges
497502
(#241).

tests/parallel/test_1069_boundary_normal_parallel.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -333,14 +333,12 @@ def _nitsche_annulus_diagnostics():
333333
leakage. Both are stable from tolerance 1e-9 to 1e-12, so neither is the linear
334334
solve.
335335
336-
``local_h=False`` is deliberate and it is not a workaround for this fix. The
337-
default ``local_h=True`` scales the Nitsche penalty by ``mesh.cell_size()``, which
338-
is built from ``Mesh._get_mesh_sizes`` — a kd-tree query against THIS RANK's cell
339-
centroids, and so partition-dependent in its own right (on this mesh the field's
340-
sum is 26.0822 at np=1, 26.1211 at np=2, 26.1386 at np=4, and its max moves at
341-
np=4). That is a SEPARATE defect from the boundary normal, it is not what #564 is
342-
about, and leaving it in would make this test measure the two together. See the
343-
TODO(BUG) on ``Mesh._assemble_cell_size``.
336+
This test now leaves ``local_h`` at its default ``True``. Before #569/#687,
337+
doing so mixed the boundary-normal regression with a second partition-dependent
338+
input from ``mesh.cell_size()``; this test therefore had to disable the public
339+
default. The cell-local geometric size is now partition independent, so retaining
340+
the default jointly guards the normal assembly and the Nitsche penalty path users
341+
actually run.
344342
"""
345343
RI, RO = 0.5, 1.0
346344
mesh = uw.meshing.Annulus(radiusInner=RI, radiusOuter=RO, cellSize=0.12, qdegree=3)
@@ -357,7 +355,7 @@ def _nitsche_annulus_diagnostics():
357355
y / r * sympy.cos(4 * theta) * (r - RI) * (RO - r) * 40.0]])
358356
stokes.add_essential_bc((0.0, 0.0), "Lower")
359357
# default normal= is the assembled one — that is what is under test
360-
stokes.add_nitsche_bc(0.0, "Upper", local_h=False)
358+
stokes.add_nitsche_bc(0.0, "Upper")
361359
stokes.tolerance = 1.0e-9
362360
stokes.petsc_options["snes_type"] = "ksponly"
363361
stokes.solve()

0 commit comments

Comments
 (0)