Add non-uniform grid regression tests for linear advection (UpwindScheme)#562
Conversation
|
@ChrisRackauckas @xtalax Here is the regression test suite for the Upwind non-uniform audit. |
|
@xtalax @ChrisRackauckas I added a test block to check Periodic BC behavior on non-uniform grids with Passing To document this current limitation while keeping the CI green, I wrapped the |
|
Excellent looks good, my mistake. Yes, adding nonuniform support for interface bcs would be a good contribution, just make sure you understand their other use in joining disperate domains with different physics together. See the MOL_1D_Interface_Nonlinear.jl for this use case |
|
Thanks @xtalax I will look into it as soon as my final exams are over on Friday. |
eb57bd8 to
ff64267
Compare
|
@xtalax @ChrisRackauckas I've just rebased the branch. Could you please trigger the CI |
ff64267 to
e224873
Compare
e224873 to
95d3ecf
Compare
Summary
Adds a regression test suite for linear advection with
UpwindScheme()on non-uniformAbstractVectorspatial grids. Uniform-grid convection tests already exist; they do not exercise per-point stencil weights, boundary upwinding on irregular spacing, or the non-uniform discretization path inDiscreteSpace.This PR adds coverage only — no changes to scheme or discretization code.
Motivation
Non-uniform grid support for advection is an existing code path, but it lacked dedicated tests comparable to
MOL_1D_Linear_Diffusion_NonUniform.jl. These tests lock in expected behavior before further work on non-uniform upwind (convergence, performance, additional BC types).What's added
test/pde_systems/MOL_1D_Linear_Convection_NonUniform.jl— MMS-based tests foru_t + v u_x = 0withUpwindScheme()test/runtests.jl— new CI groupConvection_NUTest coverage
BoundsError,NaN, or blow-up.err_n < 5·err_u); short-time Gaussian mass conservation.AbstractVectorgrid routing (s.grid,s.dxs), noStepRangeLenfallback,Float32grids,chebyspace, uniform vs vectordxstyping.Implementation notes
u(t, x₀) ~ u(t, x_L)) are not used because non-uniform upwind currently rejects interface/periodic BCs in_upwind_difference. This is documented in-test by design, not a test oversight.SSPRK33with a CFL-limiteddtbased onminimum(diff(xgrid)).UpwindScheme();approx_order = 2for centered operators on the same grid.Test plan
julia --project=test test/pde_systems/MOL_1D_Linear_Convection_NonUniform.jlGROUP=Convection_NU julia --project=test -e 'include("test/runtests.jl")'Related work
Part of the non-uniform upwind verification effort (proposal weeks 1–2): establish a CI-backed regression baseline for
UpwindSchemeonAbstractVectorgrids before convergence/performance suites and any scheme fixes.