Trait salva2d::solver::NonPressureForce
source · pub trait NonPressureForce: Send + Sync {
// Required method
fn solve(
&mut self,
timestep: &TimestepManager,
kernel_radius: Real,
fluid_fluid_contacts: &ParticlesContacts,
fluid_boundaries_contacts: &ParticlesContacts,
fluid: &mut Fluid,
boundaries: &[Boundary],
densities: &[Real]
);
// Provided method
fn apply_permutation(&mut self, _permutation: &[usize]) { ... }
}
Expand description
Trait implemented by non-pressure forces.
This includes all non-pressure forces internal to a same fluid, or acting between a fluid and a boundary.
Required Methods§
sourcefn solve(
&mut self,
timestep: &TimestepManager,
kernel_radius: Real,
fluid_fluid_contacts: &ParticlesContacts,
fluid_boundaries_contacts: &ParticlesContacts,
fluid: &mut Fluid,
boundaries: &[Boundary],
densities: &[Real]
)
fn solve( &mut self, timestep: &TimestepManager, kernel_radius: Real, fluid_fluid_contacts: &ParticlesContacts, fluid_boundaries_contacts: &ParticlesContacts, fluid: &mut Fluid, boundaries: &[Boundary], densities: &[Real] )
Compute and applies the non-pressure forces to the given fluid.
The force application should result in adding accelerations to the
fluid.accelerations
field.
Provided Methods§
sourcefn apply_permutation(&mut self, _permutation: &[usize])
fn apply_permutation(&mut self, _permutation: &[usize])
Apply the given permutation to all relevant field of this non-pressure force.
This is currently not used so it can be left empty.