Struct salva3d::object::Boundary [−][src]
pub struct Boundary { pub positions: Vec<Point<Real>>, pub velocities: Vec<Vector<Real>>, pub volumes: Vec<Real>, pub forces: Option<RwLock<Vec<Vector<Real>>>>, }
Expand description
A boundary object.
A boundary object is composed of static particles, or of particles coupled with non-fluid bodies.
Fields
positions: Vec<Point<Real>>
The world-space position of the boundary particles.
velocities: Vec<Vector<Real>>
The artificial velocities of each boundary particle.
volumes: Vec<Real>
The volume computed for each boundary particle.
forces: Option<RwLock<Vec<Vector<Real>>>>
The forces applied to each particle of this boundary object.
If this is set to None
(which is the default), the boundary won’t receive any
force for fluids.
Implementations
Initialize a boundary object with the given particles.
The number of particles of this boundary object.
Transforms all the particle positions of this boundary by the given isometry.
Apply a force f
to the i
-th particle of this boundary object.
This call relies on thread-safe interior mutability.
Clears all the forces applied to this boundary object’s particles.
Auto Trait Implementations
impl RefUnwindSafe for Boundary
impl UnwindSafe for Boundary
Blanket Implementations
Mutably borrows from an owned value. Read more
type Output = T
type Output = T
Should always be Self
The inverse inclusion map: attempts to construct self
from the equivalent element of its
superset. Read more
pub fn is_in_subset(&self) -> bool
pub fn is_in_subset(&self) -> bool
Checks if self
is actually part of its subset T
(and can be converted to it).
pub fn to_subset_unchecked(&self) -> SS
pub fn to_subset_unchecked(&self) -> SS
Use with care! Same as self.to_subset
but without any property checks. Always succeeds.
pub fn from_subset(element: &SS) -> SP
pub fn from_subset(element: &SS) -> SP
The inclusion map: converts self
to the equivalent element of its superset.