incorrect WENO coefficient in GRHydro WENO reconstruction code
The GRHydro WENO reconstruction code selected by GRHydro::recon_method = "weno"
employs incorrect values for the weno_coeffs
array that is constructed from the WENO $omega_r$ values.
The current values are in fact WENO interpolation instead of WENO reconstruction.
Pull request
https://bitbucket.org/einsteintoolkit/einsteinevolve/pull-requests/17/rhaas-wenocoeffsfix
corrects the coefficients, re-computing them from the original publication used to implement the code (“WHAM paper”, https://arxiv.org/abs/0704.2608) and updates the test data as well.
The attached stand-alone test (extracted code from GRHydro) demonstrates the issue and shows that only WENO-Z and WHAM’s WENO do show the WENO property of exactly reconstructing smooth data of low order polynomials (2nd order in the test, but should be up to 5th order). It also shows that WENO as implemented by GRHydro is actually WENO interpolation.
This effectively reduces WENO to a 2nd order accurate scheme similar to a basic tvd scheme I would guess.
Comments (15)
-
reporter -
reporter - changed status to open
-
reporter -
assigned issue to
-
assigned issue to
-
reporter @Zach Etienne could I ask you to review this? It would be important to have the corrected WENO coeffs in the next release and this is complicated enough that a second pair of eyes would be very helpful.
-
reporter In case it helps, the “average to left” matrix that one needs is the product of the “average to center” and “center to left” matrices show in the WHAM paper. And in Maple code this would be:
with(linalg); C_cl := matrix([[15/8, -5/4, 3/8], [3/8, 3/4, -1/8], [-1/8, 3/4, 3/8]]); C_ac := matrix([[23/24, 1/12, -1/24],[-1/24, 13/12, -1/24],[-1/24, 1/12, 23/24]]); C_al := multiply(C_cl, C_ac);
which gives:
[ 11/6 -7/6 1/3 ] C_al = [ 1/3 5/6 -1/6 ] [ -1/6 5/6 1/3 ]
which is almost what shows up in the code. The matrix is used in the code. Except that the code sorts by a different index (see comment “ these are from equ. (18) and (19) when substituting into each other and sorting by the index i-r+j”).
-
reporter The interpolation vs. reconstruction behaviour should be checked against PPM to decide if WENO or WENOZ coefficients should be updated (one is reconstruction the other one is interpolation).
-
reporter I did some more tests and incorporated GRHydro’s PPM ( Ian Hawke, Toni Font, Luca Baiotti, Frank Loeffler) to my test and find that PPM does reconstruction not interpolation.
So WENO (which does interpolation) should be changed.
Attached please find the test code and test output.
-
reporter - attached weno_ppm.out
- attached weno_ppm.cc
Code and output.
-
reporter - attached weno.mw
maple worksheet showing explicitly how Aminus is computed.
-
reporter - attached Java_Printing__nable-job_1103.pdf
PDF version
-
reporter - attached weno.mw
-
reporter - attached Java_Printing__nable-job_1104.pdf
-
reporter Steve says “please apply” in the pull request.
-
reporter Applied as git hash 25f1178 "GRHydro: re-generate test data" of einsteinevolve
-
reporter - changed status to resolved
- Log in to comment
Please review.