pub struct GpuSphGrid {
pub positions: Vec<f64>,
pub masses: Vec<f64>,
pub smoothing_lengths: Vec<f64>,
pub densities: Vec<f64>,
pub pressures: Vec<f64>,
pub velocities: Vec<f64>,
pub forces: Vec<f64>,
pub rho0: f64,
pub c0: f64,
}Expand description
A grid of SPH particles with associated physical quantities.
Positions are stored as flat arrays of (x, y, z) triplets.
Fields§
§positions: Vec<f64>Particle positions: [x0, y0, z0, x1, y1, z1, …].
masses: Vec<f64>Particle masses (one per particle).
smoothing_lengths: Vec<f64>Smoothing lengths (one per particle).
densities: Vec<f64>Particle densities (one per particle, updated by gpu_density_kernel).
pressures: Vec<f64>Particle pressures (one per particle, updated by gpu_pressure_tait).
velocities: Vec<f64>Particle velocities: [vx0, vy0, vz0, …].
forces: Vec<f64>Particle forces: [fx0, fy0, fz0, …] (output of gpu_force_kernel).
rho0: f64Reference density ρ₀ for the Tait equation of state.
c0: f64Speed of sound c₀ for the Tait EOS.
Implementations§
Source§impl GpuSphGrid
impl GpuSphGrid
Trait Implementations§
Source§impl Clone for GpuSphGrid
impl Clone for GpuSphGrid
Source§fn clone(&self) -> GpuSphGrid
fn clone(&self) -> GpuSphGrid
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 GpuSphGrid
impl RefUnwindSafe for GpuSphGrid
impl Send for GpuSphGrid
impl Sync for GpuSphGrid
impl Unpin for GpuSphGrid
impl UnsafeUnpin for GpuSphGrid
impl UnwindSafe for GpuSphGrid
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