3.1 The mapping method by Henrick
Henrick et al. [6] first pointed out the fact that WENO5-JS suffers accuracy loss at a critical point, and then they introduced an extra mapping process to recover the accuracy, where the weights are mapped to more accurate values. To be specific, the mapping is achieved through a set of mapping functions having the form of
$$ {g}_k\left(\omega \right)=\frac{\omega \left({d}_k+{d}_k^2-3{d}_k\omega +{\omega}^2\right)}{d_k^2+\omega \left(1-2{d}_k\right)},\kern0.5em \omega \in \left(0,1\right). $$
(20)
The function is smooth and has the following features: gk(0) = 0, gk(1) = 1, gk(dk) = dk, \( {g}_k^{\hbox{'}}\left({d}_k\right)=0 \) and \( {g}_k^{\hbox{'}\hbox{'}}\left({d}_k\right)=0 \). Once the weight of WENO5-JS in Eq.(5) is obtained, the new unnormalized weight is given by
$$ {\alpha}_k^{\ast }={g}_k\left({\omega}_k\right). $$
(21)
Taylor series expansion of Eq.(21) gives
$$ {\displaystyle \begin{array}{l}{\alpha}_k^{\ast }={g}_k\left({d}_k\right)+{g}_k^{\hbox{'}}\left({d}_k\right)\left({\omega}_k-{d}_k\right)+\frac{g_k^{\hbox{'}\hbox{'}}\left({d}_k\right)}{2}{\left({\omega}_k-{d}_k\right)}^2+\frac{g_k^{\hbox{'}\hbox{'}\hbox{'}}\left({d}_k\right)}{6}{\left({\omega}_k-{d}_k\right)}^3\\ {}\kern1.25em ={d}_k+\frac{{\left({\omega}_k-{d}_k\right)}^3}{d_k-{d}_k^3}+\cdots \\ {}\kern1.25em ={d}_k+\mathrm{O}\left(\varDelta {x}^3\right).\end{array}} $$
(22)
Then, new weight is obtained by
$$ {\omega}_k^{\mathrm{M}}=\frac{\alpha_k^{\ast }}{\sum_{l=0}^2{\alpha}_l^{\ast }}. $$
(23)
Substitute Eq.(22) into Eq.(23), and new weight satisfies
$$ {\omega}_k^{\mathrm{M}}=\frac{\alpha_k^{\ast }}{\sum_{l=0}^2{\alpha}_l^{\ast }}=\frac{d_k+\mathrm{O}\left(\varDelta {x}^3\right)}{1+\mathrm{O}\left(\varDelta {x}^3\right)}={d}_k+\mathrm{O}\left(\varDelta {x}^3\right). $$
(24)
Eq.(24) indicates that the strong sufficient condition, Eq.(8), is satisfied. Therefore, the problem of accuracy loss at a critical point is fixed. The resultant mapped WENO scheme is generally abbreviated as WENO-M.
3.2 The asymmetric improvement of WENO5-M
Here, the linear advection equation,
$$ \frac{\partial u}{\partial t}+\frac{\partial u}{\partial x}=0,\kern0.5em x\in \left[-1,1\right], $$
(25)
with periodic boundary conditions, is taken as an example for illustration. Consider a single square wave, and the initial condition is
$$ u\left(x,t=0\right)=\left\{\begin{array}{l}1,\kern0.5em x\in \left[-0.5,0.5\right],\\ {}0,\kern0.5em \mathrm{else}.\end{array}\right. $$
(26)
The third-order TVD Runge-Kutta method is used to do the discretization in time, expressed as
$$ {\displaystyle \begin{array}{l}{Q}^{(0)}={Q}^{\mathrm{n}},\\ {}{Q}^{(1)}={Q}^{(0)}+\varDelta tR\left({Q}^{(0)}\right),\\ {}{Q}^{(2)}=\frac{3}{4}{Q}^{(0)}+\frac{1}{4}{Q}^{(1)}+\frac{1}{4}\varDelta tR\left({Q}^{(1)}\right),\\ {}{Q}^{(3)}=\frac{1}{3}{Q}^{(0)}+\frac{2}{3}{Q}^{(2)}+\frac{2}{3}\varDelta tR\left({Q}^{(2)}\right),\\ {}{Q}^{\mathrm{n}+1}={Q}^{(3)}.\end{array}} $$
(27)
Time is integrated to t = 20, and the numerical results are shown in Fig. 2. Due to the less dissipation of WENO5-M compared to WENO5-JS, an improvement in the result near the discontinuity is observed in Fig. 2 (a). From the absolute pointwise errors in Fig. 2 (b), however, the improvement on both sides of the discontinuity is not in a symmetric fashion. Specifically, the error curve of WENO5-JS is almost symmetric about the discontinuity, shown with a red line in Fig. 2 (b), while WENO5-M has obvious larger error on the right side of the discontinuity, shown with a blue line in Fig. 2 (b). Consequently, as is shown in Fig. 2 (a), the improvement of WENO5-M on the right side of the discontinuity is obviously less than that on the left side. Due to the asymmetry near the discontinuity, the whole error curve of WENO5-M is no longer symmetric about the center of domain x = 0, shown in Fig. 2 (b).
In order to clarify the cause of this asymmetric improvement of WENO5-M, a simple model shown in Fig. 3 is used. On a six-point domain with a discontinuity at the center, there are two sets of five-point stencils symmetric about the discontinuity. A quantity with superscript L belongs to the left stencil, while with superscript R belongs to the right stencil.
According to Eq.(6) and due to the symmetry, smoothness indicators of left and right stencils have the following relation,
$$ {\displaystyle \begin{array}{l}{\beta}_0^{\mathrm{L}}={\beta}_2^{\mathrm{R}}=0,\\ {}{\beta}_1^{\mathrm{L}}={\beta}_1^{\mathrm{R}}=\frac{13}{12}{\left(b-a\right)}^2+\frac{1}{4}{\left(b-a\right)}^2,\\ {}{\beta}_2^{\mathrm{L}}={\beta}_0^{\mathrm{R}}=\frac{13}{12}{\left(b-a\right)}^2+\frac{1}{4}{\left(3b-3a\right)}^2.\end{array}} $$
(28)
Obviously, for the left stencil, 0-th sub-stencil is the smoothest, and 2-th sub-stencil is the least smooth. While for the right stencil, 2-th sub-stencil is the smoothest, and 0-th sub-stencil is the least smooth.
According to Eq.(5), the weight of each sub-stencil on the same stencil satisfies the relation,
$$ \frac{\omega_i}{\omega_j}=\frac{d_i}{d_j}{\left(\frac{\beta_j+\varepsilon }{\beta_i+\varepsilon}\right)}^p,\kern0.5em i=0,1,2,\kern0.5em j=0,1,2. $$
(29)
Assuming that θ, σ are weights assigned to the least-smooth sub-stencils of left and right stencils, the weight of each sub-stencil can be written as
$$ {\displaystyle \begin{array}{l}{\omega}_0^{\mathrm{L}}=1-{\omega}_1^{\mathrm{L}}-{\omega}_2^{\mathrm{L}},\kern0.5em {\omega}_1^{\mathrm{L}}=2\cdot {\left(\frac{5}{2}\right)}^p\theta, \kern0.5em {\omega}_2^{\mathrm{L}}=\theta; \\ {}{\omega}_0^{\mathrm{R}}=\sigma, \kern0.5em {\omega}_1^{\mathrm{R}}=6\cdot {\left(\frac{5}{2}\right)}^p\sigma, \kern0.5em {\omega}_2^{\mathrm{R}}=1-{\omega}_0^{\mathrm{R}}-{\omega}_1^{\mathrm{R}}.\end{array}} $$
(30)
WENO scheme behaves like an ENO scheme at a discontinuity, and thus θ, σ are small values close to 0. Then, new weights are obtained through the mapping process, i.e.,
$$ {\displaystyle \begin{array}{l}{\omega}_k^{\mathrm{L},\mathrm{M}}=\frac{g_k\left({\omega}_k^{\mathrm{L}}\right)}{g_0\left({\omega}_0^{\mathrm{L}}\right)+{g}_1\left({\omega}_1^{\mathrm{L}}\right)+{g}_2\left({\omega}_2^{\mathrm{L}}\right)},\\ {}{\omega}_k^{\mathrm{R},\mathrm{M}}=\frac{g_k\left({\omega}_k^{\mathrm{R}}\right)}{g_0\left({\omega}_0^{\mathrm{R}}\right)+{g}_1\left({\omega}_1^{\mathrm{R}}\right)+{g}_2\left({\omega}_2^{\mathrm{R}}\right)}.\end{array}} $$
(31)
As θ, σ approach 0, it is approximately obtained that
$$ {\displaystyle \begin{array}{l}\frac{\omega_0^{\mathrm{L},\mathrm{M}}}{\omega_0^{\mathrm{L}}}=1,\kern0.5em \frac{\omega_1^{\mathrm{L},\mathrm{M}}}{\omega_1^{\mathrm{L}}}=1+\frac{1}{d_1}=\frac{8}{3},\kern0.5em \frac{\omega_2^{\mathrm{L},\mathrm{M}}}{\omega_2^{\mathrm{L}}}=1+\frac{1}{d_2}=\frac{13}{3};\\ {}\frac{\omega_0^{\mathrm{R},\mathrm{M}}}{\omega_0^{\mathrm{R}}}=1+\frac{1}{d_0}=11,\kern0.5em \frac{\omega_1^{\mathrm{R},\mathrm{M}}}{\omega_1^{\mathrm{R}}}=1+\frac{1}{d_1}=\frac{8}{3},\kern0.5em \frac{\omega_2^{\mathrm{R},\mathrm{M}}}{\omega_2^{\mathrm{R}}}=1.\end{array}} $$
(32)
From Eq.(32), it is observed that after mapping, the magnification of weight of the least-smooth sub-stencil is not identical for both sides of the discontinuity, i.e. \( \frac{\omega_2^{\mathrm{L},\mathrm{M}}}{\omega_2^{\mathrm{L}}}\ne \frac{\omega_0^{\mathrm{R},\mathrm{M}}}{\omega_0^{\mathrm{R}}} \), obviously larger on the right side. It is the mismatched magnification that results in the asymmetric improvement of WENO5-M around a discontinuity.
3.3 A symmetry-preserving mapping method
It is the derivative of mapping function at 0 that determines the magnification of weight of less-smooth sub-stencils, i.e.,
$$ {g}_k^{\hbox{'}}(0)=1+\frac{1}{d_k}. $$
(33)
Due to the difference in ideal weights for each sub-stencil, mapping the weight with the function by Henrick inevitably causes the problem of asymmetric improvement. There are two ways to overcome the problem of mismatched magnification. One way is to redesign a set of mapping functions with identical derivatives at 0, and the other is to choose a new mapping object that has the same ideal value for each sub-stencil. An example of the former is the work in [7], where the new mapping function is smooth and piecewise,
$$ {p}_k\left(\omega \right)={c}_1{\left(\omega -{d}_k\right)}^{n+1}\left(\omega +{c}_2\right)+{d}_k,\kern0.5em n\ge 2, $$
(34)
where
$$ {c}_1=\left\{\begin{array}{l}{\left(-1\right)}^n\frac{n+1}{{\left({d}_k\right)}^{n+1}},\kern0.5em \omega \in \left[0,{d}_k\right],\\ {}-\frac{n+1}{{\left(1-{d}_k\right)}^{n+1}},\kern0.75em \mathrm{else},\end{array}\right. $$
(35)
and
$$ {c}_2=\left\{\begin{array}{l}\frac{d_k}{n+1},\kern3.5em \omega \in \left[0,{d}_k\right],\\ {}\frac{d_k-\left(n+2\right)}{n+1},\kern0.75em \mathrm{else}.\end{array}\right. $$
(36)
The new function has identical derivative at 0,
$$ {p}_k^{\hbox{'}}(0)=0. $$
(37)
In [7], the researchers noticed the distortion problem of WENO5-M, but they improperly attributed this to the numerical instability, which was thought to be caused by over-amplification of weight of less-smooth sub-stencil. Therefore, they proposed the function with derivative of 0 at 0, in the form of Eq.(34), to retain the ENO property at a strong discontinuity. Although the reason is not properly understood, due to restricting all derivatives to be identical at 0, using mapping function in the form of Eq.(34) is able to avoid the problem of asymmetric improvement. However, extra constraint on derivative brings difficulty in designing concise mapping function, and complicated function will result in significantly increased computational cost. The other way is choosing a new mapping object that has identical ideal value for each sub-stencil, so that extra constraint on derivative at 0 is not necessary. Furthermore, when the ideal value is the same, the mapping function is unique, and the function design is much simplified. Therefore, the second way is more reasonable.
In the formula of weight Eq.(5), besides the weight ωk, there is another quantity related to each sub-stencil, i.e. the smoothness indicator βk. In the smooth region, different from the weight ωk, the smoothness indicator βk is equal for each sub-stencil, and thus its ideal value is unique. In order to keep proportional to ωk, consider the inverse of smoothness indicator with power parameter p, i.e. \( \frac{1}{{\left({\beta}_k+\varepsilon \right)}^p} \). But for mapping, it is necessary to normalize them to a limited interval,
$$ {\lambda}_k=\frac{1/{\left({\beta}_k+\varepsilon \right)}^p}{\sum_{l=0}^2\left(1/{\left({\beta}_l+\varepsilon \right)}^p\right)},\kern0.5em {\lambda}_k\in \left(0,1\right). $$
(38)
The normalized variable, λk, is the new mapping object, and its unique ideal value is
$$ \overline{\lambda}=\frac{1}{3}. $$
(39)
In general, the ideal value of λk for (2r − 1) th-order WENO scheme is \( \frac{1}{r} \).
Substitute Eq.(12) into Eq.(38), and it is obtained at a critical point that
$$ {\lambda}_k=\overline{\lambda}+\mathrm{O}\left(\varDelta x\right). $$
(40)
It is straightforward to apply the mapping function, originally designed for ωk, to do the mapping for λk. Considering the function by Henrick, the mapping function for λk is unique and written as
$$ g\left(\lambda \right)=\frac{\lambda \left(\overline{\lambda}+{\overline{\lambda}}^2-3\overline{\lambda}\lambda +{\lambda}^2\right)}{{\overline{\lambda}}^2+\lambda \left(1-2\overline{\lambda}\right)}. $$
(41)
Similar to Eq.(22), after mapping, it is obtained that
$$ {\lambda}_k^{\ast }=\overline{\lambda}+\mathrm{O}\left(\varDelta {x}^3\right). $$
(42)
Then, new weight is evaluated and satisfies
$$ {\omega}_k^{\mathrm{FM}}=\frac{d_k{\lambda}_k^{\ast }}{\sum_{l=0}^2{d}_l{\lambda}_l^{\ast }}=\frac{d_k\left(\overline{\lambda}+\mathrm{O}\left(\varDelta {x}^3\right)\right)}{\sum_{l=0}^2{d}_l\left(\overline{\lambda}+\mathrm{O}\left(\varDelta {x}^3\right)\right)}={d}_k+\mathrm{O}\left(\varDelta {x}^3\right). $$
(43)
Eqs.(43) and (24) indicate that at a critical point, mapping λk can achieve the same effect as mapping ωk.
According to Eqs.(28) and (38), λk for the left and right stencils in Fig. 3 satisfies
$$ {\lambda}_0^{\mathrm{L}}={\lambda}_2^{\mathrm{R}},{\lambda}_1^{\mathrm{L}}={\lambda}_1^{\mathrm{R}},{\lambda}_2^{\mathrm{L}}={\lambda}_0^{\mathrm{R}}. $$
(44)
After mapping with function Eq.(41), the mapped value still satisfies
$$ {\lambda}_0^{\mathrm{L},\ast }={\lambda}_2^{\mathrm{R},\ast },{\lambda}_1^{\mathrm{L},\ast }={\lambda}_1^{\mathrm{R},\ast },{\lambda}_2^{\mathrm{L},\ast }={\lambda}_0^{\mathrm{R},\ast }. $$
(45)
According to Eq.(43), it is obtained that
$$ \frac{\omega_i^{\mathrm{FM}}}{\omega_j^{\mathrm{FM}}}=\frac{d_i}{d_j}\frac{\lambda_i^{\ast }}{\lambda_j^{\ast }},\kern0.5em i=0,1,2,\kern0.5em j=0,1,2. $$
(46)
Based on Eqs.(45) and (46), one has
$$ \frac{\omega_2^{\mathrm{L},\mathrm{FM}}}{\omega_0^{\mathrm{L},\mathrm{FM}}}=\frac{\omega_0^{\mathrm{R},\mathrm{FM}}}{\omega_2^{\mathrm{R},\mathrm{FM}}},\frac{\omega_1^{\mathrm{L},\mathrm{FM}}}{\omega_0^{\mathrm{L},\mathrm{FM}}}=\frac{\omega_1^{\mathrm{R},\mathrm{FM}}}{\omega_2^{\mathrm{R},\mathrm{FM}}}. $$
(47)
As \( {\omega}_2^{\mathrm{L}},{\omega}_2^{\mathrm{R}} \) approach 0, \( \frac{\omega_0^{\mathrm{L},\mathrm{FM}}}{\omega_0^{\mathrm{L}}} \) and \( \frac{\omega_2^{\mathrm{R},\mathrm{FM}}}{\omega_2^{\mathrm{R}}} \) approach 1. Therefore, it is approximately obtained that
$$ {\displaystyle \begin{array}{l}\frac{\omega_2^{\mathrm{L},\mathrm{FM}}}{\omega_2^{\mathrm{L}}}=\frac{\omega_2^{\mathrm{L},\mathrm{FM}}}{\omega_0^{\mathrm{L},\mathrm{FM}}}\cdot \frac{\omega_0^{\mathrm{L}}}{\omega_2^{\mathrm{L}}},\frac{\omega_1^{\mathrm{L},\mathrm{FM}}}{\omega_1^{\mathrm{L}}}=\frac{\omega_1^{\mathrm{L},\mathrm{FM}}}{\omega_0^{\mathrm{L},\mathrm{FM}}}\cdot \frac{\omega_0^{\mathrm{L}}}{\omega_1^{\mathrm{L}}};\\ {}\frac{\omega_0^{\mathrm{R},\mathrm{FM}}}{\omega_0^{\mathrm{R}}}=\frac{\omega_0^{\mathrm{R},\mathrm{FM}}}{\omega_2^{\mathrm{R},\mathrm{FM}}}\cdot \frac{\omega_2^{\mathrm{R}}}{\omega_0^{\mathrm{R}}},\frac{\omega_1^{\mathrm{R},\mathrm{FM}}}{\omega_1^{\mathrm{R}}}=\frac{\omega_1^{\mathrm{R},\mathrm{FM}}}{\omega_2^{\mathrm{R},\mathrm{FM}}}\cdot \frac{\omega_2^{\mathrm{R}}}{\omega_1^{\mathrm{R}}}.\end{array}} $$
(48)
From Eqs.(28) and (29), one has
$$ \frac{\omega_2^{\mathrm{L}}}{\omega_0^{\mathrm{L}}}=\frac{\omega_0^{\mathrm{R}}}{\omega_2^{\mathrm{R}}},\frac{\omega_1^{\mathrm{L}}}{\omega_0^{\mathrm{L}}}=\frac{\omega_1^{\mathrm{R}}}{\omega_2^{\mathrm{R}}}. $$
(49)
According to Eqs.(33), (47), (48) and (49), it is obtained that
$$ \frac{\omega_2^{\mathrm{L},\mathrm{FM}}}{\omega_2^{\mathrm{L}}}=\frac{\omega_0^{\mathrm{R},\mathrm{FM}}}{\omega_0^{\mathrm{R}}}=\frac{\omega_1^{\mathrm{L},\mathrm{FM}}}{\omega_1^{\mathrm{L}}}=\frac{\omega_1^{\mathrm{R},\mathrm{FM}}}{\omega_1^{\mathrm{R}}}=1+\frac{1}{\overline{\lambda}}. $$
(50)
Eq.(50) indicates that using the new mapping object λk, the problem of mismatched magnification of weights of less-smooth sub-stencils is fixed.
In this article, WENO5-JS with the symmetry-preserving mapping method is abbreviated as WENO5-FM. As is shown in Fig. 2 (b), the error curve of WENO5-FM is symmetric about the discontinuity, and almost symmetric about the center x = 0 on the whole domain. Consequently, compared to WENO5-JS, the improvement of WENO5-FM on both sides of a discontinuity is in a symmetric fashion. To present an intuitive comparison, the linear advection equation initialized by Eq.(26), is still numerically tested here. Results of the first way, where Eq.(34) is used to map ωk, are also presented, n = 6 as suggested in [7]. The corresponding scheme is abbreviated as WENO5-MP. As is shown in Fig. 4, with longer output time t = 100, the asymmetric improvement is more evident compared the case of t = 20. On the left side of the discontinuity, three schemes have similar results, while on the right side, the result of WENO5-M is much worse than the others and suffers obvious distortion.
It is observed from Fig. 5 that at t = 250, both sides of the discontinuity are influenced in the result of WENO5-M, and similar to the right side of the discontinuity, the result on the left side also becomes distorted. On the right side of the discontinuity, the results of WENO5-MP and WENO5-FM are still close to each other, similar to the case of t = 100. However, on the left side, there is obvious overshoot in the result of WENO5-MP, shown with a blue line in Fig. 5. Taking the result at t = 400 in Fig. 6 into consideration together, it can be inferred that the overshoot of WENO5-MP is caused by numerical instability. From the results at t = 100, 250, 400, WENO5-FM is always able to obtain non-oscillatory results and the improvement is symmetric about the discontinuity.
As is mentioned before, to enhance the numerical stability near a discontinuity, the function used in WENO5-MP constrains the derivative at 0 to be 0, but numerical oscillation is observed in Figs. 5 and 6. To figure out the numerical instability, it is necessary to have an observation at the distribution of mapping functions. As is shown in Fig. 7, the black dashed line corresponds to the case without mapping, while the red and blue lines are related to functions used in WENO5-FM and WENO5-MP, respectively. Due to different ideal weights for each sub-stencil, there are three different functions involved in WENO5-MP. Only the function for the minimum weight \( {d}_0=\frac{1}{10} \), is presented in Fig. 7.
It is observed that the magnification of weight near 0 is smaller with blue line, which is beneficial to capture strong discontinuities. However, for a weak discontinuity in numerical sense, i.e., the weight is not so close to 0 or 1 but deviates significantly from the ideal value, the adjustment of weight is obviously stronger with blue line. From the results in Figs. 4, 5 and 6, it can be concluded that even with larger magnification of weight near strong discontinuity, the numerical stability of WENO5-FM is still ensured. By contrast, there is no oscillation observed in the result of WENO5-MP at t = 100, while evident oscillation occurs at t = 250 when the initial strong discontinuity is smoothed out and becomes much weaker due to numerical dissipation. It can be inferred that, the numerical instability of WENO5-MP comes from the over-adjustment of weight near a weak discontinuity. As is mentioned previously, there is a controllable parameter n in the function defined by Eq.(34). Functions with n = 4 and n = 2 are plotted in Fig. 7, and it is shown that with smaller n, the adjustment of weight is weaker, especially in the region with weak discontinuities. Figure 8 shows the results of WENO5-MP with n = 6, 4, 2. In the results of n = 4, 2, there is no numerical oscillation observed, while n = 2 leads to a slightly more dissipative result. This further supports the inference that the numerical instability is due to the over-adjustment of weight near a weak discontinuity.
The above results suggest that weak discontinuity is also important for numerical stability. To ensure a stable mapping, excessive adjustment should be avoided near both strong and weak discontinuities. The core of mapping method lies in the mapping function, and different requirements on a scheme, such as strong stability, low dissipation, can be met with specifically designed function. In terms of function design, using λk to map has two main advantages over using ωk. On one hand, for (2r − 1) th-order scheme, there are r different ideal weights and thus r different functions need to be designed. While there is only one function to be designed for using λk to map due to the unique ideal value, which greatly simplifies the function design. On the other hand, the minimum ideal weight is closer to 0 with higher order, e.g., \( {d}_0=\frac{1}{10},\frac{1}{35},\frac{1}{126} \) for fifth-, seventh- and ninth-order schemes, respectively. Ideal value close to 0 brings difficulty in balancing accuracy recovery and numerical stability. By contrast, \( \overline{\lambda}=\frac{1}{3},\frac{1}{4},\frac{1}{5} \) for fifth-, seventh- and ninth-order schemes respectively, which significantly alleviates this dilemma.