Trait salva3d::solver::PressureSolver [−][src]
pub trait PressureSolver { fn init_with_fluids(&mut self, fluids: &[Fluid]); fn init_with_boundaries(&mut self, boundaries: &[Boundary]); fn predict_advection(
&mut self,
timestep: &TimestepManager,
kernel_radius: Real,
contact_manager: &ContactManager,
gravity: &Vector<Real>,
fluids: &mut [Fluid],
boundaries: &[Boundary]
); fn evaluate_kernels(
&mut self,
kernel_radius: Real,
contact_manager: &mut ContactManager,
fluids: &[Fluid],
boundaries: &[Boundary]
); fn compute_densities(
&mut self,
contact_manager: &ContactManager,
fluids: &[Fluid],
boundaries: &mut [Boundary]
); fn step(
&mut self,
counters: &mut Counters,
timestep: &mut TimestepManager,
gravity: &Vector<Real>,
contact_manager: &mut ContactManager,
kernel_radius: Real,
fluids: &mut [Fluid],
boundaries: &[Boundary]
); }
Expand description
Trait implemented by pressure solvers.
Required methods
fn init_with_fluids(&mut self, fluids: &[Fluid])
fn init_with_fluids(&mut self, fluids: &[Fluid])
Initialize this solver with the given fluids.
fn init_with_boundaries(&mut self, boundaries: &[Boundary])
fn init_with_boundaries(&mut self, boundaries: &[Boundary])
Initialize this solver with the given boundaries.
fn predict_advection(
&mut self,
timestep: &TimestepManager,
kernel_radius: Real,
contact_manager: &ContactManager,
gravity: &Vector<Real>,
fluids: &mut [Fluid],
boundaries: &[Boundary]
)
fn predict_advection(
&mut self,
timestep: &TimestepManager,
kernel_radius: Real,
contact_manager: &ContactManager,
gravity: &Vector<Real>,
fluids: &mut [Fluid],
boundaries: &[Boundary]
)
Predicts advection with the given gravity.
fn evaluate_kernels(
&mut self,
kernel_radius: Real,
contact_manager: &mut ContactManager,
fluids: &[Fluid],
boundaries: &[Boundary]
)
fn evaluate_kernels(
&mut self,
kernel_radius: Real,
contact_manager: &mut ContactManager,
fluids: &[Fluid],
boundaries: &[Boundary]
)
Evaluate the SPH kernels for all the contacts in contact_manager
.
fn compute_densities(
&mut self,
contact_manager: &ContactManager,
fluids: &[Fluid],
boundaries: &mut [Boundary]
)
fn compute_densities(
&mut self,
contact_manager: &ContactManager,
fluids: &[Fluid],
boundaries: &mut [Boundary]
)
Compute the densities of all the boundary and fluid particles.
Solves pressure and non-pressure force for the given fluids and boundaries.
Both self.init_with_fluids
and self.init_with_boundaries
must be called before this
method.