A Strategy Applied on Weighted ENO Interpolation to Improve the Accuracy near Discontinuities ()
1. Introduction
The interpolation of piecewise smooth function from the discrete sample points is always an important problem of numerical computation. The simple linear Lagrangian interpolation is suitable for a set of smooth sample points and achieves the optimal accuracy. However, we often need to interpolate a set of discrete points which contains corner (or jump) discontinuities. In these cases, the Gibbs oscillations generated by linear Lagrangian interpolations around the discontinuities will decrease the numerical accuracy. Then some preferred nonlinear algorithms should be used to obtain stable numerical approximation. The nonlinear essentially non-oscillatory (ENO) interpolation, which can tackle this problem well, was first presented in [1] [2] for solving hyperbolic conservation laws. To eliminate the effect of non-smooth parts of sample points, the ENO algorithm adaptively chooses the smoothest stencil from the candidates to reconstruct the piecewise function. The indicator of smoothness of each stencil is defined as the Newton divided difference of sample points on this stencil. More information about ENO algorithm can be found in [3]-[5].
In the procedure of ENO interpolation, while the smoothness of all the candidate stencils is measured, only the smoothest one is finally conserved even though all the stencils are smooth enough to be used. To gather all the potential stencils, in [6], the authors presented the weighted ENO (WENO) algorithm based on ENO. The aim of WENO algorithm is to keep the ENO property in non-smooth regions and meanwhile improve the order of accuracy in smooth regions. To obtain it, in the WENO algorithm, each candidate stencil is assigned a nonlinear weight which measures the contribution of this stencil for the final convex combination. The nonlinear weights are devised to approach linear optimal weights in smooth region to improve the accuracy of interpolation. While there exist stencils across the discontinuities, the weights assigned to these non-smooth stencils can be ignored almost. In [7], the authors showed new indicators of smoothness which emulate the idea of minimizing the total variation of function. The new indicators of smoothness are defined as the
norm of the derivatives of the interpolation polynomials. The indicators of smoothness in [7] ensure the optimal order of accuracy in smooth region and ENO property when there exist stencils that contain the discontinuities. About the improvements and applications of WENO algorithm, the interested reader can refer to [8]-[16].
Around the discontinuities, the classical WENO algorithm [7] generally only achieves the same order of accuracy as the corresponding ENO interpolation. It was shown in [7] for reconstructing the numerical flux at cell boundary based on the cell averages. What leads to the degeneration of order of accuracy is the classical WENO cannot distribute reasonable optimal weights to the smooth stencils when the discontinuity appears. In [17], the authors proposed a power WENO algorithm to improve the accuracy near discontinuities. However, it does not obtain the maximum theoretical order of accuracy. Then, the authors in [18] succeed in obtaining the maximum theoretical accuracy close to the discontinuities by an improved WENO algorithm (WENO-AW). Unlike the fixed linear optimal weights proposed in [7] [19], they devise nonlinear optimal weights to tackle this problem. The nonlinear optimal weights are expressed as the nonlinear convex combination of three vectors of linear optimal weights. Each vector of linear optimal weights is appropriate for one special case. The proofs of maximum theoretical accuracy near discontinuities and ENO property were presented in [18]. They also give another algorithm to raise the accuracy of WENO algorithm for the interval which contains the corner discontinuity. In [17] [18] [20], certain modified indicators of smoothness are used to detect the corner and jump discontinuities. At the same time, these indicators of smoothness conserve the optimal accuracy and ENO property. In this paper, we only consider how to improve the order of accuracy near discontinuities by using a more efficient algorithm. If one wants to obtain the optimal accuracy in the interval containing the discontinuity, the algorithm in [18] will be a commendable choice.
As mentioned above, the algorithm in [18] recovers the optimal accuracy near discontinuities by devising a set of nonlinear optimal weights. However, the new nonlinear optimal weights are computed by an extra WENO algorithm. And in this procedure, the indicators of smoothness of the bigger stencils also need to be calculated. As shown in [18], the computational costs of new WENO algorithm are more than double when compared with the classical WENO. In this paper, we present a simple WENO algorithm to recover the optimal accuracy near discontinuities. In order to describe this algorithm clearly, we take the 6th-order WENO algorithm for example. To ensure the optimal accuracy near discontinuities, the classical WENO algorithm is divided into three sub-WENO procedures. We first construct two 5th-order WENO approximations by using the former two 4-points stencils and latter two 4-points stencils, respectively. In the next, we construct the 6th-order WENO approximation by using two 5-points stencils and corresponding 5th-order WENO approximations which have been obtained. From the statement above, we need three sub-WENO procedures in this algorithm and in each sub-WENO procedure we only need information of two stencils. Unlike the classical WENO, which directly constructs the 6th-order approximation by the nonlinear convex combination of three 4th-order approximations, the order of accuracy of new WENO algorithm grows one by one and this nonlinear interpolation truly confirms the optimal accuracy near discontinuities. Since the 5-points stencils are used in this procedure, we have to compute their indicators of smoothness. To control the oscillations and reduce the computational cost, we express the indicators of smoothness of 5-points stencils as the product of two corresponding 4-points substencils. The new WENO algorithm here can be reformulated into the similar compact form as the classical WENO algorithm and not much computation is introduced. Furthermore, it is also easy to extend the algorithm to the cases of higher order.
The organization of this paper is as follows. In Section 2, we review the classical WENO [7] and WENO-AW [18] algorithms. In Section 3, we show the new WENO interpolation and prove the statement of optimal order of accuracy near discontinuity and property of ENO. In Section 5, we test the numerical accuracy and computational costs.
2. Review of WENO Algorithms
In this section, we review the classical WENO [7] and WENO-AW algorithm [18] in point values. The interested reader can also refer to [21] [22] for a full statement of WENO interpolations.
2.1. The Classical WENO Algorithm with Fixed Optimal Weights
Let us consider a set of sample points
,
, where
and
. What we want to do is to interpolate the value in middle point
of interval
when the discontinuity appears around this interval, but not in this interval. As shown in [23], it is possible to locate the corner discontinuities, but it is no hope to locate the jump discontinuities. Hence, when the corner discontinuity appears in
, the algorithm proposed in [18] can be used to tackle this problem. But when the jump discontinuity appears in
, the order of accuracy of numerical approximation to
will be affected inevitably.
Since
we want to approximate is in the interval
, each stencil used should contain
. Let us denote by
the stencil
where the superscript of
denotes the number of point of this stencil contains and the subscript denotes the number of point at the right of interval
. The same notation is also used for the interpolation polynomial
, indicators of smoothness
, the weights
and so on. Let us take the 6th-order WENO for example to approximate the value at
in the middle of
. The 6th-order WENO algorithm uses three 4-points stencils,
On each stencil, we obtain approximation at
by a Lagrangian interpolation polynomial of degree 3,
(1)
In [7], the indicators of smoothness were defined as the
norm of the derivatives of the interpolation polynomials. These indicators of smoothness were proposed for upwind methods to solve hyperbolic conservation laws with cell averages. To fit the interpolation in point values, we adopt the one presented in [14] [18] [20],
(2)
By removing the first derivative of interpolation polynomial from formula in [7], the modified indicators of smoothness perform well for the corner discontinuities. The explicit forms of (2) of three stencils are
(3)
To ensure the optimal accuracy and ENO property, the nonlinear weights are introduced by
(4)
The nonlinear weights
and
. The linear optimal weights
are chosen to be
,
,
so that
The parameter
appears in denominator is used to avoid the division by zero. The fully discusses about
can refer to [8] [24]. The exponent
in (4) is used to increase the difference of scales of weights near the non-smooth region. For high order WENO interpolations, we generally need to choose
for control the numerical oscillations around the discontinuities [19] [25]. To imitate the 6th-order linear interpolation at the smooth region and meanwhile compress the interpolation oscillations, the approximation
of
at
is chosen to be
(5)
At smooth regions, Taylor series expansions at
of the indicators of smoothness in (3) can be collected to be
(6)
Replacing
in (4) and taking
small enough, if
the nonlinear weights approximate linear ones by
(7)
Substituting (7) into (5) gives
(8)
At the smooth part of discretized data, the classical 6th-order WENO algorithm has optimal accuracy if
.
In the next, we consider the case in which
and
are smooth, while
contains a jump discontinuity. For the corner discontinuity, we can reach the similar conclusions. In the case of jump discontinuity, three indicators of smoothness will take values
Then the corresponding weights can be expressed as
and
So, the contribution of stencil
which contains discontinuity can be ignored when
is small enough. It is exactly the ENO property. Generally, since
and using the similar operations in (8), we only obtain
(9)
Finally, we consider the case of
,
and
. That is, the discontinuity lies in interval
and only stencil
is smooth. Through the similar analysis as the above cases, the same conclusion as (9) is achieved for WENO approximation at
. The idea of classical WENO algorithm is to ensure the optimal accuracy at smooth part of discretized data and ENO property when there exist stencils affected by discontinuity. In the second case, since
and
are both smooth, the higher 5th-order approximation using the information of stencil
is preferred to be reached.
2.2. The WENO Algorithm with Adapted Optimal Weights
In the classical WENO algorithm [7], the optimal weights
(
) in Equation (4) are fixed. It is considered as the primary reason of degeneration of order of accuracy around discontinuities in [18]. The authors present the adapted optimal weights based on the indicators of smoothness of stencils. For the 6th-order WENO-AW algorithm, if the jump discontinuity lies in
, i.e.,
,
and
, then optimal weights
, which satisfy
are preferred to be chosen to achieve the 5th-order of accuracy. Similarly, if the discontinuity lies in
, i.e.,
,
and
, then optimal weights
, which satisfy
are preferred to be chosen. To improve the accuracy near discontinuities, an adapted strategy to choose the optimal weights among
,
and
is proposed in [18]. In order to avoid the abrupt transition from one vector of optimal weight to another one at the interfaces between smooth and non-smooth regions, the nonlinear adapted optimal weights are defined as a smooth convex combination of three vectors of optimal weights,
(10)
The coefficients of three vectors of linear optimal weights are defined as
where
After obtaining the adapted optimal weights
, inserting them into Equation (4) gives
(11)
In case 1: all the 4-points stencils are smooth. The nonlinear weights computed by (11) satisfy
It is the sufficient condition, as shown by the Theorem 3.2 in [18], to achieve the 6th-order approximation,
In case 2: the discontinuity lies in the interval
, i.e.,
and
are both smooth and
is non-smooth. If it is a corner discontinuity, then we have
If it is a jump discontinuity, then we have
If the discontinuity lies in the symmetric interval
of
, by similar analysis we obtain
for the corner discontinuity and
for the jump discontinuity. Also by the Theorem 3.2 in [18], the 5th-order approximation can be achieved,
In case 3: the discontinuity lies in the interval
, i.e.,
is smooth and
and
are both non-smooth. If it is a corner discontinuity, then we have
If it is a jump discontinuity, then we have
If the discontinuity lies in the symmetric interval
of
, by similar analysis we obtain
for the corner discontinuity and
for the jump discontinuity. Also by the Theorem 3.2 in [18], the 4th-order approximation can be achieved,
When the interval
contains the corner discontinuity, the strategy in [18] is suggested to be used. This strategy ensures the 3rd-order of accuracy for the interval which contains the corner discontinuity.
3. The 6th-Order Sub-WENO Algorithm
In this section, a simple 6th-order sub-WENO algorithm is presented, which has the same aim as the WENO-AW algorithm proposed in [18], to achieve the optimal order near the discontinuities. The second algorithm in [18] is to improve the order of accuracy of when the middle interval
contains the discontinuity. As shown in Section 2.2, the extra three indicators of smoothness of big stencils
,
and
are required to calculate the adapted nonlinear optimal weights. The computational cost of the WENO-AW algorithm in [18] is more than double when compared with the classical WENO algorithm [7]. In the classical 6th-order WENO algorithm, the idea is to combine three 4th-order linear interpolations to achieve 6th-order accuracy at smooth regions and the potential 5th-order interpolations are skipped. It is the probable reason which leads to the degeneration of algorithm near discontinuities. To recover the accuracy near discontinuities, we divide the classical WENO into several sub-WENO procedures. In each sub-WENO procedure, only two stencils are used. The order of accuracy grows by only one at most by combining two stencils and the ENO property is also conserved (Figure 1).
![]()
Figure 1. The left is the tree structure of the 6th-order sub-WENO algorithm. The right is the tree structure of the 6th-order classical WENO algorithm.
In the 6th-order sub-WENO algorithm, there are three 4-points stencils can be used and there will be three sub-WENO procedures as shown in Section 3. In the first sub-WENO procedure denoted by
↪
, emulating the classical WENO in Section 2, we use the stencils
and
to compute the 5th-order approximation at
,
(12)
We extract the formulas of interpolation polynomials
at
from (1),
(13)
The nonlinear weights are computed similarly as (4) by
(14)
and the unnormalized weights are defined as
(15)
The linear optimal weights in (15) are chose to be
and
to satisfy
The indicators of smoothness
are extracted from (3), and we repeat them for completeness of new algorithm,
(16)
Up to now, the first sub-WENO procedure
↪
is completed by emulating the classical WENO algorithm. This sub-WENO procedure can achieve 5th-order approximation to
at smooth region and keep the ENO property when there is one non-smooth stencil. Actually, when there is one non-smooth stencil, this sub-WENO procedure still ensure the 4th-order of accuracy. The proofs of assertions are ignored here, since the properties of the algorithm after integrating three sub-WENO procedures are our aims.
In the second sub-WENO procedure
↪
, we use the stencils
and
to obtain another 5th-order approximation to
,
(17)
where the values of two 4th-order interpolation polynomials at
are
(18)
The nonlinear weights in (17) are computed as
(19)
and the unnormalized weights are defined as
(20)
The linear optimal weights are chose to be
and
for satisfying
The indicators of smoothness
are also chosen from (3),
(21)
The second sub-WENO procedure
↪
is similar to the first one but the nonlinear interpolation is operated on the stencils
and
. It is noted that in the two sub-WENO procedures above, we use the several same notations, such as the nonlinear weight
in (14) and (19). But these same notations are independent in the different sub-WENO procedures.
Through the former sub-WENO procedures, we arrive the 5th-order approximations satisfying
and
on the 5-points stencils
and
, respectively, when discretized data is smooth. In the third sub-WENO procedure
↪
, we arrange to obtain the 6th-order approximation to
by combination of
and
,
(22)
The nonlinear weights are defined as
(23)
where the unnormalized weights are defined as
(24)
The optimal weights are chosen to be
and
for satisfying
The only problem is how to choose the indicators of smoothness
and
on
and
, respectively. A natural option of
is to use the Formula (2)
When the discontinuity lies in
or
, the choice of (2) is valid and the final algorithm can achieve 5th-order accuracy and keep the ENO property. However, if there exists a discontinuity appears in
or
, then
and
are both non-smooth. And in result, both stencils are distributed comparative weights and the oscillation will be inevitable. To approach the optimal accuracy and preserve the ENO property, the effective choices are
(25)
Taking
for example, since
, we express the indicator of smoothness parent stencil
as the product of substencils
and
. This option will be extended to the higher order sub-WENO algorithms. If the discontinuity appears in
or
, by using the indicators of smoothness in (25), the contribution of stencil
can be ignored and
will dominate the final combination. The similar result can be obtained when the discontinuity lies in
or
. In addition, the indicators of smoothness
have been obtained in the former sub-WENO procedures and we do not need extra computational cost. For the simplification of the equations, we replace
in denominators of (24) by
, respectively, and (24) becomes
(26)
The common term
will be cancelled when we substitute the unnormalized weights into (23). So, we actually define the indicators of smoothness
and
as
(27)
For the higher order sub-WENO algorithms, the choice of indicators of smoothness is presented in Section 4 in detail. The proofs of achieving optimal accuracy and keeping ENO property will be shown in theorem 1. Before giving this theorem, we first simplify the sub-WENO algorithm which will facilitate the proof of theorem 1.
Inserting the weights (14) into (12) gives
(28)
and similarly inserting the weights (19) into (17) gives
(29)
Finally, substituting the 5th-order approximations (28) (29) into (22), we obtain
(30)
Through reorganization, the nonlinear weights in (30) are
(31)
where the unnormalized weights are
(32)
Theorem 1. Suppose that the stencil
contains a discontinuity at most, the exponent in unnormalized weights
and
. Then the 6th-order sub-WENO algorithm (30) (31) (32) satisfies the following three cases:
Case 1: if the stencil
is smooth, then
Case 2: if there is a discontinuity lies in
, then
or if there is a discontinuity lies in
, then
Case 3: if there is a discontinuity lies in
, then
or if there is a discontinuity lies in
, then
Proof 1. For the case 1, since the stencil
is smooth, we obtain
(33)
By Taylor analysis, the unnormalized weights in (32) satisfy
(34)
Then the weights in (31) satisfy
(35)
By using the similar discussion as (8) and denoting
, we have
(36)
For the case 2, we only discuss the situation in which the discontinuity lies in the interval
since
and
are symmetric. We first analyze the case of corner discontinuity which lies in
. At this moment three 4-points stencils satisfy
(37)
The unnormalized weights in (32) satisfy
(38)
The weights in (31) satisfy
(39)
Denoting
and one can easily verify
, then we have
(40)
If there is a jump discontinuity in the interval
, then the indicators of smoothness satisfy
(41)
Inserting these indicators of smoothness into the unnormalized weights in (32) gives
(42)
Then the nonlinear weights in (31) satisfy
(43)
Repeating (40) shows the same result,
(44)
Finally, we consider the case 3, in which the discontinuity lies in interval
or
. Again we only analyze the situation of the discontinuity lies in interval
since
and
are symmetric. we take into account the corner discontinuity which lies in
, then the indicators of smoothness achieve
(45)
Substituting the indicators of smoothness into the unnormalized weights in (32) shows
(46)
Then the nonlinear weights in (31) satisfy
(47)
Denoting
and one can easily verify
, then we have
(48)
If the jump discontinuity lies in
, then the indicators of smoothness approach
(49)
Replacing the indicators of smoothness into the unnormalized weights in (32) shows
(50)
Then the nonlinear weights in (31) satisfy
(51)
Denoting
and one can easily verify
, then we have
(52)
Theorem 1 shows the maximum theoretical accuracy of the 6th-order sub-WENO algorithm near discontinuities. What we left is to ensure the ENO property of new algorithm. The algorithm is deemed to conserve the ENO property if it satisfies the following two conditions,
1) If the stencil
is smooth, then the nonlinear weight corresponding
satisfy
.
2) If the stencil
is non-smooth, then the nonlinear weight corresponding
satisfies
.
Clearly, from the nonlinear weights (39) (43) (47) and (51) in theorem 1, we can validate the ENO property of new algorithm if
.
4. The Higher Order Sub-WENO Alrorithm
In this section, the 2rth-order sub-WENO algorithms are presented for
. In particular, when
the 4th-order sub-WENO algorithm is the same as the classical WENO algorithm. The 6th-order sub-WENO algorithm (
) has been shown in Section 3 and we also analyze the optimal accuracy and ENO property. To implement the algorithm clearly, we give the tree structure of 2rth-order sub-WENO algorithm in Section 4 (Figure 2).
Figure 2. The tree structure of 2rth-order sub-WENO algorithm.
In the first level, there are
-points stencils and corresponding indicators of smoothness
. As the 6th-order sub-WENO algorithm in the Section 3, it will be found that we only need to compute the indicators of smoothness
of the smallest stencils on the first level. The choice of indicator of smoothness
should ensure the optimal accuracy, ENO property and modest computational cost of sub-WENO algorithm. From tree structure, we can find that each nonlinear approximation
on stencil
is obtained by the combination of the nonlinear approximations
and
on
and
, respectively,
(53)
That is, in each sub-WENO procedure
↪
, we only use the information from two stencils. The nonlinear weights are defined as
(54)
The linear optimal weights
and
in (54) are chosen so that they satisfy
Since
and, as we have done for the 6th-order sub-WENO algorithm, a reasonable choice is
(55)
Replacing
and
in (54) by
and
, respectively, and canceling the common terms, then (54) is simplified as
(56)
Section 4 helps us to determine the indicators of smoothness of stencils intuitively. The indicators of smoothness of stencils
and
on the top of “V” corresponding the sub-WENO procedure
↪
are chosen to be the indicators of smoothness of
and
, respectively. It is remarkable that the stencil
is involved simultaneously in both the sub-WENO procedures
↪
and
↪
. But the indicator of smoothness of
is different when it belongs to different sub-WENO procedure (Figure 3).
Figure 3. The choice of indicator of smoothness for sub-WENO procedure.
To validate such choice of indicators of smoothness, taking the 8th-order sub-WENO algorithm for example, Section 4 shows the cases in which the discontinuity lies in
,
and
, respectively. The left tree structure of Section 4 shows the situation when the discontinuity lies in the interval
, i.e., the former three stencils
are smooth and the last one
is non-smooth. From the first level to second level, there are three sub-WENO procedures. The former two sub-WENO procedures both produce the 6th-order approximations and the third sub-WENO procedure only produce a 5th-order approximation since the stencil
is non-smooth and the nonlinear weight assigned to it can be ignored. From the second level to third level, there are two sub-WENO procedures. In the first sub-WENO procedure
↪
, since the indicators of smoothness of stencils
and
are defined by
this sub-WENO procedure generates 7th-order approximation. The second sub-WENO procedure
↪
only produces the 6th-order approximation, since
is non-smooth. In the final sub-WENO procedure
↪
, the indicators of smoothness are defined by
Since
is non-smooth, the contribution of this stencil is ignored and the final approximation
is only 7th-order. The middle and right tree structures of Section 4 show the situations when the discontinuities lie in
and
, respectively. The “
” denotes the situation that the value generated by this sub-WENO procedure is nonsense since both substencils are non-smooth. By the strategy of choosing the indicators of smoothness, the value denoted by “
” will be ignored almost in the latter sub-WENO procedures.
To implement the higher order sub-WENO algorithm easily, we present the necessary formulas explicitly for
. Since all the sub-WENO procedures can be integrated, we will only present the compact forms of sub-WENO algorithms as (30) (31) (32). For the 8th-order sub-WENO algorithm, there exist four stencils
used to approximate
. The linear 5th-order interpolations at
can be expressed as
(57)
By combining all the sub-WENO procedures (Figure 4), we can arrive
Figure 4. The choice of indicator of smoothness for sub-WENO procedure keeps the ENO property. The circles “
” denotes the non-smooth stencils and the stars “
” denotes the values generated by corresponding sub-WENO procedures are nonsense.
(58)
where
(59)
and
,
. The unnormalized weights are defined as
(60)
The indicators of smoothness computed by (2) can be expressed as
(61)
5. Numerical Results
In this section, two examples, containing the corner and jump discontinuities respectively, are used to test the order of accuracy of sub-WENO algorithms. We also compare the computational costs between the classical WENO [7], the WENO-AW [18] and sub-WENO algorithms. The 8th-order sub-WENO algorithms is only tested by the first example since we can obtain the similar results for the second example. We choose the parameters
and
for all the algorithms.
Example 1. Consider the function
(62)
there is a corner discontinuity lies at
. This piecewise function is even and continuous, but the first derivative is not discontinuous. Since the function is symmetrical with
-axis, we only show the absolute errors at
. While it is only interested in the order of accuracy near discontinuities in this paper, we keep the discontinuities lie in the center of grid
. To get this, the interval
is divided into
grids and then we subdivide each grid into three small uniform grids in every grid refinement. In the numerical experiments, the grid spacing is set to be
,
. Table 1 shows the absolute errors and order of accuracy of classical WENO, WENO-AW and sub-WENO algorithms. As presented in Section 2.1, when the discontinuity lies in the interval
, the approximations of classical WENO algorithm at
and
can only arrive the 4th-order of accuracy. When we predict the value at
, since the stencil
for approximating
is smooth, the maximum 6th-order of accuracy is certainly obtained. As shown in [18] and Section 3, the WENO-AW and sub-WENO algorithms are devised to reasonably combine all the smooth stencils to arrive the maximum theoretical accuracy. The WENO-AW and sub-WENO algorithms achieves 5th-order of accuracy when approximate the value at
since the 5-points stencil
is smooth. It is noted that the absolute errors presented by WENO-AW and sub-WENO algorithms are almost identical.
Table 1. The absolute errors and orders of accuracy of the 6th-order classical WENO, WENO-AW and sub-WENO algorithms for the function (62) which contains a corner discontinuity at
.
classical WENO |
|
|
|
|
|
0 |
1.478e−00 ***** |
1.080e−06 ***** |
2.780e−07 ***** |
4.284e−10 ***** |
1 |
4.929e−01 1.000 |
1.438e−08 3.931 |
3.439e−09 3.998 |
5.649e−13 6.034 |
2 |
1.643e−01 1.000 |
1.818e−10 3.979 |
4.245e−11 4.000 |
7.646e−16 6.012 |
3 |
5.477e−02 1.000 |
2.261e−12 3.993 |
5.239e−13 4.000 |
1.044e−18 6.004 |
4 |
1.826e−02 1.000 |
2.799e−14 3.998 |
6.467e−15 4.000 |
1.430e−21 6.001 |
WENO-AW |
|
|
|
|
|
0 |
1.478e−00 ***** |
1.109e−06 ***** |
7.869e−09 ***** |
4.284e−10 ***** |
1 |
4.929e−01 1.000 |
1.450e−08 3.917 |
3.044e−11 5.056 |
5.649e−13 6.034 |
2 |
1.643e−01 1.000 |
1.822e−10 3.984 |
1.227e−13 5.019 |
7.646e−16 6.012 |
3 |
5.477e−02 1.000 |
2.263e−12 3.995 |
5.012e−16 5.006 |
1.044e−18 6.004 |
4 |
1.826e−02 1.000 |
2.800e−14 3.998 |
2.058e−18 5.002 |
1.430e−21 6.001 |
sub-WENO |
|
|
|
|
|
0 |
1.478e−00 ***** |
1.144e−06 ***** |
7.869e−09 ***** |
4.283e−10 ***** |
1 |
4.929e−01 1.000 |
1.464e−08 3.967 |
3.044e−11 5.056 |
5.649e−13 6.036 |
2 |
1.643e−01 1.000 |
1.828e−10 3.989 |
1.227e−13 5.019 |
7.646e−16 6.012 |
3 |
5.477e−02 1.000 |
2.266e−12 3.996 |
5.012e−16 5.006 |
1.044e−18 6.004 |
4 |
1.826e−02 1.000 |
2.801e−14 3.999 |
2.058e−18 5.002 |
1.430e−21 6.001 |
Table 2 compares the computational costs of three WENO algorithms. To obtain the reliable CPU costs, we loop the interpolation parts of codes 5 million times. The results are shown in Table 2 and we find that the CPU times of the WENO-AW and sub-WENO algorithms increase approximately by 150% and 5% respectively when compared with the classical WENO algorithm.
Table 2. The CPU costs of the 6th-order classical WENO, WENO-AW and sub-WENO algorithms for the function (62). The interpolation parts of codes are looped 5 million times to obtain the reliable CPU costs.
classical WENO |
WENO-AW |
sub-WENO |
13.8s |
35.4s |
14.6s |
The performance of 8th-order sub-WENO algorithm is presented in Table 3. We can find that the algorithm achieves the optimal order near the corner discontinuity. When we approximate the value at
, there exists only one stencil
is smooth. The nonlinear weight distributed to this stencil is dominant and the contributions of the left stencils are ignored. The prediction at
by sub-WENO algorithm gives a reasonable combination of
and
since they are both smooth. When approximate the value at
, the discontinuity lies in the far left interval
. The stencils
,
and
all are smooth and the sub-WENO algorithm uses them well to obtain 7th-order of accuracy.
Table 3. The absolute errors and orders of accuracy of the 8th-order sub-WENO algorithms for the function (62) which contains a corner discontinuity at
.
8th-order sub-WENO |
|
|
|
|
|
|
0 |
1.398e−00 ***** |
4.656e−08 ***** |
8.755e−11 ***** |
5.936e−13 ***** |
2.865e−14 ***** |
1 |
4.659e−01 1.000 |
1.847e−10 5.033 |
1.157e−13 6.034 |
2.690e−16 7.008 |
4.142e−18 8.048 |
2 |
1.553e−01 1.000 |
7.511e−13 5.011 |
1.567e−16 6.011 |
1.226e−19 7.003 |
6.200e−22 8.016 |
3 |
5.177e−02 1.000 |
3.079e−15 5.004 |
2.141e−19 6.004 |
5.600e−23 7.001 |
9.392e−26 8.006 |
4 |
1.726e−02 1.000 |
1.265e−17 5.001 |
2.933e−22 6.001 |
2.560e−26 7.000 |
1.425e−29 8.004 |
Example 2. In this example, we slightly modify the piecewise function (62) so that the corner discontinuity in it is changed into jump discontinuity,
(63)
We only test the 6th-order WENO algorithms for this example. As shown in Table 4, the classical WENO algorithm only arrives 4th-order of accuracy when we approximate the values at
which is near discontinuity. For the WENO-AW and sub-WENO algorithms, they are both obtain the maximum theoretical accuracy. It is noted that, when approximating the value at discontinuity, we will lose the accuracy entirely.
Table 4. The absolute errors and orders of accuracy of classical WENO, WENO-AW and sub-WENO algorithms for the function (63) which contains a jump discontinuity at
.
classical WENO |
|
|
|
|
|
0 |
197.988 ***** |
1.250e−06 ***** |
2.847e−07 ***** |
4.284e−10 ***** |
1 |
199.899−0.009 |
1.507e−08 4.021 |
3.464e−09 4.013 |
5.649e−13 6.034 |
2 |
200.537−0.003 |
1.846e−10 4.007 |
4.254e−11 4.004 |
7.646e−16 6.012 |
3 |
200.749−0.001 |
2.273e−12 4.002 |
5.243e−13 4.002 |
1.044e−18 6.004 |
4 |
200.820−0.000 |
2.804e−14 4.001 |
6.469e−15 4.000 |
1.430e−21 6.001 |
WENO-AW |
|
|
|
|
|
0 |
197.605 ***** |
1.250e−06 ***** |
7.869e−09 ***** |
4.284e−10 ***** |
1 |
199.772−0.010 |
1.507e−08 4.021 |
3.044e−11 5.056 |
5.649e−13 6.034 |
2 |
200.494−0.003 |
1.846e−10 4.007 |
1.227e−13 5.019 |
7.646e−16 6.012 |
3 |
200.735−0.001 |
2.273e−12 4.002 |
5.012e−16 5.006 |
1.044e−18 6.004 |
4 |
200.815−0.000 |
2.804e−14 4.001 |
2.058e−18 5.002 |
1.430e−21 6.001 |
sub-WENO |
|
|
|
|
|
0 |
197.243 ***** |
1.250e−06 ***** |
7.869e−09 ***** |
4.283e−10 ***** |
1 |
199.651−0.011 |
1.507e−08 4.021 |
3.044e−11 5.056 |
5.649e−13 6.036 |
2 |
200.454−0.004 |
1.846e−10 4.007 |
1.227e−13 5.019 |
7.646e−16 6.012 |
3 |
200.722−0.001 |
2.273e−12 4.002 |
5.012e−16 5.006 |
1.044e−18 6.004 |
4 |
200.811−0.000 |
2.804e−14 4.001 |
2.058e−18 5.002 |
1.430e−21 6.001 |
6. Conclusion
In this paper, the sub-WENO algorithm is presented to recover the optimal order of accuracy near the discontinuities. The sub-WENO algorithm is constructed by dividing the classical WENO into several sub-WENO procedures. In each sub-WENO procedure, we only combine two stencils to approximate the value of target points. If the two stencils are both smooth, then sub-WENO procedure increases the order of accuracy by one. If there is a stencil that is smooth and the left one is non-smooth, then algorithm conserves the order of interpolation by corresponding smooth stencil and keeps the ENO property. If both stencils are non-smooth, then the value constructed by sub-WENO procedure will be cut off in the latter procedures. The whole of sub-WENO algorithm can be expressed as tree structure. The choice of smoothness of indicator of stencils in the middle part of tree is also presented. This choice does not increase the computational time much. The proof of order of accuracy and ENO property of the 6th-order sub-WENO algorithm is shown in theorem 1. The numerical tests validate the results we have proved in theorem 1. The sub-WENO algorithm based on the cell averages and its application to hyperbolic conservation laws will be our future work.
Acknowledgements
This work was supported by Natural Science Foundation of Guangdong Province under contract no. 2018A030313879, the Technology Foundation of Huizhou under contract no. 2017C0403019 and Huizhou University under contract no. HZUX1201620.