discretize.TreeMesh.average_node_to_face#
- TreeMesh.average_node_to_face#
Averaging operator from nodes to faces (scalar quantities).
This property constructs a 2nd order averaging operator that maps scalar quantities from nodes to edges; scalar at faces is organized in a 1D numpy.array of the form [x-faces, y-faces, z-faces]. This averaging operator is used when a discrete scalar quantity defined on mesh nodes must be projected to faces. Once constructed, the operator is stored permanently as a property of the mesh. See notes.
- Returns:
- (
n_faces
,n_nodes
)scipy.sparse.csr_matrix
The scalar averaging operator from nodes to faces
- (
Notes
Let \(\boldsymbol{\phi_n}\) be a discrete scalar quantity that lives on mesh nodes. average_node_to_face constructs a discrete linear operator \(\mathbf{A_{nf}}\) that projects \(\boldsymbol{\phi_n}\) to faces, i.e.:
\[\boldsymbol{\phi_f} = \mathbf{A_{nf}} \, \boldsymbol{\phi_n}\]where \(\boldsymbol{\phi_f}\) approximates the value of the scalar quantity at faces. For each face, we are simply averaging the values at the nodes which outline the face. The operation is implemented as a matrix vector product, i.e.:
phi_f = Anf @ phi_n