docs(solvers): state for each transform type where the boundary node sits relative to the input array (DST-I/II, DCT-I/II, FFT), with a staggered-grid example
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 68/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- python
- Domain
- documentation
Research direction
Start with docs/theory/elliptic_solvers.md and docs/elliptic_solvers_guide.md, then locate the solve_helmholtz_* docstrings and the mktestdocs setup from #95. Add the boundary-location table, the Arakawa C-grid worked example, and the L conventions described in the issue. Done means the snippets run in CI and every solver docstring states its boundary-node location.
Written by the indexing model from the issue text.
Description
Part of #83. Requested by the finitevolX audit (jejjohnson/finitevolX#300), where every spectral inversion converged at first order because the wrapper passed its full ghost-ringed array to solve_helmholtz_dst.
Summary
The solver docs say things like "DST-I: ψ = 0 on all edges" (docs/theory/elliptic_solvers.md) without saying which nodes are the edges. For a consumer whose unknowns live on a staggered grid this is the whole question:
| Transform | Unknowns | Where the homogeneous BC is imposed | L convention |
|---|---|---|---|
DST-I (solve_helmholtz_dst, dst1) |
all N input nodes | ψ = 0 on virtual nodes at index −1 and N, i.e. half a spacing beyond the first/last input node on a node-centred grid, a full cell beyond on a cell-centred one | (N+1)·dx |
DST-II (dst2) |
all N input nodes (cell centres) | ψ = 0 on the faces at index −½ and N−½ | N·dx |
DCT-I (dct1) |
all N input nodes | ∂ψ/∂n = 0 at the first/last node itself (node-centred, mirror) | (N−1)·dx |
DCT-II (dct, dct2) |
all N input nodes (cell centres) | ∂ψ/∂n = 0 on the faces at −½ and N−½ | N·dx |
| FFT | all N | periodic with period N·dx | N·dx |
Measured on a C-grid (finitevolX): passing the full [Ny, Nx] array with a one-cell ghost ring to DST-I puts the Dirichlet wall one full cell outside the physical wall (rate 0.53–0.89); passing the strictly interior X nodes [1:-2, 1:-2] gives rate 2.00.
Proposed fix
- A "Where is the boundary?" section in
docs/theory/elliptic_solvers.mdanddocs/elliptic_solvers_guide.mdwith the table above and one worked example: an Arakawa C-grid with ψ at corners and p at centres, showing which slice of the array to pass for Dirichlet (DST-I on the interior corners) and Neumann (DCT-II on the interior centres), and the mirrored-back embedding. - The same statement in each
solve_helmholtz_*docstring and in the futureHelmholtzSolver(#107) docstring, plus theLconvention (which #94 already tracks for the_psbuilders). - A doc-snippet test (via #95's
mktestdocs) that runs the example and asserts rate ≥ 1.9.
Acceptance criteria
- Table and worked example in the docs; snippets execute in CI.
- Every solver docstring names its boundary-node location in one sentence.
- Dominant language
- Python
- Stars
- 2
- Forks
- 0
- Avg merge
- 8h 13m
- Merged PRs (30d)
- 8
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from jejjohnson/spectraldiffx
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
jejjohnson/spectraldiffx#172 ·
-
epic
Difficulty 1/5 Under an hour Newbie friendliness 62/100
jejjohnson/spectraldiffx#167 · 1 comment ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
jejjohnson/spectraldiffx#113 ·
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
jejjohnson/spectraldiffx#105 ·
-
dependencies
Difficulty 4/5 3-5 days Newbie friendliness 45/100
jejjohnson/spectraldiffx#181 ·
All issues in jejjohnson/spectraldiffx
Similar issues
-
bug(operator): VolterraOperator built inside jax.jit with a concrete decay raises TracerBoolConversionErrorPossibly taken @jejjohnson claimed this today. Opentype:bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
jejjohnson/integrix#144 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
finos/ai-governance-framework#459 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
autowarefoundation/autoware_carla_scenario#2963 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
freelawproject/litigant-portal#1307 ·
Maintainers usually reply within 2 days
-
type/bug
Difficulty 1/5 Under an hour Newbie friendliness 86/100
h2oai/h2o-llmstudio#1163 ·
Maintainers usually reply within 1 day