GP-Recipe: Gaussian Process approximation to linear operations in numerical methods Journal: Applied Numerical Mathematics Chris DeGrendele, Dongwook Lee Abstract We introduce new Gaussian Process (GP) high-order approximations to linear operations that are frequently used in various numerical methods. Our method employs the kernel-based GP regression modeling, a non-parametric Bayesian approach to regression that operates on the probability distribution over all admissible functions that fit observed data. We begin in the first part with discrete data approximations to various linear operators applied to smooth data using the most popular squared exponential kernel function. In the second part, we discuss data interpolation across discontinuities with sharp gradients, for which we introduce a new GP kernel that fits discontinuous data without oscillations. The current study extends our previous GP work on polynomial-free shock-capturing methods in finite difference and finite volume methods to a suite of linear operator approximations on smooth data. The formulations introduced in this paper can be readily adopted in daily practices in numerical methods, including numerical approximations of finite differences, quadrature rules, interpolations, and reconstructions, which are most frequently used in numerical modeling in modern science and engineering applications. In the test problems, we demonstrate that the GP approximated solutions feature improved solution accuracy compared to the conventional finite-difference counterparts. 1 Introduction Many physical phenomena in science and engineering applications pose numerical representations to function approximations that involve interpolations, derivatives, and integrals. Popular numerical methods for interpolation include polynomial interpolations, spline and Hermite interpolations, and rational function interpolations. For numerical derivatives, finite differences are perhaps the most popular method of all, while other alternatives are spectral methods, spline differentiation, and least square differentiation, to name a few. For integrals, there exist many quadrature rules to numerically evaluate the values of integrated functions. All of the methods mentioned can be broadly classified as parametric as they formulate function approximations by assuming a fixed functional form (e.g., polynomial vs. trigonometric functions) and configure relevant function parameters (e.g., polynomial coefficients, polynomial degrees). The primary aim of this paper is to present various types of function approximations based on the nonparametric Gaussian process (GP) modeling approach, where no assumption is made for a specific functional form but rather the function approximation is entirely determined by observed data. Since its first introduction in [ 1 ] , GP has been employed as a data-driven tool to study data-dominant problems in various applications. The scientific interests in GP regression brought broader attention in the subsequent work [ 2 ] by the same authors, where supervised machine learning using GP regression was presented. Prior supervised machine learning models were mostly parametric in nature, which lacked the ability to generalize to complex data sets and often faced data overfitting issues [ 3 ] . Neural networks are a subset of this class of approaches and thus inherited many of these problems. By contrast, GP is a nonparametric, kernel-based Bayesian approach to data regression making data-driven predictions. By being nonparametric, GP regression operates directly on defining a probability distribution over all admissible functions that fit the data instead of building around the probability distribution of parameters of any specific functional form. The GP data regression and predictions are formulated by specifying a prior (on a target function space, e.g., smooth vs. discontinuous, periodic, etc.) and calculating the associated updated posterior distribution inferred by the conditional distribution of an unobserved new data point given the observed data points. This gives the ability to compute the predictive posterior distribution on a set of new data points. The underlying principle in GP regression is to establish the relationship between input and output data points by correlating them and letting them determine the inferred data complexity in the sense of Bayesian inference [ 2 ] . Practitioners usually adopt one of two viewpoints to understand GPs: the Bayesian and function-space. Under the Bayesian viewpoint, estimations of function values are linear [ 4 ] in the constructed function space, referred to as the weight-space view that centers around probability distributions over linear weights of the sampled input data. The function-space view directly defines a distribution over functions, which ultimately arrives at the same results as with the weight-space approach [ 2 , 5 ] . The equivalence of the function-space and weight-space approaches is justified by realizing that defining a distribution of functions is identical to defining each set of distributions of weights, where a collection of sets of weights comprises a collection of functions. The function-space view is what we adopt by default in this paper. The interest in GP has grown over decades rapidly as a powerful tool for modeling correlated datasets in a wide range of application areas, including machine learning [ 2 ] , data science [ 6 , 7 ] , deep neural networks [ 8 , 9 ] , time-series modeling [ 10 , 11 , 12 , 13 ] , robotics and control systems [ 14 , 15 ] , computer vision [ 16 ] , medical applications [ 17 ] , financial modeling and price forecasting [ 18 , 19 ] , to name a few. Tutorial articles [ 5 , 20 ] have also been reported to provide the community with practical introductions of GP regression as a powerful tool for understanding agnostic function approximations. 1.1 Previous Studies of GP Regression in Shock-capturing Schemes Apart from the above applications, GP regression has been recently extended to a class of high-order methods in finite difference (FD) and finite volume (FV) formalisms. In [ 21 ] , GP’s updated posterior mean function was first introduced as a high-order method for a one-dimensional system of Euler’s equations. It demonstrated, as a proof-of-concept, that the new GP method can deliver a variable odd-order convergence rate from the 3rd to the 11th accuracy on a smooth Gaussian profile advection. This preliminary study also considered the GP method on the 1D Shu-Osher shock-tube problem [ 22 ] where the shock strength is mild. The GP shock-capturing strategy made a leap forward in the subsequent study reported in [ 23 ] . This work established a foundational ground where GP’s updated posterior mean function as a high-order reconstruction method was integrated into WENO’s shock-capturing framework [ 24 ] . The GP solution was tested against a suite of 1D shock-tube tests in hydrodynamics and magnetohydrodynamics. An extension to multiple spatial dimensions, dubbed GP-WENO, was first studied in the finite difference method (FDM) framework in [ 25 ] , featuring the variable odd-order accuracy on smooth flows and stable shock-capturing capability on discontinuous flows. The mathematical ideas of the GP-WENO method have been formulated into a more general kernel-based FV reconstruction method in the finite volume method (FVM) framework in [ 26 , 27 ] . Unlike the use of symmetric positive definite kernels in the previous GP studies [ 21 , 23 , 25 ] that explored the GP covariance kernel functions, the work in [ 26 , 27 ] utilized non-symmetric kernel functions (that are no longer GP covariance kernels) and achieved the numerical stability near shocks using the adaptive-order WENO approach [ 28 , 23 ] . This kernel-based FVM with WENO (or KFVM-WENO) is shown to be at least sixth-order accurate on the smooth nonlinear isentropic vortex problem [ 29 , 30 , 25 ] and robust on a selectively chosen set of benchmark problems, including a three-dimensional compressible isothermal turbulence problem and the Taylor-Green vortex problem. Interested readers are encouraged to consult more details on the setups and references in [ 27 ] . A new effort to restructure the shock-capturing paradigm has also been considered in GP. The majority of the modern shock-capturing algorithms take the so-called a priori approach, implying that the shock-detection mechanism is to be always engaged for non-oscillatory fluid data approximations. All of the aforementioned schemes in the previous paragraph belong to this class. On the other hand, an alternative method called a posteriori approach maintains non-oscillatory solutions near shocks by post-processing its solutions, where the solutions are cascaded to non-oscillatory, positivity-preserving lower-order solutions if unphysical oscillations are detected in shock regions. This order-cascading strategy is referred to as the MOOD (multidimensional optimal order detection) method and was originally proposed and studied in [ 31 , 32 , 33 , 34 , 35 ] for polynomial-based methods. In [ 36 , 37 ] , the high-order GP method was successfully integrated into the MOOD architecture (replacing the polynomial counterparts). It showed that the new GP-MOOD scheme gains significant computational efficiency by removing the need for expensive nonlinear shock-detecting switches (e.g., slope limiters, smoothness indicators) while delivering high-order solutions ranging the third, fifth, and seventh-order accuracy in two-dimensional finite volume simulations. Moreover, the GP scheme has been extended to a third-order accurate prolongation algorithm in the finite volume adaptive mesh refinement simulations [ 38 ] . 1.2 Extending GP’s Data Conversion Property to Interpolations and Linear Operators One aspect that allows GP regression great flexibility, particularly in high-order FV reconstruction in multiple spatial dimensions, is its ability to convert data to any specified type. As already investigated (at least partly) in the GP shock-capturing methods mentioned above, GP can convert different data types from one grid location to another in a simpler manner than in the existing approaches [ 39 , 40 ] . For example, a standard FV polynomial reconstruction scheme would require taking volume-averaged values at cell centers as input to reconstruct pointwise Riemann states as output at cell interface locations in 1D. In multiple dimensions, a quadrature-based integration scheme would need to be used to convert these pointwise estimates to a face integral flux value. A popular way to obtain high-order accurate Riemann states in conventional polynomial-based multidimensional reconstruction schemes is to add transverse corrections for each spatial direction dimension-by-dimension. An example in 3D would include three separate reconstructions, cascading from cell averages in 3D to face averages, face averages to line averages, and finally, line averages to pointwise values and vice versa [ 39 , 40 ] . Although this process is not particularly difficult, there are many steps that can be computationally compounded, and one may need to apply boundary conditions on intermediate quantities [ 27 ] , which results in added data communication in parallel computing. In GP, however, such data-type conversions can be achieved by applying the needed integral operations directly to the underlying pointwise GP covariance kernels, thanks to the fact that GP is invariant under linear operations [ 2 , 21 , 23 , 25 , 38 , 37 ] . This aspect is the centerpiece of the current study, where we apply GP approximation to a collection of linear operations, such as derivatives and integrations, which are frequently used in modern science and engineering applications. 2 Gaussian Process for Modeling Functions In this section, we give a concise outline of the GP regression theory from the function-space perspective to prepare basic building blocks that are useful for the rest of the paper. Interested readers are referred to our previous publications [ 23 , 25 , 37 ] for similar introductory discussions or to [ 2 , 5 ] for a broader theoretical background of GP. 2.1 GP Prior and Posterior Predictions A GP makes predictions of agnostic function value estimations by defining a probabilistic distribution over all admissible functions that can fit the given data. Constructing a collection of random variables is construed as defining a GP, where a finite number of which follow a joint multivariate Gaussian distribution. We say the function f is distributed as a GP and write: f(\mathbf{x})\sim\mathcal{GP}\left(m(\mathbf{x}),K(\mathbf{x},\mathbf{x}^{\prime})\right), (1) where \mathbf{x} and \mathbf{x}^{\prime} are two points (not necessarily distinct) in \mathbb{R}^{D} . That any agnostic function f(\mathbf{x}) is in GP according to Eq. 1 implies that the observation of the function evaluation of f at a new point \mathbf{x}_{*}\in\mathbb{R}^{D} (where the true value f(\mathbf{x}_{*}) has not been observed) follows a joint multivariate Gaussian distribution, allowing us to make a probabilistically meaningful estimation on f(\mathbf{x}_{*}) with a predicted uncertainty. In a more specific term, assume that we have observed the function values of f at a finite set of points \{\mathbf{x}:\mathbf{x}\in\mathbb{R}^{D}\} probabilistically (but no information is available for the function f itself) in terms of the prior GP distribution, where the GP prior is determined by the following two functions: • a mean function m(\mathbf{x})=\bar{f}(\mathbf{x})=\mathbb{E}[f(\mathbf{x})] , which is the expected function value of f at the input \mathbf{x}\in\mathbb{R}^{D} , and • a symmetric positive definite covariance GP kernel function K(\mathbf{x},\mathbf{x}^{\prime})=\mathbb{E}\left[\left(f(\mathbf{x})-\bar{f}(\mathbf{x})\right)\left(f(\mathbf{x}^{\prime})-\bar{f}(\mathbf{x}^{\prime})\right)\right] , which correlates the dependence between the function values at two input points (not necessarily distinct) \mathbf{x} and \mathbf{x}^{\prime} . Let us denote the input points by \mathbf{x}_{i}\in\mathbb{R}^{D},i=1,\dots n , and the D\times n martrix by \mathbf{X}=[\mathbf{x}_{1}|\dots|\mathbf{x}_{n}] whose columns are \mathbf{x}_{i} . We also denote the corresponding (observed or sampled) input data vector by \mathbf{f}=[f(\mathbf{x}_{1}),\dots,f(\mathbf{x}_{n})]^{T} and the resulting n\times n covariance matrix by [\mathbf{K}]_{ij}\equiv K(\mathbf{x}_{i},\mathbf{x}_{j}) . Given the observations \mathbf{f} on \mathbf{X} , suppose we want to make a probabilistic prediction on f_{*}=f(\mathbf{x}_{*}) at a new point \mathbf{x}_{*} . Then, GP regression furnishes a probabilistic prediction for the new \mathbf{x}_{*} by drawing f_{*} from the posterior distribution p(f_{*}|\mathbf{f},\mathbf{X},\mathbf{x}_{*}) . Using Bayes’ Theorem, the conditional property applied to the joint Gaussian prior distribution on \mathbf{f},\mathbf{X}, and \mathbf{x}_{*} yields the GP posterior distribution p(f_{*}|\mathbf{f},\mathbf{X},\mathbf{x}_{*}) [ 2 , 23 ] described by • a newly updated posterior mean function {\tilde{f}_{*}}\equiv\bar{f}(\mathbf{x}_{*})+\mathbf{k}_{*}^{T}\mathbf{K}^{-1}\cdot\left(\mathbf{f}-\bar{\mathbf{f}}\right) , and • a newly updated posterior covariance U^{2}\equiv k_{**}-\mathbf{k}_{*}^{T}\mathbf{K}^{-1}\cdot\mathbf{k}_{*} , where [\mathbf{k}_{*}]_{i}=K(\mathbf{x}_{*},\mathbf{x}_{i}) . Following our previous studies, we regard the updated posterior mean function to be GP’s high-order approximation to any agnostic function evaluations at any given point \mathbf{x}_{*} . Often, the prior mean function is set to zero, \bar{f}(\mathbf{x})=\bar{\mathbf{f}}=0 , to lessen the associated computational footprints, simplifying the expression of the posterior mean function further to {\tilde{f}_{*}}=\mathbf{z}_{*}^{T}\cdot\mathbf{f},\;\;\ \mbox{where}\;\;\mathbf{z}_{*}^{T}=\mathbf{k}_{*}^{T}\mathbf{K}^{-1}. (2) The grid- and kernel-dependent vector \mathbf{z}_{*}^{T}=\mathbf{k}_{*}^{T}\mathbf{K}^{-1} is called the prediction vector [ 23 , 25 ] , independent of the data \mathbf{f} , and hence can be calculated, stored, and reused as long as the grid (or the kernel) remains unchanged. If we further restrict ourselves to a ‘stationary’ kernel on a uniform grid (see more discussions on stationary kernels in Section 3.1 ), only one of these vectors, \mathbf{z}_{*}^{T} , needs to be stored for the entire grid. For any given data, \mathbf{f}\in\mathbb{R}^{D} (e.g., 2r_{gp}+1 density values \mathbf{f}=[\rho_{i-r_{gp}},\dots,\rho_{i},\dots,\rho_{i+r_{gp}}]^{T} on a one-dimensional stencil of size 2r_{gp}+1 with D=2r_{gp}+1 ), the cost of calculating Eq. 2 is simply \mathcal{O}(2D+1) floating point operations during the rest of a simulation. Here, the integer-valued r_{gp} is called a GP stencil radius, which is a key factor that determines the order of accuracy of GP solutions. The posterior covariance conveys an uncertainty in the prediction given by the posterior mean. As such, it can serve as an indicator of how confident the GP prediction is in GP modeling applications. However, it is of limited interest to the purpose of the current paper and its role will be overlooked. See also an extra discussion on the posterior covariance in A . 2.2 Extending GP’s Posterior Prediction to Linear Operations To further extend GP regression to broader applications, we first note that symmetric positive definite GP kernels are closed under additions, multiplications, vertical rescaling, convolutions, and linear operations [ 2 , 37 ] . The underlying GP prediction models, such as Eq. 2 , can be transformed into another by such operations while preserving the probabilistic GP predictions embedded in the underlying posterior distribution. For the purpose of this paper, we mainly focus on producing new kernels under various linear operators. Before proceeding further, let us first review the invariance property of GP under linear operators, denoted by \mathcal{L} , over the function space GP has generated. It can be shown that \mathcal{L}(f)\sim\mathcal{GP}\bigg(\mathcal{L}\Big(m(\mathbf{x})\Big),\mathcal{L}\Big(K(\mathbf{x},\mathbf{x}^{\prime})\Big)\bigg)\;\;\mbox{if}\;\;f\sim\mathcal{GP}\Big(m(\mathbf{x}),K(\mathbf{x},\mathbf{x}^{\prime})\Big), (3) where \mathcal{L}\Big(K(\mathbf{x},\mathbf{x}^{\prime})\Big)=\mathcal{L}_{\mathbf{x}}\Big(\mathcal{L}_{\mathbf{x}^{\prime}}\Big(K(\cdot,\mathbf{x}^{\prime})\Big)\Big)=\mathcal{L}_{\mathbf{x}^{\prime}}\Big(\mathcal{L}_{\mathbf{x}}\Big(K(\mathbf{x},\cdot)\Big)\Big), (4) depending on whether \mathcal{L} acts on either \mathbf{x} or \mathbf{x}^{\prime} , or both. The proof is straightforward and is in B . Using this linearly invariant property, we can generalize the basic GP prediction at \mathbf{x}_{*} in Eq. 2 to various other applications. A general prediction form can be put into the following form, p_{*}=\mathcal{L}_{2}\left(\mathbf{k}_{*}^{T}\right)\mathcal{L}_{1}\left(\mathbf{K}^{-1}\right)\cdot\mathbf{f}, (5) where \mathcal{L}_{1} and \mathcal{L}_{2} are individual linear operators. Simplifying, we can write p_{*}=\mathbf{t}_{*}^{T}\mathbf{C}^{-1}\cdot\mathbf{f}, (6) where \mathbf{C}=\mathcal{L}_{1}\Big(K(\mathbf{x},\mathbf{x}^{\prime})\Big) , \mathbf{t}_{*}=\mathcal{L}_{2}\left({K}(\mathbf{x}_{*},\mathbf{x}^{\prime})\right) , \mathcal{L}_{1} and \mathcal{L}_{2} are linear operators applied to their respective kernel matrices, and p_{*} is our prediction quantity at \mathbf{x}=\mathbf{x}_{*} . A trivial case is when both \mathcal{L}_{1} and \mathcal{L}_{2} are the point-evaluation functional, e.g., \mathcal{L}_{1}\Big(g(\mathbf{x})\Big)=\mathcal{L}_{2}\Big(g(\mathbf{x})\Big)=g(\mathbf{x}) for any function g , in which case we recover the basic form in Eq. 2 . A non-trivial example is readily found in our previous studies [ 23 , 37 ] , where GP’s posterior mean function has been extended to a high-order FV reconstruction method. In this case, the input \mathbf{f}=[\overline{q}_{1},\dots,\overline{q}_{N}]^{T} is a one-dimensional vector of length N flattened to contain cell volume-averaged quantities on each cell center at \mathbf{x}_{h} (e.g., \mathbf{x}_{h}=(x_{i_{h}},y_{j_{h}}) in 2D Cartesian), \overline{q}_{h}=\frac{1}{\Delta\mathcal{V}(\mathbf{x}_{h})}\int_{\mathcal{V}(\mathbf{x}_{h})}q(\mathbf{x})d\mathcal{V}(\mathbf{x}), (7) sampled from a local stencil in D=1,2,3 spatial dimensions. The output p_{*} is a pointwise high-order reconstructed Riemann state value. Here, {\Delta\mathcal{V}(\mathbf{x}_{h})} is the cell volume of the h th cell, {\mathcal{V}(\mathbf{x}_{h})} , e.g., {\mathcal{V}(\mathbf{x}_{h})}=I_{h}\times J_{h}=[x_{i_{h}-1/2},x_{i_{h}+1/2}]\times[y_{j_{h}-1/2},y_{j_{h}+1/2}] in a 2D Cartesian geometry. To account for the input-output relationship, the operator \mathcal{L}_{1} for K(\mathbf{x},\mathbf{x}^{\prime}) is chosen as a cell volume integral operator over \mathbf{x} and \mathbf{x}^{\prime} , \mathcal{L}_{1}(\cdot)=\frac{1}{\Delta\mathcal{V}(\mathbf{x}_{h})\Delta\mathcal{V}(\mathbf{x}^{\prime}_{k})}\int_{\mathcal{V}(\mathbf{x}_{h})}\int_{\mathcal{V}(\mathbf{x}^{\prime}_{k})}(\cdot)\;\;d\mathcal{V}(\mathbf{x})d\mathcal{V}(\mathbf{x}^{\prime}), (8) while \mathcal{L}_{2} for \mathbf{k}_{*}=K(\mathbf{x}_{*},\mathbf{x}^{\prime}) with a fixed \mathbf{x}=\mathbf{x}_{*} is a volume integral operator over \mathbf{x}^{\prime} only, \mathcal{L}_{2}(\cdot)=\frac{1}{\Delta\mathcal{V}(\mathbf{x}^{\prime}_{k})}\int_{\mathcal{V}(\mathbf{x}^{\prime}_{k})}(\cdot)\;\;d\mathcal{V}(\mathbf{x}^{\prime}). (9) Applying \mathcal{L}_{1} and \mathcal{L}_{2} to the corresponding kernels produces a GP reconstruction in FVM with the following integrated kernels, \mathbf{C} and \mathbf{t}_{*} , each of which corresponds to their respective basic kernel, \mathbf{K} and \mathbf{k}_{*} . In componentwise form, they are \displaystyle[\mathbf{C}]_{hk} \displaystyle=\frac{1}{\Delta\mathcal{V}(\mathbf{x}_{h})\Delta\mathcal{V}(\mathbf{x}^{\prime}_{k})}\int_{\mathcal{V}(\mathbf{x}_{h})}\int_{\mathcal{V}(\mathbf{x}^{\prime}_{k})}K(\mathbf{x},\mathbf{x}^{\prime})d\mathcal{V}(\mathbf{x})d\mathcal{V}(\mathbf{x}^{\prime}), (10) \displaystyle[\mathbf{t}_{*}]_{k} \displaystyle=\frac{1}{\Delta\mathcal{V}(\mathbf{x}^{\prime}_{k})}\int_{\mathcal{V}(\mathbf{x}^{\prime}_{k})}K(\mathbf{x}_{*},\mathbf{x}^{\prime})d\mathcal{V}(\mathbf{x}^{\prime}). (11) It is noteworthy to mention the input-output relationship here. The first operator \mathcal{L}_{1} establishes the covariance relationship of the input data at \mathbf{x} and \mathbf{y} , respecting a given data type (e.g., \mathbf{C} for volume-averaged and \mathbf{K} for pointwise values). The second operator \mathcal{L}_{2} then takes on the computed covariance and channels the correlations to a scalar output in a form we want to obtain (e.g., pointwise Riemann states). This is the main mechanism for how GP can flexibly achieve different types of linear operations on various data types, combine them, and compute an anticipated quantity at \mathbf{x}_{*} , where the location \mathbf{x}_{*} itself is arbitrary, to begin with. 3 Choosing a Kernel Function and GP Stencils In this section, we briefly discuss our options for choosing a GP kernel function and GP local stencil configurations. 3.1 Squared Exponential (SE) Kernel The kernel calculation of the GP modeling begins with choosing an appropriate GP kernel function, K . For our study, we select the squared exponential (SE) covariance kernel, K(\mathbf{x},\mathbf{x}^{\prime})=K_{\mathrm{SE}}(\mathbf{x},\mathbf{x}^{\prime})=\Sigma^{2}\exp\left[-\frac{\left\lVert\mathbf{x}-\mathbf{x}^{\prime}\right\rVert^{2}}{2\ell^{2}}\right]=\Sigma^{2}\exp\left[-\frac{r^{2}}{2\ell^{2}}\right], (12) which is one of the most widely used GP kernel functions [ 2 , 41 ] and has been investigated extensively and exclusively in our previous high-order GP studies [ 21 , 23 , 25 , 38 , 37 ] . We follow our previous approach to set \Sigma^{2}=1 for simplicity, which does not affect the posterior mean function. The second hyperparameter \ell determines the correlation length scale the GP model prefers. It controls how heavily weighted nearby points are compared to those that are further away in space. There is some flexibility in choosing \ell while an optimal choice is available by minimizing the negative log-likelihood function with respect to \ell [ 2 ] . In general, a larger \ell is preferable, but such a choice comes at the cost of making the K a stiffer matrix and harder to invert. Our choice of the SE kernel is supported by three prime attractive properties it affords. First, the Gaussian function delivers a C^{\infty} prior function space, which guarantees that its data fitting accuracy by those sampled admissible C^{\infty} functions is convergent linearly with its stencil size. The built-in regularity also provides the SE function with analytic forms of derivatives and integrations, which makes SE much more accessible to various applications. Second, if we assume a constancy of the two hyperparameters, \Sigma^{2} and \ell , the kernel becomes a function of the Euclidean distance between \mathbf{x} and \mathbf{x}^{\prime} only, hence making it a stationary kernel. It is also data-independent as described in Section 2.1 . These two points together greatly simplify the GP prediction in Eq. 2 to a simple dot product of \mathcal{O}(2D+1) since \mathbf{z}_{*}^{T} can be pre-computed in an initial step. Third, the SE kernel facilitates dimensional factorization, i.e., \exp\left[-\frac{r^{2}}{2\ell^{2}}\right]=\prod_{d}\exp\left[-\frac{r_{d}^{2}}{2\ell^{2}}\right], (13) where the radial distance between \mathbf{x} and \mathbf{x}^{\prime} is r^{2}=\Sigma_{d}r_{d}^{2} with r_{d} in each d dimension. This factorization property enables a seamless extension from 1D to a higher spatial dimension, making our GP prediction capability readily feasible in multidimensional cases. Unfortunately, these desirable properties of SE could be severely compromised when \mathbf{x}\to\mathbf{x}^{\prime} or \ell\to\infty , which results in a poorly conditioned kernel matrix \mathbf{K} . In practice, the latter case is less of an issue as we choose \ell a bounded value. Our typical choice for \ell is either a constant that represents a characteristic length scale of a given profile or a scale distance proportional to the grid scale set by \ell=M\Delta with \Delta=\min_{d}{\Delta_{d}} and 6\leq M\leq 12 . See more discussions on \ell in [ 23 , 25 , 38 , 37 ] . The former case with \mathbf{x}\to\mathbf{x}^{\prime} causes the singularity issue more frequently as this scenario occurs as one resolves the grid scales, \Delta\to 0 . We have documented several different approaches that address the issue, most recently in [ 37 ] as well as in [ 23 , 25 , 38 ] . The simplest (and easiest) approach is adopted in the current study, which utilizes quadruple precision in compiling only a couple of routines that are relevant to calculate \mathbf{z}_{*}^{T} once and for all. Unlike the usual doubt, the added computational cost of handling quadruple-precision is a bare minimum and does not impact the overall performance of GP at all. Interested readers are encouraged to refer to the relevant discussions in our work [ 23 , 25 , 37 ] . It is worth noting the different types of GP kernels, particularly those that are non-smooth. Although SE performs well on smooth datasets, its posterior prediction is prone to underperform with oscillations when datasets contain discontinuities that are common in shock-dominant fluid dynamics simulations. There are better-suited non-smooth kernels such as the Matérn class, Wendland, rational quadratic functions, a neural network covariance kernel function, etc. [ 2 , 42 , 43 ] for discontinuous datasets. On smooth data, though, these kernels exhibit limited usability because their solution accuracy, modeled by the latent functions with finite-order differentiability, is reduced and lower than that of SE, independent of the input data size \mathbf{f} . This is in contrast to the fact that the accuracy of SE increases linearly (or decreases) with increasing (or decreasing) size of the input data, which can be readily controlled by the GP stencil configuration. Later in Section 7 , we introduce a new discontinuous kernel that is superior in fitting discontinuous data without oscillation while it converges at second-order on smooth data. We discuss GP stencils in the next section. 3.2 1D GP Stencils We take a vector of size (2r_{gp}+1) for our 1D GP stencils, containing contiguous cells from x_{i-r_{gp}} to x_{i+r_{gp}} centered at x_{i} . With this stencil configuration, a native point-to-point GP interpolation that takes an input \mathbf{f}=[q_{i-r_{gp}},\ldots,q_{i+r_{gp}}]^{T} for a function q with q_{j}=q(x_{j}) to produce a function interpolation q(x_{*})=q_{*} with x_{*}\in[x_{i-r_{gp}},x_{i+r_{gp}}] becomes a (2r_{gp}+1) -th accurate interpolation scheme following the stencil size linearly [ 23 , 25 , 37 ] . Our default choice of x_{*} in 1D is x_{i\pm 1/2} , the i -th cell interface locations, where various numerical methods (e.g., finite difference, finite volume, discontinuous Galerkin, etc.) calculate high-order numerical quantities such as Riemann states and numerical fluxes. Figure 1 : 1D GP stencil. The red “*” marks indicate the i -th cell interface locations we choose for x_{*} in 1D. The accuracy of the native GP point interpolations at x_{*} is (2r_{gp}+1) , showing (a) the 3rd-order stencil, (b) the 5th-order stencil, and (c) the 7th-order stencil, where r_{gp} denotes the respective integer-valued GP stencil radius from the cell center x_{i} . A higher-order GP stencil can be easily configured with r_{gp}>3 . 3.3 2D GP Stencils It is quite flexible to extend 1D GP stencils to a higher spatial dimension. This is yet another feature that makes GP regression genuinely multidimensional and advantageous in handling multidimensional stencil data over the existing polynomial counterparts. For instance, in Fig. 2 , we display four different GP stencil configurations in 2D with r_{gp}=2 centered at \mathbf{x}_{m}=(x_{i_{m}},y_{j_{m}}) , including (a) the cross stencil, (b) the diamond stencil, (c) the blocky-diamond stencil, and (d) the square stencil. Figure 2 : 2D GP stencils of r_{gp}=2 . The central cell \mathbf{x}_{m}=(x_{i_{m}},y_{j_{m}}) is the cell where GP predictions are computed at the surrounding interface locations, (x_{i_{m}\pm 1/2},y_{j_{m}}) or (x_{i_{m}},y_{j_{m}\pm 1/2}) , or corner locations, (x_{i_{m}\pm 1/2},y_{j_{m}\pm 1/2}) . To decide on an optimal 2D stencil, we examine the so-called effective order of convergence (or EOC) rates for various GP prediction operations on each configuration (more details to follow in Section 4 ) and choose the most compact stencil configuration that meets the expectedlinear convergence rate, e.g., (2r_{gp}+1) for the baseline point-to-point interpolation. See more applications in Section 4 . On the cross stencil in (a), EOC falls short of delivering the anticipated convergence rate on calculations involving any off-axis information simply because it includes the axis-aligned cells only. The diamond stencil in (b) adds four extra corner cells to the cross configuration in (a), and as a result, it demonstrates a more improved accuracy than (a) when multidimensional calculations are considered in particular. It was indeed chosen as the default configuration for all 2D FV simulations in [ 37 ] . Yet, we found it delivers a reduced convergence rate in some applications considered in the current study, and we opted it out as a default choice. The two configurations in (c) and (d) successfully meet the anticipated convergence rates on various applications. While their performances on convergence rates are equivalent, the “blocky diamond” configuration (c) has a smaller stencil size than the full square stencil in (d). This makes us choose the blocky diamond shape in (c) for our default GP stencil configuration. We also remark that 3D stencil configurations can be decided in a similar way, although we mainly focus on 2D calculations in the current study. 4 Stencil Selection and Convergence Analysis It remains to discuss how to examine GP convergence rates on each configuration to select an optimal GP stencil for each r_{gp} . Selecting an appropriate stencil is crucial in our GP methods as it directly influences the accuracy, efficiency, and stability of predictions. One conventional approach would be to perform grid convergence studies on a set of grid resolutions for each grid configuration and select one that is optimal in the sense we described in Section 3.3 . This strategy is absolutely necessary to validate the model’s accuracy in general, particularly when the model’s convergence rate is theoretically deduced and can be determined by design as in various polynomial approximations that are based on Taylor series expansions. However, as a kernel-based non-polynomial method, GP lacks such theoretical design principles, which leaves us to run numerous grid convergence tests to choose an optimal stencil configuration, making a stencil selection itself a computationally daunting task. To ameliorate the lack of such theoretical tools for GP, we developed a systematic approach to illustrate (and predict) GP’s effective convergence rates without executing expansive convergence tests. We introduce this methodology in this section. A key question we address is how to determine the optimal stencil and predict its effective rate of convergence. The objective is to identify a stencil that achieves the highest accuracy while minimizing computational cost. To answer this question, we analyze the effective accuracy of different stencils based on the structure of the kernel weights and their interaction with the surrounding grid data points. In conventional numerical methods, the order of accuracy is typically determined by a Taylor series expansion of the approximation. However, unlike conventional methods explicitly designed to cancel lower-order error terms, GP methods approximate function values at \mathbf{x}_{*} through kernel-weighted interpolation. This results in an effective order of accuracy, which may differ from the expected or anticipated order of accuracy due to the leading error term in conventional polynomial-based finite difference approximations. 4.1 Taylor Expansion in GP Predictions to Analyze GP’s Effective Rate of Convergence To systematically analyze GP’s effective order of accuracy, we leverage a Taylor series expansion approach in GP-produced approximations. This method is inspired by classical error analysis in finite difference methods [ 44 ] and extends the framework proposed in [ 45 ] to non-standard numerical methods, such as GP-based schemes, where perfect error term cancellation is not guaranteed. First, we note that GP predictions involve kernel-weighted interpolation. This means that once the kernel calculations have been computed, the prediction simplifies to a weighted sum of the data, f_{\text{GP}}(x_{*})=\sum_{i}w_{i}f(x_{i}), (14) where the weight vector \mathbf{w} with components w_{i} is given by the prediction vector as defined in Eq. 2 or more generally in Eq. 6 , \mathbf{w}=\mathbf{t}_{*}^{T}\mathbf{C}^{-1}. (15) For 1D GP predictions on the GP stencil of size (2r_{gp}+1) , we Taylor expand each f(x_{i}) at the point x=x_{*} to recast Eq. 14 into a Taylor-expanded GP prediction, f_{\text{GP}}(x_{*})=\sum_{i=1}^{2r_{gp}+1}w_{i}\left(\sum_{\alpha=0}^{k}\frac{f^{(\alpha)}(x_{*})}{\alpha!}(x_{i}-x_{*})^{\alpha}\right)+\mathcal{O}(h^{\alpha+1}), (16) where h=x_{i}-x_{*} . This formulation explicitly reveals how the kernel weights influence the coefficients of the Taylor expansion terms and, ultimately, determine the accuracy of the prediction. This strategy is readily extended to GP predictions in 2D and 3D by using the Taylor expansion for a function f:\mathbb{R}^{d}\to\mathbb{R} , d=2 or 3 , f(\mathbf{x}_{i})=\sum_{|\boldsymbol{\alpha}|=0}^{k}\frac{\partial^{|\boldsymbol{\alpha}|}f(\mathbf{x}_{*})}{\partial\mathbf{x}^{\boldsymbol{\alpha}}}\frac{\mathbf{h}^{\boldsymbol{\alpha}}}{\boldsymbol{\alpha}!}+\mathcal{O}(\mathbf{\mathbf{h}}^{\tilde{\boldsymbol{\alpha}}})=\sum_{|\boldsymbol{\alpha}|=0}^{k}\frac{\partial^{|\boldsymbol{\alpha}|}f(\mathbf{x}_{*})}{\partial x_{1}^{\alpha_{1}}\cdots\partial x_{n}^{\alpha_{n}}}\frac{h_{1}^{\alpha_{1}}\cdots h_{n}^{\alpha_{n}}}{\boldsymbol{\alpha}!}+\mathcal{O}(\mathbf{\mathbf{h}}^{\tilde{\boldsymbol{\alpha}}}), (17) where \mathbf{h}=\mathbf{x}_{i}-\mathbf{x}_{*} . Following the standard convention, \boldsymbol{\alpha}=(\alpha_{1},\dots,\alpha_{d})\in\mathbb{N}^{d}_{0} is an d -tuple multi-index with |\boldsymbol{\alpha}|=\sum_{i=1}^{d}\alpha_{i} , where |\tilde{\boldsymbol{\alpha}}|=\sum_{i=1}^{d}\alpha_{i}=k+1 . 4.2 Effective Order of Convergence (EOC) In traditional numerical methods, the formal order of accuracy is determined by the highest nonzero term in the Taylor series. However, in GP-based methods, lower-order terms may persist with small but nonzero coefficients, affecting the actual observed accuracy. To quantify the overall contribution of different terms, we introduce the effective order of convergence (EOC) defined as, {\text{EOC}}=\frac{\sum_{h=1}^{k}h|c_{h}|}{\sum_{h=1}^{k}|c_{h}|}, (18) where k is the number of the terms in the Taylor expansion, c_{h}=\frac{\partial^{|\boldsymbol{\alpha}|}f(\mathbf{x}_{*})}{\partial\mathbf{x}^{\boldsymbol{\alpha}}}\frac{1}{\boldsymbol{\alpha}!} with |\boldsymbol{\alpha}|=h are the coefficients of the expansion terms, and EOC represents the effective observed order of accuracy. This metric provides a holistic view of GP accuracy, accounting for all error contributions rather than only the dominant term. We set k=12 for the current study. 4.3 Selecting the Optimal GP Stencil based on EOC Using the effective order of convergence in Eq. 18 , we now examine the numerical convergence order of different 2D stencils to determine which configuration provides the most effective accuracy. This selection process is unnecessary for 1D GP stencils as their configuration is uniquely determined by the GP radius r_{gp} , and 1D GP predictions follow linear convergence rates as expected. To demonstrate, we computed EOCs on four different GP stencil configurations, (a) – (d) in Fig. 2 , for six different GP operations (see Table 1 ) where input vector \mathbf{f} contains cell-centered pointwise values [\mathbf{f}]_{i}=f_{i} sampled from each GP stencil. We display the respective results in Table 1 . Also shown as reference in the third column of Table 1 are the so-called ‘anticipated target orders of accuracy’ we would normally expect in, e.g., 1D conventional finite difference approximations, assuming that the baseline interpolation \mathbf{f}\to f(\mathbf{x}_{*}) follows the (2r_{gp}+1) th convergence rate to begin with. In this sense, we expect that the anticipated order of accuracy should decrease by one from the baseline (2r_{gp}+1) rate as each differential approximation is added to the approximating operation. In all test cases, we set the GP radius by r_{gp}=2 , and the baseline interpolation is expected to be fifth-order accurate. Approximations to partial derivatives are considered at three different locations of \mathbf{x}_{*} , including the central cell location (x_{i_{m}},y_{j_{m}}) , the x interface location (x_{{i_{m}}\pm 1/2},y_{j_{m}}) , and the cell corner location (x_{{i_{m}}\pm 1/2},y_{{j_{m}}\pm 1/2}) . We omit the y interface calculations since they are symmetric calculations of the x interface results, so we don’t repeat them. Table 1 : Anticipated target orders (third column) and GP’s effective order of convergence (EOC in Eq. 18 ) for one data interpolation and five different derivative approximations at \mathbf{x}_{*} (fourth – sixth columns) on four different GP stencils with r_{gp}=2 . Input data are the data vector \mathbf{f} whose components f_{i} are cell-centered pointwise values sampled from each stencil. EOCs are calculated at (i) the central cell (x_{i_{m}},y_{j_{m}}) in the fourth column, (ii) the x interfaces (x_{{i_{m}}\pm 1/2},y_{j_{m}}) of the central cell in the fifth column, and (iii) the cell corners (x_{{i_{m}}\pm 1/2},y_{{j_{m}}\pm 1/2}) of the central cell in the sixth column. GP stencil Operation Anticipated Order \text{EOC at }\mathbf{x}_{*}=(x_{i_{m}},y_{j_{m}}) \text{EOC at }\mathbf{x}_{*}=(x_{{i_{m}}\pm 1/2},y_{j_{m}}) \text{EOC at }\mathbf{x}_{*}=(x_{{i_{m}}\pm 1/2},y_{{j_{m}}\pm 1/2}) \mathbf{f}\to f(\mathbf{x}_{*}) 5 Exact 5.2174 3.0330 \mathbf{f}\to\partial_{x}f(\mathbf{x}_{*}) 4 3.8093 3.6448 1.3237 Cross \mathbf{f}\to\partial_{y}f(\mathbf{x}_{*}) 4 3.8093 1.6109 1.3237 ( Fig. 2 (a)) \mathbf{f}\to\partial_{xx}f(\mathbf{x}_{*}) 3 3.5950 3.2457 2.1973 \mathbf{f}\to\partial_{xy}f(\mathbf{x}_{*}) 3 0.0000 1.9361 1.3040 \mathbf{f}\to\partial_{yy}f(\mathbf{x}_{*}) 3 3.5950 1.3944 2.1973 \mathbf{f}\to f(\mathbf{x}_{*}) 5 Exact 5.2174 5.1315 \mathbf{f}\to\partial_{x}f(\mathbf{x}_{*}) 4 3.8093 3.6448 3.4121 Diamond \mathbf{f}\to\partial_{y}f(\mathbf{x}_{*}) 4 3.8093 3.6555 3.4121 ( Fig. 2 (b)) \mathbf{f}\to\partial_{xx}f(\mathbf{x}_{*}) 3 3.5950 3.2457 3.2984 \mathbf{f}\to\partial_{xy}f(\mathbf{x}_{*}) 3 2.2689 2.1356 2.0204 \mathbf{f}\to\partial_{yy}f(\mathbf{x}_{*}) 3 3.5950 3.4222 3.2984 \mathbf{f}\to f(\mathbf{x}_{*}) 5 Exact 5.2171 5.7126 \mathbf{f}\to\partial_{x}f(\mathbf{x}_{*}) 4 3.8093 3.6448 5.0371 Blocky Diamond \mathbf{f}\to\partial_{y}f(\mathbf{x}_{*}) 4 3.8093 4.7600 5.0371 ( Fig. 2 (c)) \mathbf{f}\to\partial_{xx}f(\mathbf{x}_{*}) 3 3.5950 3.2457 4.0972 \mathbf{f}\to\partial_{xy}f(\mathbf{x}_{*}) 3 4.0719 3.8882 3.7237 \mathbf{f}\to\partial_{yy}f(\mathbf{x}_{*}) 3 3.5950 4.8469 4.0972 \mathbf{f}\to f(\mathbf{x}_{*}) 5 Exact 4.9229 4.9844 \mathbf{f}\to\partial_{x}f(\mathbf{x}_{*}) 4 3.8121 3.7314 4.9225 Square \mathbf{f}\to\partial_{y}f(\mathbf{x}_{*}) 4 3.8090 4.3776 4.9481 ( Fig. 2 (d)) \mathbf{f}\to\partial_{xx}f(\mathbf{x}_{*}) 3 3.6626 3.2551 3.5499 \mathbf{f}\to\partial_{xy}f(\mathbf{x}_{*}) 3 3.9009 3.8126 3.7697 \mathbf{f}\to\partial_{yy}f(\mathbf{x}_{*}) 3 3.6375 4.6015 3.5523 We aim to choose an optimal stencil configuration that can deliver its EOCs as much as close to the anticipated order of convergence. First, we see that the EOCs on the cross stencil achieve the fifth-order accuracy for the baseline point-to-point interpolation case at the x interface. However, the stencil delivers only the third-order convergence at the corner location. This is expected since the stencil lacks points along the diagonal direction, which carries important information in diagonally-oriented calculations. A similar deficiency is also found in the cross derivative calculation \partial_{xy}f(\mathbf{x}_{*}) that only achieves an EOC \sim 1.3 , lower than the other grid-aligned counterparts, \partial_{xx} or \partial_{yy} . Nevertheless, EOCs fall short of the anticipated orders on the remaining first and second derivative test cases at the cell corners, which makes us conclude that the most compact stencil is suboptimal and inappropriate. Second, the results on the diamond stencil prove to be better than those on the cross case in derivative tests, although they fail to show the anticipated fourth- and third-order rates in some cases, especially on the cross derivative case. Comparing this EOC \sim 2.02 with the cross stencil EOC \sim 1.3 , adding the extra four corner cells to the cross configuration generally helps improve the diagonal calculation, except that it is insufficient enough to meet the third-order anticipated accuracy. In comparison, the EOCs on the blocky diamond and square stencils are shown to produce orders that match the anticipated orders. In fact, we see that the EOCs are higher than the anticipated accuracy in most cases, convincing the validity of the stencil configurations. From this analysis, we select the blocky diamond as our default configuration since it delivers qualitatively equivalent results to the ones on the square stencil while being a bit more compact. There are a couple of notes we want to discuss. First, on all stencils, the baseline interpolation \mathbf{f}\to f(\mathbf{x}_{*}) at the central cell (x_{i_{m}},y_{j_{m}}) is exact due to the property of GP to exactly recover data given to its prior distribution. Second, it is worth pointing out one outlier case \mathbf{f}\to\partial_{xy}f(\mathbf{x}_{*}) on the cross stencil, which returns a convergence of exactly 0 due to the perfect cancellations in the leading term. This can be seen in Eq. 30 that (-2x+2x^{\prime}) will always be 0 in the vertical strip of the cross stencil and (-2y+2y^{\prime}) will always be zero in the horizontal strip, leading to effectively zero contributions from all points on the stencil. Lastly, we make observations on the convergence of the derivative terms, which is shown to behave differently from the anticipated order. As discussed, we normally expect a drop in order of accuracy for each derivative taken, so we would naively look for at least fourth-order convergence for \mathbf{f}\to\partial_{x}f(\mathbf{x}_{*}) and \mathbf{f}\to\partial_{y}f(\mathbf{x}_{*}) . For example, the x interface calculations of the x derivative are equivalent between the diamond and blocky diamond stencils with EOCs \sim 3.6448 , close to the anticipated fourth-order convergence. Although a similar rate is observed in the y derivative EOC on the diamond stencil ( \sim 3.6555 ), it is interesting to see a higher EOC \sim 4.76 is achieved on the blocky diamond for the same problem. Similar higher orders are also found on the blocky diamond on the other second derivative tests involving the y derivative as well. The y direction improvements on the blocky stencil can be seen by looking at the number of cells along the y direction, above and below the x interface location x_{i\pm 1/2} . The diamond stencil has three points, while the blocky diamond has five. This added directional contribution to the blocky configuration results in an EOC that is indeed higher than the anticipated fourth order. This reasoning explains the identical EOCs at the corner location (x_{{i_{m}}\pm 1/2},y_{{j_{m}}\pm 1/2}) on the blocky stencil, e.g., EOCs \sim 5.0371 between \mathbf{f}\to\partial_{x}f(\mathbf{x}_{*}) and \mathbf{f}\to\partial_{y}f(\mathbf{x}_{*}) and the EOCs \sim 4.0972 between \mathbf{f}\to\partial_{xx}f(\mathbf{x}_{*}) and \mathbf{f}\to\partial_{yy}f(\mathbf{x}_{*}) as the participating cell counts are consistently symmetric in x and y directions. The results of the blocky diamond and the square stencils are quite similar, and they both perform well in meeting the anticipated orders. It may seem a bit strange why some of the EOCs on the square stencil are lower than those on the blocky stencil. We suspect that this counter-intuitive behavior could be related to an overfitting issue, where addition of data points beyond what is necessary may overfit the data and degrade GP predictions. We now draw our conclusion. Our Taylor series-based analysis for GP provides powerful insights into tuning GP’s prediction capabilities for a set of linear operators on different stencil configurations. We used this approach to identify an optimal GP stencil configuration across a selected set of GP operations in this section. We emphasize that the results here will be redone and cross-checked on actual grid convergence tests to validate the grid-based GP performance on a broad range of linear operators on our optimal GP stencil. The EOC comparison study illustrates that the blocky diamond in Fig. 2 (c) performs well across different types of derivative approximations, which makes us select it as our optimal (and default) stencil choice in 2D. 5 List of Applications In the rest of the paper, we present numerical results to validate the findings in the previous section further. We begin by providing a list of selected applications based on their popularity in modeling numerical differential equations. Most frequent operations include derivatives and integrals applied to pointwise and volume-averaged data types. We limit our interests to 1D and 2D applications only, although extensions to 3D applications are straightforward. Table 2 : A list of GP-recipe applications, including the baseline point-evaluation operator denoted by PE, e.g., \mathcal{L}(g(\mathbf{x}))=g(\mathbf{x}) for a function g . The input is a N -vector \mathbf{g} whose h th component [\mathbf{g}]_{h}=g(\mathbf{x}_{h}) is shown in the first column. The output in the second column is a scalar function value evaluated at \mathbf{x}=\mathbf{x}_{*} . Following Eq. 5 , \mathcal{L}_{1} is applied to K(\mathbf{x},\mathbf{x}^{\prime}) and \mathcal{L}_{2} is applied to K(\mathbf{x}_{*},\mathbf{x}^{\prime}) , acting on either \mathbf{x} or \mathbf{x}^{\prime} , or both. For simplicity, we assume that all calculations are performed using Cartesian geometry. In the first and second columns, we also show three abbreviations, “pt”, “va”, and “der”, representing pointwise, volume-averaged, and derivative data types in each input and output pair. The notation I_{h} is reserved to denote a 1D cell [x_{h-1/2},x_{h+1/2}] centered at x_{h} , and similarly for J_{k} centered at y_{k} , as well as for I_{*} centered at x_{*} and for J_{*} centered at y_{*} . 1D Input 1D Output x,x^{\prime}\in\mathbb{R} Section \mathcal{L}_{1}(K(x,x^{\prime})) \mathcal{L}_{2}(K(x_{*},x^{\prime})) f(x_{h}) (pt) f(x_{*}) (pt) PE PE Section 6.1.1 f(x_{h}) (pt) f^{(m)}(x_{*}) (der) PE \frac{d^{m}}{dx^{m}}(\cdot) Section 6.1.3 f(x_{h}) (pt) \frac{1}{\Delta x}\int_{I_{*}}f(x)dx (va) PE \frac{1}{\Delta x}\int(\cdot)\;dx Section 6.1.5 \frac{1}{\Delta x}\int_{I_{h}}f(x)dx (va) f(x_{*}) (pt) \frac{1}{\Delta x\Delta x^{\prime}}\int\int(\cdot)\;dxdx^{\prime} \frac{1}{\Delta x^{\prime}}\int(\cdot)\;dx^{\prime} Section 6.1.7 2D Input 2D Output \mathbf{x}=(x,y),\mathbf{x}^{\prime}=(x^{\prime},y^{\prime})\in\mathbb{R}^{2} Section \mathcal{L}_{1}(K(\mathbf{x},\mathbf{x}^{\prime})) \mathcal{L}_{2}(K(\mathbf{x}_{*},\mathbf{x}^{\prime})) f(x_{h},y_{k}) (pt) f(x_{*},y_{*}) (pt) PE PE Section 6.1.2 f(x_{h},y_{k}) (pt) \partial_{y}^{n}\partial_{x}^{m}f(x_{*},y_{*}) (der) PE \partial_{y}^{n}\partial_{x}^{m}(\cdot) Section 6.1.4 f(x_{h},y_{k}) (pt) \frac{1}{\Delta x\Delta y}\int_{I_{*}}\int_{J_{*}}f(x,y)dxdy (va) PE \frac{1}{\Delta\mathbf{x}}\int(\cdot)\;d\mathbf{x} Section 6.1.6 \frac{1}{\Delta x\Delta y}\int_{I_{h}}\int_{J_{k}}f(x,y)dxdy (va) f(x_{*},y_{*}) (pt) \frac{1}{\Delta\mathbf{x}\Delta\mathbf{x}^{\prime}}\int\int(\cdot)\;d\mathbf{x}d\mathbf{x}^{\prime} \frac{1}{\Delta\mathbf{x}^{\prime}}\int(\cdot)\;d\mathbf{x}^{\prime} Section 6.1.8 \frac{1}{\Delta x\Delta y}\int_{I_{h}}\int_{J_{k}}f(x,y)dxdy (va) \partial_{y}^{n}\partial_{x}^{m}f(x_{*},y_{*}) (der) \frac{1}{\Delta\mathbf{x}\Delta\mathbf{x}^{\prime}}\int\int(\cdot)\;d\mathbf{x}d\mathbf{x}^{\prime} \partial_{y}^{n}\partial_{x}^{m}\left(\frac{1}{\Delta\mathbf{x}^{\prime}}\int(\cdot)\;d\mathbf{x}^{\prime}\right) Section 6.1.9 Table 2 summarizes a set of linear operations that are particularly of interest in discretizing partial differential equations. The input \mathbf{g} is a 1D vector of length N that contains all participating grid data values from a local GP stencil (see Figs. 1 and 2 ), which are concatenated (or flattened) into a 1D vector form if the data values are collected from a multi-dimensional stencil. As discussed in the previous section, our default GP stencil in 2D is the blocky diamond shape in Fig. 2 (c). Common types of input data values appearing in numerical modeling are shown in the first column, showing only a single component. Target outputs are displayed in the second column, which are scalar values that represent linearly transformed function evaluations at the point of interest, \mathbf{x}=\mathbf{x}_{*} . For exposition purposes, we consistently choose the variable \mathbf{x} (over \mathbf{x}^{\prime} ) to assign the evaluation point, \mathbf{x}=\mathbf{x}_{*} , although the roles of \mathbf{x} and \mathbf{x}^{\prime} are interchangeable in general. The \mathcal{L}_{1} operation transforms the kernel function K linearly to construct the covariance kernel matrix \mathbf{K} , embedding the two-point correlations between the input data values at \mathbf{x}=\mathbf{x}_{h} and \mathbf{x}^{\prime}=\mathbf{x}_{k} into [\mathbf{K}]_{hk} in the data type prescribed in the first column. Such correlations are then channeled into the output via \mathcal{L}_{2} by translating the correlated input data information into the target output at \mathbf{x}_{*} in various data types. The operations of the \mathcal{L}_{2} columns in the 1D and 2D boxes are to be finalized by plugging \mathbf{x}=\mathbf{x}_{*} to obtain the outputs in the second column. Interested readers are encouraged to consult the visual representation of the kernels in Fig. 2 of [ 5 ] . 6 Kernels for Smooth Function Approximations and Numerical Results We present GP performance results on 1D and 2D grids for smoothly varying differentiable function approximations. For all smooth function test cases in this section, we use the SE kernel on the blocky diamond GP stencils of three GP radii, r_{gp}=1,2, and 3. Later in Section 7 , we introduce a new GP kernel called the DAS (Discontinuous ArcSin) kernel to approximate discontinuous functions, which will be compared with the SE kernel and an existing neural network kernel to demonstrate its exceptional oscillation-control property at discontinuities. 6.1 Constrained Kernels To conduct the tasks in Table 2 , we first present the constrained kernels associated with different linear operators. These kernels are derived by applying linear operators \mathcal{L}_{1} to K(\mathbf{x},\mathbf{x}^{\prime}) and \mathcal{L}_{2} to K(\mathbf{x}_{*},\mathbf{x}^{\prime}) as described in the caption of Table 2 . Nothing needs to be done to the SE kernel for the baseline point-evaluation operator PE, which is in Eq. 12 , and we do not repeat it here. In all cases, the input vector [\mathbf{g}]_{h}=g(\mathbf{x}_{h})=\mathcal{L}_{1}(f(\mathbf{x}_{h})) takes a linear operator \mathcal{L}_{1} of the pointwise function values, [\mathbf{f}]_{h}=f(\mathbf{x}_{h}) , sampled from the cell centers of the blocky square. For example, in the volume average to point conversion, \mathbf{g} would represent the volume-averaged data which is supplied as an input to the calculation. The general form of the GP prediction with linear constraints is introduced in Eq. 5 , and is shown here again: p_{*}=\mathbf{z}^{T}_{*}\cdot\mathbf{g}=\mathbf{t}_{*}^{T}\mathbf{C}^{-1}\cdot\mathbf{g}=\Bigg(\mathcal{L}_{2}\Big(K(\mathbf{x}_{*},\mathbf{x}^{\prime})\Big)\Bigg)^{T}\Bigg(\mathcal{L}_{1}\Big(K(\mathbf{x},\mathbf{x}^{\prime})\Big)\Bigg)^{-1}\cdot\mathbf{g}. (19) 6.1.1 Kernels for pointwise function values to a pointwise interpolation in 1D The basic SE kernel K_{\text{SE}} in Eq. 12 is all we need to calculate the baseline pointwise-to-pointwise function interpolation that takes an input data \mathbf{f} to predict f(\mathbf{x}_{*}) , where both \mathcal{L}_{1} and \mathcal{L}_{2} are the point-evaluation operator PE. In this case, the GP prediction at \mathbf{x}_{*} is simply the updated posterior mean in Eq. 2 using the SE kernel matrix, \mathbf{K}=\mathbf{K}_{\text{SE}} , i.e., f(\mathbf{x}_{*})=\mathbf{z}_{*}^{T}\cdot\mathbf{f},\quad\text{where}\;\;\mathbf{z}^{T}_{*}=\mathbf{k}_{*}^{T}\mathbf{K}^{-1}. (20) As an example, we present a grid convergence study to approximate the function f(x)=e^{-x}\sin(4\pi x)\cos(2\pi x) on [0,1] discretized at x=x_{i} on five grid resolutions, N_{x}=16,32,64,128,256 in Table 3 . GP takes the cell-centered function values f(x_{i}) as input on three GP stencils of size r_{gp}=1,2,3 to make function value predictions at x=x_{i+1/2} . In all experimental grid convergence tests hereafter, we display the standard experimental order of convergence (EOC) rates defined by * * * Note that this EOC is different from the effective order of convergence we used for the Taylor series analysis in Eq. 18 . \mbox{EOC}=\frac{\ln(E_{c}/E_{r})}{\ln(2)}, (21) where E_{c} and E_{r} are the errors in the corresponding norm on the coarse and the next refined resolutions (e.g., E_{c} on 32 and E_{r} on 64 ), respectively, calculated against the exact solution on each grid. We see that EOCs are third, fifth, and seventh, respectively on r_{gp}=1,2,3 , successfully following the anticipated order, (2r_{gp}+1) , on each grid resolution. Table 3 : Grid convergence results for the 1D point-to-point interpolation in Section 6.1.1 . GP calculations are performed using the SE kernel with r_{gp}=1,2,3 to approximate the function values f(x_{i+1/2}) from the cell center input values f(x_{i}) for f(x)=e^{-x}\sin(4\pi x)\cos(2\pi x) on [0,1] . We set \ell=0.05 . Grid Res. r_{gp}=1 r_{gp}=2 r_{gp}=3 L_{1} error L_{2} error L_{\infty} error L_{1} error L_{2} error L_{\infty} error L_{1} error L_{2} error L_{\infty} error 16 1.5755e-02 1.9291e-02 4.1273e-02 7.9488e-03 9.5539e-03 1.8090e-02 4.1997e-03 5.1116e-03 1.0107e-02 32 5.6083e-03 6.7936e-03 1.6785e-02 1.0475e-03 1.3935e-03 3.7604e-03 4.3879e-04 5.1092e-04 1.1524e-03 64 7.9883e-04 9.6524e-04 2.6346e-03 4.8332e-05 6.1595e-05 1.7997e-04 4.4746e-06 6.3025e-06 1.8003e-05 128 1.0100e-04 1.2283e-04 3.4421e-04 1.5971e-06 2.0460e-06 5.9998e-06 3.8455e-08 5.3534e-08 1.5710e-07 256 1.2651e-05 1.5437e-05 4.3386e-05 5.0499e-08 6.4622e-08 1.8882e-07 3.0713e-10 4.2503e-10 1.2402e-09 L_{1} EOC L_{2} EOC L_{\infty} EOC L_{1} EOC L_{2} EOC L_{\infty} EOC L_{1} EOC L_{2} EOC L_{\infty} EOC 16 – – – – – – – – – 32 1.490 1.506 1.298 2.924 2.777 2.266 3.259 3.323 3.133 64 2.812 2.815 2.672 4.438 4.500 4.385 6.616 6.341 6.000 128 2.983 2.974 2.936 4.919 4.912 4.907 6.862 6.879 6.840 256 2.997 2.992 2.988 4.983 4.985 4.990 6.968 6.977 6.985 6.1.2 Kernels for pointwise function values to a pointwise interpolation in 2D Similarly, the 2D pointwise interpolation uses the same SE kernel except that the kernel function K_{\text{SE}} now takes the two-dimensional form with \mathbf{x}=(x,y),\mathbf{x}^{\prime}=(x^{\prime},y^{\prime})\in\mathbb{R}^{2} , K_{\text{SE}}\left(\mathbf{x},\mathbf{x}^{\prime}\right)=e^{-\frac{\left(x-x^{\prime}\right)^{2}}{2\ell^{2}}}e^{-\frac{\left(y-y^{\prime}\right)^{2}}{2\ell^{2}}}. (22) Once a set of function values on a 2D GP stencil is flattened into a 1D vector, \mathbf{f} , in an order consistent with the correlation order in the kernel matrix \mathbf{K}_{\text{SE}} , the 2D calculation proceeds with the same expression as in Eq. 20 . As in the 1D case in the previous section, we also present a 2D grid convergence study in Table 4 . We discretize f(x,y)=e^{-2x}\sin(4\pi y)+xe^{-y}\cos(2\pi x) at cell centers (x_{i},y_{j}) over the square domain [0,1]\times[0,1] . Three GP calculations on the blocky stencil with r_{gp}=1,2,3 task to predict the function values at the cell corner locations (x_{i+1/2},y_{j+1/2}) on five grid resolutions, N_{x}=16,32,64,128,256 . Again, the 2D EOC rates are third, fifth, and seventh, respectively on r_{gp}=1,2,3 , satisfactorily demonstrating the expected rates of convergence in all cases. In particular, the experimental result with r_{gp}=2 is consistent with the anticipated and effective target order study for the blocky diamond stencil in Table 1 . As mentioned, we set the blocky diamond GP stencil as our default 2D stencil in all 2D calculations hereafter. Table 4 : Grid convergence results for the 2D point-to-point interpolation in Section 6.1.2 . GP calculations are performed using the SE kernel with r_{gp}=1,2,3 to approximate the function values f(x_{i+1/2},y_{j+1/2}) from the cell center input values f(x_{i},y_{j}) for f(x,y)=e^{-2x}\sin(4\pi y)+xe^{-y}\cos(2\pi x) on [0,1]\times[0,1] . As discussed, we set the blocky diamond stencil as our default 2D stencil configuration. We choose \ell=0.05 for the length hyperparameter. Grid Res. r_{gp}=1 r_{gp}=2 r_{gp}=3 L_{1} error L_{2} error L_{\infty} error L_{1} error L_{2} error L_{\infty} error L_{1} error L_{2} error L_{\infty} error 16 4.1324e-02 4.9148e-02 1.1271e-01 1.3467e-02 1.5832e-02 3.8873e-02 4.5533e-03 5.4040e-03 1.3892e-02 32 8.2994e-03 9.9775e-03 2.5316e-02 2.2561e-03 2.6967e-03 6.7348e-03 8.9778e-04 1.0605e-03 2.3860e-03 64 1.0237e-03 1.2386e-03 3.3654e-03 8.2938e-05 9.9982e-05 2.8072e-04 1.0241e-05 1.2241e-05 3.1432e-05 128 1.2581e-04 1.5315e-04 4.2373e-04 2.5631e-06 3.1014e-06 8.3960e-06 8.1480e-08 9.7758e-08 2.5652e-07 256 1.5589e-05 1.9035e-05 5.2948e-05 7.9461e-08 9.6359e-08 2.6240e-07 6.3098e-10 7.5861e-10 2.0054e-09 L_{1} EOC L_{2} EOC L_{\infty} EOC L_{1} EOC L_{2} EOC L_{\infty} EOC L_{1} EOC L_{2} EOC L_{\infty} EOC 16 – – – – – – – – – 32 2.32 2.30 2.15 2.58 2.55 2.53 2.34 2.35 2.54 64 3.02 3.01 2.91 4.77 4.75 4.58 6.45 6.44 6.25 128 3.02 3.02 2.99 5.02 5.01 5.06 6.97 6.97 6.94 256 3.01 3.01 3.00 5.01 5.01 5.00 7.01 7.01 7.00 6.1.3 Kernels for pointwise function values to a derivative in 1D The GP prediction from pointwise input values to a derivative takes \mathcal{L}_{1} =PE and \mathcal{L}_{2} is to be a relevant derivative operator at x=x_{*} . In 1D, we get \mathcal{L}_{2}({K}_{\text{SE}}(x_{*},x^{\prime}))=\Bigg(\frac{d^{m}}{dx^{m}}{\mathbf{K}_{\text{SE}}(x,x^{\prime})}\Bigg)\Bigg|_{x=x_{*}}. (23) For brevity, we only show kernels for the first, second, and third derivatives here. For the first derivative ( m=1 ), we get \mathcal{L}_{2}({K}_{\text{SE}}(x_{*},x^{\prime}))=-\frac{\left(-2x_{*}+2x^{\prime}\right)e^{-\frac{\left(x_{*}-x^{\prime}\right)^{2}}{2\ell^{2}}}}{2\ell^{2}}. (24) The second derivative kernel ( m=2 ) takes of the form \mathcal{L}_{2}({K}_{\text{SE}}(x_{*},x^{\prime}))=\frac{\left(-1+\frac{\left(x_{*}-x^{\prime}\right)^{2}}{\ell^{2}}\right)e^{-\frac{\left(x_{*}-x^{\prime}\right)^{2}}{2\ell^{2}}}}{\ell^{2}}, (25) and finally, for the third derivative ( m=3 ), the kernel is given as \mathcal{L}_{2}({K}_{\text{SE}}(x_{*},x^{\prime}))=\frac{\left(-3+\frac{\left(x_{*}-x^{\prime}\right)^{2}}{\ell^{2}}\right)\left(x-x^{\prime}\right)e^{-\frac{\left(x_{*}-x^{\prime}\right)^{2}}{2\ell^{2}}}}{\ell^{4}}. (26) Numerical convergence results are shown in Tables 5 , 6 and 7 , respectively for the first, second, and third derivatives of the function f(x)=e^{-x}\sin(4\pi x)\cos(2\pi x) defined on [0,1] . As before, given the pointwise function values f(x_{i}) at cell centers, we compute f^{\prime}(x_{i+1/2}),f^{\prime\prime}(x_{i+1/2}) , and f^{\prime\prime\prime}(x_{i+1/2}) at the cell interface locations using the corresponding kernel functions in Eqs. 24 , 25 and 26 . As the grid refines, these test results satisfy the anticipated and effective convergence rates in Table 1 very well as the order of the derivative varies. Table 5 : Grid convergence results for the 1D point-to-1st derivative conversion in Section 6.1.3 . GP calculations are performed at cell interface locations x_{i+1/2} using the kernel in Eq. 24 with r_{gp}=1,2,3 and \ell=0.05 to approximate the function f(x)=e^{-x}\sin(4\pi x)\cos(2\pi x) on [0,1] . Grid Res. r_{gp}=1 r_{gp}=2 r_{gp}=3 L_{1} error L_{2} error L_{\infty} error L_{1} error L_{2} error L_{\infty} error L_{1} error L_{2} error L_{\infty} error 16 3.3539e-01 4.0471e-01 8.9270e-01 8.9040e-02 1.0535e-01 2.1358e-01 1.1327e-02 1.4364e-02 3.0059e-02 32 1.0599e-01 1.2858e-01 2.8091e-01 1.5199e-02 1.8424e-02 3.8738e-02 5.3990e-03 6.6940e-03 1.5706e-02 64 3.0356e-02 3.6988e-02 1.0172e-01 1.1218e-03 1.4032e-03 3.7392e-03 7.2870e-05 9.2416e-05 2.3222e-04 128 8.3399e-03 1.0109e-02 2.8394e-02 7.7643e-05 9.8382e-05 2.8879e-04 1.3063e-06 1.7915e-06 5.2338e-06 256 2.1284e-03 2.5927e-03 7.3070e-03 5.0474e-06 6.4345e-06 1.8915e-05 2.1498e-08 2.9792e-08 8.7917e-08 L_{1} EOC L_{2} EOC L_{\infty} EOC L_{1} EOC L_{2} EOC L_{\infty} EOC L_{1} EOC L_{2} EOC L_{\infty} EOC 16 – – – – – – – – – 32 1.662 1.654 1.668 2.550 2.516 2.463 1.069 1.101 0.937 64 1.804 1.798 1.466 3.760 3.715 3.373 6.211 6.179 6.080 128 1.864 1.871 1.841 3.853 3.834 3.695 5.802 5.689 5.471 256 1.970 1.963 1.958 3.943 3.935 3.932 5.925 5.910 5.896 Table 6 : Grid convergence results for the 1D point-to-2nd derivative conversion in Section 6.1.3 using the kernel in Eq. 25 . All other GP setups are the same as in Table 5 . Grid Res. r_{gp}=1 r_{gp}=2 r_{gp}=3 L_{1} error L_{2} error L_{\infty} error L_{1} error L_{2} error L_{\infty} error L_{1} error L_{2} error L_{\infty} error 16 2.9833e+01 3.6768e+01 7.8908e+01 1.6014e+01 1.9091e+01 3.6545e+01 8.7882e+00 1.0694e+01 2.0702e+01 32 4.5051e+01 5.4730e+01 1.3643e+02 9.3169e+00 1.2405e+01 3.3636e+01 4.0084e+00 4.6632e+00 1.0421e+01 64 2.5862e+01 3.1224e+01 8.5017e+01 1.7292e+00 2.2026e+00 6.4389e+00 1.6597e-01 2.3354e-01 6.6653e-01 128 1.3098e+01 1.5934e+01 4.4625e+01 2.2993e-01 2.9462e-01 8.6357e-01 5.7359e-03 7.9834e-03 2.3418e-02 256 6.5922e+00 8.0455e+00 2.2604e+01 2.9229e-02 3.7406e-02 1.0926e-01 1.8418e-04 2.5485e-04 7.4342e-04 L_{1} EOC L_{2} EOC L_{\infty} EOC L_{1} EOC L_{2} EOC L_{\infty} EOC L_{1} EOC L_{2} EOC L_{\infty} EOC 16 – – – – – – – – – 32 -0.595 -0.574 -0.790 0.781 0.622 0.120 1.133 1.197 0.990 64 0.801 0.810 0.682 2.430 2.494 2.385 4.594 4.320 3.967 128 0.982 0.971 0.930 2.911 2.902 2.898 4.855 4.871 4.831 256 0.990 0.986 0.981 2.976 2.977 2.982 4.961 4.969 4.977 Table 7 : Grid convergence results for the 1D point-to-3rd derivative conversion in Section 6.1.3 using the kernel in Eq. 26 . All other GP setups are the same as in Table 5 . Grid Res. r_{gp}=1 r_{gp}=2 r_{gp}=3 L_{1} error L_{2} error L_{\infty} error L_{1} error L_{2} error L_{\infty} error L_{1} error L_{2} error L_{\infty} error 16 2.0660e+03 2.4861e+03 5.5018e+03 5.6927e+02 6.7278e+02 1.3753e+03 7.0796e+01 8.7636e+01 1.8277e+02 32 2.5204e+03 3.0602e+03 6.7207e+03 4.0375e+02 4.8935e+02 1.0304e+03 1.4836e+02 1.8381e+02 4.3101e+02 64 2.9141e+03 3.5502e+03 9.7604e+03 1.1975e+02 1.4976e+02 3.9880e+02 8.0585e+00 1.0220e+01 2.5661e+01 128 3.2348e+03 3.9209e+03 1.1012e+04 3.3467e+01 4.2403e+01 1.2447e+02 5.8337e-01 7.9997e-01 2.3371e+00 256 3.3232e+03 4.0481e+03 1.1409e+04 8.7568e+00 1.1163e+01 3.2816e+01 3.8640e-02 5.3548e-02 1.5802e-01 L_{1} EOC L_{2} EOC L_{\infty} EOC L_{1} EOC L_{2} EOC L_{\infty} EOC L_{1} EOC L_{2} EOC L_{\infty} EOC 16 – – – – – – – – – 32 -0.287 -0.300 -0.289 0.496 0.459 0.417 -1.067 -1.069 -1.238 64 -0.209 -0.214 -0.538 1.753 1.708 1.369 4.202 4.169 4.070 128 -0.151 -0.143 -0.174 1.839 1.820 1.680 3.788 3.675 3.457 256 -0.039 -0.046 -0.051 1.934 1.925 1.923 3.916 3.901 3.887 6.1.4 Kernels for pointwise function values to a derivative in 2D In a similar fashion, kernels for derivatives in 2D can be obtained by considering \mathcal{L}_{1} =PE and \mathcal{L}_{2} is a respective derivative operator at \mathbf{x}=(x,y) , followed by the derivative evaluation at \mathbf{x}=\mathbf{x}_{*}=(x_{*},y_{*}) . A general form is written as \mathcal{L}_{2}({K}_{\text{SE}}(\mathbf{x}_{*},\mathbf{x}^{\prime}))=\Bigg(\frac{\partial^{m+n}}{\partial y^{n}\partial x^{m}}{{K}_{\text{SE}}(\mathbf{x},\mathbf{x}^{\prime})}\Bigg)\Bigg|_{\mathbf{x}=\mathbf{x}_{*}}. (27) We only show a couple of them here for exposition purposes. The kernel for the first-order partial derivative in x is shown to be \frac{\partial}{\partial x}{{K}_{\text{SE}}(\mathbf{x}_{*},\mathbf{x}^{\prime})}=-\frac{\left(-2x_{*}+2x^{\prime}\right)e^{-\frac{\left(x_{*}-x^{\prime}\right)^{2}}{2\ell^{2}}}e^{-\frac{\left(y_{*}-y^{\prime}\right)^{2}}{2\ell^{2}}}}{2\ell^{2}}. (28) Similarly, the kernel for \partial_{y} becomes \frac{\partial}{\partial y}{K}_{\text{SE}}(\mathbf{x}_{*},\mathbf{x}^{\prime})=-\frac{\left(-2y_{*}+2y^{\prime}\right)e^{-\frac{\left(x_{*}-x^{\prime}\right)^{2}}{2\ell^{2}}}e^{-\frac{\left(y_{*}-y^{\prime}\right)^{2}}{2\ell^{2}}}}{2\ell^{2}}. (29) The kernel for the cross derivative \partial_{xy} is \frac{\partial}{\partial x}\frac{\partial}{\partial y}{K}_{\text{SE}}(\mathbf{x}_{*},\mathbf{x}^{\prime})=\frac{\left(-2x_{*}+2x^{\prime}\right)\left(-2y_{*}+2y^{\prime}\right)e^{-\frac{\left(x_{*}-x^{\prime}\right)^{2}}{2\ell^{2}}}e^{-\frac{\left(y_{*}-y^{\prime}\right)^{2}}{2\ell^{2}}}}{4\ell^{4}}, (30) and lastly the kernel for \partial_{xx} is \frac{\partial^{2}}{\partial x^{2}}{{K}_{\text{SE}}(\mathbf{x}_{*},\mathbf{x}^{\prime})}=\frac{\left(-1+\frac{\left(x_{*}-x^{\prime}\right)^{2}}{\ell^{2}}\right)e^{-\frac{\left(x_{*}-x^{\prime}\right)^{2}}{2\ell^{2}}}e^{-\frac{\left(y_{*}-y^{\prime}\right)^{2}}{2\ell^{2}}}}{\ell^{2}}. (31) Other higher-order derivatives can be readily obtained in a similar fashion. As a proof of concept, we show numerical results for computing a Laplacian operator of a function \nabla^{2}f=\frac{\partial^{2}f}{\partial x^{2}}+\frac{\partial^{2}f}{\partial y^{2}} to demonstrate the flexibility of the GP method. In this example, we choose a simple function f(x,y)=\sin(x)\sin(y) on a square domain [0,2\pi]\times[0,2\pi] although any other smooth functions would work well too. The function, the GP prediction of the Laplacian at cell corners (x_{i+1/2},y_{j+1/2}) , and the exact Laplacian \nabla^{2}f(x_{i+1/2},y_{j+1/2}) are plotted in Fig. 3 , where the GP solution and the exact solutions match well visually. To quantify GP’s results, we conducted a grid convergence study for this test in Table 8 . In all test cases, GP solutions successfully converge on each grid resolution following the anticipated and effective convergence rates described in Table 1 . Figure 3 : GP’s prediction of \nabla^{2}\sin(x)\sin(y) on [0,2\pi]\times[0,2\pi] using a 128\times 128 grid resolution with r_{gp}=2 and \ell={\pi}/{10} . The GP result shows a great visual agreement with the exact Laplacian calculation. The convergence study for this case is shown in Table 8 . Table 8 : Grid convergence results for the 2D point-to-Laplacian conversion in Section 6.1.4 . GP considers to approximate the Laplacian of the function f(x,y)=\sin(x)\sin(y) on [0,2\pi]\times[0,2\pi] at (x_{i+1/2},y_{j+1/2}) by taking the function values f(x_{i},y_{j}) at cell centers as input. The prediction utilizes the kernel in Eq. 31 with \ell={\pi}/{10} . Grid Res. r_{gp}=1 r_{gp}=2 r_{gp}=3 L_{1} error L_{2} error L_{\infty} error L_{1} error L_{2} error L_{\infty} error L_{1} error L_{2} error L_{\infty} error 16 1.1523e+02 2.1272e+01 5.9043e+00 5.5807e+01 1.0371e+01 3.0678e+00 1.7191e+01 3.0400e+00 6.8892e-01 32 8.3384e+01 1.4699e+01 3.6491e+00 3.0797e+01 5.4303e+00 1.3420e+00 1.3309e+01 2.3489e+00 5.7482e-01 64 3.8632e+01 6.8245e+00 1.6402e+00 3.8864e+00 6.8516e-01 1.6355e-01 5.3657e-01 9.4783e-02 2.2545e-02 128 1.8257e+01 3.2293e+00 7.7024e-01 4.5357e-01 8.0228e-02 1.9171e-02 1.6369e-02 2.8949e-03 6.7924e-04 256 9.0985e+00 1.6068e+00 3.7286e-01 5.6298e-02 9.9525e-03 2.3080e-03 5.0524e-04 8.9238e-05 2.0536e-05 L_{1} EOC L_{2} EOC L_{\infty} EOC L_{1} EOC L_{2} EOC L_{\infty} EOC L_{1} EOC L_{2} EOC L_{\infty} EOC 16 – – – – – – – – – 32 0.47 0.53 0.69 0.86 0.93 1.19 0.37 0.37 0.26 64 1.11 1.11 1.15 2.99 2.99 3.04 4.63 4.63 4.67 128 1.08 1.08 1.09 3.10 3.09 3.09 5.03 5.03 5.05 256 1.00 1.01 1.05 3.01 3.01 3.05 5.02 5.02 5.05 6.1.5 Kernels for pointwise function values to a volume average value in 1D As the input values are pointwise, we choose \mathcal{L}_{1} =PE to correlate pointwise values at x and x^{\prime} , while we set \mathcal{L}_{2} to be a volume-averaging integral operator over x , followed by the integral evaluation at x=x_{*} . That is, \mathcal{L}_{2}({K}_{\text{SE}}(x_{*},x^{\prime}))=\Bigg(\frac{1}{\Delta x}\int_{I_{*}}{K_{\text{SE}}(x,x^{\prime})}dx\Bigg)\bigg|_{x=x_{*}}. (32) Here, the operation of \mathcal{L}_{2} can be understood as a bridging step that converts the pointwise values to the target volume average value at x=x_{*} by considering a Bayesian inference between the pointwise input data at each x^{\prime} and the sought volume-averaging evaluation at x=x_{*} . Unlike other differential or point-evaluation operations where the point x_{*} could be chosen from the interior or boundaries of a cell I_{*} , we set x_{*} to be a cell center location to make the volume-averaging meaningful in our calculations. The same is true for the 2D volume averages in the next subsection. With this choice of x_{*} and I_{*}=[x_{*}-\Delta x/2,x_{*}+\Delta x/2] , Eq. 32 is written in terms of the error function by, \displaystyle\mathcal{L}_{2}({K}_{\text{SE}}(x_{*},x^{\prime}))= \displaystyle\sqrt{\frac{\pi}{2}}\frac{\ell}{{\Delta x}}\left(\operatorname{erf}\Bigg(\frac{\big(x_{*}+{\Delta x}/{2}-x^{\prime}\big)}{\sqrt{2}\ell}\Bigg)-\operatorname{erf}\Bigg(\frac{\big(x_{*}-{\Delta x}/{2}-x^{\prime}\big)}{\sqrt{2}\ell}\Bigg)\right) \displaystyle= \displaystyle\sqrt{\frac{\pi}{2}}\frac{\ell}{{\Delta x}}\left(\operatorname{erf}\Bigg(\frac{\big(\Delta_{x^{*}x^{\prime}}+1/2\big)}{\sqrt{2}\ell/\Delta x}\Bigg)-\operatorname{erf}\Bigg(\frac{\big(\Delta_{x^{*}x^{\prime}}-1/2\big)}{\sqrt{2}\ell/\Delta x}\Bigg)\right), (33) where \Delta_{x^{*}x^{\prime}}={(x_{*}-x^{\prime})}/{\Delta x} . Since the output is the integral average, \frac{1}{\Delta x}\int_{I_{*}}f(x)dx , the grid \Delta x from the integration cancels with the averaging \Delta x . Hence, for each r_{gp} , the anticipated convergence rate is the same as the (2r_{gp}+1) rate in the baseline pointwise to pointwise conversion in Section 6.1.1 and Table 1 . Experimental GP results are collected in Table 9 , demonstrating the anticipated third, fifth, and seventh-order convergence rates on r_{gp}=1,2,3 , respectively. Table 9 : Grid convergence results for the 1D point-to-volume average conversion in Section 6.1.5 . Input values are f(x_{i}) for the function f(x)=e^{-x}\sin(4\pi x)\cos(2\pi x) on [0,1] and GP predicts \frac{1}{\Delta x}\int_{I_{i}}f(x)dx at x_{i} using the kernel in Eq. 33 with \ell=0.05 . Grid Res. r_{gp}=1 r_{gp}=2 r_{gp}=3 L_{1} error L_{2} error L_{\infty} error L_{1} error L_{2} error L_{\infty} error L_{1} error L_{2} error L_{\infty} error 16 1.0392e-02 1.2708e-02 2.7168e-02 5.1714e-03 6.2267e-03 1.1763e-02 2.7103e-03 3.2999e-03 6.5516e-03 32 3.7056e-03 4.4867e-03 1.1063e-02 6.7677e-04 9.0023e-04 2.4265e-03 2.8178e-04 3.2817e-04 7.4173e-04 64 5.3047e-04 6.4110e-04 1.7507e-03 3.1409e-05 4.0033e-05 1.1696e-04 2.8846e-06 4.0638e-06 1.1610e-05 128 6.7270e-05 8.1796e-05 2.2926e-04 1.0401e-06 1.3324e-06 3.9077e-06 2.4848e-08 3.4594e-08 1.0153e-07 256 8.4310e-06 1.0287e-05 2.8916e-05 3.2908e-08 4.2110e-08 1.2305e-07 1.9858e-10 2.7481e-10 8.0197e-10 L_{1} EOC L_{2} EOC L_{\infty} EOC L_{1} EOC L_{2} EOC L_{\infty} EOC L_{1} EOC L_{2} EOC L_{\infty} EOC 16 – – – – – – – – – 32 1.488 1.502 1.296 2.934 2.790 2.277 3.266 3.330 3.143 64 2.804 2.807 2.660 4.429 4.491 4.375 6.610 6.335 5.997 128 2.979 2.970 2.933 4.916 4.909 4.904 6.859 6.876 6.837 256 2.996 2.991 2.987 4.982 4.984 4.989 6.967 6.976 6.984 6.1.6 Kernels for pointwise function values to a volume average value in 2D Similar to the 1D case, GP converts pointwise function input values to predict a volume average value at \mathbf{x}=\mathbf{x}_{*}=(x_{*},y_{*}) in 2D using \mathcal{L}_{1} =PE and \mathcal{L}_{2}({K}_{\text{SE}}(\mathbf{x}_{*},\mathbf{x}^{\prime}))=\Bigg(\frac{1}{\Delta\mathbf{x}}\int_{I_{*}\times J_{*}}{K_{\text{SE}}(\mathbf{x},\mathbf{x}^{\prime})}d\mathbf{x}\Bigg)\bigg|_{\mathbf{x}=\mathbf{x}_{*}}=\Bigg(\frac{1}{\Delta x\Delta y}\int_{I_{*}}\int_{J_{*}}{K_{\text{SE}}(\mathbf{x},\mathbf{x}^{\prime})}dxdy\Bigg)\bigg|_{\mathbf{x}=\mathbf{x}_{*}}. (34) Again, the \mathcal{L}_{2} operation channels the pointwise input values to the 2D volume average value at \mathbf{x}_{*} by constructing a correlation between the two different data type values, i.e., the pointwise inputs sampled from cell center points \mathbf{x}^{\prime} and the sought volume average value anchored at the point \mathbf{x}_{*} centered in a 2D rectangular cell I_{*}\times J_{*}=[x_{*}-\Delta x/2,x_{*}+\Delta x/2]\times[y_{*}-\Delta y/2,y_{*}+\Delta y/2] . Due to the dimensional factorization property in the SE kernel in Eq. 13 , the 2D version of the volume-averaging kernel in Eq. 34 can be easily written as \mathcal{L}_{2}({K}_{\text{SE}}(\mathbf{x}_{*},\mathbf{x}^{\prime}))=\prod_{d=x,y}\sqrt{\frac{\pi}{2}}\frac{\ell}{{\Delta d}}\left(\operatorname{erf}\Bigg(\frac{\big(\Delta_{\mathbf{x}^{*}\mathbf{x}^{\prime}}^{d}+1/2\big)}{\sqrt{2}\ell/\Delta d}\Bigg)-\operatorname{erf}\Bigg(\frac{\big(\Delta_{\mathbf{x}^{*}\mathbf{x}^{\prime}}^{d}-1/2\big)}{\sqrt{2}\ell/\Delta d}\Bigg)\right), (35) where \Delta_{\mathbf{x}^{*}\mathbf{x}^{\prime}}^{d}={\mathbf{e}_{d}\cdot(\mathbf{x}_{*}-\mathbf{x}^{\prime})}/{\Delta d} with \mathbf{e}_{d} being the unit vector in each d -direction. Note that Eqs. 33 and 35 recover the \mathbf{t}_{*} kernel form in [ 37 ] . As in the 1D case, GP converges to the anticipated third, fifth, and seventh-order solutions in 2D as well, as shown in Table 10 . Table 10 : Grid convergence results for the 2D point-to-volume average conversion in Section 6.1.6 . Input values are f(x_{i},y_{j}) for the function f(x,y)=e^{-2x}\sin(4\pi y)+xe^{-y}\cos(2\pi x) on [0,1]\times[0,1] and GP predicts \frac{1}{\Delta x\Delta y}\int_{I_{i}}\int_{I_{j}}f(x,y)dxdy at (x_{i},y_{j}) using the kernel in Eq. 35 with \ell=0.05 . Grid Res. r_{gp}=1 r_{gp}=2 r_{gp}=3 L_{1} error L_{2} error L_{\infty} error L_{1} error L_{2} error L_{\infty} error L_{1} error L_{2} error L_{\infty} error 16 2.7145e-02 3.2285e-02 7.3896e-02 8.5402e-03 1.0034e-02 2.4582e-02 2.9554e-03 3.5202e-03 9.2304e-03 32 5.5162e-03 6.6279e-03 1.6774e-02 1.4634e-03 1.7485e-03 4.3727e-03 5.7681e-04 6.8143e-04 1.5310e-03 64 6.8251e-04 8.2504e-04 2.2399e-03 5.4005e-05 6.5078e-05 1.8207e-04 6.6111e-06 7.9002e-06 2.0278e-05 128 8.3890e-05 1.0208e-04 2.8236e-04 1.6715e-06 2.0222e-06 5.4755e-06 5.2676e-08 6.3195e-08 1.6582e-07 256 1.0394e-05 1.2689e-05 3.5295e-05 5.1815e-08 6.2829e-08 1.7111e-07 4.0878e-10 4.9126e-10 1.2968e-09 L_{1} EOC L_{2} EOC L_{\infty} EOC L_{1} EOC L_{2} EOC L_{\infty} EOC L_{1} EOC L_{2} EOC L_{\infty} EOC 16 – – – – – – – – – 32 2.30 2.28 2.14 2.54 2.52 2.49 2.36 2.37 2.59 64 3.01 3.01 2.90 4.76 4.75 4.59 6.45 6.43 6.24 128 3.02 3.01 2.99 5.01 5.01 5.06 6.97 6.97 6.93 256 3.01 3.01 3.00 5.01 5.01 5.00 7.01 7.01 7.00 6.1.7 Kernels for volume average values to a pointwise value in 1D The conversion from volume averages at cell centers to a pointwise value at x_{*} is one of the crucial building blocks in finite volume methods. The most common example is found in high-order reconstruction schemes that aim to achieve high-order accurate values called the Riemann states at cell interfaces, x_{*}=x_{i\pm 1/2} . Using GP, such a conversion can be formulated by the two kernels in Eqs. 10 and 11 for an input vector \mathbf{g} , whose h th component is a 1D volume-averaged quantity \frac{1}{\Delta x}\int_{I_{h}}f(x)dx of a function f . These volume average values between x and x^{\prime} are correlated by \mathcal{L}_{1}(K_{\text{SE}}(x,x^{\prime})) that takes the volume-averaging integration of K_{\text{SE}}(x,x^{\prime}) at both x and x^{\prime} , \displaystyle\mathcal{L}_{1}(K_{\text{SE}}(x,x^{\prime}))=\sqrt{\pi}\left(\ \frac{\ell}{\Delta x}\right)^{2} \displaystyle\left\{\left(\frac{\Delta_{xx^{\prime}}+1}{\sqrt{2}\ell/\Delta x}\operatorname{erf}\left[\frac{\Delta_{xx^{\prime}}+1}{\sqrt{2}\ell/\Delta x}\right]+\frac{\Delta_{xx^{\prime}}-1}{\sqrt{2}\ell/\Delta x}\operatorname{erf}\left[\frac{\Delta_{xx^{\prime}}-1}{\sqrt{2}\ell/\Delta x}\right]\right)\right. \displaystyle+\frac{1}{\sqrt{\pi}} \displaystyle\left.\left(\exp\left[-\frac{(\Delta_{xx^{\prime}}+1)^{2}}{2(\ell/\Delta x)^{2}}\right]+\exp\left[-\frac{(\Delta_{xx^{\prime}}-1)^{2}}{2(\ell/\Delta x)^{2}}\right]\right)\right. \displaystyle-2 \displaystyle\left.\left(\frac{\Delta_{xx^{\prime}}}{\sqrt{2}\ell/\Delta x}\operatorname{erf}\left[\frac{\Delta_{xx^{\prime}}}{\sqrt{2}\ell/\Delta x}\right]+\frac{1}{\sqrt{\pi}}\exp\left[-\frac{\Delta_{xx^{\prime}}^{2}}{2(\ell/\Delta x)^{2}}\right]\right)\right\}. (36) These correlated volume averages are then channeled through the second operation by \mathcal{L}_{2}(K_{\text{SE}}(x_{*},x^{\prime})) where the volume-averaging operation is kept at x^{\prime} while the pointwise evaluation is to take place at x=x_{*} . This is be done by finalizing the conversion process using Eq. 33 . Rigorously speaking, the \mathcal{L}_{2} kernels are different in converting pointwise inputs to a volume average in Section 6.1.5 and volume average inputs to a pointwise output in this section. This clarification is noted in Table 2 making clear distinctions between \frac{1}{\Delta\mathbf{x}}\int(\cdot)\;d\mathbf{x} and \frac{1}{\Delta\mathbf{x}^{\prime}}\int(\cdot)\;d\mathbf{x}^{\prime} to indicate over which variable ( \mathbf{x} or \mathbf{x}^{\prime} ) the integration is computed. It is worth mentioning that there is no actual difference in the final expression of the kernel, though, since \mathbf{x} and \mathbf{x}^{\prime} are interchangeable, and the SE kernel is symmetric positive definite. Lastly, the pointwise prediction at x_{*} is obtained by combining the kernels in Sections 6.1.7 and 33 according to Eq. 19 . Similar to the case in Section 6.1.5 , we expect the volume average-to-pointwise conversion converges at (2r_{gp}+1) . Our experimental results confirm this convergence rate for each r_{gp}=1,2,3 in Table 11 . Table 11 : Grid convergence results for the 1D volume-average-to-point conversion in Section 6.1.7 . Input values are the integral average values \frac{1}{\Delta x}\int_{I_{i}}f(x)dx at cell centers x_{i} and output values are pointwise function values f(x_{i+1/2}) at cell interface locations for f(x)=e^{-x}\sin(4\pi x)\cos(2\pi x) on [0,1] . GP utilizes the kernel in Section 6.1.7 with \ell=0.05 . Grid Res. r_{gp}=1 r_{gp}=2 r_{gp}=3 L_{1} error L_{2} error L_{\infty} error L_{1} error L_{2} error L_{\infty} error L_{1} error L_{2} error L_{\infty} error 16 1.7407e-02 2.2542e-02 4.8096e-02 1.2685e-02 1.5502e-02 3.0334e-02 7.2806e-03 8.9043e-03 1.8025e-02 32 6.9198e-03 8.4268e-03 2.1101e-02 1.2698e-03 1.7192e-03 4.6781e-03 5.7232e-04 6.5120e-04 1.4616e-03 64 1.0496e-03 1.2688e-03 3.4631e-03 6.6081e-05 8.4426e-05 2.4717e-04 6.2253e-06 8.7481e-06 2.4844e-05 128 1.3419e-04 1.6327e-04 4.5752e-04 2.2506e-06 2.8857e-06 8.4621e-06 5.5469e-08 7.7300e-08 2.2659e-07 256 1.6858e-05 2.0574e-05 5.7815e-05 7.1677e-08 9.1745e-08 2.6803e-07 4.4789e-10 6.1992e-10 1.8082e-09 L_{1} EOC L_{2} EOC L_{\infty} EOC L_{1} EOC L_{2} EOC L_{\infty} EOC L_{1} EOC L_{2} EOC L_{\infty} EOC 16 – – – – – – – – – 32 1.331 1.420 1.189 3.321 3.173 2.697 3.669 3.773 3.624 64 2.721 2.731 2.607 4.264 4.348 4.242 6.523 6.218 5.878 128 2.967 2.958 2.920 4.876 4.871 4.868 6.810 6.822 6.777 256 2.993 2.988 2.984 4.973 4.975 4.981 6.952 6.962 6.969 6.1.8 Kernels for volume average values to a pointwise value in 2D The 1D calculation in the previous section is easily extended to 2D by combining \mathcal{L}_{2}({K}_{\text{SE}}(\mathbf{x}_{*},\mathbf{x}^{\prime})) in Eq. 35 and \mathcal{L}_{1}({K}_{\text{SE}}(\mathbf{x},\mathbf{x}^{\prime})) defined by \displaystyle\mathcal{L}_{1}(K_{\text{SE}}(\mathbf{x},\mathbf{x}^{\prime}))=\prod_{d=x,y}\sqrt{\pi}\left(\ \frac{\ell}{\Delta d}\right)^{2} \displaystyle\left\{\left(\frac{\Delta_{\mathbf{x}\mathbf{x}^{\prime}}^{d}+1}{\sqrt{2}\ell/\Delta_{d}}\operatorname{erf}\left[\frac{\Delta_{\mathbf{x}\mathbf{x}^{\prime}}^{d}+1}{\sqrt{2}\ell/\Delta d}\right]+\frac{\Delta_{\mathbf{x}\mathbf{x}^{\prime}}^{d}-1}{\sqrt{2}\ell/\Delta_{d}}\operatorname{erf}\left[\frac{\Delta_{\mathbf{x}\mathbf{x}^{\prime}}^{d}-1}{\sqrt{2}\ell/\Delta d}\right]\right)\right. \displaystyle+\frac{1}{\sqrt{\pi}} \displaystyle\left.\left(\exp\left[-\frac{(\Delta_{\mathbf{x}\mathbf{x}^{\prime}}^{d}+1)^{2}}{2(\ell/\Delta d)^{2}}\right]+\exp\left[-\frac{(\Delta_{\mathbf{x}\mathbf{x}^{\prime}}^{d}-1)^{2}}{2(\ell/\Delta d)^{2}}\right]\right)\right. \displaystyle-2 \displaystyle\left.\left(\frac{\Delta_{\mathbf{x}\mathbf{x}^{\prime}}^{d}}{\sqrt{2}\ell/\Delta d}\operatorname{erf}\left[\frac{\Delta_{\mathbf{x}\mathbf{x}^{\prime}}^{d}}{\sqrt{2}\ell/\Delta d}\right]+\frac{1}{\sqrt{\pi}}\exp\left[-\frac{(\Delta_{\mathbf{x}\mathbf{x}^{\prime}}^{d})^{2}}{2(\ell/\Delta d)^{2}}\right]\right)\right\}. (37) The resulting pointwise GP prediction has been used for designing two-dimensional high-order accurate finite volume Riemann states at \mathbf{x}_{*}=(x_{i\pm 1/2},y_{j}) or (x_{i},y_{j\pm 1/2}) in [ 37 ] , directly converting the volume average quantities \mathbf{g} to a point value p_{*} via the one-step dot product between the (pre-computed and saved) prediction vector \mathbf{z}_{*}^{T} and the input vector \mathbf{g} in Eq. 19 . This approach is an effective kernel-based alternative to the existing polynomial-based high-order multi-dimensional reconstruction schemes that incorporate high-order correction terms with Taylor series expansions [ 39 , 40 ] . In Table 12 , we once again confirm that the experimental convergence follows the (2r_{gp}+1) rate for each GP radius, r_{gp}=1,2,3 , similar to the results in Section 6.1.6 . Table 12 : Grid convergence results for the 2D volume average-to-point conversion in Section 6.1.8 . Input values are the integral average values \frac{1}{\Delta x\Delta y}\int_{I_{i}}\int_{I_{j}}f(x,y)dxdy at cell centers (x_{i},y_{j}) and output values are pointwise function values f(x_{i+1/2},y_{i+1/2}) at cell corner locations for f(x,y)=e^{-2x}\sin(4\pi y)+xe^{-y}\cos(2\pi x) on [0,1]\times[0,1] . GP utilizes the kernel in Section 6.1.8 with \ell=0.05 . Grid Res. r_{gp}=1 r_{gp}=2 r_{gp}=3 L_{1} error L_{2} error L_{\infty} error L_{1} error L_{2} error L_{\infty} error L_{1} error L_{2} error L_{\infty} error 16 4.7181e-02 5.6016e-02 1.3170e-01 1.7241e-02 2.0195e-02 5.0511e-02 7.9703e-03 9.4562e-03 2.3277e-02 32 1.0275e-02 1.2368e-02 3.1682e-02 2.8104e-03 3.3617e-03 8.3630e-03 1.0964e-03 1.2940e-03 2.8774e-03 64 1.3376e-03 1.6228e-03 4.4180e-03 1.1389e-04 1.3746e-04 3.8678e-04 1.4246e-05 1.7033e-05 4.3726e-05 128 1.6685e-04 2.0334e-04 5.6283e-04 3.6118e-06 4.3724e-06 1.1834e-05 1.1770e-07 1.4124e-07 3.7052e-07 256 2.0753e-05 2.5355e-05 7.0532e-05 1.1272e-07 1.3672e-07 3.7228e-07 9.1941e-10 1.1057e-09 2.9244e-09 L_{1} EOC L_{2} EOC L_{\infty} EOC L_{1} EOC L_{2} EOC L_{\infty} EOC L_{1} EOC L_{2} EOC L_{\infty} EOC 16 – – – – – – – – – 32 2.20 2.18 2.06 2.62 2.59 2.59 2.86 2.87 3.02 64 2.94 2.93 2.84 4.63 4.61 4.43 6.27 6.25 6.04 128 3.00 3.00 2.97 4.98 4.97 5.03 6.92 6.91 6.88 256 3.01 3.00 3.00 5.00 5.00 4.99 7.00 7.00 6.99 6.1.9 Kernels for volume-average values to a derivative in 2D To make a GP prediction of a derivative value at \mathbf{x}_{*} using 2D volume average values as input, one extra step is required in the calculation of Section 6.1.8 . While we keep the \mathcal{L}_{1}(K_{\text{SE}}(\mathbf{x},\mathbf{x}^{\prime})) kernel the same, we need to add the sought differential operation at \mathbf{x}_{*} to the \mathcal{L}_{2} kernel operation in Eq. 35 by taking respective derivatives of it. For example, to pursue \partial_{xy} from the volume average input values, we define the kernel to be \displaystyle\mathcal{L}_{2}({K}_{\text{SE}}(\mathbf{x}_{*},\mathbf{x}^{\prime}))= \displaystyle\prod_{d=x,y}\frac{\partial}{\partial d}\sqrt{\frac{\pi}{2}}\frac{\ell}{{\Delta d}}\left\{\operatorname{erf}\Bigg(\frac{\big(\Delta_{dd^{\prime}}+1/2\big)}{\sqrt{2}\ell/\Delta d}\Bigg)-\operatorname{erf}\Bigg(\frac{\big(\Delta_{dd^{\prime}}-1/2\big)}{\sqrt{2}\ell/\Delta d}\Bigg)\right\}\Bigg|_{d=d_{*}} \displaystyle= \displaystyle\prod_{d=x,y}\frac{1}{{\Delta d}}\left\{\exp\Bigg(-\frac{(1+2\Delta_{d_{*}d^{\prime}})^{2}}{8(\ell/\Delta d)^{2}}\Bigg)-\exp\Bigg(-\frac{(1-2\Delta_{d_{*}d^{\prime}})^{2}}{8(\ell/\Delta d)^{2}}\Bigg)\right\}. (38) In Table 13 , we demonstrate the experimental convergence rates for the cross derivative approximations using the kernel in Eq. 38 . The anticipated convergence rate in this case is to be (2r_{gp}-1) with the cross derivative as output. The results in Table 13 show that the EOC rates are a little higher than (2r_{gp}-1) for each r_{gp}=1,2,3 , which is also observed in the effective order of convergence rates in Table 1 for the blocky diamond stencil. Table 13 : Grid convergence results for the 2D volume-average-to-point conversion in Section 6.1.9 . Input values are the integral average values \frac{1}{\Delta x\Delta y}\int_{I_{i}}\int_{I_{j}}f(x,y)dxdy at cell centers (x_{i},y_{j}) and output values are the cross derivative \partial_{xy}f(x_{i+1/2},y_{i+1/2}) evaluated at cell corner locations for f(x,y)=e^{-2x}\sin(4\pi y)+xe^{-y}\cos(2\pi x) on [0,1]\times[0,1] . GP utilizes the kernel in Eq. 38 with \ell=0.05 . Grid Res. r_{gp}=1 r_{gp}=2 r_{gp}=3 L_{1} error L_{2} error L_{\infty} error L_{1} error L_{2} error L_{\infty} error L_{1} error L_{2} error L_{\infty} error 16 8.7267e+00 1.0552e+01 2.6820e+01 5.8462e+00 6.9295e+00 1.6537e+01 1.5169e+00 2.0003e+00 6.4048e+00 32 1.5016e+00 2.0064e+00 7.9577e+00 5.1291e-01 6.3349e-01 2.1593e+00 1.3965e-01 1.8245e-01 6.2518e-01 64 1.4811e-01 2.6887e-01 1.2779e+00 1.6540e-02 3.0654e-02 1.6658e-01 8.8849e-04 1.6420e-03 8.6167e-03 128 5.0073e-02 6.9984e-02 3.5331e-01 7.6547e-04 1.1173e-03 6.7764e-03 1.7477e-05 2.5667e-05 1.4431e-04 256 1.6491e-02 2.1352e-02 7.7280e-02 7.1038e-05 9.2609e-05 3.6246e-04 3.9564e-07 5.1600e-07 1.9633e-06 L_{1} EOC L_{2} EOC L_{\infty} EOC L_{1} EOC L_{2} EOC L_{\infty} EOC L_{1} EOC L_{2} EOC L_{\infty} EOC 16 – – – – – – – – – 32 2.54 2.39 1.75 3.51 3.45 2.94 3.44 3.45 3.36 64 3.34 2.90 2.64 4.95 4.37 3.70 7.30 6.80 6.18 128 1.56 1.94 1.85 4.43 4.78 4.62 5.67 6.00 5.90 256 1.60 1.71 2.19 3.43 3.59 4.22 5.47 5.64 6.20 7 DAS Kernel for Non-Oscillatory Approximation to Discontinuous Functions Kernel selection is a crucial step in obtaining accurate and reliable outputs in GP models. As we have discussed so far for continuous function approximations, we can capture the underlying patterns and structures of target functions within the data by carefully choosing appropriate kernel functions. This, in turn, ensures that our model is capable of making accurate predictions and generalizing them well to unseen data points. The kernel in GP models not only serves as a mathematical function but also establishes a GP prior that expresses our assumptions about the underlying relationship in the data. By specifying a particular kernel, we are making a strong assumption about the smoothness, periodicity, and correlation structure of the function that is being modeled. Thus, the choice of a kernel directly impacts the resulting GP model’s performance, and different types of data require different kernel choices. In this section, we further extend our kernel investigation beyond smooth function approximations and explore appropriate kernel selection for discontinuous functions. Discrete approximation to discontinuous function data is one of the major research topics in numerical modeling of all times, where the main emphasis is dedicated to producing non-oscillatory solutions across sharp gradients. To demonstrate, let us consider a test problem of reconstructing pointwise data at a shock interface. We will analyze performances of three different kernels, including K_{\text{SE}} in Eq. 12 , the so-called neural network kernel K_{\text{NN}} [ 2 ] given by K_{\text{NN}}\left(\mathbf{x},\mathbf{x}^{\prime}\right)=\frac{2}{\pi}\sin^{-1}\left(\frac{2\tilde{\mathbf{x}}^{\top}\Sigma\tilde{\mathbf{x}}^{\prime}}{\sqrt{\left(1+2\tilde{\mathbf{x}}^{\top}\Sigma\tilde{\mathbf{x}}\right)\left(1+2\tilde{\mathbf{x}}^{\prime\top}\Sigma\tilde{\mathbf{x}}^{\prime}\right)}}\right), (39) and lastly our new “Discontinous ArcSin kernel” (or the DAS kernel for short) K_{\text{DAS}} that takes of the form of K_{\text{DAS}}\left(\mathbf{x},\mathbf{x}^{\prime}\right)=\frac{2}{\pi}\sin^{-1}\left(\frac{\exp\left(-\sqrt{(\mathbf{x}-\mathbf{x^{\prime}})^{\top}(\mathbf{x}-\mathbf{x^{\prime}})}\right)}{\sqrt{\prod_{i=1}^{d}\left(1+2(1+\ {(x_{i}-x_{i}^{\prime})^{2}}\right))}}\right). (40) In Eq. 39 , \tilde{\mathbf{x}}=(1,\mathbf{x})^{T}=\left(1,x_{1},\ldots,x_{d}\right)^{\top} is an augmented vector of \mathbf{x} with d being the number of spatial dimensions, which must also be the size of \mathbf{x} and \mathbf{x}^{\prime} . We also set \Sigma={\text{diag}}(\sigma_{0}^{2},\sigma^{2}) following [ 2 ] . The augmentation with unity prevents the kernel from failing to be symmetric semi-positive definite–a requirement for GP kernel functions–when \mathbf{x}=\mathbf{x}^{\prime}=\mathbf{0} especially in the diagonal entries, keeping its eigenvalues to be non-negative. The functions sampled from this NN kernel can be viewed as superpositions of error functions, \text{erf}(u_{0}+ux) , where \sigma_{0}^{2} controls the variance of u_{0} while \sigma^{2} controls u , in which case they respectively influence how much these sample functions are offset from the origin and their scaling on the x -axis [ 2 ] . Below, we discuss how these three kernels are compared on data predictions across sharp discontinuities, particularly emphasizing the improved non-oscillatory shock-capturing abilities of the new DAS kernel. First, we remark that the SE and DAS kernels are a stationary kernel, which means it only depends on the ‘distance’ between observed input data points at \mathbf{x} and \mathbf{x}^{\prime} rather than the actual values of them. That is, SE and DAS are invariant to translations in the input space. This is computationally efficient because K^{-1} only needs to be computed once, saved, and reused over computational steps as long as the computational grid configuration remains static. This is not the case for the NN kernel. It is non-stationary ; hence its inverse matrix must to be computed at each input location. The non-stationary property of K_{\text{NN}} makes it computationally challenging even for small problems, not to mention big problems with increasing grid resolutions. Figure 4 : Heat map comparison of kernels. (Top left) SE kernel with \ell=1.0 . (Top right) SE kernel with \ell=0.35 . (Bottom left) NN kernel with \sigma=\sigma_{0}=1 . (Bottom right) DAS kernel. The above observations motivate us to design K_{\text{DAS}} to be a stationary kernel. In Fig. 4 , we show the kernel heat maps. The way to read this map is by considering each point \mathbf{x}=(x,y) as an input to the kernel. The color scale represents the value of the kernel: the higher the value, the larger the weight or importance the GP will place on that point. Noticeably, we see that K_{\text{DAS}} takes the maximum value along a very thin diagonal band. The consequence is K_{\text{DAS}} ’s strong prediction between the data points separated by, namely, the bandwidth, \delta_{b} , where it is seen that \delta_{b}\sim\mathcal{O}(\Delta m) with \Delta m=\max_{d=x,y}\{\Delta d\} . On the other hand, if any data points are separated by a distance larger than \delta_{b} , i.e., 10 or more cells away from each other, the correlation of them rapidly drops with the increasing inter-distance and K_{\text{DAS}} ’s predictions become insignificant. By design, henceforth, K_{\text{DAS}} is apt to work very well for narrow fluid structures such as shocks or discontinuities. Also importantly, for the same data values at different grid locations, K_{\text{DAS}} ’s stationary property returns the same kernel value as long as the distance between the data is the same. This is an important consistency concern for numerical methods. Contrary to the well-confined thin-band structure in the stationary K_{\text{DAS}} kernel, the non-stationary effects in the NN kernel are evident in the heat map with an increased area of high kernel values. With K_{\text{NN}} , GP correlations depend on the actual values of \tilde{\mathbf{x}} and \tilde{\mathbf{x}}^{\prime} , thereby the heat map appears to be widely spread out across the large area of the entire domain. It is true that the NN kernel can be tuned to produce a more confined, narrow band-like structure by increasing \sigma from the current value of 1 in Fig. 4 . Nevertheless, one still faces the non-stationary effects, including the need for inverting the kernel at each input location of \mathbf{x} and \mathbf{x}^{\prime} . We present K_{\text{NN}} ’s heat map using \sigma_{0}=\sigma=1 to visualize the non-stationary effects in a clear way. Table 14 : Grid convergence results for the 1D baseline point-to-point interpolation using the NN kernel in Eq. 39 . The NN prediction takes cell center function values f(x_{i}) as input for f(x)=e^{-x}\sin(4\pi x)\cos(2\pi x) on [0,1] and computes f(x_{i+1/2}) using \sigma=\sigma_{0}=1 . Grid Res. r_{gp}=1 r_{gp}=2 r_{gp}=3 L_{1} error L_{2} error L_{\infty} error L_{1} error L_{2} error L_{\infty} error L_{1} error L_{2} error L_{\infty} error 16 2.0485e-02 2.4082e-02 4.5616e-02 5.0616e-03 5.8995e-03 1.1189e-02 1.1641e-03 1.3252e-03 2.3945e-03 32 2.6048e-03 2.9700e-03 5.1987e-03 1.5872e-04 1.8007e-04 3.2454e-04 8.8349e-06 9.7185e-06 1.6531e-05 64 3.2722e-04 3.7604e-04 7.4039e-04 4.8296e-06 5.5502e-06 1.0466e-05 6.3433e-08 7.1688e-08 1.2562e-07 128 4.0433e-05 4.6538e-05 9.8315e-05 1.4945e-07 1.7071e-07 3.3212e-07 4.7695e-10 5.3743e-10 9.4100e-10 256 5.0100e-06 5.7736e-06 1.2506e-05 4.5900e-09 5.2572e-09 1.0579e-08 4.3487e-12 5.2229e-12 1.5137e-11 L_{1} EOC L_{2} EOC L_{\infty} EOC L_{1} EOC L_{2} EOC L_{\infty} EOC L_{1} EOC L_{2} EOC L_{\infty} EOC 16 – – – – – – – – – 32 2.975 3.019 3.133 4.995 5.034 5.108 7.042 7.091 7.178 64 2.993 2.981 2.812 5.038 5.020 4.955 7.122 7.083 7.040 128 3.017 3.014 2.913 5.014 5.023 4.978 7.055 7.059 7.061 256 3.013 3.011 2.975 5.025 5.021 4.972 6.777 6.685 5.958 Table 15 : Grid convergence results for the 1D baseline point-to-point interpolation using the DAS kernel in Eq. 40 . The DAS prediction takes cell center function values f(x_{i}) as input for f(x)=e^{-x}\sin(4\pi x)\cos(2\pi x) on [0,1] and computes f(x_{i+1/2}) . Grid Res. r_{gp}=1 r_{gp}=2 r_{gp}=3 L_{1} error L_{2} error L_{\infty} error L_{1} error L_{2} error L_{\infty} error L_{1} error L_{2} error L_{\infty} error 16 3.5577e-02 4.2384e-02 8.6919e-02 3.5273e-02 4.2029e-02 8.5971e-02 3.5243e-02 4.2033e-02 8.5812e-02 32 9.1863e-03 1.0765e-02 2.2903e-02 9.1511e-03 1.0725e-02 2.2820e-02 9.1060e-03 1.0675e-02 2.2742e-02 64 2.2622e-03 2.6473e-03 5.5801e-03 2.2603e-03 2.6453e-03 5.5753e-03 2.2566e-03 2.6409e-03 5.5670e-03 128 5.6063e-04 6.5374e-04 1.3808e-03 5.6053e-04 6.5363e-04 1.3805e-03 5.6032e-04 6.5338e-04 1.3801e-03 256 1.3931e-04 1.6230e-04 3.4265e-04 1.3930e-04 1.6229e-04 3.4264e-04 1.3929e-04 1.6228e-04 3.4262e-04 L_{1} EOC L_{2} EOC L_{\infty} EOC L_{1} EOC L_{2} EOC L_{\infty} EOC L_{1} EOC L_{2} EOC L_{\infty} EOC 16 – – – – – – – – – 32 1.953 1.977 1.924 1.947 1.970 1.914 1.952 1.977 1.916 64 2.022 2.024 2.037 2.017 2.019 2.033 2.013 2.015 2.030 128 2.013 2.018 2.015 2.012 2.017 2.014 2.010 2.015 2.012 256 2.009 2.010 2.011 2.009 2.010 2.010 2.008 2.009 2.010 First, we examine the convergence of the three kernels on smooth data. For the baseline pointwise interpolation, both K_{\text{SE}} and K_{\text{NN}} feature a rate of convergence order (2r_{gp}+1) on smooth data as shown in Tables 3 and 4 and Table 14 , respectively. The K_{\text{DAS}} lags behind significantly in this regard and demonstrates a fixed second order convergence rate regardless of stencil sizes as shown in Table 15 . Despite its inferior convergence rate on smooth flows, the true value of the DAS kernel is to be emphasized and highlighted in relation to discontinuous flow problems. In Figs. 5 and 6 , we present how these three kernels perform in approximating data predictions across shocks and discontinuities for interpolation. Figure 5 : We test the problem of interpolating across a single discontinuity using our GP point-to-point interpolation and compare different kernels. The solution is computed over [-0.2,0.2] with N_{x}=20 for the left panel and N_{x}=40 for the right. (Left) The hyperparameters of the kernels are varied on each kernel holding r_{gp}=2 . The SE kernel is varied over \ell values of 0.1, 1.0, and 10. The NN kernel is varied over \sigma values of 1, 10, and 100. We keep \sigma_{0}=1 as it has little effect on the solution. DAS does not have any hyperparameters and is held at constant. (Right) The stencil order is varied from r_{gp}=1,2,3 for each kernel choice. The SE kernel utilizes \ell=0.1 and the NN kernel uses \sigma=100 and \sigma_{0}=1 . Figure 6 : Comparison of point-to-point interpolation on three different profiles using the SE, NN, and DAS kernels. The NN kernel uses \sigma=\sigma_{0}=1 , and the SE kernel uses \ell=12\Delta x . (Top) The function, f_{1} , is a piecewise function defined on [0,1.5] by f_{1}(x)=0 for 0\leq x<0.3 and 1.0\leq x\leq 1.5 ; f_{1}(x)=e^{-2x}\sin(10\pi x)+1/2 for 0.3\leq x<0.6 ; f_{1}(x)=1 for 0.6\leq x<1.0 . (Bottom) The function, f_{2} , is a piecewise function defined on [-4,4] by f_{2}(x)=\sin(\pi x) for |x|\geq 1.0 ; f_{2}(x)=3 for -1.0