pub trait CouplingManager {
    // Required methods
    fn update_boundaries(
        &mut self,
        timestep: &TimestepManager,
        h: Real,
        particle_radius: Real,
        hgrid: &HGrid<HGridEntry>,
        fluids: &mut [Fluid],
        boundaries: &mut BoundarySet
    );
    fn transmit_forces(
        &mut self,
        timestep: &TimestepManager,
        boundaries: &BoundarySet
    );
}
Expand description

Trait that needs to be implemented by middlewares responsible for coupling bodies from a rigid-body physic framework (nphysics, bullet, PhysX, etc.) with boundary objects of salva.

Required Methods§

source

fn update_boundaries( &mut self, timestep: &TimestepManager, h: Real, particle_radius: Real, hgrid: &HGrid<HGridEntry>, fluids: &mut [Fluid], boundaries: &mut BoundarySet )

Updates the boundary objects from the coupled bodies.

The goal of this method is to update the particles composing the boundary objects so they reflect the state of the coupled body. Those particles will generally be samplings of the boundary of the object. This also updates the velocity at those particles.

source

fn transmit_forces( &mut self, timestep: &TimestepManager, boundaries: &BoundarySet )

Transmit forces from salva’s boundary objects to the coupled bodies.

Implementations on Foreign Types§

source§

impl CouplingManager for ()

source§

fn update_boundaries( &mut self, _: &TimestepManager, _: Real, _: Real, _: &HGrid<HGridEntry>, _: &mut [Fluid], _: &mut BoundarySet )

source§

fn transmit_forces(&mut self, _: &TimestepManager, _: &BoundarySet)

Implementors§