[][src]Trait salva2d::solver::PressureSolver

pub trait PressureSolver<N: RealField> {
    fn init_with_fluids(&mut self, fluids: &[Fluid<N>]);
fn init_with_boundaries(&mut self, boundaries: &[Boundary<N>]);
fn predict_advection(
        &mut self,
        timestep: &TimestepManager<N>,
        kernel_radius: N,
        contact_manager: &ContactManager<N>,
        gravity: &Vector<N>,
        fluids: &mut [Fluid<N>],
        boundaries: &[Boundary<N>]
    );
fn evaluate_kernels(
        &mut self,
        kernel_radius: N,
        contact_manager: &mut ContactManager<N>,
        fluids: &[Fluid<N>],
        boundaries: &[Boundary<N>]
    );
fn compute_densities(
        &mut self,
        contact_manager: &ContactManager<N>,
        fluids: &[Fluid<N>],
        boundaries: &mut [Boundary<N>]
    );
fn step(
        &mut self,
        counters: &mut Counters,
        timestep: &mut TimestepManager<N>,
        gravity: &Vector<N>,
        contact_manager: &mut ContactManager<N>,
        kernel_radius: N,
        fluids: &mut [Fluid<N>],
        boundaries: &[Boundary<N>]
    ); }

Trait implemented by pressure solvers.

Required methods

fn init_with_fluids(&mut self, fluids: &[Fluid<N>])

Initialize this solver with the given fluids.

fn init_with_boundaries(&mut self, boundaries: &[Boundary<N>])

Initialize this solver with the given boundaries.

fn predict_advection(
    &mut self,
    timestep: &TimestepManager<N>,
    kernel_radius: N,
    contact_manager: &ContactManager<N>,
    gravity: &Vector<N>,
    fluids: &mut [Fluid<N>],
    boundaries: &[Boundary<N>]
)

Predicts advection with the given gravity.

fn evaluate_kernels(
    &mut self,
    kernel_radius: N,
    contact_manager: &mut ContactManager<N>,
    fluids: &[Fluid<N>],
    boundaries: &[Boundary<N>]
)

Evaluate the SPH kernels for all the contacts in contact_manager.

fn compute_densities(
    &mut self,
    contact_manager: &ContactManager<N>,
    fluids: &[Fluid<N>],
    boundaries: &mut [Boundary<N>]
)

Compute the densities of all the boundary and fluid particles.

fn step(
    &mut self,
    counters: &mut Counters,
    timestep: &mut TimestepManager<N>,
    gravity: &Vector<N>,
    contact_manager: &mut ContactManager<N>,
    kernel_radius: N,
    fluids: &mut [Fluid<N>],
    boundaries: &[Boundary<N>]
)

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.

Loading content...

Implementors

impl<N, KernelDensity, KernelGradient> PressureSolver<N> for DFSPHSolver<N, KernelDensity, KernelGradient> where
    N: RealField,
    KernelDensity: Kernel,
    KernelGradient: Kernel
[src]

impl<N, KernelDensity, KernelGradient> PressureSolver<N> for IISPHSolver<N, KernelDensity, KernelGradient> where
    N: RealField,
    KernelDensity: Kernel,
    KernelGradient: Kernel
[src]

Loading content...