pub struct GpuLbmDispatch {
pub grid: GpuLbmGrid,
pub boundary: Vec<LbmBoundary>,
}Expand description
High-level dispatcher that couples a GpuLbmGrid with per-cell boundary
conditions and orchestrates time-stepping.
Fields§
§grid: GpuLbmGridThe underlying LBM grid.
boundary: Vec<LbmBoundary>Per-cell boundary conditions (length == grid.nx * grid.ny).
Implementations§
Source§impl GpuLbmDispatch
impl GpuLbmDispatch
Sourcepub fn new(nx: usize, ny: usize, rho: f64) -> Self
pub fn new(nx: usize, ny: usize, rho: f64) -> Self
Create a new dispatcher for a grid of size nx × ny with uniform
initial density rho and all boundaries set to Periodic.
Sourcepub fn set_boundary(&mut self, x: usize, y: usize, bc: LbmBoundary)
pub fn set_boundary(&mut self, x: usize, y: usize, bc: LbmBoundary)
Set the boundary condition for cell (x, y).
Sourcepub fn dispatch_step(&mut self, omega: f64)
pub fn dispatch_step(&mut self, omega: f64)
Perform one dispatch step, applying boundary pre-conditioning before collision + streaming.
Trait Implementations§
Source§impl Clone for GpuLbmDispatch
impl Clone for GpuLbmDispatch
Source§fn clone(&self) -> GpuLbmDispatch
fn clone(&self) -> GpuLbmDispatch
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for GpuLbmDispatch
impl RefUnwindSafe for GpuLbmDispatch
impl Send for GpuLbmDispatch
impl Sync for GpuLbmDispatch
impl Unpin for GpuLbmDispatch
impl UnsafeUnpin for GpuLbmDispatch
impl UnwindSafe for GpuLbmDispatch
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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