Skip to content

fix: use left-biased 3-point stencil for face gradients on non-uniform grids#2202

Open
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_929301731
Open

fix: use left-biased 3-point stencil for face gradients on non-uniform grids#2202
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_929301731

Conversation

@copybara-service

Copy link
Copy Markdown

fix: use left-biased 3-point stencil for face gradients on non-uniform grids

Switch the inner face gradient stencil from left-right-rightright to
leftleft-left-right for all faces except the first inner face (which
retains the right-biased stencil since no leftleft cell exists).

This prevents pedestal values from contaminating core gradient
calculations on non-uniform grids, where the rightright cell could
reach across the pedestal boundary.

Both stencils are second-order accurate. On uniform grids they are
mathematically equivalent.

@copybara-service
copybara-service Bot force-pushed the test_929301731 branch 3 times, most recently from 295d28a to e59c3c9 Compare June 9, 2026 21:33
…m grids

Switch the inner face gradient stencil from left-right-rightright to
leftleft-left-right for all faces except the first inner face (which
retains the right-biased stencil since no leftleft cell exists).

This prevents pedestal values from contaminating core gradient
calculations on non-uniform grids, where the rightright cell could
reach across the pedestal boundary.

Both stencils are second-order accurate. On uniform grids they are
mathematically equivalent.

PiperOrigin-RevId: 929301731
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant