Struct salva2d::geometry::ParticlesContacts
source · pub struct ParticlesContacts { /* private fields */ }
Expand description
The set of contacts affecting the particles of a single fluid.
Implementations§
source§impl ParticlesContacts
impl ParticlesContacts
sourcepub fn particle_contacts(&self, i: usize) -> &RwLock<Vec<Contact>>
pub fn particle_contacts(&self, i: usize) -> &RwLock<Vec<Contact>>
The set of contacts affecting the particle i
.
sourcepub fn particle_contacts_mut(&mut self, i: usize) -> &mut RwLock<Vec<Contact>>
pub fn particle_contacts_mut(&mut self, i: usize) -> &mut RwLock<Vec<Contact>>
The set of mutable contacts affecting the particle i
.
sourcepub fn contacts(&self) -> &[RwLock<Vec<Contact>>]
pub fn contacts(&self) -> &[RwLock<Vec<Contact>>]
All the contacts in this set.
The self.contacts()[i]
contains all the contact affecting the particle i
.
sourcepub fn contacts_mut(&mut self) -> &mut [RwLock<Vec<Contact>>]
pub fn contacts_mut(&mut self) -> &mut [RwLock<Vec<Contact>>]
All the mutable contacts in this set.
The self.contacts()[i]
contains all the contact affecting the particle i
.
sourcepub fn apply_permutation(&mut self, _permutation: &[usize])
pub fn apply_permutation(&mut self, _permutation: &[usize])
Apply a permutation to this set of contacts.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for ParticlesContacts
impl Send for ParticlesContacts
impl Sync for ParticlesContacts
impl Unpin for ParticlesContacts
impl UnwindSafe for ParticlesContacts
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
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.