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

Abierto
#153 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
python
Área
backend

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
Python
Estrellas
2
Forks
0
Merge medio
8 h 13 min
PR fusionados (30 d)
8

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de jejjohnson/spectraldiffx

Todos los issues de jejjohnson/spectraldiffx

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.