[−][src]Struct salva2d::solver::PBFSolver
A Position Based Fluid solver.
Methods
impl<N, KernelDensity, KernelGradient> PBFSolver<N, KernelDensity, KernelGradient> where
N: RealField,
KernelDensity: Kernel,
KernelGradient: Kernel,
[src]
N: RealField,
KernelDensity: Kernel,
KernelGradient: Kernel,
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]
&mut self,
dt: N,
gravity: &Vector<N>,
fluids: &[Fluid<N>]
)
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]
&mut self,
dt: 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.
Auto Trait Implementations
impl<N, KernelDensity, KernelGradient> Send for PBFSolver<N, KernelDensity, KernelGradient> where
N: Scalar,
N: Scalar,
impl<N, KernelDensity, KernelGradient> Sync for PBFSolver<N, KernelDensity, KernelGradient> where
N: Scalar,
N: Scalar,
impl<N, KernelDensity, KernelGradient> Unpin for PBFSolver<N, KernelDensity, KernelGradient> where
KernelDensity: Unpin,
KernelGradient: Unpin,
N: Scalar + Unpin,
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,
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,
KernelDensity: RefUnwindSafe,
KernelGradient: RefUnwindSafe,
N: RefUnwindSafe + Scalar,
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn is_in_subset(&self) -> bool
unsafe fn to_subset_unchecked(&self) -> SS
fn from_subset(element: &SS) -> SP
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,