Repository navigation
Ignore infinite missing-offset sentinels when computing tile forces - #122
Open
sylvesterkaczmarek wants to merge 1 commit into
Conversation
Signed-off-by: Sylvester Kaczmarek <16242628+sylvesterkaczmarek@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.py22 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 --checkpass. No production dependency or workflow changes.