discretize.TreeMesh.average_node_to_edge#

TreeMesh.average_node_to_edge#

Averaging operator from nodes to edges (scalar quantities).

This property constructs a 2nd order averaging operator that maps scalar quantities from nodes to edges; scalar at edges is organized in a 1D numpy.array of the form [x-edges, y-edges, z-edges]. This averaging operator is used when a discrete scalar quantity defined on mesh nodes must be projected to edges. Once constructed, the operator is stored permanently as a property of the mesh. See notes.

Returns:
(n_edges, n_nodes) scipy.sparse.csr_matrix

The scalar averaging operator from nodes to edges

Notes

Let \(\boldsymbol{\phi_n}\) be a discrete scalar quantity that lives on mesh nodes. average_node_to_edge constructs a discrete linear operator \(\mathbf{A_{ne}}\) that projects \(\boldsymbol{\phi_n}\) to edges, i.e.:

\[\boldsymbol{\phi_e} = \mathbf{A_{ne}} \, \boldsymbol{\phi_n}\]

where \(\boldsymbol{\phi_e}\) approximates the value of the scalar quantity at edges. For each edge, we are simply averaging the values defined on the nodes it connects. The operation is implemented as a matrix vector product, i.e.:

phi_e = Ane @ phi_n