C7 The upwind–central split
| ID | Group | Type | Backends | Figure | Program |
|---|---|---|---|---|---|
| C7 | Contracts | C | Python (exact rationals); CPU (gfortran R4P, R8P, R16P; nvfortran) | no | scripts/gen_gideon.py, gideon_test_split |
Case and scope
A hybrid scheme moves between a central and an upwind-biased face value with a sensor. That is only clean if the biased value is the central one plus a dissipation term the sensor can scale: then the central scheme is recovered exactly at
Models and numerics
| Item | Choice | Code |
|---|---|---|
| Identity | gen_gideon.py, build() | |
| Proof | the biased row minus the centred row on the centred window, divided by the binomial | |
| One-sided rows | the same tried for every ur row against every centred face row: split_findings | |
| Compiled check | 50 random windows; | gideon_test_split.F90 |
Program
bash
python3 scripts/gen_gideon.py --check
./exe/gideon_test_splitResults
The identities, every one proven in exact rationals:
| Data | Biased (left) | = centred | + C × | difference | Dissipation part (left, right: −C) |
|---|---|---|---|---|---|
| fd | fd_face_bl3 | fd_face_c4 | fd_face_diss_bl3, fd_face_diss_br3 | ||
| fd | fd_face_bl5 | fd_face_c6 | fd_face_diss_bl5, fd_face_diss_br5 | ||
| fd | fd_face_bl7 | fd_face_c8 | fd_face_diss_bl7, fd_face_diss_br7 | ||
| fd | fd_face_bl9 | fd_face_c10 | fd_face_diss_bl9, fd_face_diss_br9 | ||
| fv | fv_face_bl3 | fv_face_c4 | fv_face_diss_bl3, fv_face_diss_br3 | ||
| fv | fv_face_bl5 | fv_face_c6 | fv_face_diss_bl5, fv_face_diss_br5 | ||
| fv | fv_face_bl7 | fv_face_c8 | fv_face_diss_bl7, fv_face_diss_br7 | ||
| fv | fv_face_bl9 | fv_face_c10 | fv_face_diss_bl9, fv_face_diss_br9 |
The one-sided rows, from the generator's findings:
split fd: gideon_fd_face_ur1 = gideon_fd_face_c2 + (1/2) delta^1; no centred row + one face difference: gideon_fd_face_ur2, gideon_fd_face_ur3, gideon_fd_face_ur4, gideon_fd_face_ur5, gideon_fd_face_ur6, gideon_fd_face_ur7, gideon_fd_face_ur8, gideon_fd_face_ur9split fv: gideon_fv_face_ur1 = gideon_fv_face_c2 + (1/2) delta^1; no centred row + one face difference: gideon_fv_face_ur2, gideon_fv_face_ur3, gideon_fv_face_ur4, gideon_fv_face_ur5, gideon_fv_face_ur6, gideon_fv_face_ur7, gideon_fv_face_ur8, gideon_fv_face_ur9
The compiled kernels:
| Build | Biased kernels | Checks | Failures |
|---|---|---|---|
| gfortran, R4P | 16 | 1600 | 0 |
| gfortran, R8P | 16 | 1600 | 0 |
| gfortran, R16P | 16 | 1600 | 0 |
| nvfortran -acc, R8P | 16 | 1600 | 0 |
Findings
- Every upwind-biased face value of order
is the centred value of order plus one face difference, on point values and on cell averages: the difference of two rows exact to degree on the same points annihilates every polynomial of degree , and the only such row is . On cell averages the constants are , , , : the familiar split of the linear WENO face values. - The one-sided rows do not split beyond one cell:
ur2−c4is, not a multiple of ; only ur1=c2+. Their windows are not symmetric about the face, so the remainder spans more than one difference. Roadmap #2 claimed the split for "every upwind-biased and one-sided face row": true for the first, false for the second. - At
the sum is a different floating-point sum from the biased kernel: equal within the round-off of the two, not bitwise (#2's gate asked for both ends bitwise: kept at only).