  In many applications, piecewise continuous functions are commonly
interpolated over meshes. However, accurate high-order manipulations of such
functions can be challenging due to potential spurious oscillations known as
the Gibbs phenomena. To address this challenge, we propose a novel approach,
Robust Discontinuity Indicators (RDI), which can efficiently and reliably
detect both C^{0} and C^{1} discontinuities for node-based and cell-averaged
values. We present a detailed analysis focusing on its derivation and the
dual-thresholding strategy. A key advantage of RDI is its ability to handle
potential inaccuracies associated with detecting discontinuities on non-uniform
meshes, thanks to its innovative discontinuity indicators. We also extend the
applicability of RDI to handle general surfaces with boundaries, features, and
ridge points, thereby enhancing its versatility and usefulness in various
scenarios. To demonstrate the robustness of RDI, we conduct a series of
experiments on non-uniform meshes and general surfaces, and compare its
performance with some alternative methods. By addressing the challenges posed
by the Gibbs phenomena and providing reliable detection of discontinuities, RDI
opens up possibilities for improved approximation and analysis of piecewise
continuous functions, such as in data remap.
