Skip to content

Ignore infinite missing-offset sentinels when computing tile forces - #122

Open
sylvesterkaczmarek wants to merge 1 commit into
google-research:mainfrom
sylvesterkaczmarek:fix/unavailable-coarse-offset-forces-20261005
Open

sylvesterkaczmarek wants to merge 1 commit into
google-research:mainfrom
sylvesterkaczmarek:fix/unavailable-coarse-offset-forces-20261005

Conversation

@sylvesterkaczmarek

Copy link
Copy Markdown

Summary

Fixes #121.

Replace positive and negative infinite force residuals with zero, matching the existing treatment of unavailable NaN constraints. This prevents failed coarse-offset estimates from becoming enormous artificial spring forces in both 2D and 3D tile meshes. Finite constraints, their per-component behavior, and the underlying spring formula are unchanged.

Validation

python -m pytest -q tests/stitch_missing_offsets_test.py tests/mesh_test.py tests/flow_utils_test.py

22 tests passed. Thirteen new cases cover both mesh dimensions, NaN and signed infinities, mixed valid/missing constraints against an independent force-balance oracle, eager/JIT execution, coordinate derivatives and the actual coarse optimizer. Nine cases fail on unchanged upstream; four controls pass. Existing mesh and flow utility tests pass. Full image-volume stitching, remote stores and accelerators were not exercised.

Tested on macOS CPU with Python 3.12 using real module imports. New test formatting, scoped static checks, syntax checks and git diff --check pass. No production dependency or workflow changes.

Signed-off-by: Sylvester Kaczmarek <16242628+sylvesterkaczmarek@users.noreply.github.com>
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.

Missing coarse offsets produce extreme spring forces during mesh relaxation

1 participant