weno5_grad
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($u), 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] = ((1/10/(1.0×10⁻⁶ + 13/12·(index($u, $x − 2) + −2·index($u, $x − 1))² + 1/4·(index($u, $x − 2) + −4·index($u, $x − 1))²)²·(11/6·index($u, $x) + −7/6·index($u, $x − 1)) + 6/10/(1.0×10⁻⁶ + 13/12·(index($u, $x − 1) + −2·index($u, $x))² + 1/4·(index($u, $x − 1) + −1·index($u, $x + 1))²)²·(−1/6·index($u, $x − 1) + 5/6·index($u, $x)))/(1/10/(1.0×10⁻⁶ + 13/12·(index($u, $x − 2) + −2·index($u, $x − 1))² + 1/4·(index($u, $x − 2) + −4·index($u, $x − 1))²)² + 6/10/(1.0×10⁻⁶ + 13/12·(index($u, $x − 1) + −2·index($u, $x))² + 1/4·(index($u, $x − 1) + −1·index($u, $x + 1))²)²) − (1/10/(1.0×10⁻⁶ + 13/12·(index($u, $x) + −2·index($u, $x + 1))² + 1/4·(3·index($u, $x) + −4·index($u, $x + 1))²)²·(11/6·index($u, $x) + −7/6·index($u, $x + 1)) + 6/10/(1.0×10⁻⁶ + 13/12·(index($u, $x − 1) + −2·index($u, $x))² + 1/4·(index($u, $x − 1) + −1·index($u, $x + 1))²)²·(1/3·index($u, $x − 1) + 5/6·index($u, $x)))/(1/10/(1.0×10⁻⁶ + 13/12·(index($u, $x) + −2·index($u, $x + 1))² + 1/4·(3·index($u, $x) + −4·index($u, $x + 1))²)² + 6/10/(1.0×10⁻⁶ + 13/12·(index($u, $x − 1) + −2·index($u, $x))² + 1/4·(index($u, $x − 1) + −1·index($u, $x + 1))²)²))/dx