Next Article in Journal
Navigating Stakeholders Perspectives on Artificial Intelligence in Higher Education
Previous Article in Journal
Adaptive Grid Generation by Solving One-Dimensional Diffusion Equation Using Physics-Informed Neural Networks
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Adapted B-Spline Quasi-Interpolation for Approximating Piecewise Smooth Functions

1
School of Mathematical Sciences, Tel-Aviv University, Tel Aviv 6997801, Israel
2
Holon Institue of Technology, Holon 5810201, Israel
*
Author to whom correspondence should be addressed.
Algorithms 2025, 18(6), 335; https://doi.org/10.3390/a18060335
Submission received: 28 April 2025 / Revised: 26 May 2025 / Accepted: 30 May 2025 / Published: 3 June 2025
(This article belongs to the Special Issue Nonsmooth Optimization and Its Applications)

Abstract

:
We address the challenge of efficiently approximating piecewise smooth functions, particularly those with jump discontinuities. Given function values on a uniform grid over a domain Ω in R d , we present a novel B-spline-based approximation framework, using new adaptable quasi-interpolation operators. This approach integrates discontinuity detection techniques, allowing the quasi-interpolation operator to selectively use points from only one side of a discontinuity in both one- and two-dimensional cases. Among a range of candidate operators, the most suitable quasi-interpolation scheme is chosen to ensure high approximation accuracy and efficiency, while effectively suppressing spurious oscillations in the vicinity of discontinuities.

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 Ω R d . 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 C 2 smoothness and an O ( h 4 ) 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 f : Ω R , defined on a domain Ω R d , based on its known values at a uniform grid { f ( a ) } a A , where A Ω . The proposed approximation is constructed using a quasi-interpolation approach, expressed as
Q f ( x ) = a A f ( a ) q a ( x ) ,
where { q a } a A 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 R d . In [14], we outlined two key properties that the basis functions for quasi-interpolation should satisfy:
1.
Polynomial reproduction:
a A p ( a ) q a ( x ) = p ( x ) , x Ω , p Π m ,
where Π m is the space of polynomials of total degree m in R d .
2.
Compact support:
s u p p ( q a ) B ( a , R h ) .
Here, B ( a , r ) 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 a A and h.
In [14], we presented the following proposition.
Proposition 1.
Let f C m + 1 ( Ω ) , i.e., all partial derivatives of f of total order m + 1 are continuous on Ω. If Q is a quasi-interpolation operator satisfying properties (2) and (3), then
f Q f , Ω C · M m + 1 , Ω ( f ) h m + 1 ,
where
M k , Ω ( f ) = s u p x Ω { | k f ( x ) | : k = x 1 i 1 x d i d f , j = 1 d i j = k } .
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
S f ( x ) = i f ( i h ) B m ( x / h i ) ,
where B 2 m 1 denotes the centered B-spline of degree 2 m 1 , supported on the interval ( m h , m h ) with nodes m h , ( m 1 ) h , , ( m 1 ) h , m h . The Schoenberg operator achieves an approximation order of O ( h 2 ) 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 O ( h 4 ) , can be achieved using the following quasi-interpolation operator based on cubic B-splines on a uniform grid:
Q f ( x ) = i 1 6 B 3 x h i 1 + 4 3 B 3 x h i 1 6 B 3 x h i + 1 f i h .
This operator can also be expressed in form (1) using the basis functions
q i ( x ) = 1 6 B 3 x h i 1 + 4 3 B 3 x h i 1 6 B 3 x h i + 1 .
Thanks to its locality and its exact reproduction of polynomials of a degree up to three, the operator achieves an approximation order of O ( h 4 ) for functions that are C 4 -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 h 0 ; 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 R

Let the domain Ω = R and let X be the set of grid points uniformly spaced in Ω : X = { x i x i = i h } . V X = { f ( x i ) | x i X } . After rearranging the indices, the quasi-interpolation operator (7) can be expressed as follows:
Q S y m f ( x ) Q f ( x ) = i [ 1 6 f ( x i 1 ) + 4 3 f ( x i ) 1 6 f ( x i + 1 ) ] B 3 ( x h i ) .
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 O ( h 4 ) 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:
Q F f ( x ) = i [ A f ( x i ) + B f ( x i + 1 ) + C f ( x i + 2 ) + D f ( x i + 3 ) ] B 3 ( x h i ) .
To ensure the desired property of reproducing cubic polynomials, we derive a system of equations for unknowns A ,   B ,   C , and D:
A f ( x i ) + B f ( x i + 1 ) + C f ( x i + 2 ) + D f ( x i + 3 ) = 1 6 f ( x i 1 ) + 4 3 f ( x i ) 1 6 f ( x i + 1 ) ,
for f Π 3 . Since the space of polynomials is shift-invariant, it is sufficient to consider the equation for i = 0 . Solving this system of equations, we obtain the quasi-interpolation operator Q F f ( x ) :
Q F f ( x ) = i [ 2 3 f ( x i ) + 5 6 f ( x i + 1 ) 2 3 f ( x i + 2 ) + 1 6 f ( x i + 3 ) ] B 3 ( x h i ) .
Similarly, we can construct a backward quasi-interpolation operator that relies only on function values to the left of x i . This leads to the formulation of Q B f ( x ) :
Q B f ( x ) = i [ 1 6 f x i 3 2 3 f x i 2 + 5 6 f x i 1 + 2 3 f x i ] B 3 x h i .
After establishing quasi-interpolation operators (9), (12), and (13), we introduce a general mixed quasi-interpolation operator, expressed as
Q ˜ f ( x ) = i w i B 3 x h i ,
where the weights w i are selected from the following three options:
w i 1 w i S y m = 1 6 f ( x i 1 ) + 4 3 f ( x i ) 1 6 f ( x i + 1 ) ,
w i 2 w i F = 2 3 f ( x i ) + 5 6 f ( x i + 1 ) 2 3 f ( x i + 2 ) + 1 6 f ( x i + 3 ) ,
w i 3 w i B = 1 6 f ( x i 3 ) 2 3 f ( x i 2 ) + 5 6 f ( x i 1 ) + 2 3 f ( x i ) .
Proposition 2.
Let f C 4 ( R ) , x i = i h . Consider the operator Q ˜ defined in (14), where the weights { w i } are chosen arbitrarily from the three available options: w i S y m , w i F , or w i B . Then, the approximation error satisfies
| f ( x ) Q ˜ f ( x ) | = O ( h 4 ) , as h 0 .
Proof. 
From relation (11), it follows that Q ˜ reproduces Π 3 , the space of cubic polynomials. This reproduction property, together with the compact support property of Q ˜ , 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 x i .
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 x i , we compute a smoothness indicator I i :
I i = | 2 f ( x i ) | ,
where 2 f ( x i ) is the central second difference, defined as
2 f ( x i ) = f ( x i + 1 ) 2 f ( x i ) + f ( x i 1 ) .
The value of I i is of size O ( h 2 ) at smooth regions of f, and O(1) if ( x i 1 , x i + 1 ) contains a discontinuity of f. Consequently, large values of I i 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 I j exceeds a predetermined threshold, we conclude that a discontinuity exists within the interval [ x j , x j + 1 ] . 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 { w i } 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 x i , we compute the three values,
V 1 = I i , V 2 = I i + 1 + I i + 2 , V 3 = I i 2 + I i 1 .
Let k { 1 , 2 , 3 } be the index for which V k is minimal. We then set w i = w i k in (14). Notably, the procedure naturally selects w i 1 w i S y m in smooth regions.
The resulting modified operator is referred to as the adapted quasi-interpolation operator, denoted by Q A d a p t ( f ) .

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
f ( x ) = f 1 ( x ) , x [ 1 , 0 ) , f 2 ( x ) , x [ 0 , 1 ] , ,
where f 1 C 4 ( [ 1 , 0 ] ) , f 2 C 4 ( [ 0 , 1 ] ) . Let D denote the size of the jump discontinuity at x = 0 , defined by D = | f + ( 0 ) f ( 0 ) | . Consider the quasi-interpolation approximations Q S y m f and Q A d a p t f , constructed using the sampled data { f ( i h ) } .
Proposition 3.
For any h < 0.2 , there exist points x 1 ( 2 h , 0 ) and x 2 ( 0 , 2 h ) such that
| Q S y m f ( x 2 ) Q S y m f ( x 1 ) |   ( 1 + 0.113 ) D .
Proof. 
Since Q Sym is a linear operator, it suffices to prove the result for the function
f ( x ) = 0 , x < 0 , 1 , x 0 . ,
which corresponds to the case f 1 0 and f 2 1 , and yields D = 1 .
From Equation (15), it follows that w i S y m = 0 for i < 1 and w i S y m = 1 for i > 0 , while w 1 S y m = 1 / 6 and w 0 S y m = 7 / 6 . It follows that Q S y m f ( x ) = f ( x ) for | x | 2 h . In the region | x | < 2 h , the approximation Q S y m f ( x ) is a piecewise cubic function, attaining a minimum value of approximately 0.056935 at x 1 < 0 and a maximum value of approximately 1.056935 at x 2 > 0 . Therefore, the result in (20) follows. □
Proposition 4.
Let f be defined as in (19). Then, the adapted quasi-interpolation approximation Q A d a p t f for f defined by (19) is globally C 2 , and satisfies the error estimate
| f ( x ) Q A d a p t f ( x ) | C h 4 , | x | 2 h ,
where C is a constant independent of h. Moreover, the approximation Q A d a p t f does not exhibit any Gibbs-like overshoot near the discontinuity at x = 0 .
Proof. 
First, assume D > 0 , and h to be sufficiently small. Then, by construction, each of the weights w i selected for the adapted quasi-interpolation operator uses only function values from one side of the jump discontinuity at x = 0 . Error estimate (21) follows by considering the support of B 3 and the reproduction of cubic polynomials by Q A d a p t for | x | 2 h .
Next, we observe that each of the candidate weights, w i 1 = w i S y m , w i 2 = w i F , and w i 3 = w i B , satisfies the approximation property
w i k = f ( i h ) + O ( h 2 ) , as h 0 ,
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 w i S y m , as it is symmetric and centered and reproduces linear polynomials. For k = 2 , 3 , the approximation property in (22) also holds, as a direct consequence of the defining relation (11). Thus, in particular in ( 2 h , 2 h ) , we have
Q A d a p t f ( x ) = i w i B 3 ( x h i ) = i ( f ( i h ) + O ( h 2 ) ) B 3 ( x h i ) = i f ( i h ) B 3 ( x h i ) + O ( h 2 ) .
As noted in Section 2, the Schoenberg approximation (6) avoids overshoots and oscillations, thereby preventing Gibbs-like artifacts. From (23), we observe that Q A d a p t f differs from the Schoenberg approximation by only a O ( h 2 ) 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
f 1 ( x ) = c o s ( x ) , x [ 0 , 0.5 ] , c o s ( x ) , x ( 0.5 , 1 ] .
The second test function is
f 2 ( x ) = 1 1 / ( x + 0.2 ) , x [ 0 , 0.5 ] , s i n ( 3 x ) + 2 , x ( 0.5 , 1 ] .
The available data consist of sampled values of the non-smooth test functions at uniformly spaced points { x i = i h } , h = 0.05 . 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 f 1 and Figure 5 and Figure 6 for the second test function f 2 .
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 f 2 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 Ω = [ 0 , 1 ] 2 . Let Γ be a smooth curve that separates Ω into two domains Ω 1 and Ω 2 , and suppose that
f ( x , y ) = f 1 ( x , y ) , ( x , y ) Ω 1 , f 2 ( x , y ) , ( x , y ) Ω 2 ,
with f 1 C 4 ( Ω 1 ¯ ) and f 2 C 4 ( Ω 2 ¯ ) . Assume that f ( x , y ) is given on the grid points { ( i h , j h ) } in Ω , 0 i ,   j N , h = 1 / N , and define f i , j f ( i h , j h ) .
We wish to approximate the function using a quasi-interpolation operator of the form
Q f ( x , y ) = i , j w i , j B 3 ( x / h i ) B 3 ( y / h j ) .
Similarly to the one-dimensional case, the weights w i , j 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 w i , j . 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 w i , j does not depend on function values from both sides of the singularity curve Γ .
In the following, we describe the method for computing the weights w i , j in (27). This is achieved by taking the tensor product of the one-dimensional quasi-interpolation operators Q F , Q B , and Q S y m as defined in (15)–(17), respectively. This construction yields a total of nine two-dimensional quasi-interpolation operators:
Q 1 = Q S x S y , Q 2 = Q S x F y , Q 3 = Q S x B y , Q 4 = Q S y F x , Q 5 = Q F x F y , Q 6 = Q B x F y , Q 7 = Q S y B x , Q 8 = Q F x B y , Q 9 = Q B x B y ,
where S x and S y denote the symmetric one-dimensional quasi-interpolation operators in the x and y directions, respectively; F x and F y represent the forward operators; and B x and B y , the backward ones. If we denote the identity operator by I, by x + 1 , the forward operator in the x direction is x + 1 f i , j = f i + 1 , j , and by y + 1 , the forward operator in the y direction is y + 1 f i , j = f i , j + 1 . We obtain nine cross products of the three quasi-interpolation operators in one dimension. For example,
Q i , j F x , F y f = [ 2 3 I + 5 6 x + 1 2 3 x + 2 + 1 6 x + 3 ] [ 2 3 I + 5 6 y + 1 2 3 y + 2 + 1 6 y + 3 ] f i , j ,
which gives
Q i , j F x , F x f = 4 9 f i , j + 5 9 f i , j + 1 4 9 f i , j + 2 + 1 9 f i , j + 3 + 5 9 f i + 1 , j + 25 36 f i + 1 , j + 1 5 9 f i + 1 , j + 2 + 5 36 f i + 1 , j + 3 4 9 f i + 2 , j 5 9 f i + 2 , j + 1 + 4 9 f i + 2 , j + 2 1 9 f i + 2 , j + 3 + 1 9 f i + 3 , j + 5 36 f i + 3 , j + 1 1 9 f i + 3 , j + 2 + 1 36 f i + 3 , j + 3 .
Similarly, we define the remaining eight quasi-interpolation operators in two dimensions. To compute the weights w i , j 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:
( i h , j h ) ( i h , ( j + 1 ) h ) ( i h , ( j + 2 ) h ) ( i h , ( j + 3 ) h ) ( ( i + 1 ) h , j h ) ( ( i + 1 ) h , ( j + 1 ) h ) ( ( i + 1 ) h , ( j + 2 ) h ) ( ( i + 1 ) h , ( j + 3 ) h ) ( ( i + 2 ) h , j h ) ( ( i + 2 ) h , ( j + 1 ) h ) ( ( i + 2 ) h , ( j + 2 ) h ) ( ( i + 2 ) h , ( j + 3 ) h ) ( ( i + 3 ) h , j h ) ( ( i + 3 ) h , ( j + 1 ) h ) ( ( i + 3 ) h , ( j + 2 ) h ) ( ( i + 3 ) h , ( j + 3 ) h ) .

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:
L i 1 , j 1 = | f i 1 + 1 , j 1 4 f i 1 , j 1 + f i 1 1 , j 1 + f i 1 , j 1 + 1 + f i 1 , j 1 1 | + | f i 1 + 1 , j 1 + 1 4 f i 1 , j 1 + f i 1 1 , j 1 1 + f i 1 1 , j 1 + 1 + f i 1 + 1 , j 1 1 | .
We note that if all the values involved in (31) lie within a smooth region of f, then L i 1 , j 1 = O ( h 2 ) as h 0 . However, if L i 1 , j 1 incorporates values of f from both sides of the singularity curve Γ , then L i 1 , j 1 = O ( 1 ) . Figure 7 presents the values of the smoothness indicator { L i , j } 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:
Q i , j = k = k 1 k 1 + m l = l 1 l 1 + n c k , l f i + k , j + l .
The corresponding smoothness indicator is defined as
V i , j = k = k 1 + 1 k 1 + m 1 l = l 1 1 l 1 + n 1 L i + k , j + l .
Thus, for each grid point ( i h , j h ) , we compute nine values, V i , j 1 , , V i , j 9 , corresponding to the above nine quasi-interpolation operators Q 1 , , Q 9 , applied using their respective stencils. From these, we select the minimum value, denoted as
V i , j k m i n = m i n k { V i , j k } ,
and assign the associated weight w i , j = Q i , j k m i n to the point ( x i , y j ) .
Once the weights w i , j 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 Q A d a p t .

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 f C 4 ( R 2 ) , ( x i , y j ) = ( i h , j h ) , and let Q be the operator in (27) where the weights { w i j } are arbitrarily chosen from any of the nine options in (28). Then, we have
| f ( x , y ) Q f ( x , y ) | = O ( h 4 ) , as h 0 .
Proposition 6.
Let f be a piecewise C 4 function defined as in (26), with a singularity curve Γ. Then, the symmetric quasi-interpolation approximation Q S x S y f defined above is globally C 2 , and it satisfies the error estimate
| f ( x , y ) Q S x S y f ( x , y ) | C h 4 , d i s t ( ( x , y ) , Γ ) 3 2 h ,
where C is a constant independent of h. Near the discontinuity at Γ, the approximation Q S x S y f exhibits some Gibbs-like overshoots.
Proof. 
Observe that the support of the basis function B 3 ( x ) B 3 ( y ) is the Cartesian product of the supports of B 3 ( x ) and B 3 ( y ) , each of which spans an interval of length 4. Consequently, the diameter of the two-dimensional support is 4 2 . Moreover, the weights w i , j in the symmetric scheme involve function values located at a distance up to 2 from the grid point ( i h , j h ) . Depending on the local orientation of the singularity curve Γ , it follows that at points ( x , y ) 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 C 4 function defined as in (26), with a smooth singularity curve Γ. Then, the adapted quasi-interpolation approximation Q A d a p t f defined above is globally C 2 , and, for sufficiently small h, it satisfies the error estimate
| f ( x , y ) Q A d a p t f ( x , y ) | C h 4 , d i s t ( ( x , y ) , Γ ) 2 2 h ,
where C is a constant independent of h. Moreover, the approximation Q A d a p t f 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 w i , j 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 B 3 ( x ) B 3 ( y ) and the reproduction of cubic polynomials by Q A d a p t .
Next, we observe that each of the nine candidate weights, { w i , j k } i = 1 k , satisfies the approximation property
w i , j k = f ( i h , j h ) + O ( h 2 ) , as h 0 .
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).
Thus, we have
Q A d a p t f ( x , y ) = i , j w i , j B 3 ( x h i ) B 3 ( y h j ) = i , j ( f ( i h , j h ) + O ( h 2 ) ) B 3 ( x h i ) B 3 ( y h j ) = i f ( i h , j h ) B 3 ( x h i ) B 3 ( y h j ) + O ( h 2 ) .
As noted in Section 2, the Schoenberg approximation (6) avoids overshoots and oscillations, thereby preventing Gibbs-like artifacts. From (38), we observe that Q A d a p t f differs from the Schoenberg approximation by only a O ( h 2 ) 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:
f ( x , y ) = c o s ( x ) c o s ( y ) , x 2 + y 2 < 0.5 , 3 + c o s ( x ) c o s ( y ) , o t h e r w i s e .
We refer the reader to Figure 7, which presents the values of the smoothness indicator { L i , j } 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 h = 0.01 .

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.

Author Contributions

Methodology, D.L.; software, N.G. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

No new data were created.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Jiang, G.; Shu, C.-W. Efficient Implementation of Weighted ENO Schemes. J. Comput. Phys. 1996, 126, 202–228. [Google Scholar] [CrossRef]
  2. Liu, X.D.; Osher, S.; Chan, T. Weighted essentially nonoscillatory schemes. J. Comput. Phys. 1994, 115, 200–212. [Google Scholar] [CrossRef]
  3. Harten, A.; Engquist, B.; Osher, S.; Chakravarthy, S.R. Uniformly high order accurate essentially non-oscillatory schemes, III. J. Comput. Phys. 1987, 71, 231–303. [Google Scholar] [CrossRef]
  4. Harten, A.; Osher, S. Uniformly high order accurate nonoscillatory schemes, I. SIAM J. Numer. Anal. 1987, 24, 279–309. [Google Scholar] [CrossRef]
  5. Shu, C.W. High Order ENO and WENO Schemes for Computational Fluid Dynamics; Springer: Berlin/Heidelberg, Germany, 1999; pp. 439–582. [Google Scholar]
  6. Arandiga, F.; Baeza, A.; Belda, M.; Mulet, P. Analysis of WENO schemes for full and global accuracy. SIAM J. Numer. Anal. 2011, 49, 893–915. [Google Scholar] [CrossRef]
  7. Henrick, A.K.; Aslam, T.D.; Powers, J.M. Mapped weighted essentially non-oscillatory schemes: Achieving optimal order near critical points. J. Comput. Phys. 2005, 207, 542–567. [Google Scholar] [CrossRef]
  8. Amat, S.; Levin, D.; Ruiz, J.; Yanez, F. A new B-Spline type approximation method for non-smooth functions. App. Math. Lett. 2023, 141, 108628. [Google Scholar] [CrossRef]
  9. Amat, S.; Levin, D.; Ruiz, J.; Yanez, D.F. Explicit multivariate approximations from cell-average data. Adv. Comput. Math. 2022, 48, 85. [Google Scholar] [CrossRef]
  10. Amat, S.; Ruiz, J. New WENO smoothness indicators computationally efficient in presence of corner discontinuities. J. Sci. Comput. 2017, 71, 1265–1302. [Google Scholar] [CrossRef]
  11. Arandiga, F.; Belda, A.M.; Mulet, P. Point-Value WENO Multiresolution Applications to Stable Image Compression. J. Sci. Comput. 2010, 43, 158–182. [Google Scholar] [CrossRef]
  12. Arandiga, F.; Donat, R.; Lopez-Urena, S. Nonlineaer inprovements of quasi-interpolating splines to approximate piecewise smooth functions. Appl. Math. and Comput. 2023, 448, 127946. [Google Scholar]
  13. Amat, S.; Levin, D.; Ruiz-Álvarez, J.; Yanez, D.F. Non-linear WENO B-spline based approximation method. Numer. Algorithms 2025, 98, 1141–1169. [Google Scholar] [CrossRef]
  14. Gruberger, N.; Levin, D. Basis functions for Scattered Data Quasi-Interpolation. In Proceedings of the Curves and Surfaces: 8th International Conference, Paris, France, 12–18 June 2014; Springer International Publishing: Berlin/Heidelberg, Germany, 2015; pp. 263–271. [Google Scholar]
  15. Speleers, H. Hierarchical spline spaces: Quasi-interpolants and local approximation estimates. Adv. Comput. Math. 2017, 43, 235–255. [Google Scholar] [CrossRef]
  16. Gibbs, J.W. Fourier’s Series. Nature 1899, 59, 1522. [Google Scholar] [CrossRef]
Figure 1. Test function f 1 .
Figure 1. Test function f 1 .
Algorithms 18 00335 g001
Figure 2. Test function f 2 .
Figure 2. Test function f 2 .
Algorithms 18 00335 g002
Figure 3. Plot a: The adapted quasi-interpolation approximation of f 1 . Plot b: The error in the approximation.
Figure 3. Plot a: The adapted quasi-interpolation approximation of f 1 . Plot b: The error in the approximation.
Algorithms 18 00335 g003
Figure 4. Plot a: Symmetric quasi-interpolation approximation of f 1 . Plot b: Approximation error of the symmetric quasi-interpolation.
Figure 4. Plot a: Symmetric quasi-interpolation approximation of f 1 . Plot b: Approximation error of the symmetric quasi-interpolation.
Algorithms 18 00335 g004
Figure 5. Plot a: The adapted quasi-interpolation approximation of f 2 . Plot b: The approximation error.
Figure 5. Plot a: The adapted quasi-interpolation approximation of f 2 . Plot b: The approximation error.
Algorithms 18 00335 g005
Figure 6. Plot a: Symmetric quasi-interpolation approximation of f 2 . Plot b: Approximation error of the symmetric quasi-interpolation.
Figure 6. Plot a: Symmetric quasi-interpolation approximation of f 2 . Plot b: Approximation error of the symmetric quasi-interpolation.
Algorithms 18 00335 g006
Figure 7. The values of the smoothness indicators defined in Equation (31) for the function given in Equation (39).
Figure 7. The values of the smoothness indicators defined in Equation (31) for the function given in Equation (39).
Algorithms 18 00335 g007
Figure 8. The test function defined by (39).
Figure 8. The test function defined by (39).
Algorithms 18 00335 g008
Figure 9. The adapted quasi-interpolation approximation.
Figure 9. The adapted quasi-interpolation approximation.
Algorithms 18 00335 g009
Figure 10. The approximation using symmetric quasi-interpolation.
Figure 10. The approximation using symmetric quasi-interpolation.
Algorithms 18 00335 g010
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Levin, D.; Gruberger, N. Adapted B-Spline Quasi-Interpolation for Approximating Piecewise Smooth Functions. Algorithms 2025, 18, 335. https://doi.org/10.3390/a18060335

AMA Style

Levin D, Gruberger N. Adapted B-Spline Quasi-Interpolation for Approximating Piecewise Smooth Functions. Algorithms. 2025; 18(6):335. https://doi.org/10.3390/a18060335

Chicago/Turabian Style

Levin, David, and Nira Gruberger. 2025. "Adapted B-Spline Quasi-Interpolation for Approximating Piecewise Smooth Functions" Algorithms 18, no. 6: 335. https://doi.org/10.3390/a18060335

APA Style

Levin, D., & Gruberger, N. (2025). Adapted B-Spline Quasi-Interpolation for Approximating Piecewise Smooth Functions. Algorithms, 18(6), 335. https://doi.org/10.3390/a18060335

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop