feat(pipekit): elliptic solver operators — Poisson / Helmholtz with FFT, DST and DCT boundary conditions

Aperta
#153 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python
Ambito
backend

Direzione di ricerca

Start by reading the existing solve_helmholtz_2d implementation and _BC_DISPATCH, then inspect the prerequisite issue #151 and the related solver in #107. Implementing the Helmholtz and Poisson operators spans boundary-condition transforms, spectral input handling, and differentiation with respect to λ. Done means matching the solver across supported BC combinations, preserving zero transforms for all-periodic spectral input, and checking λ gradients against finite differences.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement

Part of epic #148. Depends on: #151 (E4.1). Wraps today's solve_helmholtz_2d (per-axis BCs); #107's single HelmholtzSolver only simplifies the body later.

Proposal

class Helmholtz(SpectralOperator):
    """(∇² − λ) ψ = f     with BCs per axis (periodic / Dirichlet / Neumann)."""
    bc: tuple[str, ...] = eqx.field(static=True)          # e.g. ("periodic", "dirichlet")
    approximation: str = eqx.field(static=True, default="spectral")
    lam: Array = 0.0                                       # λ, a leaf (see #105 on λ = 0)
    zero_mean: bool | None = eqx.field(static=True, default=None)

class Poisson(Helmholtz):  # λ ≡ 0
  • The carrier is physical in, physical out for DST / DCT boundary conditions, because their coefficient layouts are not the Fourier Spectral layout. With all-periodic bc, the op also accepts and emits Spectral (0 transforms spectral → spectral).
  • A bc tuple and approximation that the #107 solver does not support fail at construction with the supported set.

Acceptance criteria

  • Equals solve_helmholtz_2d on the per-axis BC combinations of _BC_DISPATCH.
  • All-periodic Spectral → Spectral: 0 transforms.
  • grad w.r.t. lam matches finite differences away from λ = 0; the docstring links #105 for the discontinuity at λ = 0 on null-mode BCs.

Generated by Claude Code

Lingua principale
Python
Stelle
2
Fork
0
Merge medio
8h 13m
PR unite (30g)
8

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di jejjohnson/spectraldiffx

Tutte le issue di jejjohnson/spectraldiffx

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.