← Explainer · Markdown · Source on GitHub

# S2 and S3: from aligned data to multiresolution simulation

**Design proposal, 2026-09-26; embedded-boundary readiness reviewed 2026-09-27.** Roadmap outcomes: [S2 and S3](/docs/ROADMAP#s2--uniform-multiblock-on-one-gpu).
Current status: [work board](/docs/WORKBOARD). No executable multiblock or AMR support
is established by this document. Per-method qualification, approved architecture and
performance-first GPU execution boundaries and boundary qualification updated 2026-09-26;
the required two-level pressure example and evidence matrix were added the same day.
Begin with [AMR-02 data alignment](/docs/amrex-alignment/DATA_MODEL_ALIGNMENT)
and the separate [TRN-01 single-level transport effort](/docs/amrex-alignment/SINGLE_LEVEL_TRANSPORT).

## Delivery sequence

AMR-02 represents today's one-block case as one `MeshPatch` and preserves its numerical
behavior. TRN-01 establishes conservative
transport and demonstrated accuracy benefit on selected single-grid cases. S2 then
validates that method across same-resolution patch interfaces. S3 adds coupled
refinement, then adaptation. Keep the same level/patch representation throughout;
do not create an alternative refined solver alongside a legacy uniform path.
Existing roadmap workflow priorities and one-GPU scope remain in force.

Apply the [GPU execution boundary](/docs/plans/gpu-resident-processing) to each
delivered scope: keep simulation fields and repeated numerical work on device,
complete reductions and dependent solver coefficients there, and avoid host/device
round trips in inner loops. Do not download simulation fields or reduction partials
for CPU numerical processing. Explicitly bounded and measured compact control,
status and layout metadata may support host scheduling and mesh management; account
for its synchronization cost as well as bytes. Host setup and allocation remain
available, and requested field/output capture remains separate from processing.
Closing the entire GPU-01 migration backlog is not a prerequisite to AMR-02 or to
unrelated TRN-01/S2/S3 work. Each increment preserves performance and qualifies its
new paths against this boundary without claiming uncompleted paths are compliant.
No silent CPU fallback or MPI is introduced.

Use TRN-01's [method qualification matrix](/docs/amrex-alignment/SINGLE_LEVEL_TRANSPORT#qualification-grows-by-method-and-topology).
One immutable momentum-transport choice applies to every patch and physical level
of a run. S2 may support retained interpolation methods after separate partition
checks; initial S3 accepts only the conservative method qualified for its case.
There is no requirement to implement every method on every topology and no silent
fallback. The [algorithm review guide](/docs/amrex-alignment/ALGORITHMS) and
[numerical explainer](/algorithms.html) connect these gates to the equations.

S2 layout/ownership development can overlap TRN-01. Finalize its transport interfaces
against the established method's stencil, flux and temporal-stage contract. Do not
combine the first proof of a new advection method with the first refinement test.
The [BC-01/BC-02 boundary plan](/docs/plans/boundary-condition-alignment) supplies
shared setup checks and single-grid boundary/stage qualification alongside TRN-01.
Numerical boundary corrections remain separate from AMR-02's behavior-preserving
refactor. Spatially mixed BCs are deferred and do not gate AMR-02, basic S2 or S3.

| Gate | Smallest useful implementation | What passing establishes |
| --- | --- | --- |
| AMR-02 | One level, one full-domain patch | Structural migration with existing behavior preserved |
| GPU-01, alongside delivery | Device numerical kernels and complete reductions; measured host control boundary | No field/partial-result downloads for CPU numerics in qualified paths, with bounded control transfers and preserved scientific/performance checks |
| TRN-01 | Conservative transport on one level and one patch | Validated budgets and accuracy benefit on preselected single-grid workloads, with measured cost |
| BC-01 / BC-02, alongside delivery | Consistent typed/JSON periodic validation and single-grid boundary/stage evidence | The declared method/BC subset is ready for S2 transport qualification; numerical corrections have separate acceptance |
| S2 first experiment | One uniform problem split into two patches | Same-resolution interfaces work for the declared simple case |
| S2 acceptance | Partitioned operators, supported geometry/BCs, measurements and output | A complete supported multiblock workflow on one GPU |
| S3 fixed refinement | One full-domain coarse patch and one aligned 2:1 fine region; shared timestep | Validated two-way coupling for an explicitly bounded case |
| S3 extension | Several fine patches and levels, then regridding | Each added layout/physics combination passes its own acceptance |

A two-patch experiment is not full S2 acceptance. Fixed refinement is not adaptive
refinement. Thermal or moving-geometry support does not transfer automatically to a
new layout. Unsupported combinations must fail preflight, not silently fall back.

## S2: same-resolution patches on one GPU

**Depends on:** accepted AMR-02, W1 workflow and representative S1 measurements.
New paths must meet the GPU execution boundary; unrelated GPU-01 backlog does not block S2.
TRN-01's flux/stencil contract precedes finalized transport interfaces, and its
accepted single-level scope is required for full S2 transport acceptance, together
with BC-02 evidence for each enabled method/BC subset.

### 1. Layout and field ownership

Accept a bounded collection of non-overlapping cell boxes whose union covers the
domain. Represent mesh partitions as `MeshPatch`, with `Box`, `DomainGeometry`,
`IndexType`, `LevelLayout` and `LevelFields` preserving their separate roles.
Follow [AMR-02 naming and bounds](/docs/amrex-alignment/DATA_MODEL_ALIGNMENT#bounds-and-placement):
inclusive boxes, explicit cell/node index types and C# spellings of corresponding
AMReX operations. Later refinement/coarsening must preserve the correct cell/face
extents and negative-index behavior; do not introduce a competing box convention.
All patches at this level share spacing and physical coordinate mapping.
Validate gaps, overlaps, bounds, minimum operator extents and allocation overflow.
Keep cell valid regions distinct from ghost storage and shared face samples.

Build adjacency/intersection information, including periodic images, once per layout.
Cell boxes are disjoint, but neighboring face-centered arrays include the same shared
face. Define one authoritative value or a deterministic synchronization rule, and
avoid counting shared faces twice in relevant reductions. Keep ownership on one GPU;
do not add MPI, load balancing or a general scheduler as prerequisites.

The level coordinator schedules exchange and operator stages from layout metadata;
patch kernels consume compact derived `PatchKernelDescriptor` values and borrowed
device views. The host may manage allocation, patch layout and adjacency from
authored or explicitly bounded compact metadata. Field-scale geometry/topology
processing and dependent numerical kernels remain on device. Views identify layout
revision, geometry revision, time and stage; a
completed frame does not imply ghosts are current for a later predictor stage.

### 2. Boundary filling and advection

Separate physical boundary application, periodic-domain mapping and interior patch
exchange. `BoundaryRegion` entries belong to `DomainBoundaryConditions`, with
`DeviceBoundaryRegion` entries in its device binding `DeviceDomainBoundaryConditions`;
they are not mesh partitions.
Canonical domain periodicity must agree across fields and operators; retain BC-01's
coordinate-based correspondence checks when deriving periodic mesh neighbors.
Resolve physical BC choices into component/operator descriptors; keep physical
pressure values distinct from pressure-correction conditions. The
[current boundary guide](/docs/BOUNDARY_CONDITIONS_HALOS) and
[numerical review](/docs/amrex-alignment/ALGORITHMS#boundary-conditions) define the starting contracts.
Fill same-level data through device operations at the stages that need it, then
record validity for that stage and invalidate it when its producer changes.
Never apply a wall condition merely because a stencil reaches a patch edge.

For the conservative method, use TRN-01's accepted reconstruction, limiter and temporal stages to determine ghost
reach and synchronization. Apply one consistent flux at each shared transport
interface, with opposite contributions to its adjacent control volumes. Exchange
values entirely on the device and validate edge/corner samples and periodic seams.

For any retained semi-Lagrangian/MacCormack method, replace local-domain clamping or
wrapping with interpatch sampling; its departure points may need a different reach.
Validate forward, reverse and limiting stages where applicable, including departure
reach across more than one patch. Do not infer that a pressure stencil's packed face
halos suffice for either method. Enable each retained method only for its qualified
scope, and do not preserve superseded internals solely for compatibility.

AMReX distinguishes neighbor exchange from physical boundary filling and its
`FillPatch` utilities assemble same-level or coarse-level values at the requested
time. Use that separation as the model, with numerical policies chosen for our solver.
[AMReX AmrCore](https://amrex-codes.github.io/amrex/docs_html/AmrCore.html)

### 3. Coupled operators, geometry and diagnostics

Advance one coupled solution, not independent per-patch simulations. Pressure and
implicit diffusion must account for cross-patch stencils. Extend pressure connected
components and gauges across interfaces, including periodic joins; reductions remain
double and appropriately weighted. A solid may span a patch boundary, and disconnected
fluid pockets may span several patches. Validate both.

Connectivity labeling, anchored-component classification, gauge/reduction
finalization, PCG coefficients and convergence evaluation execute on GPU. Do not
download cell labels, weights or reduction partials for CPU processing. Bounded
component counts or allocation metadata may support host resource management.
Device flags govern dependent updates; an occasional compact completion/status
readback may let the host stop scheduling work. Measure that cadence and cost
against device-gated launches; do not require long runs of inactive kernels merely
to eliminate a status transfer.

Evaluate repeated cut-cell geometry work at global physical coordinates with
consistent interface metrics on GPU. Static source preparation, including a
host-built acceleration structure uploaded for device sampling, may stay on the
host when its total setup cost and memory are appropriate.
`IEmbeddedBoundarySource`/`SdfEmbeddedBoundarySource` describe inputs;
`EmbeddedBoundaryData`/`DeviceEmbeddedBoundaryData` hold derived metrics, borrowed
by kernels through `EmbeddedBoundaryMetricsView`. Preserve distinct
current/previous/solver-coarse states and invalidate dependent stage views on change. Extend sources,
motion updates, force extraction, section integration and domain mass balance to the
layout. Bound each supported motion combination with evidence; preserve existing
single-patch functionality throughout the work.
Compute all field-derived diagnostics, force/section integrals and final weighted
reductions on the device; explicit output copies carry completed results only.

### Embedded-boundary readiness before cut interfaces

The [source review and illustrated explanation](/docs/amrex-alignment/EMBEDDED_BOUNDARIES) recommend a
bounded static-EB gate before accepting solids that cross patch joins. They do not
expand AMR-02 or BC-01, and do not require an EB rewrite before regular-grid S2 work.

1. Qualify final geometry on one grid: apertures, volume fractions, classes and normal
   consumers must agree after thresholding and isolated-cell repair. Reproduce the
   source-identified risk of face metadata surviving aperture repair unchanged;
   correct demonstrated mismatches without changing scientific references to pass.
2. Use global coordinates and neighboring geometry for every stencil at a storage
   join. Current local-edge gradient, solid-neighbor and immersed-wall-link rules
   cannot be reused as physical boundary rules on a patch edge.
3. Assign canonical shared-face metrics and velocity/flux ownership, with consistent
   periodic representatives and stage-valid geometry ghosts. Match operator face
   masks and connected pressure regions across patches; BC-01's coordinate checks
   alone do not establish EB symmetry or wall accuracy.
4. Partition the same represented grid through curved walls, slivers and narrow
   passages. Compare final geometry and connectivity first, then coupled operator
   action, trajectories, final continuity, wall behavior and budgets with the
   monolithic case. Preserve existing acceptance limits and state the geometry,
   wall mode and method subset tested. Partition agreement and physical accuracy
   are different claims.

All new repeated geometry/exchange/topology work and complete numerical reductions
stay on GPU; measure launch, transfer, synchronization and peak-memory costs. Current
GPU-01 gaps remain explicit. Add richer geometric metrics only when an operator needs
them. Conservative MAC cut volumes and small-cell treatment belong to TRN-01's cut
extension; moving geometry and coarse/fine EB consistency retain separate acceptance.
The first EB-free S3 pressure experiment does not depend on those later extensions.

### 4. Authoring, results and workflow

Add explicit typed/serialized partition support with capability checks and resource
estimates. Carry patch extents, placement and ownership through selective capture,
saved fields and live products. Introduce only the versioned contract changes actually
needed; update maintained fixtures, generators, decoders and viewers together.
Resolve one recorded method for the whole layout, reject unsupported method/layout
combinations before allocation and estimate only its required exchange/flux scratch.
Compute the tightest applicable patch constraint and adaptive dt on GPU; fixed
steps must also pass device-computed hard-limit checks. Clipping, rejection and
dependent stage masks use device results. Keep the authoritative timestep resident;
bounded host completion/status scheduling must not recreate CPU reduction or
coefficient work.

A stitched or resampled preview may be useful, but it must identify its sampling rule
and must not masquerade as native samples. Measurements keep physical coordinates
and their scientific meaning independent of the partition. Verify replay of the
resolved problem and layout; it remains replay, not numerical restart.

### S2 acceptance

Compare monolithic and partitioned runs of the same physical problem, using declared
unchanged scientific tolerances. Start with two patches and add unequal extents,
noncubic domains, all interface orientations, corners, periodic seams, cut geometry
crossing interfaces and cross-patch pressure components. Compare field trajectories,
divergence, operator residuals, forces/sections and mass balance, not just final images.

Compare the accepted TRN-01 method on both layouts, including its momentum budgets
and transport flux cancellation. This establishes partition independence; its
single-grid accuracy benefit must already have separate evidence.
For every enabled method, extend BC-02's accepted single-grid inflow, outlet/backflow,
wall and symmetry tests across partitions. Include MacCormack's forward, reverse
and limiter stages when enabled. A periodic-only partition test does not qualify
physical domain boundaries.
Every additional enabled method needs the same monolithic-versus-partitioned
comparison for its declared scope; interpolation methods need sampling equivalence,
not an invented conservative-flux test. Verify method identity through replay and
rejection of unavailable combinations. Partition acceptance for one method does not
enable another method automatically.

Verify shared-face consistency, cancellation/disposal, selective capture and memory
limits. Measure setup, solver, exchange and output costs independently. The one-patch
path must preserve its accepted performance; partitioning is not assumed to accelerate
the same grid. Apply [performance acceptance](/docs/PERFORMANCE_VALIDATION#architecture-change-acceptance).

Require no simulation-field or reduction-partial downloads for CPU numerical
processing in the new exchange, geometry, topology, solve and diagnostic paths.
Audit indirect APIs, host-returning reductions and pinned staging as well as explicit
copies. Record each permitted compact control/layout transfer's purpose, maximum
bytes/count, cadence and synchronization cost; measure setup, host scheduling and
inactive device launches rather than assuming that fewer copies means faster runs.
Account for requested output separately. GPU execution acceptance preserves double
reduction accuracy, independent references and every scientific check; disabling
checks is not a transfer fix. Existing migration gaps retain explicit status.

## S3: fixed refinement, then adaptation

**Depends on:** accepted S2 and TRN-01 transport; apply the GPU execution boundary
to the intended case scope and explicitly integrate each delivered thermal/motion
capability. Unrelated GPU-01 backlog is not a prerequisite.

### 1. Restrict the first problem

Start with a single rectangular coarse patch covering the entire domain and one
stationary rectangular fine patch. Proposed initial ratio: 2:1 on each axis, with
coarse-cell-aligned extents and a shared timestep selected for the finest constraints.
Use a simple stationary flow case first. Specify the allowed boundary contacts and
proper-nesting/ghost-support buffer before implementation; reject other layouts.
Use only the qualified conservative transport method throughout both levels.
Reject `SemiLagrangian` and `MacCormack` refinement requests initially; supporting
them on a single level does not imply a valid coarse/fine transport algorithm.

This is a proposed first subset, not a final decision on every supported refinement
ratio. The representation must allow a level to contain multiple patches. Multiple
fine regions, patch adjacency, more levels and physical-boundary contacts each require
later checks. A full-domain coarse patch can remain the initial runtime restriction.

### First two-level pressure example

**S3-01: required worked design and bounded prototype; not implemented or passed.** Before
general S3 pressure implementation, write out and solve one regular Cartesian case:
one full-domain coarse patch and one strictly interior, coarse-cell-aligned fine
patch at 2:1 in each direction, constant density, no embedded boundary and fixed
layout. Choose explicit dimensions, spacing, physical BCs and a manufactured
pressure/velocity field. Include a closed or periodic case to exercise the gauge;
do not leave the boundary or refinement-contact policy implicit. This pressure-only
research can begin before TRN-01 completes and does not block AMR-02 or single-grid
work. Its qualification is required before extending the pressure algorithm into
production S3; it does not qualify transport, diffusion, cut cells or complete flow.

#### Unknowns and the discrete operator

- Enumerate independent pressure-increment unknowns on uncovered coarse cells plus
  all fine cells. Covered coarse values and ghosts are derived storage, not extra
  physical unknowns. Define exactly when restriction refreshes them.
- Enumerate independent normal-velocity/volume-flux samples. At a coarse/fine face,
  use the fine subface fluxes as the common interface data and derive the stored
  coarse value from their area-weighted sum. In 3D the four fine subfaces cover one
  coarse face: `A_c u_c = sum_f A_f u_f`, with one agreed orientation. Neither two
  independently corrected interface velocities nor an unweighted sum is acceptable.
  Record shared-face ownership and which velocity samples are auxiliary to this solve.
- Derive the coarse/fine reconstruction and its eliminated ghost values, then write
  each affected row of the divergence `D`, correction gradient `G` and `A = -D G`.
  Use the same `G` for `u_new = u_star - dt G phi`, with `b = -D u_star / dt`.
  Check `D u_new = -dt (b - A phi)` on the active composite cells, including interface
  neighbors. Use homogeneous correction BCs for this displayed linear identity.
  If a prescribed correction is nonzero, expose its affine lift explicitly:
  `A_B phi = A_h phi + a_B`, solve `A_h phi = b - a_B`, and audit
  `r = (b - a_B) - A_h phi = b - A_B phi`. Prescribed velocity fluxes enter
  `u_star` and compatibility; physical BCs and pressure gauges must match the solve.
- Coarse/fine cell centers have tangential offsets. A pressure difference divided
  only by the normal center separation is not a general interface derivation.
  Show constant and linear consistency in every coordinate, including a tangential
  linear field, and state the expected error for quadratic manufactured fields.
- Define the composite pressure inner product as the sum of `V_i x_i y_i` over
  active cells only; regular-grid volume is a level constant. Derive weighted
  symmetry and positivity on the gauge-fixed space before choosing PCG, and verify
  the multigrid preconditioner's required properties as well. Conservative interface
  fluxes alone do not prove either property. If they fail, revise the operator or
  explicitly select and qualify a suitable solver rather than asserting PCG compatibility.

#### Operator application, iteration and a solved reference

Keep the above definition of `A` separate from how multilevel iteration solves it.
Specify a full cycle: solution boundary/ghost refresh, composite residual formation,
coarse/fine elliptic flux-mismatch correction, residual restriction, coarse solve,
correction interpolation, smoothing and the final true composite residual. State
which operations act between physical AMR levels and which coarsen an operator's
MG levels. Define solution versus correction boundary data separately; fixed physical
pressure does not imply the same prescribed value for a pressure increment.

AMReX's release-tagged [`MLCellLinOp` reference](https://github.com/AMReX-Codes/amrex/blob/26.09/Src/LinearSolvers/MLMG/AMReX_MLCellLinOp.H)
separates `solutionResidual`, `correctionResidual`, `reflux` and `compFlux`.
Its [`MLMG` composite residual](https://github.com/AMReX-Codes/amrex/blob/26.09/Src/LinearSolvers/MLMG/AMReX_MLMG.H)
combines level residuals, elliptic reflux and fine-to-coarse residual averaging.
Elliptic reflux corrects operator-flux mismatch in a residual; it is distinct from
the physical time-integrated transport reflux below. `MLCellLinOp` also masks
covered coarse cells in `dotProductPrecond`; that algebraic dot product is not
itself PolyCFD's volume-weighted inner-product derivation. Pin the exact AMReX commit,
dimension, operator, interpolation order and BC mode used for the worked comparison;
the 26.09 links identify a starting reference, not an adopted complete algorithm.

Independently assemble the tiny active-cell matrix from the written interface rows,
apply the same gauge/BC constraints and actually solve it. Compare its action,
pressure increment and corrected face velocities with the CUDA matrix-free
operator and composite multigrid solve. Do not build the reference by calling the
production operator on basis vectors or reuse its row evaluator: that would miss
shared derivation defects. Record matrix dimensions, residuals, masked error norms,
flux mismatch and post-projection divergence with frozen tolerances. Follow with
manufactured grid refinement; tiny-matrix agreement does not establish spatial accuracy.

The tiny host matrix is an offline validation oracle assembled from known test
inputs, with a fixed small size. It is not a production solver, runtime matrix
assembly, CPU-backend pass or fallback. Upload expected reference values for device
comparison where practical; any terminal validation capture is explicit output,
never a per-iteration readback or simulation feedback path. Production fields,
transfers, smoothing, reductions, coefficients and convergence checks stay on GPU
under the existing [execution policy](/docs/plans/gpu-resident-processing).

#### Required buffer and lifetime accounting

This table is a design checklist, **not a report of allocated buffers**. Let `S_l`
be stored valid cell count on level `l` (including covered coarse storage), `F_l`
its stored MAC-face count, `G_l` the additional stencil/ghost sample count, and
`I_c`, `I_f` the coarse interface-face and fine subface counts. For a rectangular
patch with extents `(nx,ny,nz)`,
`F_l = (nx+1)ny*nz + nx(ny+1)nz + nx*ny(nz+1)`. Regular 3D 2:1 interfaces have
`I_f = 4 I_c`. Counts include the exact chosen padding/layout; they are not all
independent degrees of freedom. The worked design must resolve each symbolic
count, vector count and alias before allocation or performance acceptance.
In the MG row, `S_lm` counts cells on MG level `m` of AMR level `l`, and `G_lm`
counts the additional ghost samples across its retained workspaces.

| Proposed data | Owner / borrowed view | Live window and reuse constraint | Payload accounting |
| --- | --- | --- | --- |
| Predictor/corrected MAC velocity | Level field owner; projection borrows | Predictor through correction and final divergence check; in-place reuse only after all predictor consumers finish | `4 sum_l F_l` per distinct float velocity set; do not count an alias twice |
| Pressure increment and covered coarse representation | Composite solve owner | Initial guess through final correction/verification; covered values invalidated when their fine producer changes | `4 sum_l S_l` per stored float solution hierarchy |
| RHS, residual and Krylov vectors | Composite solver workspace | RHS retained as required for true residual; each scratch vector has an explicit producer and last consumer | `4 sum_l(q_l S_l)` for the declared simultaneously retained vector counts `q_l` |
| Physical/coarse-fine ghost or trace values | Boundary workspace, borrowing solution/correction descriptors | Refresh for the precise solution/correction stage before application; no reuse across stale stages | `4 sum_l G_l` per distinct float workspace; declare any compact constant descriptors separately |
| Coverage mask and interface correspondence | Layout owner; operators borrow | Fixed layout lifetime, including pending kernels; immutable after setup | `4 S_0` if an int32 coarse mask is stored, plus declared correspondence-entry count times stride; reuse canonical layout data |
| Interface fluxes and mismatch | Operator workspace | Flux construction through residual reflux/correction consistency check; reset before reuse | `4(I_f + I_c)` for separate float subface flux and coarse mismatch arrays; record eliminated/aliased arrays explicitly |
| MG solution, RHS, residual and transfer scratch | MG hierarchy owner | Reused across cycles only after dependent stream work; distinct from physical AMR state | `4 sum_(l,m)(q_lm S_lm + G_lm)` for declared MG vector/ghost counts, excluding aliases already counted |
| Weighted reductions, coefficients, gauge and status | Device reduction/solver workspace | Complete reduction through its final numerical consumer; partials remain device-resident | `8(P + R)` for `P` double partials and `R` double scalars, plus explicitly sized flags; level volumes may be constants |
| Independent tiny matrix/reference | Validation harness only | Offline assembly/solve and terminal comparison; absent from production ownership | Up to `8 N^2` for a dense double matrix plus `8 N` per reference vector, with a fixed declared `N` cap |

List stream dependencies and invalidation rules, not merely disposal methods.
Account for retained pools, halos, duplicated coarse representations, alignment,
allocation peaks and pending output leases. Free or repurpose borrowed storage only
after its last GPU consumer completes. Measure actual peak bytes and compare them
with this inventory; a sum of logical unknown counts is not a memory estimate.

### 2. Coverage, transfer and geometric consistency

Build coverage masks so diagnostics and composite equations use uncovered coarse
cells plus fine cells. Covered coarse values may still serve transfers and solver
work, but must not be counted again as physical volume or heat content.
Compute masks, restriction/prolongation, metric consistency and synchronization
on device, including their final reductions and acceptance flags. Host access to
layout metadata does not permit host calculations over downloaded fields or metrics.

Define restriction, prolongation and synchronization separately for cell quantities,
face velocity/flux and embedded geometry. Preserve constants and the relevant weighted
integrals; test linear fields where the chosen method claims that accuracy. Constrain
the coarse-face normal volume flux to the sum of the corresponding fine open-face
fluxes, with consistent area/aperture weights. Specify treatment of partially blocked
interfaces, small cells and unresolved geometry before supporting cut interfaces.

Rebuilding an SDF at each resolution does not by itself make coarse and fine open
areas or volumes consistent. Establish a metric aggregation/correction policy and
show its effect on conservation and physical accuracy; do not change the physical
solid merely to make coupling convenient.

### 3. Composite pressure, diffusion and transport

Construct a pressure correction that couples active cells across coarse/fine
interfaces, with compatible discrete divergence/gradient operators and a gauge for
each physical fluid component. Verify the symmetry/positive-definiteness assumptions
required by PCG in the chosen weighted inner product. Adapt multigrid to the composite
operator; its coarsening levels remain distinct from simulation refinement levels.
Independent fine-patch pressure solves with interpolated boundaries are not acceptance.

AMReX-Hydro documents multilevel projection operators; they are a reference for the
coupling problem, not a drop-in implementation of PolyCFD's cut-cell discretization.
[Projection methods](https://amrex-fluids.github.io/amrex-hydro/docs_html/Projections.html)

Implicit diffusion needs cross-level coupling or a demonstrated synchronization
scheme as well. Extend TRN-01's accepted reconstruction, limiter, transport velocity
and time integration across resolution changes. Its single-level conservation and
accuracy evidence does not establish coarse/fine consistency. The current
semi-Lagrangian/MacCormack remap has no matching conservative momentum-flux update;
the decision and single-grid validation of the conservative option belong to
TRN-01, not the first S3 implementation. Do not weaken mass, momentum or heat checks.

For quantities advanced through conservative face fluxes, specify mismatch correction
using the actual area/time-integrated fluxes. Synchronized timesteps avoid temporal
interpolation initially, but do not eliminate spatial flux mismatch. AMReX's flux-register
example explains this distinction. [Flux registers](https://amrex-codes.github.io/amrex/docs_html/AmrCore.html#fluxregisters)

### 4. Measurements, output and delivered physics

Integrate named sections and global budgets using the finest active coverage without
double counting. Define a physical plane that intersects several levels; one global
integer slice index is insufficient. Native output must retain level spacing, patch
bounds, coverage and completed-frame/layout identity. Preview resampling must remain
explicit and bounded in memory, readback and retained leases.

If temperature is delivered, validate scalar transfer, diffusion, sources and heat
budgets across interfaces before advertising refined thermal cases. Validate moving
geometry crossing levels separately, including connectivity, previous/current
volumes and pressure gauges. Declare unsupported combinations in preflight and UI.

### 5. Adaptation after fixed-refinement acceptance

Add deterministic tagging/clustering, proper nesting and grid-size constraints.
Compute error indicators, tags and tag compaction on GPU. The host may cluster
compact tag coordinates and manage layout/adjacency/allocation at synchronized
regrid points. Declare and measure transfer bytes/count, regrid cadence and
synchronization time; compact tags can still become large when much of the domain
is tagged. Do not download solution fields or cell-sized error/geometry arrays to
perform the tagging calculation on CPU. Upload the resulting compact descriptors
for device numerical kernels.

Compare capacity-based pools with allocation sized from compact metadata. Include
retained scratch, fragmentation, peaks during old/new layout coexistence and
capacity-failure behavior. Preserve scientific tagging/nesting requirements; memory
pressure must not silently discard requested refinement. Fully device-driven
clustering and allocation planning are later optimizations if measurements justify
them, not AMReX alignment or first-S3 prerequisites. AMReX itself supports host
control objects and GPU numerical data, and its GPU tag collation includes host
counts/offsets and compact tag output: [GPU model](https://amrex-codes.github.io/amrex/docs_html/GPU.html),
[tag collation source](https://github.com/AMReX-Codes/amrex/blob/development/Src/AmrCore/AMReX_TagBox.cpp).
Regrid only at defined synchronized states. Transfer solution state, restrict removed
fine regions appropriately, initialize new fine cells, and restore the required
divergence/flux constraints. Rebuild geometry, connectivity, solver state, source
bindings, coverage and selection mappings with numerical field work on device;
host resource/layout management uses the declared compact metadata boundary.
Refresh the `LevelLayout`/`LevelFields` view validity and compact patch descriptors.

Introduce layout revision and lifetime rules so outstanding frames keep valid storage
or are explicitly rejected; a geometry revision alone cannot identify changed topology.
Record completed layouts/tagging settings for reproducibility and account for their
output separately from regrid control transfers. Validate memory peaks while old
and new layouts coexist. Time subcycling remains a separate later decision.
Regridding preserves the run's selected method and revalidates its extents, ghost
support and stability restrictions on GPU. Account for the finest active constraints
even with a shared timestep; fixed-step execution cannot bypass a tighter post-regrid
limit. Host observation of a compact acceptance/status result must not bypass that
device-computed limit.

### S3 acceptance

Use manufactured/interface tests and uniform-fine reference solutions. Establish
spatial and timestep convergence, coarse/fine flux mismatch, divergence, pressure
coupling and applicable mass/momentum/heat budgets. Freeze case-specific limits before
evaluating results. Solver residual reduction alone establishes neither conservation
nor physical accuracy.

Fixed refinement must reach declared measurement accuracy with less measured memory
or time than a comparable uniform-fine solve; include solver, geometry and required
outputs. Then test multiple/touching patches, additional levels and supported boundary
contacts. Adaptation needs separate refine/derefine cycles, moving features, transfer
error, budgets and cost evidence. A fixed-refinement pass does not complete all of S3.
Test upfront rejection of unqualified methods, motion and boundary combinations,
and retain the method identity through saved-run/replay paths and regridding.
Extend the field-residency and bounded-control-transfer audit to coverage, coarse/fine transfers,
refluxing, composite topology/solvers and every refine/derefine or allocation-failure
path. Preserve scientific acceptance with fully device-finalized double reductions;
count control/layout transfers and requested output separately, measure total cost
including synchronization and memory peaks, and reject hidden CPU numerical fallback.

## Verification and decisions

### Evidence matrix

The rows below are **required future evidence, not passing results**. They refine
the acceptance above without duplicating task status from the work board. Every
completed row must link an immutable configuration and implementation commit,
reference identity (including an AMReX commit/options when used), metric definitions,
limits and their rationale fixed before evaluation, the exact CUDA command actually
run, and its artifact/receipt and verdict. Record unavailable evidence as not run;
do not invent commands for a harness that does not yet exist. An offline matrix
generation command is additional reference provenance, not a CUDA execution result.

| Claim / bounded scope | Required independent evidence | Acceptance and limitation |
| --- | --- | --- |
| S2 partition equivalence | Same physical problem monolithic and partitioned; unequal extents, all orientations, periodic seams and each declared BC/method subset | Compare field trajectory, residual, divergence and relevant budgets against unchanged single-grid limits; one two-patch or periodic-only case does not qualify full S2 |
| S3-01 unknowns and coverage | Enumerated active cells/faces, mask counts and an independent integral of constant data; vary covered coarse initial storage, then rebuild mandated derived state before comparison | No duplicate physical volume or independently counted interface flux; ghost/covered representations have explicit consistency rules |
| Interface reconstruction and `A = -D G` | Constant and all-coordinate linear fields, quadratic manufactured refinement, independent tiny matrix action, and post-correction divergence/residual identity | Limits follow the derived order and roundoff/scaling; include tangential offsets and every interface orientation |
| Weighted solve and gauge | Tiny matrix weighted symmetry/positivity checks, explicit nullspace, gauge-matched direct reference solution and multigrid's true composite residual | PCG and its preconditioner are qualified only if their assumptions hold; small solver residual alone is insufficient |
| Two-level pressure GPU implementation | CUDA matrix-free/composite-MG solve compared with the actually solved offline tiny oracle; device-computed pressure/velocity errors, interface mismatch and divergence | Record both algebraic agreement and manufactured refinement; no transport, EB or moving-geometry claim follows |
| Complete fixed-refinement flow | Qualified transport, projection and diffusion together against a comparable uniform-fine reference, with spatial and timestep studies | Preserve applicable mass/momentum/heat and measurement limits; justify cost at matched accuracy, not equal cell count |
| Device residency, memory and lifetime | Transfer/launch/stream trace, measured peak allocations against the buffer inventory, cancellation/disposal and selective output checks | No field/partial-result CPU numerical path; bound control metadata separately and include output leases and setup peaks in measured cost |

Keep unit/operator evidence, complete-flow scientific evidence and performance
evidence distinct. A source inspection, worked derivation or documentation receipt
can support a design row but cannot substitute for its required numerical run.

For each implementation increment run repository static/fast/GPU verification and
appropriate CUDA numerical coverage, then full coverage for broad acceptance. Use
the [verification guide](https://github.com/hankbeasley/polycfd/blob/b7f5b9ba6f52355d9b196b586e4a6c8719d8feea/test/README.md), [suite selection](/docs/COMPLETE_VALIDATION#choose-coverage-for-the-change)
and [runtime contracts](/docs/RUNTIME_CONTRACTS). CPU backend not run (user directive).
Keep existing references, scientific limits and performance allowances unchanged;
report missing hardware, occupied devices and incomplete checks. New supported cases
need intentionally reviewed references, not refreshed baselines to hide regressions.

Before finalizing S2 transport interfaces, use TRN-01's established method to resolve
ghost/sampling reach and shared-flux ownership. Before S3 coding, resolve nesting,
transfer operators, composite pressure/diffusion, coarse/fine flux synchronization
and cut-interface metrics. These are scientific decisions with validation obligations;
the AMReX-style data model does not decide them for us.

AMR-02 does not alter W4's binding decisions. If later result changes affect those
decisions, follow their approval and generation rules at that time. Move accepted
runtime contracts into the current guides and retire completed plan sections once
the corresponding milestone is delivered.