Jets: one shared assignment check for dense and fine levels

Move surface_link_velocity (pure host code) from lbm/curved_links.py to
body/jets.py, re-exported by curved_links, so refinement.py can reuse it
without importing PyCUDA. prepare_fine_boundary now runs the same
assignment validation as the steppers when jets are given, rejecting
jet-vs-SurfaceActuation overlap (root's C(12.25,12.25) R2.15 case) as
well as empty/overlapping jets. Test the overlap and a disjoint pair.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ClaudeandClaude Opus 5.5 committed 2026-10-15 08:35:12 +00:00
1 parent f7753be0e4
commit 038a759ff1
4 files changed
+70 -51

No files matched your search

+7
View File
@@ -276,3 +276,10 @@ def test_fine_boundary_keeps_edge_frame_hits_and_checks_jets():
refinement.prepare_fine_boundary(cfg, patch, [body], jets=[jet, jet])
with pytest.raises(ValueError, match="need fine boundary objects"):
refinement.prepare_fine_boundary(cfg, patch, [], jets=[jet])
# Jet vs legacy SurfaceActuation overlap on the fine level (root's case).
legacy = SimObject(0, geometry=CircleGeometry(*C, R), center=C, radius=R,
surface_actuation=SurfaceActuation(0., .5, .002))
with pytest.raises(ValueError, match="SurfaceActuation"):
refinement.prepare_fine_boundary(cfg, patch, [legacy], jets=[jet])
disjoint = Jet(Sector(C, math.pi, .5, R + .01), Radial(C, inward=False))
refinement.prepare_fine_boundary(cfg, patch, [legacy], jets=[disjoint])