f_rd_stepper_spike — can a real-space explicit PDE stepper run in a pix chain?
Status: 🔵 spike plan, not run. Captured 2026-11-28 (Claude offline, docs only). It gates f_gs, f_excitable, f_turing and (loosely) f_perona. Numbers below are derived from VisualPDE preset constants, not measured. No spike has been run, no Max bench taken.
The question
f_ks, f_cgl and f_wave_field are spectral solvers (DFT passes, 256² float32). The reaction-diffusion candidates are naturally real-space explicit: one Laplacian stencil plus a pointwise reaction per substep, in a ping-pong. The library has no module like that. Is it affordable, and at what grid size and substep count does it look alive?
What to find out
- Stability and resolution: for Gray-Scott at 256², what
dtis stable and how many substeps per frame make the pattern visibly evolve at 30 fps. Compare the 256² pattern scale with VisualPDE's 330 to 700 cell grids. - Stiff cases: Brusselator, Gierer-Meinhardt and Schnakenberg sit near the explicit 2D limit (
Dv dt / dx^2 = 0.2for Gierer-Meinhardt and Schnakenberg, from their presets); Gray-Scott does not (0.016 in the Pearson preset). Which of them need a smaller step than a per-frame budget allows. - Float32: do states near zero (
unear 0 in Gray-Scott) stay stable. - Edges: periodic wrap versus clamp, and the
G-edge-wraphazard in pix chains. - Cost per substep in a
jit.gl.pixping-pong, and whether several substeps can sit in one chain or need a multi-stage pix chain like the oneP-confinementmentions.
Proposed method (per the f_ verification tiers)
- Tier 1, NumPy mirror (offline, no Max, no API calls): a 256² explicit stepper for Gray-Scott with the observed
a,b,Du,Dv; sweepdt, substeps and seeds; record stability limits and a look-alive measure (for example, defect or spot count over time, or frame-to-frame change). Repeat for one stiff kinetic (Gierer-Meinhardt) to bound the hard case. This follows thef_cgl_spike.pyandf_nematic_spike.pypractice; seeideas/f_cgl.md"Spike result". - Tier 2, bench (needs Max in the foreground; Matt's go, announce first): a scratch stepper patch and a cost measurement. Do not start before the NumPy numbers say it is worth it.
- Tier 3, live look: Matt's.
Reuse to check before writing anything
docs/max-reference/temporal_synthesis_architecture.md and intraframe_multipass_architecture.md for the ping-pong and multi-pass patterns; the f_vf_lbm and f_vf_fluid stepping (real-space solvers already in the library, now in PDE) as the nearest precedent for explicit steps in a pix chain (their substep counts and cost were not read). Not read for this note: how those two modules iterate.
Stop rule
If Gray-Scott at 256² cannot reach a lively pattern in under about 4 ms per frame at a reasonable substep count (the f_ks and f_cgl costs are 2.4 and 3.5 ms), park the real-space family and keep only the spectral candidate (f_swift). Say so in .specify/gates.md.
Gate
P-pattern-gen.