Repository navigation
docs: Add Non-Uniform WENO Showcase - #616
Merged
Merged
Conversation
utkuyilmaz1903
marked this pull request as ready for review
August 4, 2026 09:29
|
|
||
| an interior layer of width ``O(\nu)`` pinned at ``x = 0`` — the finite-difference prototype of a steep interfacial gradient. With ``\nu = 2 \times 10^{-3}`` the layer is ``\sim 0.01`` wide: a uniform grid needs thousands of points to see it, yet 98% of those points sit in regions where the solution is essentially constant. | ||
|
|
||
| The test protocol: start *from* the exact steady state and integrate to ``t = 1``. A perfect scheme holds the layer exactly; a real scheme smears it, shifts it, or rings around it, and the error against ``u_\infty`` measures precisely that. (Starting from a smeared initial profile instead would measure the metastable, ``O(e^{c/\nu})``-slow layer relaxation of viscous Burgers — a property of the physics, not of the discretization.) |
Member
There was a problem hiding this comment.
"real scheme", you mean an inaccurate scheme, or a finite difference scheme?
Member
Author
There was a problem hiding this comment.
Yeah, that was vague. Meant any discretization, not FD specifically. Reworded.
|
|
||
| - **First-order upwind** replaces the physical viscosity ``\nu`` with its own numerical viscosity ``\sim u\,\Delta x / 2 \approx 8 \times 10^{-3} \gg \nu`` and relaxes the layer to the corresponding *wrong* width. | ||
| - **Uniform WENO at N=257** barely fits the layer into one cell. It stays non-oscillatory (the WENO weights see the layer as a near-discontinuity), but accuracy is limited — and on the *N=129* uniform grid the sub-cell layer is not even stable to integrate. Under-resolution is not a small-error regime; it is a failure regime. | ||
| - **Clustered WENO at N=129** resolves the layer with ``\sim 25`` points and holds it to a relative error of ``\sim 10^{-4}`` — two orders of magnitude better than the uniform grid with *twice* the points, with the largest overshoot at the ``10^{-8}`` level. |
Member
There was a problem hiding this comment.
You should describe how you're choosing the non-uniformity? Where are you clustering the points and why, in order to achieve this.
Member
Author
There was a problem hiding this comment.
I added a paragraph right after the density definition. Doing this without a-priori feature knowledge is tracked in #610, which could make this much more powerful down the line.
Member
|
Looks amazing! Just a few small comments. |
ChrisRackauckas
approved these changes
Aug 6, 2026
Member
|
The docs build dies, but I don't think it's this. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Final piece of the non-uniform WENO GSoC work: a quantitative showcase of what the new infrastructure buys, plus two small regression tests covering the regimes it exercises.
Docs: new tutorial page (
docs/src/tutorials/weno_showcase.md)Two problems with exact solutions, both advection-dominated with steep-but-smooth profiles:
Part A — Stationary viscous shock (viscous Burgers, ν = 2e-3). Starting from the exact tanh steady state, the scheme must hold an O(ν)-wide interior layer in place for t = 1.
Uniform WENO appears as a single point because the N = 129 uniform run is unstable (the sub-cell layer aborts the integration) — under-resolution is a failure regime, not a small-error regime.
Part B — Front crossing a two-domain interface into a porous region (flow-battery-inspired). A concentration front compresses 2x as a variable velocity v(x) slows it down, crossing the seam onto an independently generated, ~2x finer grid. Against the exact characteristic solution:
The page also documents limitations explicitly: non-conservative form (Hou–LeFloch — not a shock-tube solver), mismatched-grid interfaces support first-order derivatives only, and under-resolution being a failure regime rather than a small-error regime.
Tests: two compact regression blocks, no new files (~1.5 min added to
Convection_WENO)MOL_1D_WENO_NU_Convergence.jl: mixed WENO advection + centered diffusion on the same variable, on a strongly clustered grid (viscous shock held for t = 1).MOL_1D_WENO_NU_Interface.jl: variable-coefficient advection across a mismatched non-uniform interface.These are the two operator/interface combinations not covered by the existing convergence and interface tests.