1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
use crate::counters::Counters;
use crate::geometry::ContactManager;
use crate::math::{Real, Vector};
use crate::object::{Boundary, Fluid};
use crate::TimestepManager;
pub trait PressureSolver {
fn init_with_fluids(&mut self, fluids: &[Fluid]);
fn init_with_boundaries(&mut self, boundaries: &[Boundary]);
fn predict_advection(
&mut self,
timestep: &TimestepManager,
kernel_radius: Real,
contact_manager: &ContactManager,
gravity: &Vector<Real>,
fluids: &mut [Fluid],
boundaries: &[Boundary],
);
fn evaluate_kernels(
&mut self,
kernel_radius: Real,
contact_manager: &mut ContactManager,
fluids: &[Fluid],
boundaries: &[Boundary],
);
fn compute_densities(
&mut self,
contact_manager: &ContactManager,
fluids: &[Fluid],
boundaries: &mut [Boundary],
);
fn step(
&mut self,
counters: &mut Counters,
timestep: &mut TimestepManager,
gravity: &Vector<Real>,
contact_manager: &mut ContactManager,
kernel_radius: Real,
fluids: &mut [Fluid],
boundaries: &[Boundary],
);
}