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

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more

Checks if self is actually part of its subset T (and can be converted to it).

Use with care! Same as self.to_subset but without any property checks. Always succeeds.

The inclusion map: converts self to the equivalent element of its superset.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.