# Adapted B-Spline Quasi-Interpolation for Approximating Piecewise Smooth Functions
## 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, [PERSON]. [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. [PERSON]. [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 \(\Omega\subset\mathbb{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 \(\mathbb{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.