Epic: gaussx integration (consume structured operators, expose spectral preconditioners, fix the dependency pin)
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- jupyter-notebook, python
- Domain
- backend-api-design, performance, tooling
Research direction
This is an epic coordinating multiple issues across two repositories. Start by reading the linked child issues (#112, #113, #114, #115) and the gaussx-side issues. The first actionable piece is likely #112, which involves wrapping spectral solvers as lineax operators. Examine the existing solve_helmholtz_fft function and the lineax integration points. The goal is to enable spectral preconditioners within the gaussx structured linear algebra framework.
Written by the indexing model from the issue text.
Description
Scope
The spectraldiffx side of a two-repo effort; the gaussx side is jejjohnson/gaussx#258, and finitevolX consumes both (jejjohnson/finitevolX#279). Every solver in spectraldiffx is an operator whose eigenbasis is a fast transform (operator = V⁻¹ Λ V with V an FFT/DCT/DST/Legendre pair). gaussx has the generic structured-linear-algebra machinery (KroneckerSum, MaskedOperator, CapacitanceSolver, Toeplitz, preconditioned CG, logdet/sqrt dispatch) but no "fast-diagonalisable operator" type, so today the only shared piece is the capacitance solver.
Benchmarks from the audit (128² Helmholtz, x64, CPU) that decide the direction:
| Variant | ms/solve |
|---|---|
direct solve_helmholtz_fft |
0.40–0.65 |
gaussx.solve(KroneckerSum − λI) today (dense eigh per solve) |
3.4–295 |
spectral inverse wrapped as a custom lineax.AbstractLinearSolver |
0.485 (0.97x, no overhead) |
lineax.CG on the FD stencil |
56–72 (115–144x slower) |
variable-coefficient ∇·(a∇ψ) − λψ: plain CG |
549 iterations, 144 ms |
same with the spectral solve as preconditioner via gaussx.linear_solve(..., preconditioner=OperatorPreconditioner(M)) |
16 iterations, 12–14 ms (works with gaussx v0.0.17 today) |
Conclusion: wrapping spectral solvers as lineax/gaussx operators costs nothing on solves (1.8x on implicit-diff gradients, so keep direct functions for hot loops) and buys composability. Quadrature rules and Kronecker-of-transforms should stay in spectraldiffx (dctn(axes=...) already is the fused Kronecker transform).
gaussx-side work (jejjohnson/gaussx#258)
- jejjohnson/gaussx#259
CapacitanceSolverstorage layout / memory / staticbase_solve - jejjohnson/gaussx#260
CapacitanceSolverconstant-augmented system for singular bases - jejjohnson/gaussx#261
DiagonalisedOperator - jejjohnson/gaussx#262
Circulant - jejjohnson/gaussx#263 non-symmetric Kronecker-sum solve
- jejjohnson/gaussx#265
solve(MaskedOperator)dispatch - jejjohnson/gaussx#266 publish gaussx to PyPI
spectraldiffx-side child issues (in suggested order)
- #112 feat(solvers):
as_lineax_operator/as_preconditioner+ variable-coefficient CG docs example — works today, highest value per effort - #113 build: bump gaussx pin to v0.0.28 now; drop the git pin once gaussx is on PyPI
- #114 refactor(solvers): express Fourier/Chebyshev/spherical solvers through
gaussx.DiagonalisedOperator(blocked on gaussx#261/#262/#263; after #106) - #115 refactor(capacitance): replace the wrapper with
gaussx.solve(MaskedOperator(...))(blocked on gaussx#265, #259, #260; the correctness fix is #87 and does not wait) - #123 refactor(capacitance): rename
spectraldiffx.CapacitanceSolverto avoid the clash withgaussx.CapacitanceSolver— requested by finitevolX (jejjohnson/finitevolX#318)
Related
- #80 (correctness), #81 (spherical), #82 (JAX-native; #102 is a prerequisite here), #83 (Fourier consolidation), #85 (hygiene).
- Downstream: jejjohnson/finitevolX#279 (its dependency epic), #315–#319.
- 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