incorrect WENO coefficient in GRHydro WENO reconstruction code

Create issue
Issue #2647 open
Roland Haas created an issue

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

corrects the coefficients, re-computing them from the original publication used to implement the code (“WHAM paper”, 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 (5)

  1. Roland Haas 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.

  2. Roland Haas 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:

    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”).

  3. Log in to comment