Skip to content

Rename staggered -> collocated (the scheme is not staggered-grid) - #5

Merged
gfpinton merged 1 commit into
mainfrom
fix/collocated-naming
Jul 19, 2026
Merged

Rename staggered -> collocated (the scheme is not staggered-grid)#5
gfpinton merged 1 commit into
mainfrom
fix/collocated-naming

Conversation

@gfpinton

Copy link
Copy Markdown
Collaborator

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 in solver.py are dead code.)

  • API rename (breaking, pre-release): shear_fdtd_staggeredshear_fdtd, shear_fdtd_staggered_jaxshear_fdtd_jax. All call sites in tests, validation, examples, and __init__ updated.
  • Prose in README, docstrings, and progress prints: "staggered-grid" → "collocated (cell-centered)".
  • Re-pointed a stale ruff.toml per-file-ignore from the old prototype path to src/shearwave/solver.py.
  • Kept the two solver.py comments that describe the dead face-based projection (they correctly use "staggered").

Test plan

  • shear_fdtd / shear_fdtd_jax importable; old name removed
  • README quickstart matches the new signature
  • pytest tests/ — 24 passed (with JAX)
  • git grep staggered → only the accurate dead-code comments remain

Note: ruff.toml's other per-file-ignores still reference old fullwave/... prototype paths (mis-targeted, harmless no-ops) — a separate cleanup if you want it.

🤖 Generated with Claude Code

https://claude.ai/code/session_01R3eMurRYQsmx58nU2yFwAF

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
@gfpinton
gfpinton merged commit aaf6702 into main Jul 19, 2026
3 checks passed
@gfpinton
gfpinton deleted the fix/collocated-naming branch July 19, 2026 14:11
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.

1 participant