Update anisotropic convection demo for current APIs - #480
Conversation
|
The failing test_uw3 import-smoke check appears to fail during MPI/UCX initialization before this PR change is reached: UCX ERROR mana_0 ... failed to create UD QP This PR only updates scripts/aniso_convection_demo.py. Local validation passed with: rm -f /tmp/metric_mesh/conv_ra1e+05_res16_n20.npz The script completed and saved /tmp/metric_mesh/aniso_convection.png. I do not have permission to rerun the upstream workflow, so a maintainer rerun may be needed. |
lmoresi
left a comment
There was a problem hiding this comment.
Adversarial review
The os.makedirs fix for the /tmp cache is real, and the API updates verified correct (_tri_cells/_signed_areas still exported; node_redistribution(mesh, <expr>) valid). One blocking finding:
- MAJOR — free-slip → no-slip on the upper boundary. This flips the demo's convection solution (rigid-lid vs free-slip annulus plumes differ visibly), and the demo exists to show refinement following those plumes. Use
add_rotated_freeslip_bc(0, "Upper"). - MINOR —
from underworld3.meshing import smooth_mesh_interioris now unused; the helper block sits mid-imports (E402). - MINOR —
zero_init_guess=Trueper step adds cost; harmless in a demo but unnecessary.
Requested change: the boundary condition. The failing test check was the known runner flake (#461), rerun.
35a63e8 to
99c9f69
Compare
|
Thanks Professor @lmoresi. I restored the intended upper free-slip condition using add_rotated_freeslip_bc(0, "Upper"). I also removed the unused smooth_mesh_interior import and dropped the unnecessary zero_init_guess=True in the Stokes solves. Validation:
The demo completes and saves /tmp/metric_mesh/aniso_convection.png. |
This PR updates scripts/aniso_convection_demo.py so the annulus convection / metric-redistribution demo runs with the current Underworld3 APIs.
Changes include:
This does not change solver internals.
Validation:
Example local output: