Struct particular::compute_method::storage::ParticleSystem
source · pub struct ParticleSystem<'p, V, S, T: ?Sized> {
pub affected: &'p [PointMass<V, S>],
pub massive: &'p T,
}
Expand description
Flexible, copyable storage with references to affected particles and a generic massive storage.
Fields§
§affected: &'p [PointMass<V, S>]
Particles for which the acceleration is computed.
massive: &'p T
Particles responsible for the acceleration exerted on the affected
particles, in a
storage T
.
Implementations§
source§impl<'p, V, S, T: ?Sized> ParticleSystem<'p, V, S, T>
impl<'p, V, S, T: ?Sized> ParticleSystem<'p, V, S, T>
sourcepub const fn with(affected: &'p [PointMass<V, S>], massive: &'p T) -> Self
pub const fn with(affected: &'p [PointMass<V, S>], massive: &'p T) -> Self
Creates a new ParticleSystem
with the given slice of particles and massive storage.
Trait Implementations§
source§impl<V, S, T: ?Sized> Clone for ParticleSystem<'_, V, S, T>
impl<V, S, T: ?Sized> Clone for ParticleSystem<'_, V, S, T>
source§impl<const L: usize, V, S> ComputeMethod<ParticleSystem<'_, V, S, [PointMass<V, S>]>> for BruteForceSIMD<L>
impl<const L: usize, V, S> ComputeMethod<ParticleSystem<'_, V, S, [PointMass<V, S>]>> for BruteForceSIMD<L>
source§impl<const L: usize, V, S> ComputeMethod<ParticleSystem<'_, V, S, [PointMass<V, S>]>> for BruteForceSIMD<L>
impl<const L: usize, V, S> ComputeMethod<ParticleSystem<'_, V, S, [PointMass<V, S>]>> for BruteForceSIMD<L>
source§impl<V, S> ComputeMethod<ParticleSystem<'_, V, S, [PointMass<V, S>]>> for BruteForceScalar
impl<V, S> ComputeMethod<ParticleSystem<'_, V, S, [PointMass<V, S>]>> for BruteForceScalar
source§impl<V, S> ComputeMethod<ParticleSystem<'_, V, S, [PointMass<V, S>]>> for BruteForceScalar
impl<V, S> ComputeMethod<ParticleSystem<'_, V, S, [PointMass<V, S>]>> for BruteForceScalar
source§impl<const L: usize, V, S> ComputeMethod<ParticleSystem<'_, V, S, [PointMass<V, S>]>> for BruteForceSoftenedSIMD<L, S>
impl<const L: usize, V, S> ComputeMethod<ParticleSystem<'_, V, S, [PointMass<V, S>]>> for BruteForceSoftenedSIMD<L, S>
source§impl<const L: usize, V, S> ComputeMethod<ParticleSystem<'_, V, S, [PointMass<V, S>]>> for BruteForceSoftenedSIMD<L, S>
impl<const L: usize, V, S> ComputeMethod<ParticleSystem<'_, V, S, [PointMass<V, S>]>> for BruteForceSoftenedSIMD<L, S>
source§impl<V, S> ComputeMethod<ParticleSystem<'_, V, S, [PointMass<V, S>]>> for BruteForceSoftenedScalar<S>
impl<V, S> ComputeMethod<ParticleSystem<'_, V, S, [PointMass<V, S>]>> for BruteForceSoftenedScalar<S>
source§impl<V, S> ComputeMethod<ParticleSystem<'_, V, S, [PointMass<V, S>]>> for BruteForceSoftenedScalar<S>
impl<V, S> ComputeMethod<ParticleSystem<'_, V, S, [PointMass<V, S>]>> for BruteForceSoftenedScalar<S>
source§impl<const X: usize, const D: usize, V, S> ComputeMethod<ParticleSystem<'_, V, S, ParticleTree<X, D, V, S>>> for BarnesHut<S>
impl<const X: usize, const D: usize, V, S> ComputeMethod<ParticleSystem<'_, V, S, ParticleTree<X, D, V, S>>> for BarnesHut<S>
source§impl<const X: usize, const D: usize, V, S> ComputeMethod<ParticleSystem<'_, V, S, ParticleTree<X, D, V, S>>> for BarnesHut<S>
impl<const X: usize, const D: usize, V, S> ComputeMethod<ParticleSystem<'_, V, S, ParticleTree<X, D, V, S>>> for BarnesHut<S>
source§impl<const X: usize, const D: usize, V, S> ComputeMethod<ParticleSystem<'_, V, S, ParticleTree<X, D, V, S>>> for BarnesHutSoftened<S>
impl<const X: usize, const D: usize, V, S> ComputeMethod<ParticleSystem<'_, V, S, ParticleTree<X, D, V, S>>> for BarnesHutSoftened<S>
source§impl<const X: usize, const D: usize, V, S> ComputeMethod<ParticleSystem<'_, V, S, ParticleTree<X, D, V, S>>> for BarnesHutSoftened<S>
impl<const X: usize, const D: usize, V, S> ComputeMethod<ParticleSystem<'_, V, S, ParticleTree<X, D, V, S>>> for BarnesHutSoftened<S>
source§impl ComputeMethod<ParticleSystem<'_, Vec3, f32, [PointMass<Vec3, f32>]>> for BruteForce<'_>
impl ComputeMethod<ParticleSystem<'_, Vec3, f32, [PointMass<Vec3, f32>]>> for BruteForce<'_>
source§impl ComputeMethod<ParticleSystem<'_, Vec3, f32, [PointMass<Vec3, f32>]>> for BruteForceSoftened<'_>
impl ComputeMethod<ParticleSystem<'_, Vec3, f32, [PointMass<Vec3, f32>]>> for BruteForceSoftened<'_>
impl<V, S, T: ?Sized> Copy for ParticleSystem<'_, V, S, T>
Auto Trait Implementations§
impl<'p, V, S, T: ?Sized> Freeze for ParticleSystem<'p, V, S, T>
impl<'p, V, S, T: ?Sized> RefUnwindSafe for ParticleSystem<'p, V, S, T>
impl<'p, V, S, T: ?Sized> Send for ParticleSystem<'p, V, S, T>
impl<'p, V, S, T: ?Sized> Sync for ParticleSystem<'p, V, S, T>
impl<'p, V, S, T: ?Sized> Unpin for ParticleSystem<'p, V, S, T>
impl<'p, V, S, T: ?Sized> UnwindSafe for ParticleSystem<'p, V, S, T>
Blanket Implementations§
source§impl<U> AsPrimitive for U
impl<U> AsPrimitive for U
source§fn as_<F: FromPrimitive<Self>>(self) -> F
fn as_<F: FromPrimitive<Self>>(self) -> F
Converts this primitive into the input primitive.
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<const X: usize, const D: usize, V, S, C, O> ComputeMethod<ParticleSystem<'_, V, S, [PointMass<V, S>]>> for Cwhere
O: IntoIterator,
C: for<'a> ComputeMethod<ParticleSystem<'a, V, S, ParticleTree<X, D, V, S>>, Output = O>,
V: Copy + FloatVector<Float = S, Array = [S; D]>,
S: Copy + Float + Sum + PartialOrd + FromPrimitive<usize>,
BoundingBox<[S; D]>: SubDivide<Division = [BoundingBox<[S; D]>; X]>,
impl<const X: usize, const D: usize, V, S, C, O> ComputeMethod<ParticleSystem<'_, V, S, [PointMass<V, S>]>> for Cwhere
O: IntoIterator,
C: for<'a> ComputeMethod<ParticleSystem<'a, V, S, ParticleTree<X, D, V, S>>, Output = O>,
V: Copy + FloatVector<Float = S, Array = [S; D]>,
S: Copy + Float + Sum + PartialOrd + FromPrimitive<usize>,
BoundingBox<[S; D]>: SubDivide<Division = [BoundingBox<[S; D]>; X]>,
source§fn compute(
&mut self,
system: ParticleSystem<'_, V, S, [PointMass<V, S>]>
) -> <C as ComputeMethod<ParticleSystem<'_, V, S, [PointMass<V, S>]>>>::Output
fn compute( &mut self, system: ParticleSystem<'_, V, S, [PointMass<V, S>]> ) -> <C as ComputeMethod<ParticleSystem<'_, V, S, [PointMass<V, S>]>>>::Output
Performs the computation between objects contained in the storage.