pub fn new(w: usize, h: usize) -> FluidSolver {
        println!("Initializing a new FluidSolver...");

        FluidSolver {
            w,
            h,
            p: FluidQuantity::new(w, h, Staggered::None),
            u: FluidQuantity::new(w + 1, h, Staggered::OffsetX),
            v: FluidQuantity::new(w, h + 1, Staggered::OffsetY),
            dye: FluidQuantity::new(w, h, Staggered::None),
            rhs: FluidQuantity::new(w, h, Staggered::None),
            density: 0.1,
            frame_time: 1.0 / 60.0,
            max_grid_cell_traversal: 10,
            grid_cell_size: 1.0 / (w.min(h) as f64),
            gravity: (0.0, 0.0),
            interpolation_scheme: InterpolationScheme::RK2
        }
    }
/// Constructs and returns a new solver whose simulation
/// domain will be `w`x`h` pixels in resolution.
///
/// The u and v-components of the velocity field are one unit
/// larger along their respective dimensions to form a staggered
/// MAC (marker-and-cell) grid.
///
/// The MAC grid method discretizes space into a grid of cells.
/// Each cell has a pressure `p` defined at its center. It also
/// has a velocity with components `u` and `v`, but the
/// components are placed at the centers of 2 of the cell faces:
/// `u` on the x-min face and `v` on the y-min face.
///
/// However, in code, we use integer indices so that:
///      p(i, j) = P(i + 0.0, j + 0.0)
///      u(i, j) = U(i - 0.5, j + 0.0)
///      v(i, j) = V(i + 0.0, j - 0.5)
Constructs and returns a new solver whose simulation
domain will be `w`x`h` pixels in resolution.

The u and v-components of the velocity field are one unit
larger along their respective dimensions to form a staggered
MAC (marker-and-cell) grid.

The MAC grid method discretizes space into a grid of cells.
Each cell has a pressure `p` defined at its center.


Constructs and returns a new solver whose simulation domain will be ` w ` x ` h ` pixels in resolution . The u and v - components of the velocity field are one unit larger along their respective dimensions to form a staggered MAC ( marker - and - cell ) grid . The MAC grid method discretizes space into a grid of cells . Each cell has a pressure ` p ` defined at its center .
pub fn new(w: usize, h: usize) -> FluidSolver {
        println!("Initializing a new FluidSolver...");
        FluidSolver {
            w,
            h,
            p: FluidQuantity::new(w, h, Staggered::None),
            u: FluidQuantity::new(w + 1, h, Staggered::OffsetX),
            v: FluidQuantity::new(w, h + 1, Staggered::OffsetY),
            dye: FluidQuantity::new(w, h, Staggered::None),
            rhs: FluidQuantity::new(w, h, Staggered::None),
            density: 0.1,
            frame_time: 1.0 / 60.0,
            max_grid_cell_traversal: 10,
            grid_cell_size: 1.0 / (w.min(h) as f64),
            gravity: (0.0, 0.0),
            interpolation_scheme: InterpolationScheme::RK2
        }
    }
pub fn new ( w : usize , h : usize ) -> FluidSolver { println ! ( " " ) ; FluidSolver { w , h , p : FluidQuantity :: new ( w , h , Staggered :: None ) , u : FluidQuantity :: new ( w + 1 , h , Staggered :: OffsetX ) , v : FluidQuantity :: new ( w , h + 1 , Staggered :: OffsetY ) , dye : FluidQuantity :: new ( w , h , Staggered :: None ) , rhs : FluidQuantity :: new ( w , h , Staggered :: None ) , density : 0.1 , frame_time : 1.0 / 60.0 , max_grid_cell_traversal : 10 , grid_cell_size : 1.0 / ( w . min ( h ) as f64 ) , gravity : ( 0.0 , 0.0 ) , interpolation_scheme : InterpolationScheme :: RK2 } }
Constructs and returns a new solver whose simulation
domain will be `w`x`h` pixels in resolution.
Constructs and returns a new solver whose simulation domain will be ` w ` x ` h ` pixels in resolution .
w
usize
h
usize
w
usize
h
usize