Skip to main content

rts_with_progress

Function rts_with_progress 

Source
pub fn rts_with_progress<F>(
    local_field: &[f64],
    mask: &[u8],
    nx: usize,
    ny: usize,
    nz: usize,
    vsx: f64,
    vsy: f64,
    vsz: f64,
    bdir: (f64, f64, f64),
    delta: f64,
    mu: f64,
    rho: f64,
    tol: f64,
    max_iter: usize,
    lsmr_iter: usize,
    progress_callback: F,
) -> Vec<f64>
where F: FnMut(usize, usize),
Expand description

RTS with progress callback (optimized)

Optimized implementation with:

  • Pre-allocated buffers (zero allocations per iteration)
  • In-place gradient/divergence operations
  • Buffer swapping instead of cloning
  • Fused z-subproblem and u-update

Same as rts but calls progress_callback(iteration, max_iter) each iteration.