1. Introduction
The development of approximation methods for piecewise smooth functions was originally motivated by the need to solve hyperbolic partial differential equations with discontinuous solutions [
1,
2]. In more recent years, these methods have found applications in areas such as image processing and non-smooth optimization.
The Weighted Essentially Non-Oscillatory (WENO) method builds upon the Essentially Non-Oscillatory (ENO) scheme [
3], aiming to achieve high-order accuracy in smooth regions while preventing spurious oscillations near discontinuities in the solution of conservation laws.
The WENO method is founded on the principle that, to approximate a discontinuous function accurately, one should use data only from one side of the discontinuity. This approach ensures that, when approximating the function at a given point, the function data are drawn exclusively from the smooth region surrounding that point, without incorporating values from both sides of the discontinuity. Various techniques are employed to assess the function’s smoothness and prevent the use of data across discontinuities.
The WENO method was first introduced in [
3,
4]. Later, Ref. [
2] refined the approach by incorporating a local nonlinear convex combination of multiple interpolants spanning different stencils. In this method, the weights are computed based on smoothness indicators within each stencil. Ref. [
1] further improved the smoothness indicators by incorporating a measure derived from total variation, leading to enhanced accuracy. The WENO algorithm has since been widely studied and applied in various works, including [
5,
6,
7].
More recent advancements and algorithms based on the WENO framework can be found in [
8,
9,
10,
11,
12,
13] and many other studies.
This paper introduces an approximation method for discontinuous functions based on their values sampled on a uniform grid over a domain . The proposed approach is a WENO-like algorithm that utilizes B-spline quasi-interpolation operators. A key advantage of this method is its computational efficiency, as it is both fast and local.
The resulting approximation inherits the smoothness of B-splines, achieving a high order of accuracy in smooth regions. For example, when using cubic B-splines, the approximation achieves overall smoothness and an approximation order in smooth regions. Moreover, it remains non-oscillatory near function discontinuities, providing stability and accuracy, which are essential for applications in non-smooth optimization.
Another notable advantage of the method is its natural extension to higher dimensions. We begin by presenting the algorithm in one dimension and subsequently generalize it to two dimensions, introducing an automatic stencil selection strategy to handle quasi-interpolation near singularity curves.
This paper is structured as follows.
Section 2 outlines the theoretical foundations of quasi-interpolation.
Section 3 describes the construction and application of an adapted cubic spline quasi-interpolation scheme for non-smooth univariate functions. In
Section 4, we extend the approach to the bivariate setting, incorporating a mechanism for handling discontinuities across unknown curves, and demonstrate its effectiveness through theoretical results and numerical experiments.
2. Preliminaries
In this paper, we present an approximation method for a non-smooth function
, defined on a domain
, based on its known values at a uniform grid
, where
. The proposed approximation is constructed using a quasi-interpolation approach, expressed as
where
denotes the basis functions of the quasi-interpolation operator. In [
14], we introduced a method for constructing basis functions for quasi-interpolation approximation based on Box-Splines in
. In [
14], we outlined two key properties that the basis functions for quasi-interpolation should satisfy:
- 1.
Polynomial reproduction:
where
is the space of polynomials of total degree
in
.
- 2.
Compact support:
Here, denotes the open ball of radius r centered at a, and h is the fill-distance of the point-set A, that is, the radius of the largest open ball centered in that does not contain any point from A. R is independent of and h.
In [
14], we presented the following proposition.
Proposition 1. Let , i.e., all partial derivatives of f of total order are continuous on Ω
. If Q is a quasi-interpolation operator satisfying properties (2) and (3), thenwhere In the one-dimensional setting, Speleers in [
15] presented a comprehensive analysis of spline quasi-interpolation operators on uniform grids. The simplest quasi-interpolation operator is the Schoenberg operator defined by
where
denotes the centered B-spline of degree
, supported on the interval
with nodes
. The Schoenberg operator achieves an approximation order of
for smooth functions. When applied to functions with jump discontinuities, it produces a smooth transition between the continuous regions without introducing overshoots or oscillations, thereby avoiding Gibbs-like phenomena.
An improved approximation order of
, can be achieved using the following quasi-interpolation operator based on cubic B-splines on a uniform grid:
This operator can also be expressed in form (
1) using the basis functions
Thanks to its locality and its exact reproduction of polynomials of a degree up to three, the operator achieves an approximation order of
for functions that are
-smooth. However, when applied to functions with jump discontinuities, it tends to introduce oscillations and Gibbs-like overshoots near the discontinuity. The term Gibbs-like overshoot refers to spurious oscillations in the approximation near a jump, characterized by the persistence of their magnitude even as
; see [
16].
This paper aims to identify quasi-interpolation operators that achieve high-order accuracy in smooth regions while remaining free of overshoots near jump discontinuities.
3. Constructing Quasi-Interpolation Operators for Approximating Non-Smooth Functions in
Let the domain
and let
X be the set of grid points uniformly spaced in
:
.
. After rearranging the indices, the quasi-interpolation operator (
7) can be expressed as follows:
We refer to this operator as the symmetric quasi-interpolation operator.
The central idea of this paper is to define a quasi-interpolation operator that utilizes alternative combinations of function values, distinct from those in (
9), while still preserving the ability to reproduce cubic polynomials and achieving an
approximation order. The goal is to construct a quasi-interpolation operator that uses only function values from one side of a discontinuity, ensuring both accuracy and the avoidance of spurious oscillations.
We begin by formulating a
forward quasi-interpolation operator in a non-symmetric form:
To ensure the desired property of reproducing cubic polynomials, we derive a system of equations for unknowns
, and
D:
for
. Since the space of polynomials is shift-invariant, it is sufficient to consider the equation for
. Solving this system of equations, we obtain the quasi-interpolation operator
:
Similarly, we can construct a
backward quasi-interpolation operator that relies only on function values to the left of
. This leads to the formulation of
:
After establishing quasi-interpolation operators (
9), (
12), and (
13), we introduce a general mixed quasi-interpolation operator, expressed as
where the weights
are selected from the following three options:
Proposition 2. Let , . Consider the operator defined in (14), where the weights are chosen arbitrarily from the three available options: , , or . Then, the approximation error satisfies Proof. From relation (
11), it follows that
reproduces
, the space of cubic polynomials. This reproduction property, together with the compact support property of
, directly implies the stated result. □
3.1. Using the Smoothness Indicator to Define a New Adapted Approximation
Returning to the problem of approximating a piecewise smooth function, we now describe the method for selecting the appropriate weight at each location .
The first step is to identify the interval containing the discontinuity. This is achieved using the following approach, assuming a uniform grid:
For each point
, we compute a smoothness indicator
:
where
is the central second difference, defined as
The value of is of size at smooth regions of f, and O(1) if contains a discontinuity of f. Consequently, large values of indicate regions of significant variation and are useful for detecting discontinuous intervals. We use second-order differences, rather than first-order, to also capture singularities such as jumps in the first derivative.
If
exceeds a predetermined threshold, we conclude that a discontinuity exists within the interval
. Once the interval of discontinuity is identified, we apply quasi-interpolation operator (
14) while ensuring that the discontinuous region is excluded.
We select the weights
in quasi-interpolation operator (
14) from the three available options (
15)–(
17), so that the resulting operator depends only on function values from one side of a discontinuity. The selection is carried out as follows:
For each
, we compute the three values,
Let
be the index for which
is minimal. We then set
in (
14). Notably, the procedure naturally selects
in smooth regions.
The resulting modified operator is referred to as the adapted quasi-interpolation operator, denoted by .
3.2. Theoretical Considerations of the Adapted Approximation
The following propositions quantify the overshoots produced by the symmetric quasi-interpolation operator and establish that the adapted quasi-interpolation operator eliminates such overshoots.
Let
f be a non-smooth function defined by
where
,
. Let
D denote the size of the jump discontinuity at
, defined by
. Consider the quasi-interpolation approximations
and
, constructed using the sampled data
.
Proposition 3. For any , there exist points and such that Proof. Since
is a linear operator, it suffices to prove the result for the function
which corresponds to the case
and
, and yields
.
From Equation (
15), it follows that
for
and
for
, while
and
. It follows that
for
. In the region
, the approximation
is a piecewise cubic function, attaining a minimum value of approximately
at
and a maximum value of approximately
at
. Therefore, the result in (
20) follows. □
Proposition 4. Let f be defined as in (19). Then, the adapted quasi-interpolation approximation for f defined by (19) is globally , and satisfies the error estimatewhere C is a constant independent of h. Moreover, the approximation does not exhibit any Gibbs-like overshoot near the discontinuity at . Proof. First, assume
, and
h to be sufficiently small. Then, by construction, each of the weights
selected for the adapted quasi-interpolation operator uses only function values from one side of the jump discontinuity at
. Error estimate (
21) follows by considering the support of
and the reproduction of cubic polynomials by
for
.
Next, we observe that each of the candidate weights,
,
, and
, satisfies the approximation property
provided that the corresponding weights are constructed using only function values from one side of the jump discontinuity. This is readily verified in the case of
, as it is symmetric and centered and reproduces linear polynomials. For
, the approximation property in (
22) also holds, as a direct consequence of the defining relation (
11). Thus, in particular in
, we have
As noted in
Section 2, the Schoenberg approximation (
6) avoids overshoots and oscillations, thereby preventing Gibbs-like artifacts. From (
23), we observe that
differs from the Schoenberg approximation by only a
perturbation. Therefore, the conclusion of the proposition follows directly. □
3.3. Numerical Results in One Dimension
We applied the adapted quasi-interpolation method to two distinct non-smooth test functions.
The first test function is
The second test function is
The available data consist of sampled values of the non-smooth test functions at uniformly spaced points
,
.
Figure 1 and
Figure 2 illustrate the two test functions.
Representative numerical results, which support the theoretical claims established in the preceding propositions, are shown in
Figure 3 and
Figure 4 for the first test function
and
Figure 5 and
Figure 6 for the second test function
.
A comparison between the graphs in
Figure 3, which display the results of the adapted quasi-interpolation method, and those in
Figure 4, obtained using the symmetric quasi-interpolation, reveals a significant difference. The Gibbs-like oscillations and overshoots near the discontinuity, clearly present in
Figure 4, are entirely eliminated in the adapted approach shown in
Figure 3. This qualitative improvement is further corroborated by the behavior of the approximation error, as illustrated in the lower panels of
Figure 3 and
Figure 4. The corresponding results for the second test function
are presented in
Figure 5 and
Figure 6.
4. Adapted Quasi Interpolation Operators for Non-Smooth Functions in R2
Consider a discontinuous piecewise smooth function
f defined in
. Let
be a smooth curve that separates
into two domains
and
, and suppose that
with
and
. Assume that
is given on the grid points
in
,
,
, and define
.
We wish to approximate the function using a quasi-interpolation operator of the form
Similarly to the one-dimensional case, the weights
are defined as linear combinations of the given function values, ensuring that the operator
Q reproduces cubic polynomials. There are several options for defining the weights
. For a smooth function
f, the optimal choice is to use the cross product of the one-dimensional symmetric quasi-interpolation operator (
9). However, in the case of non-smooth function approximation, we must ensure that
does not depend on function values from both sides of the singularity curve
.
In the following, we describe the method for computing the weights
in (
27). This is achieved by taking the tensor product of the one-dimensional quasi-interpolation operators
,
, and
as defined in (
15)–(
17), respectively. This construction yields a total of nine two-dimensional quasi-interpolation operators:
where
and
denote the symmetric one-dimensional quasi-interpolation operators in the
and
directions, respectively;
and
represent the forward operators; and
and
, the backward ones. If we denote the identity operator by I, by
, the forward operator in the x direction is
, and by
, the forward operator in the y direction is
. We obtain nine cross products of the three quasi-interpolation operators in one dimension. For example,
which gives
Similarly, we define the remaining eight quasi-interpolation operators in two dimensions. To compute the weights
in (
27), we consider the nine quasi-interpolation operators outlined in (
28). Each operator uses a distinct stencil of data values from the grid for its calculations. For example, the operator in (
29) incorporates 16 points:
4.1. Smoothness Indicator and the New Adapted Approximation in 2D
In the two-dimensional case, the smoothness indicator is based upon the absolute value of the discrete four-direction Laplacian:
We note that if all the values involved in (
31) lie within a smooth region of
f, then
as
. However, if
incorporates values of
f from both sides of the singularity curve
, then
.
Figure 7 presents the values of the smoothness indicator
corresponding to the non-smooth test function defined in Equation (
39).
For each of the nine quasi-interpolation operators in (
28), we attach a smoothness indicator by summing Laplacian values as follows:
Each of the nine quasi-interpolation operators is computed using the values of
f on a rectangular stencil of indices:
The corresponding smoothness indicator is defined as
Thus, for each grid point
, we compute nine values,
, corresponding to the above nine quasi-interpolation operators
, applied using their respective stencils. From these, we select the minimum value, denoted as
and assign the associated weight
to the point
.
Once the weights
are computed, they are inserted into the quasi-interpolation scheme defined in (
27). The resulting approximation operator is referred to as the
adapted quasi-interpolation operator, and is denoted as
.
4.2. Theoretical Results for the 2D Adapted Approximation
Similarly to one-dimensional Proposition 2, we obtain the following proposition for the two-dimensional case.
Proposition 5. Let , , and let Q be the operator in (27) where the weights are arbitrarily chosen from any of the nine options in (28). Then, we have Proposition 6. Let f be a piecewise function defined as in (26), with a singularity curve Γ
. Then, the symmetric quasi-interpolation approximation defined above is globally , and it satisfies the error estimatewhere C is a constant independent of h. Near the discontinuity at Γ
, the approximation exhibits some Gibbs-like overshoots. Proof. Observe that the support of the basis function
is the Cartesian product of the supports of
and
, each of which spans an interval of length 4. Consequently, the diameter of the two-dimensional support is
. Moreover, the weights
in the symmetric scheme involve function values located at a distance up to
from the grid point
. Depending on the local orientation of the singularity curve
, it follows that at points
satisfying the condition in (
35), the symmetric approximation accesses only values from one side of
. Thus, the error estimate given in (
35) follows as a direct consequence of the support structure and the localized nature of the approximation. The occurrence of Gibbs-like overshoots can be demonstrated using arguments analogous to those in the univariate case, as outlined in Proposition 3. In particular, near portions of
that are aligned with one of the coordinate axes, the overshoots are identical to those observed in the univariate setting. □
The following proposition shows that the adapted quasi-interpolation operator extends the region over which optimal approximation accuracy is attained, while eliminating Gibbs-like overshoots near discontinuities.
Proposition 7. Let f be a piecewise function defined as in (26), with a smooth singularity curve Γ
. Then, the adapted quasi-interpolation approximation defined above is globally , and, for sufficiently small h, it satisfies the error estimatewhere C is a constant independent of h. Moreover, the approximation does not exhibit any Gibbs-like overshoots near the discontinuity at Γ
. Proof. First, assume a non-zero jump across
, and
h is sufficiently small. Then, by construction, each of the weights
selected for the adapted quasi-interpolation operator uses only function values from one side of the jump discontinuity at
. Error estimate (
36) follows by considering the support of
and the reproduction of cubic polynomials by
.
Next, we observe that each of the nine candidate weights,
, satisfies the approximation property
This follows directly from the fact that each weight is constructed as a tensor product of two univariate weights, each of which satisfies the one-dimensional approximation property given in (
22).
As noted in
Section 2, the Schoenberg approximation (
6) avoids overshoots and oscillations, thereby preventing Gibbs-like artifacts. From (
38), we observe that
differs from the Schoenberg approximation by only a
perturbation. Therefore, the conclusion of the proposition follows directly. □
4.3. Numerical Results for Non-Smooth Functions in Two Dimensions
We applied both the symmetric and the newly adapted quasi-interpolation methods, as described in
Section 4, to discontinuous functions of the form given in Equation (
26).
The results for a representative test function, illustrated in
Figure 8, are presented below. This function is defined as follows:
We refer the reader to
Figure 7, which presents the values of the smoothness indicator
corresponding to this test function. The numerical results presented in
Figure 9 and
Figure 10 provide strong support for the theoretical findings established in Propositions 6 and 7. Specifically,
Figure 10 illustrates the shortcomings of the symmetric quasi-interpolation approach, exhibiting noticeable Gibbs-like overshoots and spurious oscillations near the discontinuity. In contrast, these artifacts are effectively eliminated by the newly adapted quasi-interpolation operator, as demonstrated in
Figure 9. All results were obtained using a grid spacing of
.
5. Conclusions
Quasi-interpolation algorithms are powerful tools for generating smooth and intricate curves and surfaces, making them highly valuable in computer graphics and geometric modeling. These methods are direct, yielding high-order smooth approximations without requiring the solution of linear systems or iterative procedures. However, standard quasi-interpolation schemes are generally ineffective when approximating non-smooth functions, particularly those with discontinuities.
In this work, we propose a novel adapted quasi-interpolation operator designed for the approximation of univariate and bivariate functions exhibiting jump singularities. We provide theoretical justification and support our claims with numerical experiments, demonstrating that the new method produces smooth approximations that avoid Gibbs-like oscillations near discontinuities.
Moreover, the construction of the proposed operator naturally extends to higher dimensions. For instance, it can be applied to approximate three-dimensional functions with discontinuities across unknown surfaces, while maintaining high approximation quality.