solprop.backends.numpy_ref#

The NumPy reference backend: the oracle.

Plain NumPy and scipy.fft through solprop.fourier, one named function per pass, no fusion, no in-place tricks and no compiled code. It exists to be read and to be right: every other backend is validated against the numbers it produces (docs/dev/backends.md section 2). It runs every route and every march.

Reading order: passes holds the formulas, one function per pass of a stage; backend the seam (NumpyRefBackend), which builds the workspace (workspace), the engines (engines, multistep) and the march of each run. The workspace owns the stage source (source), the statistics (statistics) and the coupled flow (coupled_flow); the Adams arithmetic and coefficients are adams_kernels and adams_tables, the general modal guide general_modal, the dense output dense.

The stateful control of a run is the reference’s own: its session (session, composed of the parts in session_parts), which schedules a run and drives its march, and the marches it drives (marches): the Runge-Kutta march (runge_kutta), the Adams march (adams) and the low-storage march (low_storage). They are the Python statement of what native’s session.cpp and compiled marches do, and native is traced against them, but native runs in its own session and imports none of them. What the two backends share is stateless: the controller cores (solprop.backends.adams_core, solprop.backends.rk_core), the engine protocols (solprop.backends.engines), the low-storage method (solprop.backends.low_storage), the tableaux, stage tables, exponential coefficients and call ledger, and the preparation refusals (solprop.backends.session.check_preparation()).

Modules

adams_kernels

The field arithmetic of the reference's Adams steps (SEP 13, SEP 14, SEP 16).

adams_tables

The coefficient tables of an Adams trial (SEP 13, SEP 16, ADR-042).

backend

The reference backend: its lowering, its marches and the refusals (SEP 52).

coupled_flow

The coherent wall's coupled linear flow, as the reference executes it (SEP 16).

dense

The reference's dense output: a plane interpolated inside the step that crossed it.

engines

The reference's Runge-Kutta engines over its workspace (SEP 52 section 5.2).

general_modal

The general modal guide's nonlinear source, on the reference backend.

marches

The reference's marches, one module each, and what they share (SEP 47 phase 2).

multistep

The reference's Adams engine: the history and its trials (SEP 13, SEP 14, SEP 16).

passes

The passes of a stage, one named function each.

session

The NumPy reference's run session: the schedule of a run (SEP 47, SEP 52).

session_parts

The building blocks the reference's session composes (SEP 47 section 5).

source

The stage derivative: the nonlinear source of a lab-frame field, on every route.

statistics

The statistics the reference forms itself, from a committed state (SEP 9, SEP 19).

workspace

The reference's workspace: its state and every state-sized operation (SEP 52).