nonlinear_laplacian_nonuniform

Family
finite_difference
Grid family
cartesian
Kind
scheme
Accuracy
O(dx_i^2)
Applies to
grad({'op': '*', 'args': ['$f', {'op': 'grad', 'args': ['$u'], 'dim': '$x'}]}), dim=$x
Rule file
discretizations/finite_difference/nonlinear_laplacian_nonuniform.json
This page is auto-generated from the rule's JSON by tools/render_doc_plots.py. The discrete operator below is pretty-printed directly from the rule's replacement AST using EarthSciSerialization (earthsci_toolkit). Rules with a hand-authored page carry richer prose plus stencil and convergence diagrams; see the curated entries linked from the rule index.

Pattern

Matches the §4.2 operator grad on the pattern grad({'op': '*', 'args': ['$f', {'op': 'grad', 'args': ['$u'], 'dim': '$x'}]}), dim=$x for grid family cartesian.

Discrete operator

Pretty-printed from the rule’s replacement AST ($-prefixed names are pattern variables bound by applies_to; grid metrics such as dx/dz are resolved by the grid):

out[$x] = 2·(0.5·(index($f, $x) + index($f, $x + 1))·(index($u, $x + 1) − index($u, $x))/index(dx, $x + 1) − 0.5·(index($f, $x − 1) + index($f, $x))·(index($u, $x) − index($u, $x − 1))/index(dx, $x))/(index(dx, $x) + index(dx, $x + 1))

Source: discretizations/finite_difference/nonlinear_laplacian_nonuniform.json.