Interpolate
Kernel-weighted (re)construction of a field at the query positions.
Kernel: coreOperations/wp_interpolate.py
(computeSPHInterpolation_Kernel); JVP
coreOperations/wp_interpolateJVP.py.
Equation
is the kernel value sphKernel under the chosen
support scheme, CRK-corrected when a
CRKState is supplied:
see CRK overview. Interpolate is the only
value-having operator that never reads queryValues — the field is
read from the reference side only — and it never reads the CRK
gradient terms (gradA/gradB; if you pass a CRKState without them
the backend substitutes correctly-shaped dummies, since the kernel only
uses ).
Output: [N_query, ...], preserving the trailing shape of
referenceValues. The query and reference counts can differ. Warp kernels
support rank-1/2 field types, so fields of rank are flattened to
one vector dimension before the launch and reshaped back afterwards.
Public API
warpOperation(
queryParticles, operationProperties, domain,
referenceValues=f, # required
queryVolumes=None, referenceVolumes=None,
crkState=None,
adjacency=None,
referenceParticles=None,
)
with operation == WarpOperation.Interpolate. warpOperation raises
if referenceValues is missing.
| Option | Default | Effect |
|---|---|---|
supportMode | Gather | pairwise support of |
operationMode | AllToAll | directional filtering on kinds |
referenceVolumes | None | substitute |
crkState | None | CRK-corrected kernel value ( only) |
calibrateNormalization, n_h | False/None | lattice-normalization factor on |
gradientMode, laplacianMode, positiveDivergence and the
renormalization/grad-h states are not consumed by Interpolate.
JVP / HVP
Value JVP — relaunch on tangentReferenceValues (there is no
query-side value input, so warpOperationJVP only ever threads a
reference tangent for Interpolate).
Geometry JVP — the volume-weighted product rule:
with frozen at primal for the geometry part and
from sphKernelJVP. Interpolate has no query-side density
term at all and no CRK/renorm/grad-h tangent support (the geometry
JVP has no CRK correction path, enforced centrally in
operations.py); query-mass tangents are rejected. Omitted tangent
fields default to zero.
Gated by tests/operations/test_forward_mode_geometry_jvp_interpolate.py.
No HVP exists for Interpolate.
Tests
tests/operations/test_operations_core.py— shape/finiteness for scalar, vector and matrix fields.tests/operations/test_operations_consistency.py— e.g. interpolating a linear field reproduces it at interior points.tests/operations/test_forward_mode_value_jvp.py,tests/operations/test_forward_mode_geometry_jvp_interpolate.py,tests/operations/test_grid_modes.py.