Abstract
The accurate reconstruction of piecewise continuous functions on meshes is challenging due to potential spurious oscillations—namely the Gibbs phenomenon—especially for high-order methods. This paper introduces the Robust Discontinuity Indicators (RDI) method, a novel technique for constructing discontinuity indicators. These indicators can effectively identify both and discontinuities in a single pass using a new comprehensive theoretical analysis combined with cell-based overshoot–undershoot indicators and node-based oscillation indicators. In addition to detecting discontinuities, these indicator values can also facilitate the construction of adaptive weighting schemes to mitigate the Gibbs phenomenon. Due to its flexibility, RDI can accommodate complex geometries and applies to nonuniform unstructured meshes and general surfaces, broadening its utility. Through experiments, we show that RDI can accurately capture discontinuities while producing fewer false positives than two-pass methods. By providing a more rigorous method for discontinuity detection, RDI has the potential to offer significant improvements in computational simulations and data remapping.
Keywords:
piecewise continuous functions; high-order reconstruction; data remapping; Gibbs phenomenon; discontinuity indicators MSC:
65D05; 65D15; 65D99
1. Introduction
The detection and accurate resolution of discontinuities in piecewise continuous functions are pivotal in diverse computational applications, including computer-aided design (CAD), computer graphics, and computational fluid dynamics (CFD) [1,2,3]. Inaccuracies in these processes can lead to non-physical oscillations, known as the Gibbs phenomenon [4], which can severely jeopardize the fidelity of results, especially when high-order methods are used.
Sophisticated numerical methods, such as Discontinuous Galerkin (DG) methods [1], Essentially Non-Oscillatory (ENO) schemes [5], and Weighted Essentially Non-Oscillatory (WENO) schemes [6], have been effectively established to address these issues, especially in handling sharp transitions in the context of solving hyperbolic partial differential equations (PDEs). These challenges extend to other domains, such as in the numerical integration of piecewise-smooth (PWS) dynamical systems, where naive regularization can alter the system’s qualitative behavior [7], making accurate event detection essential [8]. The ENO-SR scheme introduced by Harten [9] further incorporates subcell resolution, which improves the accuracy of discontinuity detection by utilizing cell averages to precisely locate discontinuities within a cell, thus preventing the smearing of features like contact discontinuities. Most of these methods focus on identifying and resolving discontinuities, namely discontinuities in function values. Some works, such as [10,11], can also detect and/or resolve discontinuities, namely discontinuities in the gradients of functions, such as in the context of solving Hamilton–Jacobi equations [10]. The latter is even more crucial in remapping and reconstructing piecewise continuous functions than it is in solving PDEs. Recognizing this challenge, we aim to develop a method for detecting and characterizing and discontinuities. This method should apply to nonuniform, unstructured surface meshes and general surfaces, unlike traditional methods limited to structured meshes or 2D planes. In addition, the indicator values in detecting discontinuities should also be useful for constructing adaptive weighting schemes to resolve the Gibbs phenomenon, such as those used in WENO-like schemes [12,13].
This paper details the Robust Discontinuity Indicators (RDI) method, a sophisticated technique that addresses these challenges. This work significantly expands upon our previous research [13], where the analysis was primarily heuristic and testing was limited to uniform spherical meshes. The main contributions of this paper are a more rigorous theoretical foundation and a significant generalization of the method. Specifically, we provide a systematic theoretical analysis, including proofs, that explains the behavior of the indicators and enables the robust detection of both and discontinuities in a single pass. Furthermore, we generalize the method to accommodate complex geometries with sharp features and nonuniform unstructured meshes, which is critical for practical applications [2]. The enhanced scheme also improves robustness for functions with poor scaling characteristics and, importantly, is extended to handle cell-averaged data, a key requirement for finite volume methods not previously addressed. Finally, through extensive numerical verification, we demonstrate that RDI accurately captures discontinuities while producing fewer false positives than comparable two-pass methods. By enhancing the accuracy of discontinuity detection and resolution, the RDI method can facilitate more consistent and reliable simulations, data remapping, and other computational procedures.
The remainder of this paper is organized as follows. Section 2 provides an introductory overview of weighted least squares approximations and the Gibbs phenomenon. Section 3 presents a detailed analysis of overshoots and undershoots near discontinuities, culminating in the derivation of cell-based overshoot–undershoot indicators. Section 4 introduces node-based oscillation indicators and a dual-thresholding strategy and elaborates on their effective implementation in scenarios involving nonuniform meshes and distinct surface features. Section 5 showcases a series of numerical tests and compares RDI with other state-of-the-art approaches to substantiate the robustness of the RDI method. Lastly, Section 6 summarizes the findings and discusses prospective avenues for further exploration.
2. Background and Preliminaries
Weighted least squares (WLS) is a powerful method for data fitting, remapping, reconstruction, and other applications. However, degree-p WLS with can introduce oscillations near discontinuities [13]. Interestingly, these oscillations can also be useful in detecting discontinuities. In this section, we provide an overview of WLS and discuss the phenomenon of oscillations, commonly referred to as the Gibbs phenomenon. This section also introduces Weighted Averaging of Local Fittings (WALF), a technique used later in the construction of our indicators.
2.1. Related Work
Discontinuities often lead to undesired overshoots or undershoots in numerical methods. Specifically, discontinuities, also known as edges [14], jump discontinuities [15,16], or faults [17,18], have a finite jump in function values. These discontinuities tend to cause oscillations that persist with mesh refinement [13]. This phenomenon is referred to as the Gibbs or Gibbs–Wilbraham phenomenon in the context of the Fourier transform [16]. While discontinuities have been extensively studied, less attention has been given to discontinuities, which have a finite jump in the gradients of functions. Nonetheless, discontinuities are still crucial in various applications. For instance, they often represent junctions or intersections of components, such as features or ridge points. The discontinuities may cause mild oscillations in numerical methods [19].
Detecting these discontinuities is essential for the effective resolution of the Gibbs phenomenon in numerical methods. It also has significant implications for various other applications, such as mesh reconstruction [20] and image processing [21]. Several methods have been developed for edge detection, such as the Polynomial Annihilation Edge Detector (PAED) [22,23,24,25] based on the polynomial annihilation (PA) technique, zero-crossing in the second derivatives [26,27,28], and singularity detection and processing with wavelets (SDPW) [29] based on the wavelet transform. The PA technique in [22] focused on a 2D unstructured mesh, approximating the jump function to detect discontinuities. The work in [23] further utilizes PAED on an approximation of the gradient to detect discontinuities. In [25], the work combined the use of PA techniques to detect discontinuities and applied regularization to mitigate the Gibbs phenomenon in the context of solving hyperbolic PDEs in 1D. Furthermore, work on variably scaled kernels (VSKs) has shown success in interpolating functions with gradient discontinuities by locally adapting the smoothness of the basis functions to the position of the discontinuities [30]. Separately, recent work has developed methods for polynomial interpolation using mapped bases while avoiding resampling, addressing the Gibbs phenomenon [31]. Unlike these previous works, our method is based on weighted-least squares and can detect both and discontinuities in a single pass without explicitly estimating derivatives. In addition, our method can be applied to general surfaces and nonuniform meshes, which are not addressed in the PA technique. In Section 5.2, we will compare our method with PAED [22,23] and demonstrate that our method tends to produce fewer false positives. It is also worth noting that for general surfaces, we cannot easily transform the problem into 1D problems or apply a Fourier transform, and many existing methods (such as the 1D technique in [25,32] and the Fourier transform in [33]) are not directly applicable in this context.
2.2. Weighted-Least-Squares Approximations
In numerical analysis, approximation uses a simple function to simulate a more complex function or a function without an analytic formula. In practice, these functions might only have values at a discrete set of points, necessitating the use of interpolation or other fitting techniques to obtain an approximation from these sample points. Degree-p weighted least squares (WLS) is a powerful method that employs polynomials of a degree up to p to approximate a function sampled at discrete points. Taking degree-2 WLS as an example, we can expand the n-dimensional Taylor series of a function f at a point using the first three terms,
where and denote the gradient and Hessian of f with respect to , respectively. We use the 2-norm by default for vectors unless otherwise noted.
By considering the approximation , where and denote the approximations to and , respectively, we can express each component of and as a linear combination of , i.e.,
Here, and are coefficients that depend on the weights used in the WLS approximation. These coefficients have magnitudes of and , respectively, and are independent of the function f. When f is at least continuous, the quadratic WLS approximation is at least second-order accurate. To determine the coefficients, we construct a linear system
where is the generalized Vandermonde matrix and contains the coefficients to be determined. The rows of correspond to basis functions evaluated at sample points, and contains the function values at these sample points. By including an adequate number of sampling points in a stencil (a local neighborhood of points), we aim to ensure the good conditioning of the system. We assign weights to each equation (row) to emphasize the importance of the corresponding sample point, leading to the weighted system , which is solved in a least-squares sense to minimize . Here, is typically a diagonal matrix of weights. Different weight choices, such as distance-inverse weights [34] or radial basis function (RBF) weights [35] based on distances, have been used in WLS, each suited to different scenarios. Notably, the WLS-WENO weights [36,37,38,39,40] are based on function values and aim to resolve discontinuities.
To improve conditioning, the WLS problem is typically formulated in a local coordinate system centered at , where coordinates are normalized by a characteristic length scale related to the stencil size. This makes the entries of dimensionless and bounded. The matrix is then called the scaled Vandermonde matrix.
A mesh is quasi-uniform if there exist constants such that for any element (cell) in the mesh, and (for d-dimensional elements), where h is a global mesh size parameter (e.g., average edge length of all elements in the mesh) and is the diameter of . For such meshes, the maximum and minimum edge lengths of elements are bounded within a constant factor of each other. We denote h as the average edge length of the mesh.
Definition 1.
A degree-p WLS is stable if the scaled Vandermonde matrix , constructed using normalized local coordinates, has a condition number that is bounded independently of the mesh size h.
Stability is critical in ensuring the accuracy of the approximation under mesh refinement. The weights in are also chosen to be dimensionless and independent of h. Note that interpolation is a special case of WLS where the Vandermonde matrix (after selecting a subset of rows if overdetermined) is square and non-singular.
Lemma 1.
Given a function f, of which the st derivative is bounded, a stable degree-p WLS approximation is st-order accurate, i.e.,
Furthermore, the entries in the gradient and Hessian of are accurate to and , respectively.
Proof.
This result is standard in WLS theory (e.g., Theorem 4 in [34]). For completeness, we outline the key steps of the proof, which is based on backward error analysis. First, using Taylor series expansion for f around the center of the WLS stencil , the local error for the kth sample point is , where is the degree-p Taylor polynomial and . When these residuals are incorporated into the WLS system, the backward error in the scaled Vandermonde system (constructed with normalized coordinates) is . Under the assumption that the condition number of the scaled Vandermonde matrix is bounded independently of h, the forward error in the computed polynomial coefficients is of the same order. Consequently, the error in approximating by for near is also . The approximations for the derivatives are obtained by differentiating . Since the local coordinates used in are scaled by h, differentiation effectively divides by h for the gradient and for the Hessian, leading to accuracy orders of and , respectively. □
2.3. Weighted Averaging of Local Fittings
In this subsection, we review the concept of Weighted Averaging of Local Fittings (WALF) [41]. WALF is a technique for reconstructing functions on discrete surfaces and is a key component in constructing one of our discontinuity indicators. Compared to pure WLS (where a separate WLS approximation is constructed for each target point) and the Continuous Moving Frames (CMF) method [41,42], WALF offers computational advantages when the number of sampled points is smaller than the number of target points. In addition, it is important to note that WALF is more susceptible to oscillations near discontinuities than CMF, as demonstrated in [41]. This oscillatory property of WALF is useful in detecting discontinuities, as discussed in Section 3.4.
Given a point located within a cell with vertices , let denote the natural (or barycentric, if applicable) coordinates of with respect to these vertices, such that and . For each vertex , we introduce a local coordinate system in the tangent plane centered at , with denoting the coordinates in this plane. Let denote the function f expressed in this local coordinate system associated with the vertex . Let denote an approximation of obtained by first constructing a WLS polynomial centered at (using data from a stencil around ) and then evaluating this polynomial at the projection of onto the -plane of . The WALF reconstruction for is then given by
For further details on WALF, we refer readers to [41].
To construct the WLS approximation (which yields ) for each sampled point , we use the scaled Buhmann weight introduced in [13],
where is the distance from the center to a stencil point in the local -coordinates of , is the cut-off radius, and
Here, in (3) is a function due to Buhmann [43]. We define for some radius ratio , where , the distance from the kth farthest point in the local coordinate system to center node (within its WLS stencil), and , , and for degree-2, 4, and 6 WLS, respectively; see [13] for their justifications. is a safeguard against “short circuiting” (such as a stencil that wraps around a small circle of a torus), where and denote some approximate normal directions at stencil point and the center node , respectively. The geometry and mesh solely determine these weights, independently of the function values. By precomputing the WLS polynomials at each vertex , we can efficiently evaluate for any point in the proximity of .
3. Cell-Based Indicators
One fundamental aspect of our proposed algorithm is the development of cell-based indicators specifically designed for detecting discontinuities within single mesh cells. This approach builds upon and significantly refines a technique originally introduced in [13], particularly by offering a deeper analysis of stable quadratic Weighted Least Squares (WLS) and linear interpolation. Notably, these two approximation methods exhibit differential behaviors in smooth regions versus near discontinuities. In this section, we rigorously quantify these differences to inform the construction of cell-based indicators accurately.
The ensuing analysis is crucial for the precise identification of both and discontinuities, laying solid groundwork for the indicator’s formulation. This enhancement significantly augments our capability to detect critical features within the data. Furthermore, this analytical base underpins the development of more advanced node-based markers, as will be elaborated in Section 4. Through this methodological and analytical approach, we seek to improve the robustness and computational efficiency of the algorithm, especially when dealing with data characterized by complex discontinuity structures. We will analyze in the 2D case for simplicity and generalize the analysis to smooth surfaces in Section 3.3 and surfaces with discontinuities in Section 4.3.
3.1. Asymptotic Bounds in Smooth Regions
Given a piecewise smooth function defined on a 2D mesh , let denote the piecewise linear interpolation of f at a point , and let denote the corresponding quadratic WLS approximation. We assume that the WLS is stable, as explained in Section 2.2. The linear interpolation typically averages function values at nearby mesh nodes or uses local basis functions, while quadratic WLS accounts for changes up to the second derivative. This difference in approximation power leads to an discrepancy in smooth regions, as stated in the following proposition.
Proposition 1.
In regions where a function f is continuous on a 2D mesh, the difference between a stable quadratic WLS approximation and linear interpolation is , where h denotes the average edge-length of the mesh.
Proof.
Without loss of generality, let us first assume that the mesh comprises triangles. The error of linear interpolation for a function f is . For the quadratic WLS approximation , when f is , its error is . This is because quadratic WLS is exact for quadratic polynomials, and the error is determined by how well a quadratic can approximate f over the stencil. For a function, this deviation is controlled by the second derivative, leading to an error. If f were (or with a bounded third derivative), Lemma 1 would provide accuracy. Then, according to the triangle inequality,
Substituting the error bounds, we have . For quadrilateral meshes, replacing linear with bilinear interpolation maintains these error bounds. □
This analysis indicates that the difference between quadratic WLS and linear interpolation is minimal in smooth regions. However, this difference becomes substantially larger near discontinuities, which we will show next.
3.2. Asymptotic Bounds near Discontinuities
The presence of discontinuities significantly alters the approximation characteristics, leading to distinct asymptotic behaviors for quadratic weighted least squares (WLS) and linear interpolation . Estimating this difference is challenging because the derivatives of discontinuous functions are not well defined in the classical sense. Generalized derivatives, such as the Dirac delta function as the distributional derivative of the Heaviside function, cannot be directly used in the context of Taylor series expansions to derive error bounds.
Generalizing the analysis in Section 3.1, we present a rigorous analysis of the differences between and near and discontinuities. This is achieved by considering the behavior of the WLS approximation itself, whose derivatives are well-defined polynomials, even if they do not accurately represent the derivatives of f near the discontinuity. These results are crucial for the development of cell-based indicators, as they provide a solid foundation for detecting discontinuities within single mesh cells.
Lemma 2.
In the vicinity of radius near a discontinuity, the error in the quadratic WLS approximation is . In contrast, near a discontinuity, it is , where h denotes the average edge-length of the quasi-uniform mesh.
Proof.
Given the function and a point located near a discontinuity, we consider the two cases separately. Let be the center of the WLS stencil used to construct .
Case 1: Discontinuity. At a discontinuity, the function values exhibit an abrupt change. If the WLS stencil for (centered at ) includes points from both sides of the discontinuity, the WLS fit will attempt to bridge this jump. Let , with . The WLS solution will typically be some average of the function values in the stencil, so can be if is on one side of the jump. The estimated gradient and Hessian will be scaled by inverse powers of h to capture the jump: and are possible if the WLS attempts to fit the jump with a quadratic. Then, the change in over a distance is
By applying the triangle inequality, we obtain
Since if and are on opposite sides of the jump (or one is on it), and can be , the total error is .
Case 2: Discontinuity. A discontinuity is characterized by continuous function values but an abrupt change in the gradient of f. In this case, f is continuous, so can approximate well, potentially or if the stencil is mostly on one side or if is at the kink. However, the WLS-approximated gradient will be an average of gradients from both sides, so can be . The WLS-approximated Hessian might scale as to capture the change in gradient. So, , and . The change in is . The error is
Here, , since f is continuous and its gradient is bounded (piecewise). If we assume (reasonable for a kink), then the total error is . □
In the preceding proof, the key idea was to analyze the behavior of the WLS polynomial and its derivatives, which are well defined, even when the true derivatives of are not. This strategy effectively overcame the difficulty of undefined derivatives of at discontinuities. Using this lemma, we can now quantify the difference between quadratic WLS and linear interpolation near discontinuities.
Proposition 2.
In the vicinity of radius near a discontinuity of a piecewise smooth function f on a 2D mesh Ω, the difference between the quadratic WLS and the piecewise linear interpolation is . In the vicinity of radius near a discontinuity, this difference is , where h denotes the average edge-length of the mesh.
Proof.
Given the function and a point located near a discontinuity, we consider the two cases separately.
Case 1: Discontinuity. At a discontinuity, the function values have an abrupt change. Piecewise linear interpolation does not introduce new extrema beyond the range of local data values, so the deviation of linear interpolation from f at is bounded by the local jump height, i.e., . From Lemma 2, . Applying the triangle inequality, we get
Case 2: Discontinuity. A discontinuity is characterized by an abrupt change in the gradient of f, while f itself is continuous. Piecewise linear interpolation deviates from f by in smooth parts, but across a kink, its error is typically if one considers the maximum deviation from the true function over an element of size h. More precisely, the error of linear interpolation is bounded by . Near a discontinuity, the Hessian is not well defined. However, f is Lipschitz continuous, so . The error of linear interpolation from f is because the function behaves like for and for locally, and linear interpolation will have an error with respect to the underlying smooth pieces if it spans the kink. Thus, . From Lemma 2, . Applying the triangle inequality, we get
□
Proposition 2 provides an upper bound, as signified by the notation. These bounds are not necessarily tight for all points in the vicinity of the discontinuity, depending on both the positions of the points relative to the discontinuity and the choices of the WLS stencils. In practice, we observe that these bounds are likely to be tighter when the WLS is constructed using stencils that include points on both sides of a discontinuity and evaluated at points somewhat centrally located with respect to these stencils, especially when using WALF as described in Section 2.3. Since WALF is computed as a weighted average of the WLS fittings, the upper bounds of the errors for WALF are asymptotically the same as those of WLS. This observation motivates us to use WALF to reconstruct the function at cell centers when constructing cell-based indicators in Section 3.4.
It is also worth noting that the error bounds in Propositions 1 and 2 hold not only for quadratic WLS but also for other degrees, such as linear and cubic WLS, when compared against an appropriate baseline (e.g., constant or linear interpolation). However, linear WLS may not be sensitive enough to higher-order features, and cubic WLS may induce oscillations when approximating continuous functions (i.e., functions with discontinuous third derivatives) and also incur higher computational costs. Hence, quadratic WLS emerges as a practical choice in terms of robustness, sensitivity to features, and computational efficiency in the context of detecting discontinuities.
3.3. Generalization to Smooth Surfaces in
The preceding analysis was conducted in for simplicity. To extend these results to smooth surfaces in , we need to consider the geometric properties of the surface mesh. The analysis becomes more complex if the surface contains geometric discontinuities, such as edges or corners. We defer the consideration of geometric discontinuities to Section 4.3 and focus on smooth surfaces here.
For a given point on a smooth surface , we can approximate the local surface around using its tangent plane. Let be a point near on the surface. By projecting onto the tangent plane at , we obtain a point in the 2D plane. The error introduced by this projection (i.e., the distance between and ) is for smooth surfaces, where . This projection allows us to apply the 2D analysis to the 3D surface by considering the local coordinates on the tangent plane, as performed in the WLS construction (Section 2.2) and WALF (Section 2.3). The WLS approximations are constructed in these local -planes. Since the geometric error due to local planar approximation is , this perturbation does not alter the leading order terms in the asymptotic error bounds derived in Propositions 1 and 2.
3.4. Precomputing Operator for Cell-Based Overshoot–Undershoot Indicators
We now build an operator to compute cell-based indicators for local overshoots and undershoots, inspired by Proposition 2.
3.4.1. Overshoot–Undershoot Indicators
To maximize the efficacy of the indicators, we evaluate them at “cell centers” since the error bounds in Proposition 2 are likely tighter for these points relative to the scale of the cell. For a cell with m vertices , we define its center as . Let denote the approximate value of f at obtained by linear interpolation and denote the approximate value from WALF with quadratic WLS, evaluated at . Specifically, we define as the average of the function values at the vertices of :
and is the WALF approximation at , using natural coordinates (since is the average of vertices):
where is the evaluation of the quadratic WLS polynomial centered at vertex of cell , at the point . We then compute the value of as the difference between and :
We refer to as the overshoot–undershoot (OSUS) indicator at , since its positive and negative signs, respectively, indicate local overshoot and undershoot of relative to at , and its magnitude indicates the level of this difference. We choose this cell center to compute because (being a higher-order fit) is more prone to exhibiting significant deviations (overshoots/undershoots) from a simple linear average near discontinuities compared to points closer to the cell vertices. In addition, these cell centers can be used as approximate quadrature points when we compute the node-based indicators in Section 4.
Both and are linear combinations of nodal function values (where are vertices in the stencils for WLS and vertices of ). Consequently, is also a linear combination of nodal values. The computation of all values for all cells can be expressed as a sparse matrix-vector multiplication , where is the vector of nodal function values. We refer to this sparse matrix as the OSUS operator. Each row of corresponds to a cell , each column corresponds to a node in the mesh, and each non-zero entry stores the weight of in the expression for . Specifically, to compute for cell and its vertex , we use a quadratic WLS centered at . A common choice for the WLS stencil is the k-ring neighborhood of : the zero-ring stencil is itself; the one-ring stencil consists of and its direct edge-neighbors; and the k-ring consists of all nodes reachable from by traversing at most k edges. We typically use the two-ring stencil for the WLS at each vertex of the cell [41]. The non-zeros in the row of corresponding to cell are determined by the union of WLS stencils for all vertices of . This OSUS operator depends only on the mesh geometry and WLS parameters and is independent of the function values , so it can be pre-computed for a given mesh.
Occasionally, the Vandermonde matrix for a WLS problem may be poorly conditioned, e.g., due to an insufficient number of points in the stencil or a degenerate geometric configuration of stencil points (e.g., co-linear points for a quadratic fit). When this happens, we monitor the condition number of the Vandermonde matrix. If it exceeds a threshold, we enlarge the stencil (e.g., from a two-ring to a three-ring stencil) to incorporate more geometric variation and ensure sufficient independent constraints for the polynomial basis, which generally improves conditioning. To implement stencil operations efficiently, we can use an array-based half-facet data structure [44], which supports computing arbitrary ring sizes.
3.4.2. Cell-Based Threshold
In accordance with Propositions 1 and 2, most of the smooth regions can be filtered out by a cell-wise threshold applied to . Let represent the union of the two-ring stencils of all vertices of cell . Let be the local range of f within this extended stencil for cell . Let be the average edge length of the cell itself (calculated in the original space). Let be the global range of the function over the entire mesh . Let h be the global average edge length of the mesh. We define the threshold for cell as
where the powers and are chosen based on Propositions 1 and 2 so that they are intermediate to the powers of h in the error bounds for in smooth regions versus discontinuous regions. This choice is further elucidated in Table 1. We mark cells where as candidates for containing discontinuities. The majority of cells near and discontinuities are likely to be marked for sufficiently fine meshes, since their values are asymptotically larger than this threshold. Note that near local extrema (or other critical points such as saddle points) in smooth regions, is close to zero. Here, might be small (e.g., if dominated by quadratic behavior). In such cases, could become very small. To safeguard against false positives that might arise if (being ) is compared to an overly small local term, the global term provides a baseline. However, should be small to prevent false negatives near genuine discontinuities where might not be very large (e.g., mild kinks). We determine and empirically; as a rule of thumb, we choose and a small , such as . The small may still leave some false positives near local extremes in smooth regions, which we will further address using the node-based oscillation indicator in Section 4.
Table 1.
Asymptotic behavior of the cell-based indicator versus the threshold . These are theoretical estimates based on Propositions 1 and 2, assuming for quasi-uniform meshes. The table illustrates how is designed to separate different function behaviors. For example, in smooth regions, , while (driven by the global term or local term if ) is . Since for small h, smooth cells are typically not marked. Conversely, near discontinuities, , while (driven by the local term if ) is . Since for small h, these cells are marked.
4. Node-Based Oscillation Indicators
4.1. Definition of Oscillation Indicator
The cell-based indicators are prone to false positives near local extrema of the function, where f is smooth but has significant curvature. To mitigate this issue, we introduce node-based oscillation indicators, denoted as , derived from the cell-based values. We define the oscillation indicators based on the observation that the values are large in magnitude (due to Proposition 2) and oscillatory (change signs) in the cells surrounding a node near a discontinuity, a consequence of the Gibbs phenomenon. In contrast, the values tend to have consistent signs in cells surrounding a node near a local extremum, as proven in Proposition A1 of Appendix A.
Given a node v, let be the set of cells containing vertex v. We define the oscillation indicator as
where is a weighted average of the values for the cells in , given by
The weights can be unit weights () for uniform meshes as in [13] or area-based weights () for nonuniform meshes, as discussed in Section 4.2. The terms and are small positive safeguards against division by zero or near-zero values.
To understand why can effectively distinguish discontinuities from local extrema, let us first consider the behavior of its numerator and denominator, omitting the safeguards and for simplicity, so . The numerator measures the weighted mean absolute deviation of values around their weighted mean .
- Near discontinuities: The values tend to oscillate in sign. For example, if alternates between and for cells around v, then . The numerator becomes . The denominator becomes . In this simplified view, would be large. With the safeguard , the denominator becomes . Thus, , which is large if is small.
- Near local extrema (smooth regions): The values tend to have consistent signs (e.g., all negative for a minimum, see Appendix A) and similar magnitudes. Thus, for all . The numerator becomes very small. The denominator remains relatively large. Hence, tends to be small.
Thus, tends to be large near discontinuities and small at local extrema, helping to reduce false positives from the cell-based indicators. It is also worth noting that is non-dimensional and is independent of the function value range and the mesh scale. It is also more computationally efficient and stable than explicitly estimating higher-order derivatives.
Let us elaborate on the two safeguards in the denominator in (10). These safeguards are incorporated against division by a value that is too small, which may happen if the function is locally linear (so all , making and ). is a small dimensionless number; we found to be robust in practice. The term is an absolute small value only used when the rest of the denominator is numerically zero (e.g., if f is constant, all ). This prevents from becoming NaN. We can choose to be a very small floating-point number (e.g., related to machine epsilon times a typical scale of , or simply a fixed small number like ).
In terms of implementation, we use the one-ring neighborhood of cells (i.e., cells sharing vertex v) to evaluate from the values. While using a larger neighborhood (e.g., cells incident to vertices in the 1-ring of v) might provide a smoother indicator, it would increase computational cost. To distinguish different types of discontinuities or filter smooth regions, we use a threshold for . Specifically, we mark a node v as part of a discontinuity if its value is large and at least one of its incident cells has a large value (i.e., from Section 3.4). The final indicator for a node v is determined as:
where and are thresholds for (with ) and is the cell-based threshold from (9). This dual-thresholding strategy using both and values significantly reduces false positives and negatives, as we will demonstrate in Section 5.
We determine the thresholds empirically. As a rule of thumb, lower values will result in a more sensitive indicator but may introduce a higher number of false positives. On the other hand, higher values will yield a stricter indicator, potentially leading to an increase in false negatives. In practice, we found that it works well to choose in the interval for discontinuities and in for discontinuities. These parameters are user-tunable based on the specific application’s tolerance for false positives and false negatives.
4.2. Area Weights for Nonuniform Meshes
In (10), the weights play an important role in the accuracy of the node-based indicators, especially on nonuniform meshes. In our previous work [13], we used unit weights (), assuming the meshes are relatively uniform. For highly nonuniform (albeit still quasi-uniform) meshes, we observe that utilizing unit weights may result in many false positives. To overcome this issue, we propose using area weights for nonuniform meshes, i.e., . This choice is motivated by the fact that the area of a cell is a measure of its contribution to the local region, which is a good proxy for its importance when averaging local indicators.
To illustrate the importance of area weights, let us consider a simplified example. Suppose node v is surrounded by one large cell (with area and characteristic edge length ) and small cells (with area and characteristic edge length ) for . Assume v is in a smooth region where f is . Then, from Proposition 1, and . Since , we have . If unit weights () are used, . If is large, could be much smaller than . The numerator of would be approximately . If , then the first term is . The other terms are . The numerator becomes . The denominator (simplified) is . So , which approaches 2 for a large . Such a large could erroneously identify v as a discontinuity. In contrast, when employing area weights , and . Then . If , then . The numerator of becomes . The first term is small. The second sum is . The denominator (simplified) is . So . If , then is small, correctly indicating a smooth region. This example, though simplified, illustrates that area weights can better handle variations in cell sizes, preventing false positives in smooth regions of nonuniform meshes while preserving effectiveness in detecting genuine discontinuities where values oscillate significantly regardless of cell size.
4.3. Generalization to Surfaces with Geometric Discontinuities
Our preceding analysis generally assumed continuity of the surface (i.e., continuous surface normals and curvatures) for the WLS constructions to be straightforward. This assumption is not applicable when dealing with geometric discontinuities, such as sharp ridges ( discontinuity in surface normal) and corners ( discontinuity in surface position, or more complex normal behavior). This work focuses on discontinuities in normal directions, such as sharp ridges and corners. To accommodate ridge curves, we employ virtual splitting as presented in [20] along these feature curves. The basic idea of virtual splitting is to treat the mesh entities (vertices, edges) along a feature curve as distinct for each adjacent smooth surface patch. This effectively makes the twin half-edges along ridge curves appear disconnected in the mesh data structure (e.g., half-edge or half-facet data structure) and, in turn, creates a separate connected component (a patch with boundary) for each smooth region of the original surface. As a result, the WLS stencils used in computing (and thus ) will not include points from different sides of these geometric discontinuities. For instance, after the virtual splitting of a cylinder, the two circular bases and the lateral surface become three distinct connected components (patches). We then separately run our RDI method on these surface patches, treating their new edges as boundaries. Without virtual splitting, using RDI might introduce many false positives (misinterpreting geometric features as function discontinuities) or false negatives (masking function discontinuities that coincide with geometric features), as we demonstrate in Appendix B.
Close to a geometric boundary of a patch (either an original boundary of the surface or one created by virtual splitting), WLS stencils need careful handling. Standard k-ring stencils might be too small or one-sided. We observed that using a slightly larger stencil, e.g., a three-ring neighborhood, can provide adequate data points for stable degree-2 WLS in the OSUS operator construction near such boundaries. Similarly, when computing for a vertex v on a patch boundary, its neighborhood will consist of cells from only one patch. These adjustments help provide more accurate indicator results, as demonstrated in Section 5.3.
4.4. Summary of Algorithm
We outline the complete algorithm for RDI. Our approach consists of three main stages:
- Computation of cell-based OSUS indicators for all cells .
- Calculation of node-based oscillation indicators for all vertices v.
- Determination of node-based discontinuity markers using a dual-thresholding strategy involving both and .
Our design principle aims to separate offline preprocessing from online computation. Given a mesh, the offline component involves computing the OSUS operator , which is constructed only once per mesh. This step involves setting up and storing the linear transformation from nodal function values to cell-based indicators . Once the OSUS operator is generated, the online computation can be performed efficiently, as outlined in Algorithm 1, to detect discontinuities for different function data on the same mesh.
To analyze the time complexity of Algorithm 1, let be the number of vertices and be the number of cells. Offline (OSUS operator construction): For each of the N vertices, a WLS polynomial is constructed. This involves selecting a stencil (e.g., -ring, with points, assumed as ) and solving a small system (where is the number of polynomial basis functions, for fixed-degree p). This is . Then, for each of the M cells (with vertices, ), the entries of the corresponding row in are computed. This involves evaluating WLS polynomials. The support for this row (number of non-zeros) depends on the union of stencils of its vertices. If the average stencil size is , this is . Overall, constructing and storing (if its total non-zeros is ) is roughly . If , then it is . This step is performed once per mesh.
| Algorithm 1 Robust Discontinuity Indicators (RDI) |
| Require: A surface mesh (vertices V, cells E), the precomputed OSUS operator for , function values at all nodes , node-based thresholds for and discontinuities (), cell-based threshold parameters . Ensure: A vector of integer markers for all nodes ().
|
Online (Algorithm 1):
- Line 1: . Sparse matrix-vector multiplication. If has non-zeros, complexity is . Assuming (average non-zeros per row is constant), this is .
- Lines 3–11 (Cell-based pre-filtering): Loop over M cells. Inside, computations are per cell (assuming stencil size is for ). Total .
- Lines 13–25 (Node-based indicators): Loop over N vertices. Let be the number of vertices with . Inside the loop for marked vertices: compute and . This involves summing over cells incident to v. If average vertex valence is ( for typical meshes), this is per marked node. Total . In the worst case, , so .
Thus, the online complexity for detecting discontinuities for one function is . For different functions on the same mesh, the OSUS operator is reused. The total online complexity becomes . The total complexity including one-time offline preprocessing is .
5. Numerical Results
In this section, we report several numerical experiments conducted with RDI, including comparisons on planes, evaluations on general surfaces with sharp features, and the use case of remapping nodal values between meshes for discontinuous functions. We implemented our algorithms in MATLAB and converted the code into C++ using MATLAB Coder. The numerical experiments were conducted using MATLAB R2022b on Linux. Since one of the key applications of RDI is remapping in climate modeling, which tends to employ various representations of the sphere, some of our experiments used spherical meshes. The primary focus of these experiments was to validate the accuracy and robustness of the indicators. Therefore, while we do not present detailed timing studies, we confirm that the observed performance of the online algorithm is consistent with the theoretical complexity derived in Section 4.4. This linear scaling ensures the method’s efficiency and practicality for large-scale applications. To facilitate reproducibility and future comparative studies, we have made the meshes used in this work publicly available on Zenodo [45]. For each experiment, specific mesh characteristics (e.g., number of vertices and cells) and RDI parameters () will be provided or were set to the default values mentioned earlier.
5.1. Experimentation on Unit Spheres with Nonuniform Neshes
To evaluate our discontinuity indicators, we employed two piecewise smooth functions, “interacting waves” and “crossing waves,” which were previously used in [13]. The definitions of these functions are as follows:
and
Note that has and discontinuities, whereas has , , and discontinuities. We chose these functions since the discontinuities have complex interacting patterns, allowing a more thorough evaluation of the robustness of the indicators. Figure 1 displays the color maps of the two functions on two regionally refined meshes. Specifically, is shown on the dual of a spherical centroidal Voronoi tessellations (SCVT) mesh [46], and is shown on a cubed-sphere mesh. The meshes in Figure 1 are relatively coarse. For ease of visualization, we intersect the sphere with planes and will depict the values on the intersection curves henceforth.
Figure 1.
Function values on coarse regionally refined meshes and the intersection planes. (a) on the dual of a coarse regionally refined SCVT ( 31,936, 15,970) with the intersection plane . (b) on a coarse regionally refined cubed-sphere ( 15,860, 15,858) with the intersection plane .
Figure 2 depicts the function values and values along the intersection curves on finer meshes, which have edge lengths of approximately one-fourth of those seen in Figure 1. We use and to denote the number of vertices and cells, respectively, in the meshes. It is evident that the values can effectively distinguish the discontinuities from the smooth regions. Figure 3 shows the nodes where (i.e., , assuming is larger). These nodes correspond to the regions with and discontinuities. For these tests, we used , , , . Reducing to a smaller value may allow for the identification of some discontinuities on coarse meshes but would also increase the risk of false positives.
Figure 2.
Functions and along with their corresponding values along the cross section of finer regionally refined meshes (SCVT: 135,768, 67,886; cubed-sphere: 247,330, 247,328) with intersection planes.
Figure 3.
Detected discontinuity cells (cells incident to nodes with , shown in red) on regionally refined meshes. (a) Detected discontinuity cells of on level-3 regionally refined SCVT ( 135,768, 67,886). (b) Detected discontinuity cells of on level-3 regionally refined cubed-sphere mesh ( 247,330, 247,328).
5.2. Comparison with Polynomial Annihilation Edge Detection
We compare RDI with Polynomial Annihilation Edge Detector (PAED) [22,23]. Like RDI, PAED is designed to detect discontinuities in functions, primarily discontinuities in its original formulation [22] and extended to discontinuities by applying it to estimated derivatives [23]. PAED is based on polynomial annihilation and often uses limiters like the minmod limiter [47,48] to reduce oscillations when approximating jump functions or derivatives. Since PAED is typically formulated for 2D planar data, we conduct the comparison on planar domains.
First, we use two test functions, and , from [22], both of which contain only discontinuities. Specifically, the function is given by
for , and is the gray level of the Shepp–Logan phantom [49].
For comparison with [22], we generated 16,384 random points on . As RDI uses a mesh data structure for computing neighborhoods, we computed the Delaunay triangulation of these points when applying RDI. To visualize the detected discontinuities, we computed an approximation of the local jump function
where is the one-ring neighborhood of nodes connected to (including ) on the sampled mesh.
Figure 4 displays the results, which are visually similar to those for the PAED method shown in Figures 4.2 and 4.3 of [22]. Subplots (a) and (c) show the original functions and , where both height (z-axis) and color represent the function’s value. Subplots (b) and (d) visualize the output of our RDI method by plotting the local jump function . In these plots, the non-zero regions trace the detected discontinuities. Both the height and the color of the resulting surfaces correspond to the magnitude of the local jump, accurately aligning with the true discontinuities in the original functions. For instance, the constant-height (and single-color) circular wall in (b) reflects the constant jump in , while the varying heights (and colors) in (d) correctly capture the different jump magnitudes in the Shepp–Logan phantom.
Figure 4.
Original functions (a) and (c) , and their approximated local jump functions (b,d) based on RDI detection (on Delaunay triangulation of 16,384 random points), respectively.
The detected discontinuities from PAED may appear thinner in some cases than those of RDI, partly because RDI uses larger stencils (two rings for the OSUS operator), which can slightly widen the detected region around a discontinuity. RDI parameters for this test were and .
A key feature of RDI is its ability to detect both and discontinuities in a single pass without prior derivative estimation. In [23], PAED was extended to detect discontinuities by first estimating the derivatives and then applying PAED to these derivative fields. To compare our method with [23], we use the test function from their work,
which has a discontinuity (a kink) along the circle . We generated meshes over of similar point counts as those in [23]. As shown in Figure 5, our RDI method detected the discontinuity along the circle with high fidelity and very few false positives. In contrast, the results reported for the two-pass PAED approach in [23] (see their Figure 8) exhibit numerous false positives scattered across the domain, particularly on the random grids. This comparison suggests that RDI’s direct, single-pass approach is more robust for detecting discontinuities, likely because it avoids a separate, potentially noise-sensitive derivative estimation step.
Figure 5.
Detection of the discontinuity in using the RDI method on the Delaunay triangulation of two different random point sets. The method cleanly identifies the circular discontinuity with very few false positives.
5.3. Generalization to Surfaces with Sharp Features
Our previous examples employed simple, smooth geometries, such as spheres and planes. We now consider surfaces with sharp features, which present additional complications. As discussed in Section 4.3 and detailed in [20], we virtually split the surface mesh into smooth patches along the feature curves and then employ one-sided stencils (by restricting stencils to the patch) along these sharp features. The virtual splitting helps to prevent many false positives and negatives, as demonstrated in Appendix B. To maintain stability, we increase the stencil sizes (e.g., to 3-rings) for WLS near the patch boundaries when computing the OSUS operator, as discussed in Section 4.3.
We carried out several experiments and displayed the results for functions and (defined below) on complex geometries. The functions are as follows:
and
respectively, where and are taken over the coordinate range of the specific geometry, and
Function has discontinuities along the planes . Function has and discontinuities based on the x-coordinate.
Figure 6 and Figure 7 display the detected discontinuities on a cylinder and a reamer, respectively. It can be observed that RDI accurately detected the discontinuities. Some discontinuities might be missed if the quadratic WLS had minimal overshoots and undershoots for the given mesh resolution in the corresponding regions, leading to small and subsequently small . Decreasing the threshold would make RDI more sensitive to weaker discontinuities, although it may also introduce some false positives in regions of high smooth variation.
Figure 6.
Function values and numerical discontinuities (red regions indicate ) detected by RDI with virtual splitting on the surface triangulations of a cylinder ( 20,177, 39,788).
Figure 7.
Function values and numerical discontinuities (red regions indicate ) detected by RDI with virtual splitting on the surface triangulation of a reamer ( 19,515, 33,246).
5.4. Application to Remap
The robust detection of discontinuities has a variety of applications. In this section, we demonstrate the use of RDI in remapping data between different meshes, also known as data remap or conservative interpolation. In this context, upon identifying and discontinuities using RDI, one can employ specialized numerical techniques, such as WLS-ENO remap [13,20] or CAAS [50], to resolve or limit across these discontinuities, thereby mitigating the Gibbs phenomena [4]. Figure 8 compares the remapping of (from Section 5.1) from a source SCVT mesh to a target cubed-sphere mesh using standard WLS interpolation versus a WLS-ENO scheme that utilizes RDI markers. The standard WLS, which does not distinguish smooth and discontinuous regions, suffers from oscillations near discontinuities. In contrast, WLS-ENO, guided by RDI to adjust its stencils and weights near detected discontinuities, effectively eliminated overshoots and undershoots while preserving accuracy in smooth regions.
Figure 8.
Comparison between standard WLS interpolation and WLS-ENO (using RDI) for remapping . (a) on the source mesh. (b) Function profiles along a cross-section of the target mesh: exact solution (black), standard WLS remapped (blue, oscillatory), and WLS-ENO with RDI remapped (red, non-oscillatory).
6. Conclusions and Discussion
In this paper, we have introduced the Robust Discontinuity Indicators (RDI) method, a novel approach for the robust and efficient detection of discontinuities in approximating piecewise continuous functions over meshes. The RDI method distinguishes itself by accurately identifying both and discontinuities using node-based values, even in nonuniform meshes and complex surface geometries. Our approach leverages a combination of cell-based overshoot–undershoot indicators () and node-based oscillation indicators (), processed through a dual-thresholding strategy, ensuring robustness while minimizing false positives. The theoretical foundation provided by our rigorous analysis of WLS and linear interpolation behavior near discontinuities, coupled with extensive numerical experiments, demonstrates that RDI achieves high accuracy in discontinuity detection and maintains computational efficiency across a wide range of scenarios. The ability to precompute the main OSUS operator makes RDI particularly efficient for applications involving multiple functions on a fixed mesh.
Despite the promising results obtained, there are avenues for further enhancement. One potential improvement could involve incorporating a thinning process post-detection to refine the boundaries of the detected discontinuities. Extending the RDI method to three-dimensional volumetric meshes could broaden its applicability. Further investigation into the adaptive determination of the thresholds () could also improve robustness across a wider range of functions and meshes without manual tuning.
Beyond these direct improvements, our work opens up several avenues for future research. One direction is to reconstruct topologically correct discontinuity curves from the discrete points identified by RDI, a challenge relevant to applications in geometric modeling [51]. Another avenue is adapting RDI’s principles for 1D event detection in ODEs and DAEs. Such a tool would complement existing methods [8] and is critical because improper regularization can alter the qualitative dynamics of piecewise-smooth (PWS) systems, such as their limit cycles [7,52].
Author Contributions
Conceptualization, Y.L. and X.J.; methodology, Y.L. and Q.C.; software, Y.L. and Q.C.; validation, Y.L.; formal analysis, Y.L.; investigation, Y.L.; data curation, Y.L.; writing—original draft preparation, Y.L.; writing—review and editing, Q.C. and X.J.; visualization, Y.L.; supervision, X.J.; project administration, X.J.; funding acquisition, X.J. All authors have read and agreed to the published version of the manuscript.
Funding
This work was supported under the Scientific Discovery through Advanced Computing (SciDAC) program in the US Department of Energy’s Office of Science, Office of Advanced Scientific Computing Research through subcontract #462974 with Los Alamos National Laboratory.
Data Availability Statement
The meshes used in this work are available on Zenodo [45].
Acknowledgments
We thank the anonymous reviewers for their constructive comments and suggestions, which helped improve the quality of this paper. Generative AI models were used in correcting grammar and improving the readability of the paper, but all the ideas and the mathematical proofs were developed by the authors.
Conflicts of Interest
The authors declare no conflicts of interest.
Appendix A. Oscillatory Properties of Alpha_Sigma near Local Extremes
To derive more accurate indicators, we need a more precise estimation of ’s behavior in smooth regions, particularly near local extrema. In the following, we first derive the theory for a triangular mesh in and then discuss its generalization to smooth surfaces.
Proposition A1.
Given a sufficiently fine triangulation over , in the regions of a piecewise smooth function f, the cell-based indicator computed over a cell σ using the WALF scheme (as defined in Section 3.4) is negative near a local minimum of f and positive near a local maximum of f.
Proof.
Consider a function defined on a plane. For a triangular cell within a region of f, its center is . From (8), . Here, and , where is the quadratic WLS approximation centered at . Thus,
From Lemma 1, for , each (as discussed in the proof of Proposition 1). So the sum . Thus,
Let be the origin for local Taylor expansions. Let and . Then , , and . Expanding f around (since in this region), , where as .
Substituting these into (A1), the terms cancel. The combination of terms will be . The terms yield the dominant part of :
This term is . Thus, , where the term represents the WLS approximation error and the term represents the Taylor series remainder. The term is positive if is positive definite (local minimum) and negative if is negative definite (local maximum). Thus, if is positive definite (near a local minimum), the sum is positive, making negative. If is negative definite (near a local maximum), the sum is negative, making positive. This holds provided h is sufficiently small so that this Hessian-derived term determines the sign, which is expected near non-degenerate extrema where is definite and its entries are not excessively small compared to constants hidden in other terms. The Hessian is evaluated at (or more accurately, at some point within ). □
This proposition holds for general m-gons as well, and it can be extended to smooth surfaces by considering the function behavior on the local tangent plane, as the out-of-plane error is of higher order. This property of having consistent signs near local extrema is key to how the indicator (Section 4.1) distinguishes these smooth features from discontinuities where tends to oscillate.
Appendix B. The Effect of Virtual Splitting Along Sharp Features
A general surface might have geometric discontinuities, such as features (creases) and ridge points. Applying RDI directly across such geometric discontinuities might yield the inaccurate detection of numerical discontinuities in the function f. Specifically, a function f that is smooth in the ambient Euclidean space could be misclassified as having a discontinuity when evaluated on the surface if its behavior across the geometric feature mimics a kink. Conversely, a function with a genuine discontinuity that coincides with the geometric discontinuity might be mistaken as smooth if the geometric effect masks the functional one.
To illustrate these two cases, let us first consider two functions and on a curve for , where
and
The curve has a geometric discontinuity (a kink in its tangent) at (where ). The function has a discontinuity in its definition with respect to y and x across the plane . Consider . The plane (i.e., ) is a point where , which is smooth for . So has a discontinuity at . Consider . The plane (i.e., ) is where has its geometric kink. If RDI is applied without considering the geometric kink (i.e., stencils cross freely), for , the geometric kink at might be falsely detected as a discontinuity in if varies smoothly across . For , the discontinuity in at might be confused with or masked by the geometric kink. Virtual splitting separates the curve at into two pieces, allowing RDI to analyze on each piece up to the boundary, correctly identifying the jump in derivatives if one-sided limits are considered.
Figure A1.
and values for on a discretization of . The black line is . In (a), the red dash line is . In (b), the blue dashed line is . Without virtual splitting, the geometric kink at might cause large even if is smooth there, while the true kink at is sought.
Figure A1 shows that RDI without virtual splitting can detect the discontinuity at . However, it might also erroneously classify the region near the geometric kink at as a discontinuity in . Figure A2 illustrates that for , where the function discontinuity coincides with the geometric kink at , RDI without virtual splitting might yield ambiguous values (e.g., if the WLS fit is poor due to geometry, or large if it captures the combined effect). With virtual splitting, the analysis would be one-sided up to , potentially revealing the jump more clearly.
Similar misclassifications can also occur on surface meshes without virtual splitting. For instance, Figure A3 illustrates RDI applied to a simple smooth function on the triangulation of a cylinder. The function is constant on the two bases (if aligned with z-axis) and linear on the lateral surface. RDI with virtual splitting (separating bases from lateral surface) would correctly produce everywhere. In contrast, RDI without virtual splitting might yield false positives (e.g., ) near the sharp circular edges where bases meet the lateral surface, due to WLS stencils crossing these geometric discontinuities.
Figure A2.
and values for on a discretization of . The black line is . In (a), the red dash line is . In (b), the blue dashed line is . The function discontinuity at coincides with the geometric kink.
Figure A3.
Function value (left) of on a cylinder ( = 20,177, = 39,788). Numerical discontinuities (right, red regions) detected by RDI without virtual splitting, showing potential false positives along the cylinder edges. With virtual splitting, these false positives would be avoided.
References
- Hesthaven, J.S.; Warburton, T. Nodal Discontinuous Galerkin Methods; Springer: Berlin/Heidelberg, Germany, 2008. [Google Scholar]
- Botsch, M.; Kobbelt, L.; Pauly, M.; Alliez, P.; Lévy, B. Polygon Mesh Processing; CRC Press: Boca Raton, FL, USA, 2010. [Google Scholar]
- LeVeque, R.J. Finite Volume Methods for Hyperbolic Problems; Cambridge University Press: Cambridge, UK, 2002. [Google Scholar]
- Gottlieb, D.; Shu, C.W. On the Gibbs phenomenon and its resolution. SIAM Rev. 1997, 39, 644–668. [Google Scholar] [CrossRef]
- Shu, C.W. High order ENO and WENO schemes for computational fluid dynamics. In High-Order Methods for Computational Physics; Springer: Berlin/Heidelberg, Germany, 1999; pp. 439–582. [Google Scholar]
- Liu, X.D.; Osher, S.; Chan, T. Weighted essentially non-oscillatory schemes. J. Comput. Phys. 1994, 115, 200–212. [Google Scholar] [CrossRef]
- Dieci, L.; Guglielmi, N. Regularizing Piecewise Smooth Differential Systems: Co-Dimension Discontinuity Surface. J. Dyn. Differ. Equ. 2013, 25, 71–94. [Google Scholar] [CrossRef]
- Lopez, L.; Maset, S. Numerical event location techniques in discontinuous differential algebraic equations. Appl. Numer. Math. 2022, 178, 98–122. [Google Scholar] [CrossRef]
- Harten, A. ENO schemes with subcell resolution. J. Comput. Phys. 1989, 83, 148–184. [Google Scholar] [CrossRef]
- Jiang, G.S.; Peng, D. Weighted ENO Schemes for Hamilton–Jacobi Equations. SIAM J. Sci. Comput. 2000, 21, 2126–2143. [Google Scholar] [CrossRef]
- Amat, S.; Ruiz, J. New WENO Smoothness Indicators Computationally Efficient in the Presence of Corner Discontinuities. J. Sci. Comput. 2017, 71, 1265–1302. [Google Scholar] [CrossRef]
- Liu, H.; Jiao, X. WLS-ENO: Weighted-least-squares based essentially non-oscillatory schemes for finite volume methods on unstructured meshes. J. Comput. Phys. 2016, 314, 749–773. [Google Scholar] [CrossRef]
- Li, Y.; Chen, Q.; Wang, X.; Jiao, X. WLS-ENO remap: Superconvergent and non-oscillatory weighted least squares data transfer on surfaces. J. Comput. Phys. 2020, 417, 109578. [Google Scholar] [CrossRef]
- Tadmor, E. Filters, mollifiers and the computation of the Gibbs phenomenon. Acta Numer. 2007, 16, 305–378. [Google Scholar] [CrossRef]
- Cates, D.; Gelb, A. Detecting derivative discontinuity locations in piecewise continuous functions from Fourier spectral data. Numer. Algo. 2007, 46, 59–84. [Google Scholar] [CrossRef]
- Hewitt, E.; Hewitt, R.E. The Gibbs-Wilbraham phenomenon: An episode in Fourier analysis. Arch. Hist. Exact Sci. 1979, 21, 129–160. [Google Scholar] [CrossRef]
- Bozzini, M.; Rossini, M. The detection and recovery of discontinuity curves from scattered data. J. Comput. Appl. Math. 2013, 240, 148–162. [Google Scholar] [CrossRef]
- de Silanes, M.C.L.; Parra, M.C.; Torrens, J.J. Vertical and oblique fault detection in explicit surfaces. J. Comput. Appl. Math. 2002, 140, 559–585. [Google Scholar] [CrossRef]
- Moura, R.C.; Cassinelli, A.; da Silva, A.F.; Burman, E.; Sherwin, S.J. Gradient jump penalty stabilisation of spectral/hp element discretisation for under-resolved turbulence simulations. Comput. Methods Appl. Mech. Eng. 2022, 388, 114200. [Google Scholar] [CrossRef]
- Li, Y.; Zhao, X.; Ray, N.; Jiao, X. Compact feature-aware Hermite-style high-order surface reconstruction. Engrg. Comput. 2021, 37, 187–210. [Google Scholar] [CrossRef]
- Shrivakshan, G.T. A comparison of various edge detection techniques used in image processing. Int. J. Comput. Sci. Issues 2012, 9, 269. [Google Scholar]
- Archibald, R.; Gelb, A.; Yoon, J. Polynomial fitting for edge detection in irregularly sampled signals and images. SIAM J. Numer. Ana. 2005, 43, 259–279. [Google Scholar] [CrossRef]
- Saxena, R.; Gelb, A.; Mittelmann, H. A high order method for determining the edges in the gradient of a function. Comm. Comput. Phys. 2009, 5, 694–711. [Google Scholar]
- Archibald, R.; Gelb, A.; Yoon, J. Determining the locations and discontinuities in the derivatives of functions. Appl. Numer. Math. 2008, 58, 577–592. [Google Scholar] [CrossRef]
- Glaubitz, J.; Gelb, A. High Order Edge Sensors with ℓ1 Regularization for Enhanced Discontinuous Galerkin Methods. SIAM J. Sci. Comput. 2019, 41, A1304–A1330. [Google Scholar] [CrossRef]
- Marr, D.; Hildreth, E. Theory of edge detection. Proc. Roy. Soc. Lond. 1980, 207, 187–217. [Google Scholar]
- Marr, D. Early processing of visual information. Philos. Trans. R. Soc. Lond. B Biol. Sci. 1976, 275, 483–519. [Google Scholar]
- Marr, D.; Ullman, S.; Poggio, T. Bandpass channels, zero-crossings, and early visual information processing. J. Opt. Soc. Am. 1979, 69, 914–916. [Google Scholar] [CrossRef]
- Mallat, S.; Hwang, W.L. Singularity detection and processing with wavelets. IEEE Trans. Inf. Theory 1992, 38, 617–643. [Google Scholar] [CrossRef]
- Rossini, M. Interpolating functions with gradient discontinuities via Variably Scaled Kernels. Dolomites Res. Notes Approx. 2018, 11, 3–14. [Google Scholar]
- De Marchi, S.; Marchetti, F.; Perracchione, E.; Poggiali, D. Polynomial interpolation via mapped bases without resampling. J. Comput. Appl. Math. 2020, 364, 112347. [Google Scholar] [CrossRef]
- Gelb, A.; Tadmor, E. Detection of edges in spectral data. Appl. Comput. Harmon. Anal. 1999, 7, 101–135. [Google Scholar] [CrossRef]
- Gelb, A.; Tadmor, E. Detection of edges in spectral data II. Nonlinear enhancement. SIAM J. Numer. Anal. 2000, 38, 1389–1408. [Google Scholar] [CrossRef]
- Jiao, X.; Zha, H. Consistent computation of first- and second-order differential quantities for surface meshes. In Proceedings of the ACM Solid and Physical Modeling Symposium, Stony Brook, NY, USA, 2–4 June 2008; pp. 159–170. [Google Scholar]
- Buhmann, M.D. Radial Basis Functions: Theory and Implementations; Cambridge University Press: Cambridge, UK, 2003; Volume 12. [Google Scholar]
- Hu, C.; Shu, C.W. Weighted essentially non-oscillatory schemes on triangular meshes. J. Comput. Phys. 1999, 150, 97–127. [Google Scholar] [CrossRef]
- Shi, J.; Hu, C.; Shu, C.W. A technique of treating negative weights in WENO schemes. J. Comput. Phys. 2002, 175, 108–127. [Google Scholar] [CrossRef]
- Xu, Z.; Liu, Y.; Du, H.; Lin, G.; Shu, C.W. Point-wise hierarchical reconstruction for discontinuous Galerkin and finite volume methods for solving conservation laws. J. Comput. Phys. 2011, 230, 6843–6865. [Google Scholar] [CrossRef]
- Zhang, Y.T.; Shu, C.W. Third order WENO scheme on three dimensional tetrahedral meshes. Comm. Comput. Phys. 2009, 5, 836–848. [Google Scholar]
- Liu, Y.; Zhang, Y.T. A robust reconstruction for unstructured WENO schemes. J. Sci. Comput. 2013, 54, 603–621. [Google Scholar] [CrossRef]
- Jiao, X.; Wang, D. Reconstructing high-order surfaces for meshing. Engrg. Comput. 2012, 28, 361–373. [Google Scholar] [CrossRef]
- Ray, N.; Wang, D.; Jiao, X.; Glimm, J. High-Order Numerical Integration over Discrete Surfaces. SIAM J. Numer. Anal. 2012, 50, 3061–3083. [Google Scholar] [CrossRef]
- Buhmann, M. A new class of radial basis functions with compact support. Math. Comput. 2001, 70, 307–318. [Google Scholar] [CrossRef]
- Dyedov, V.; Ray, N.; Einstein, D.; Jiao, X.; Tautges, T. AHF: Array-Based Half-Facet Data Structure for Mixed-Dimensional and Non-manifold Meshes. In Proceedings of the 22nd International Meshing Roundtable, Orlando, FL, USA, 13–16 October 2013; Sarrate, J., Staten, M., Eds.; Springer International Publishing: Berlin/Heidelberg, Germany, 2014; pp. 445–464. [Google Scholar]
- Li, Y.; Jiao, X. Mesh used for Robust Discontinuity Indicators workflows. arXiv 2024, arXiv:2308.02235. [Google Scholar]
- Ju, L.; Ringler, T.; Gunzburger, M. Voronoi tessellations and their application to climate and global modeling. In Numerical Techniques for Global Atmospheric Models; Springer: Berlin/Heidelberg, Germany, 2011; pp. 313–342. [Google Scholar]
- Roe, P.L.; Baines, M.J. Algorithms for advection and shock problems. In Proceedings of the 4th Conference on Numerical Methods in Fluid Mechanics, Paris, France, 7–9 October 1981; pp. 281–290, Conference held in 1981, proceedings published in 1982. [Google Scholar]
- Gelb, A.; Tadmor, E. Adaptive edge detectors for piecewise smooth data based on the minmod limiter. J. Sci. Comput. 2006, 28, 279–306. [Google Scholar] [CrossRef]
- Shepp, L.A.; Logan, B.F. The Fourier reconstruction of a head section. IEEE Trans. Nucl. Sci. 1974, 21, 21–43. [Google Scholar] [CrossRef]
- Bradley, A.M.; Bosler, P.A.; Guba, O.; Taylor, M.A.; Barnett, G.A. Communication-efficient property preservation in tracer transport. SIAM J. Sci. Comput. 2019, 41, C161–C193. [Google Scholar] [CrossRef]
- Difonzo, F.V. Isochronous attainable manifolds for piecewise smooth dynamical systems. Qual. Theory Dyn. Syst. 2022, 21, 6. [Google Scholar] [CrossRef]
- Pi, D. Limit cycles for regularized piecewise smooth systems with a switching manifold of codimension two. Discret. Contin. Dyn. Syst. Ser. B 2019, 24, 881–905. [Google Scholar] [CrossRef]
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. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).