discretize.TreeMesh.stencil_cell_gradient_y#

TreeMesh.stencil_cell_gradient_y#

Differencing operator along y-direction to total (including hanging) y faces.

This property constructs a differencing operator along the y-axis that acts on cell centered quantities; i.e. the stencil for the y-component of the cell gradient. The operator computes the differences between the values at adjacent cell centers along the y-direction, and places the result on the y-faces. The operator is a sparse matrix \(\mathbf{G_y}\) that can be applied as a matrix-vector product to a cell centered quantity \(\boldsymbol{\phi}\), i.e.:

diff_phi_y = Gy @ phi

By default, the operator assumes zero-Neumann boundary conditions on the scalar quantity.

Returns:
(n_total_faces_y, n_cells) scipy.sparse.csr_matrix

The stencil for the y-component of the cell gradient