[][src]Struct salva2d::solver::PBFSolver

pub struct PBFSolver<N: RealField, KernelDensity: Kernel = Poly6Kernel, KernelGradient: Kernel = SpikyKernel> { /* fields omitted */ }

A Position Based Fluid solver.

Methods

impl<N, KernelDensity, KernelGradient> PBFSolver<N, KernelDensity, KernelGradient> where
    N: RealField,
    KernelDensity: Kernel,
    KernelGradient: Kernel
[src]

pub fn new() -> Self[src]

Initialize a new Position Based Fluid solver.

pub fn position_changes(&self) -> &[Vec<Vector<N>>][src]

Gets the set of fluid particle position changes resulting from pressure resolution.

pub fn position_changes_mut(&mut self) -> &mut [Vec<Vector<N>>][src]

Gets a mutable reference to the set of fluid particle position changes resulting from pressure resolution.

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

Initialize this solver with the given fluids.

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

Initialize this solver with the given boundaries.

pub fn predict_advection(
    &mut self,
    dt: N,
    gravity: &Vector<N>,
    fluids: &[Fluid<N>]
)
[src]

Predicts advection with the given gravity.

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

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.

Auto Trait Implementations

impl<N, KernelDensity, KernelGradient> Send for PBFSolver<N, KernelDensity, KernelGradient> where
    N: Scalar

impl<N, KernelDensity, KernelGradient> Sync for PBFSolver<N, KernelDensity, KernelGradient> where
    N: Scalar

impl<N, KernelDensity, KernelGradient> Unpin for PBFSolver<N, KernelDensity, KernelGradient> where
    KernelDensity: Unpin,
    KernelGradient: Unpin,
    N: Scalar + Unpin

impl<N, KernelDensity, KernelGradient> UnwindSafe for PBFSolver<N, KernelDensity, KernelGradient> where
    KernelDensity: UnwindSafe,
    KernelGradient: UnwindSafe,
    N: Scalar + UnwindSafe

impl<N, KernelDensity, KernelGradient> RefUnwindSafe for PBFSolver<N, KernelDensity, KernelGradient> where
    KernelDensity: RefUnwindSafe,
    KernelGradient: RefUnwindSafe,
    N: RefUnwindSafe + Scalar

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,