pub struct LbmDiagnostics;Expand description
Diagnostic utilities for LBM simulations.
Implementations§
Source§impl LbmDiagnostics
impl LbmDiagnostics
Sourcepub fn compute_vorticity(grid: &GpuLbmGrid) -> Vec<f64>
pub fn compute_vorticity(grid: &GpuLbmGrid) -> Vec<f64>
Compute the vorticity field ∂uy/∂x − ∂ux/∂y using central differences.
Returns a flat Vecf64in row-major order (same layout asgrid.cells`).
Periodic boundary wrapping is used at the domain edges.
Sourcepub fn compute_divergence(grid: &GpuLbmGrid) -> Vec<f64>
pub fn compute_divergence(grid: &GpuLbmGrid) -> Vec<f64>
Compute the velocity divergence field ∂ux/∂x + ∂uy/∂y using central
differences with periodic wrapping.
Sourcepub fn max_velocity(grid: &GpuLbmGrid) -> f64
pub fn max_velocity(grid: &GpuLbmGrid) -> f64
Return the maximum velocity magnitude across all cells.
Auto Trait Implementations§
impl Freeze for LbmDiagnostics
impl RefUnwindSafe for LbmDiagnostics
impl Send for LbmDiagnostics
impl Sync for LbmDiagnostics
impl Unpin for LbmDiagnostics
impl UnsafeUnpin for LbmDiagnostics
impl UnwindSafe for LbmDiagnostics
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more