discretize.TreeMesh.average_face_z_to_cell#
- TreeMesh.average_face_z_to_cell#
Averaging operator from z-faces to cell centers (scalar quantities).
This property constructs a 2nd order averaging operator that maps scalar quantities from z-faces to cell centers. This averaging operator is used when a discrete scalar quantity defined on z-faces must be projected to cell centers. Once constructed, the operator is stored permanently as a property of the mesh. See notes.
- Returns:
- (
n_cells
,n_faces_z
)scipy.sparse.csr_matrix
The scalar averaging operator from z-faces to cell centers
- (
Notes
Let \(\boldsymbol{\phi_z}\) be a discrete scalar quantity that lives on z-faces. average_face_z_to_cell constructs a discrete linear operator \(\mathbf{A_{zc}}\) that projects \(\boldsymbol{\phi_z}\) to cell centers, i.e.:
\[\boldsymbol{\phi_c} = \mathbf{A_{zc}} \, \boldsymbol{\phi_z}\]where \(\boldsymbol{\phi_c}\) approximates the value of the scalar quantity at cell centers. For each cell, we are simply averaging the values defined on its z-faces. The operation is implemented as a matrix vector product, i.e.:
phi_c = Azc @ phi_z