Skip to content

Quick-fix batch: pressure nullspace, mesh cache filename, test number - #619

Merged
lmoresi merged 1 commit into
developmentfrom
bugfix/quickfix-batch-3
Aug 20, 2026
Merged

Quick-fix batch: pressure nullspace, mesh cache filename, test number#619
lmoresi merged 1 commit into
developmentfrom
bugfix/quickfix-batch-3

Conversation

@lmoresi

@lmoresi lmoresi commented Aug 19, 2026

Copy link
Copy Markdown
Member

Closes #577. Closes #600. Closes #618.

Three small independent fixes, batched because none warrants its own change —
the same shape as #456 and #532.

#577 — the zero-slip annulus ran a singular saddle

CylindricalStokes.apply_boundary_conditions returned before the line that
removes the pressure nullspace:

if self.boundary == "zero":
    prescribed_velocity(solver, self.boundaries, (0.0, 0.0))
    return                                   # <- before the nullspace line

free_slip(solver, self.boundaries)
solver.petsc_use_pressure_nullspace = True

Both cases are an enclosed annulus, so in both the pressure is determined only
up to a constant. The nullspace belongs to the domain, not to the wall type, and
is now set once after the branch.

Measured, reading the flag back off the solver:

boundary before after
"zero" unset True
"free" True True

#618 — one cache file for every resolution

uw_filename = f"{mesh_file_dir()}/uw_structuredQuadBox_minC{minCoords}_maxC{maxCoords}.msh"

elementRes was not in the name, so every StructuredQuadBox on the same box
wrote and read one path whatever its resolution, and two processes at different
resolutions raced on it. The annulus already carries its cell size for this
reason. Resolution is now part of the name; a 4x4 and an 8x8 produce
..._res(4, 4).msh and ..._res(8, 8).msh where they previously produced one
file between them.

#600 — two test files numbered 1029

test_1029_analytic_zhong2008.py collided with
test_1029_analytic_faulted_medium.py; the two PRs were written against
different bases and neither could see the other's choice. Zhong moves to 1030,
the faulted medium keeps 1029 because it merged first. The reference in
docs/developer/subsystems/analytic-solutions.md is updated and no stale
mention remains anywhere in src/, tests/, docs/ or scripts/.

Verified

Full ./uw test: 1556 passed, 32 skipped, 2 xfailed. The analytic contract,
conformance and Zhong files: 132 passed.

Underworld development team with AI support from Claude Code

Three small independent fixes, each closing an issue that did not warrant its
own change.

#577. CylindricalStokes(boundary="zero") returned before the line that removes
the pressure nullspace, so the zero-slip case ran a singular saddle and could
return a quiet, wrong pressure. The nullspace belongs to the DOMAIN rather than
to the wall type — both cases here are an enclosed annulus — so it is now set
once after the branch. Verified by reading petsc_use_pressure_nullspace back
off the solver for both boundary values; it was None for "zero" before and is
True for both now.

#618. The StructuredQuadBox mesh cache filename omitted elementRes, so every
box on the same coordinates shared one path whatever its resolution and two
processes at different resolutions raced on it. Resolution is now part of the
name, as the annulus already does with its cell size. Verified: 4x4 and 8x8
now write uw_structuredQuadBox_..._res(4, 4).msh and _res(8, 8).msh.

#600. test_1029_analytic_zhong2008.py collided with
test_1029_analytic_faulted_medium.py — the two PRs were written against
different bases and neither could see the other's number. Renamed to 1030; the
faulted medium keeps 1029 because it merged first. The reference in
docs/developer/subsystems/analytic-solutions.md is updated and no stale
mention remains.

Closes #577, #600, #618.

Full ./uw test 1556 passed; the analytic contract, conformance and Zhong files
132 passed.

Underworld development team with AI support from Claude Code
Copilot AI lite review requested due to automatic review settings August 19, 2026 11:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants