Rename staggered -> collocated (the scheme is not staggered-grid) - #5
Merged
Conversation
The solver was described everywhere as "staggered-grid," but it is a collocated (cell-centered) scheme: displacement, velocity, the 7-point Laplacian, and the body force are all sampled at cell centers (there is no velocity/stress staggering onto faces). The face-based staggering helpers in solver.py are dead code. - Rename the public API: shear_fdtd_staggered -> shear_fdtd and shear_fdtd_staggered_jax -> shear_fdtd_jax (breaking; pre-release 0.1.0). Updated all call sites in tests, validation, examples, and __init__. - Correct prose in README, module/function docstrings, and progress prints from "staggered-grid" to "collocated (cell-centered)". - Re-point the stale ruff per-file-ignore from the old prototype path fullwave/shear_wave/shear_fdtd_staggered_3d.py to src/shearwave/solver.py. The two comments in solver.py that describe the (dead) face-based projection still say "staggered" — that is accurate for that code and is left as-is. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01R3eMurRYQsmx58nU2yFwAF
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.
The solver was described as "staggered-grid" throughout, but it's a collocated (cell-centered) scheme —
u, velocity, the 7-point Laplacian, and the body force are all sampled at cell centers, with no velocity/stress staggering onto faces. (The face-based staggering helpers insolver.pyare dead code.)shear_fdtd_staggered→shear_fdtd,shear_fdtd_staggered_jax→shear_fdtd_jax. All call sites in tests, validation, examples, and__init__updated.ruff.tomlper-file-ignore from the old prototype path tosrc/shearwave/solver.py.solver.pycomments that describe the dead face-based projection (they correctly use "staggered").Test plan
shear_fdtd/shear_fdtd_jaximportable; old name removedpytest tests/— 24 passed (with JAX)git grep staggered→ only the accurate dead-code comments remainNote:
ruff.toml's other per-file-ignores still reference oldfullwave/...prototype paths (mis-targeted, harmless no-ops) — a separate cleanup if you want it.🤖 Generated with Claude Code
https://claude.ai/code/session_01R3eMurRYQsmx58nU2yFwAF