Repository navigation
Add optional Numba geometry unwrap backend - #50
Merged
Merged
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9035ac8d06
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
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
Adds an explicit optional Numba backend for the curvature-angle unwrap used by
geometry4.The existing Python implementation remains the reference and default path:
geometry_unwrap_backend="python"— current reference behaviorgeometry_unwrap_backend="numba"— optional exact serial JIT implementationThe geometry unwrap backend is independent of the existing flow-field backend. Numba remains an optional dependency and installing it does not change the default solver behavior.
Numerical behavior
The Numba implementation preserves the existing unwrap semantics exactly:
fastmath=Falsecache=Falselast = 0.0<and>comparisonsnp.pi/2.0 * np.piarithmeticThe Python and Numba paths were bitwise identical in:
geometry4comparisonsThe validated 5,000-step trajectory was identical for both paths:
Ns = 23591.7245401220504077Checkpoint arrays and scalars, full histories, cutoff steps, selected pairs, and points removed all matched exactly.
Performance
Five alternating 5,000-step benchmark pairs produced median speedups of:
These are machine- and workload-specific measurements, not universal performance claims.
A later single public production-path confirmation also showed a strong curvature-stage improvement:
That single run was slower end-to-end because unrelated flowfield timing increased substantially. The five alternating pairs therefore remain the stronger performance estimate. No universal end-to-end speedup is claimed.
Optional dependency and compatibility
python.run_config.jsonrecords the normalized effective geometry unwrap backend.numba_parallelandnumba_fastmathcontinue to apply only to the existing flow backend.The following combinations remain independent and supported:
Interface changes
Adds: