pub fn update(&mut self) {
        let mut total_time = 0.0_f64;

        while total_time < self.frame_time {
            // (0) Update the hash table of marker cells.
            self.update_marker_cells();

            // (1) Determine a good time step, based on the current velocity field.
            let delta_t = self.determine_time_step();

            // (2) Force the fluid to obey the incompressibility condition.
            self.project(delta_t, 1e-5, 600);

            // (3) Update the velocity field (self-advection) and other quantities.
            self.advect(delta_t);

            // (4) Apply body forces.
            self.apply_body_forces();

            total_time += delta_t;
        }

    }
/// Moves the entire fluid simulation forward in time.
Moves the entire fluid simulation forward in time.
Moves the entire fluid simulation forward in time .
pub fn update(&mut self) {
        let mut total_time = 0.0_f64;
        while total_time < self.frame_time {
            // (0) Update the hash table of marker cells.
            self.update_marker_cells();
            // (1) Determine a good time step, based on the current velocity field.
            let delta_t = self.determine_time_step();
            // (2) Force the fluid to obey the incompressibility condition.
            self.project(delta_t, 1e-5, 600);
            // (3) Update the velocity field (self-advection) and other quantities.
            self.advect(delta_t);
            // (4) Apply body forces.
            self.apply_body_forces();
            total_time += delta_t;
        }
    }
pub fn update ( & mut self ) { let mut total_time = 0.0_f64 ; while total_time < self . frame_time { // (0) Update the hash table of marker cells. self . update_marker_cells ( ) ; // (1) Determine a good time step, based on the current velocity field. let delta_t = self . determine_time_step ( ) ; // (2) Force the fluid to obey the incompressibility condition. self . project ( delta_t , 1e-5 , 600 ) ; // (3) Update the velocity field (self-advection) and other quantities. self . advect ( delta_t ) ; // (4) Apply body forces. self . apply_body_forces ( ) ; total_time += delta_t ; } }
Moves the entire fluid simulation forward in time.
Moves the entire fluid simulation forward in time .
&mut self
&mut self