Skip to main content

axpy_surface_assign

Function axpy_surface_assign 

Source
pub fn axpy_surface_assign<T>(
    backend: ComputeBackend,
    y: &mut SurfaceField<T>,
    a: f64,
    x: &SurfaceField<T>,
)
where T: Copy + Send + Sync + Add<Output = T> + Mul<f64, Output = T>,
Expand description

In-place fused update on a surface field, y += a * x — the flux-field counterpart of axpy_vol_assign (phi += dt * ddt(phi)).

Allocation-free, name-preserving. Units: y and a*x are the same physical quantity.

§Panics

Panics if the internal fields or any patch pair differ in length.