Skip to main content

compute_phase_laplacian

Function compute_phase_laplacian 

Source
pub fn compute_phase_laplacian(
    phase: &[f32],
    mask: &[u8],
    nx: usize,
    ny: usize,
    nz: usize,
    vsx: f32,
    vsy: f32,
    vsz: f32,
) -> Vec<f32>
Expand description

Compute Laplacian of wrapped phase (rad) using the DEL method.

cos φ·∇²sin φ − sin φ·∇²cos φ, which on the discrete grid is Σ_neighbours sin(φ_n − φ)/h²: insensitive to 2π wraps, and equal to the ordinary Laplacian only while neighbour differences are small. Only meaningful for phase in rad.