pub struct VortexConfinement {
pub epsilon: f64,
pub dx: f64,
}Expand description
GPU vortex confinement — amplifies small-scale vortical structures to counteract numerical dissipation.
Based on Fedkiw et al. (2001) vorticity confinement.
Fields§
§epsilon: f64Confinement strength ε. Typical values: 0.1–2.0.
dx: f64Grid cell size (m).
Implementations§
Source§impl VortexConfinement
impl VortexConfinement
Sourcepub fn new(epsilon: f64, dx: f64) -> Self
pub fn new(epsilon: f64, dx: f64) -> Self
Create a new VortexConfinement with given parameters.
Sourcepub fn apply(&self, ns: &mut NavierStokesGpu, dt: f64)
pub fn apply(&self, ns: &mut NavierStokesGpu, dt: f64)
Compute and apply vortex confinement forces to a NavierStokesGpu solver.
Adds a body-force acceleration field derived from the vorticity gradient.
Trait Implementations§
Source§impl Clone for VortexConfinement
impl Clone for VortexConfinement
Source§fn clone(&self) -> VortexConfinement
fn clone(&self) -> VortexConfinement
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 VortexConfinement
impl RefUnwindSafe for VortexConfinement
impl Send for VortexConfinement
impl Sync for VortexConfinement
impl Unpin for VortexConfinement
impl UnsafeUnpin for VortexConfinement
impl UnwindSafe for VortexConfinement
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