nn_diffusion_mpas

Family
finite_difference
Grid family
mpas
Kind
scheme
Accuracy
O(h²) on quasi-uniform Voronoi
Applies to
laplacian(u), dim=cell
Rule file
discretizations/finite_difference/nn_diffusion_mpas.json
Tags
#finite-difference #mpas #voronoi #diffusion #unstructured

Stencil

Voronoi neighbor stencil — central cell with 6 hexagonal neighbors
Illustrative stencil over a hexagonal Voronoi cell. The actual number of neighbors per cell is n_edges_on_cell[c] — 5 for the twelve pentagons inherited from the icosahedral seed, 6 elsewhere.

Discrete operator

For a target cell \(c\) with neighbor list \(\mathcal{N}(c) = \{c_0, c_1, \dots, c_{n-1}\}\), where \(n = \texttt{n\_edges\_on\_cell}[c]\), the rule emits

$$\nabla^2 u\big|_c \;\approx\; \sum_{k=0}^{n-1} w_k \bigl(u_{c_k} - u_c\bigr), \qquad w_k \;=\; \frac{\ell_v(e_k)}{\ell_c(e_k)\,A_c},$$

where \(e_k = \texttt{edges\_on\_cell}[c, k]\) is the edge separating \(c\) from neighbor \(c_k\), \(\ell_v(e)\) is its Voronoi (dual) length, \(\ell_c(e)\) the distance between the two cell centers it bridges, and \(A_c\) the area of cell \(c\). The rule’s two stencil rows materialize the same expression in two pieces:

RowSelector kindContributes
1reduction over cells_on_cell[$target, k]\(+w_k\,u_{c_k}\) for each \(k = 0, \dots, n-1\)
2indirect at $target (self)\(-\bigl(\sum_{k=0}^{n-1} w_k\bigr)\,u_c\)

Row 2’s coefficient is materialized via an arrayop reduction so the diagonal weight is computed from the same dv_edge / (dc_edge · area_cell) expression used in Row 1, guaranteeing the algebraic identity \(\nabla^2 u(c) = \sum_k w_k\,(u_{c_k} - u_c)\) holds exactly without relying on a separate analytical simplification.

Derivation

This stencil is the standard finite-volume Laplacian on an orthogonal unstructured mesh. Integrating \(\nabla^2 u\) over Voronoi cell \(c\) and applying the divergence theorem,

$$\int_{c} \nabla^2 u \;dA \;=\; \oint_{\partial c} \nabla u \cdot \mathbf{n}\, ds \;=\; \sum_{k=0}^{n-1} \int_{e_k} \nabla u \cdot \mathbf{n}\, ds.$$

On an MPAS mesh, the Voronoi edge \(e_k\) is — by construction — perpendicular to the line connecting cell centers \(c \to c_k\), so the outward normal flux through \(e_k\) is approximated by the centered difference

$$\nabla u \cdot \mathbf{n}\big|_{e_k} \;\approx\; \frac{u_{c_k} - u_c}{\ell_c(e_k)},$$

and the integral over the edge contributes

$$\int_{e_k} \nabla u \cdot \mathbf{n}\, ds \;\approx\; \ell_v(e_k)\,\frac{u_{c_k} - u_c}{\ell_c(e_k)}.$$

Summing over edges and dividing by the cell area \(A_c\) (to recover the pointwise Laplacian from the cell-integrated divergence) yields exactly the stencil above. This is the diamond-coefficient FV Laplacian; on a quasi-uniform Voronoi mesh — where edge lengths and cell areas vary smoothly with \(h\) — the truncation error is \(O(h^2)\), matching the accuracy claim in the rule’s frontmatter.

Coefficients

The Laplacian is approximated by summing flux contributions across each edge of the target cell:

$$\nabla^2 u\big|_c \approx \sum_{k=0}^{n_{edges}(c)-1} \frac{\ell_v(e_k)}{\ell_c(e_k)\,A_c} \bigl(u_{c_k} - u_c\bigr),$$

with the edge metric quantities loaded from the MPAS mesh tables:

SymbolMPAS tableMeaning
ℓ_vdv_edgeVoronoi edge length (between dual vertices)
ℓ_cdc_edgedual-edge length (between cell centers)
A_carea_cellcell area
c_kcells_on_cellneighbor cell index, k = 0…n−1
e_kedges_on_cellshared-edge index for each neighbor
nn_edges_on_cellper-cell valence (5 or 6 on the icosahedral seed)

See the JSON for the full coefficient AST and discretizations/SELECTOR_KINDS.md for the reduction / indirect selector contracts.

Convergence

Pending ESS harness extension. The Layer-B convergence harness needs MPAS unstructured support — specifically the ability to evaluate manufactured solutions on a Voronoi mesh, sample at cell centers via the MPAS-mesh accessor, and refine across the x1.642 → x1.2562 → x1.10242 sequence. The fixture under [discretizations/finite_difference/nn_diffusion_mpas/fixtures/convergence/](https://github.com/EarthSciML/EarthSciDiscretizations/blob/main/discretizations/finite_difference/nn_diffusion_mpas/fixtures/convergence) declares applicable: false until that lands. The structural claims (rule discoverable, two-row stencil shape, selector kinds, and coefficient AST containing dv_edge / dc_edge / area_cell plus an arrayop diagonal-weight reduction) are checked today by test/test_rule_catalog.jl.