pub fn grad(&self, i: usize, j: usize) -> (f64, f64) {
        let dx = self.get(i, j) - self.get(i - 1, j); // Partial w.r.t. x
        let dy = self.get(i, j) - self.get(i, j - 1); // Partial w.r.t. y
        (dx, dy)
    }
/// Returns the gradient of the fluid quantity at grid cell (i, j)
Returns the gradient of the fluid quantity at grid cell (i, j)
Returns the gradient of the fluid quantity at grid cell ( i j )
pub fn grad(&self, i: usize, j: usize) -> (f64, f64) {
        let dx = self.get(i, j) - self.get(i - 1, j); // Partial w.r.t. x
        let dy = self.get(i, j) - self.get(i, j - 1); // Partial w.r.t. y
        (dx, dy)
    }
pub fn grad ( & self , i : usize , j : usize ) -> ( f64 , f64 ) { let dx = self . get ( i , j ) - self . get ( i - 1 , j ) ; // Partial w.r.t. x let dy = self . get ( i , j ) - self . get ( i , j - 1 ) ; // Partial w.r.t. y ( dx , dy ) }
Returns the gradient of the fluid quantity at grid cell (i, j)
Returns the gradient of the fluid quantity at grid cell ( i j )
&self
i
usize
j
usize
&self
i
usize
j
usize