pub struct SphParticleState {
pub n: usize,
pub pos_x: Vec<f64>,
pub pos_y: Vec<f64>,
pub pos_z: Vec<f64>,
pub vel_x: Vec<f64>,
pub vel_y: Vec<f64>,
pub vel_z: Vec<f64>,
pub density: Vec<f64>,
pub pressure: Vec<f64>,
}Expand description
Structure-of-Arrays particle state for N SPH particles.
Fields§
§n: usizeNumber of particles.
pos_x: Vec<f64>X positions (m).
pos_y: Vec<f64>Y positions (m).
pos_z: Vec<f64>Z positions (m).
vel_x: Vec<f64>X velocities (m/s).
vel_y: Vec<f64>Y velocities (m/s).
vel_z: Vec<f64>Z velocities (m/s).
density: Vec<f64>Density (kg/m³).
pressure: Vec<f64>Pressure (Pa).
Implementations§
Source§impl SphParticleState
impl SphParticleState
Sourcepub fn zero_velocities(&mut self)
pub fn zero_velocities(&mut self)
Reset velocities to zero.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SphParticleState
impl RefUnwindSafe for SphParticleState
impl Send for SphParticleState
impl Sync for SphParticleState
impl Unpin for SphParticleState
impl UnsafeUnpin for SphParticleState
impl UnwindSafe for SphParticleState
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