Abstract
Mimetic finite difference operators \(\textbf{D}\), \(\textbf{G}\) are discrete analogs of the continuous divergence (div) and gradient (grad) operators. In the discrete sense, these discrete operators satisfy the same properties as those of their continuum counterparts. In particular, they satisfy a discrete extended Gauss’ divergence theorem. This paper investigates the higher-order quadratures associated with the fourth- and sixth- order mimetic finite difference operators, and show that they are indeed numerical quadratures and satisfy the divergence theorem. In addition, extensions to curvilinear coordinates are treated. Examples in one and two dimensions to illustrate numerical results are presented that confirm the validity of the theoretical findings.
Similar content being viewed by others
1 Introduction
The use of the finite difference (FD) method is a common approach in numerical solutions of partial differential equations (PDEs). The FD method discretizes the partial derivatives of PDEs into a set of algebraic equations, which is then solved. Although FD methods have some known drawbacks, one advantage of FD methods is its simplicity (especially when one can fit the domain into a box-shaped geometry), a straightforward implementation when compared to other methods such as the finite element or finite volume methods.
One of the drawbacks of the FD method is the sensitivity of the solution to boundary conditions (LeVeque 2007). FD methods derive stencils for the derivative operators using a Taylor’s series approach. This approach has the advantage of being straight-forward, since one can easily implement matrices for the numerical derivatives. However, the underlying physics (or other mathematical characteristics) of the problem may not be adequately represented in this discretization process. Mimetic difference methods construct difference operators divergence, \(\textbf{D}\), and gradient \(\textbf{G}\), which discretely satisfy the extended Gauss’ divergence theorem. These methods are called mimetic because the discrete difference operators mimic the properties of their continuum counterparts. Hence, numerical schemes obtained using the mimetic operators are more faithful to the physics of the problem under investigation (Castillo and Miranda 2013).
The classical divergence theorem states that the flux of a vector field \(\vec v\) across the sectionally smooth boundary of a compact domain in two or three dimensions equals the surface or volume integral of \(div(\vec v)\), and this integral can be regarded as a functional. When dealing with quadrature approximations for integrals, one would then have a functional estimate for the domain integral. This functional estimate will be said to mimic the divergence theorem when this estimate is accurate and also turns out to be equal to the quadrature over the boundary. It is known that general high-order finite differences for the divergence over a uniform grid may be accurate, but they fail to mimic the divergence theorem. Hicken & Zingg (2013) have proven accuracy of the quadratures associated with summation-by-parts methods (SBP) (Kreiss and Scherer 1974; Strand 1994). SBP methods (derived on nodal grids) have been extended to staggered grids via interpolation, O’Reilly et al. (2017), but their order of approximation at the boundary is lower than the one in the interior of the domain. The construction of these operators requires a generalized inner product, referred to as the weight matrix, whose coefficients can be used for numerical integration of functions.
It is important to notice that the mimetic difference operators are built from a staggered grid (not from a nodal one) and as a result, their processes of constructions differ from those of the SBP approach. Our scalar functions are defined at the boundary and the center of cells, while our vector functions are defined at the edges or faces of cells. Moreover, the mimetic quadratures induce diagonal norms and our mimetic operators retain the same order of accuracy over the whole domain, including at the boundary. The SBP diagonal norm does not have the same order of accuracy at the boundary, i.e., their \(4^{th}\)-order operator is only \(3^{rd}\)-order accurate at the boundary.
Navarro (2015) and Srinivasan & Castillo (2016) investigated the use of the coefficients obtained from the diagonal weight matrices Q and P, associated with mimetic difference operators divergence \(\textbf{D}\) and gradient \(\textbf{G}\) on staggered grids (Castillo and Grone 2003) as a tool for numerical integration. This preliminary study was inspired by the resemblance of the coefficients of the mimetic quadratures with those of Newton-Cotes’. In fact, the second order is exactly the 3/8, 9/8 Newton-Cotes quadrature, as previously noticed by Castillo et al. (2001). The results of Navarro and Srinivasan & Castillo demonstrated that mimetic quadrature coefficients are a viable alternative for numerical integration.
In this paper, a theoretical framework is provided for the fourth and sixth order mimetic quadratures (Castillo et al. 2001) associated with the corresponding \(\textbf{D}\) and \(\textbf{G}\) discrete mimetic operators. The mimetic coefficients considered in this paper are the ones from (Castillo and Grone 2003), which guarantee even order of accuracy at the boundaries and interior nodes for the derivative operators. The approach used for SBP quadratures reported by Hicken & Zingg (2013) is followed.
The novelty of this research lies in the demonstration that the weights obtained from the mimetic discretization method are a valid numerical quadrature formulation, and that these quadratures satisfy the divergence theorem. In addition all weights (coefficients) are positive-valued and result in diagonal matrices. Finally, high-order mimetic quadrature formulations retain accuracy when used in curvilinear coordinate systems.
This paper is organized as follows: after stating in Sect. 2 some identities that one would like to mimic in the discrete sense, Sect. 3 introduces mimetic operators, and the resulting high-order quadratures. Section 4 demonstrates that the mimetic quadratures are bonafide numerical quadratures so they can be used for numerical integration of functions. Section 5 presents the extension to curvilinear coordinates. Section 6 provides numerical implementations of the quadratures, along with their calculated accuracy orders. This section, also includes examples of how to solve PDEs using the mimetic operators. Finally, the “Appendix” shows details of the derivation of the fourth-order divergence and gradient operators.
2 Identities
Let [a, b] be an interval. Let \(\{ x_0, x_1, \cdots , x_N \}\) a homogeneous partition of [a, b], i.e., \(x_i = a + ih, \, i \in I, \, h = \frac{b-a}{N-1}, I = \{ 0, 1, \cdots , N \}\).
-
1.
A quadrature for the numerical integration of function \(\mathcal {U}:[a,b] \rightarrow {\mathbb {R}}\) is given by the closed Newton-Cotes formula,
$$\begin{aligned} \int _{a}^{b} \mathcal {U} \ \textrm{d}x \approx \sum _{i=0}^{N} {{\tilde{w}}}_i \,U_i = \big<U, \mathbbm {1}\big>_{{{\tilde{W}}}} = h \, \big <U,\mathbbm {1}\big >_{{W}} = h \, {U}^T W \mathbbm {1} , \end{aligned}$$(1)where \({{\bar{w}}}_i, \, i \in I\), are its integration weights, and discrete vector \(U = (U_i) = (U(x_i)), i \in I\). In addition, \(w_i = \frac{{{\bar{w}}}_i}{h}, \, i \in I\), and \({\bar{W}} = \text {diag } \{ {{\bar{w}}}_i \} = h \, \text {diag } \{ w_i \} = h \, W\), and \(\mathbbm {1} = [1,1,...,1]^T\). Notice that \(\big <\cdot ,\cdot \big >_{V}\) for \(V = {\bar{W}}, W\) refers to the generalized inner product.
-
2.
The generalized inner product of functions \(\mathcal {U}, \mathcal {V}: [a,b] \rightarrow {\mathbb {R}}\) is given by
$$\begin{aligned} \int _{a}^{b} \mathcal {U} \mathcal {V}\ \textrm{d}x \approx {\big <{U},{V} \big >_{{{\mathbb {W}}}} = U^T {\mathbb {W}} V = V^T {\mathbb {W}} U}, \end{aligned}$$(2)where \(U = (U_i), \, V = (V_i), \, i \in I\), and \({\mathbb {W}}\) is a symmetric and positive definite matrix. It will turn out that one can restrict \({\mathbb {W}}\) to be diagonal with positive entries.
-
3.
The integration by parts (IBP) formula for \(\mathcal {U}, \mathcal {V}: [a,b] \rightarrow {\mathbb {R}}\) is given by
$$\begin{aligned} \int _{a}^{b} \mathcal {U} \mathcal {V}_x \ \textrm{d}x = \mathcal{U}\mathcal{V}\bigg |_{a}^{b} - \int _{a}^{b} \mathcal {V} \mathcal {U}_x \ \textrm{d}x. \end{aligned}$$(3) -
4.
The first derivative operator \(\frac{\partial }{\partial x}\) over a smooth function \(\mathcal {V}:[a,b] \rightarrow {\mathbb {R}}\) has a discrete analog \(\mathcal {D}_1\) which acts on discrete vector \(V = (V_i), \, i \in I\) and approximates \(\frac{\partial \mathcal {V}}{\partial x} = \mathcal {V}_x\) by
$$\begin{aligned} \mathcal {V}_x = \frac{\partial \mathcal {V}}{\partial x} \approx \mathcal {D}_1 \, V. \end{aligned}$$(4)
3 Mimetic finite difference
The higher dimension equivalent to the IBP is the extended Gauss’ divergence theorem,
In Eq. (5), \(\nabla \cdot \) is the divergence operator div, and \(\nabla \) the gradient operator grad. The integral on the right hand side of Eq. (5) represents the boundary integral operator. The aim of mimetic discretizations is to seek discrete equivalents for the div and grad operators.
The mimetic discretization method utilizes a staggered grid. In two or three dimensions, the divergence differential operator acts on vector fields, and the gradient differential operator acts on scalar fields. PDE flux boundary conditions require that the flux is given in terms of a gradient. So, physically meaningful PDE discretizations are constrained to compute the result of a gradient on the boundary of a voxel or element. Similarly, the definition of the divergence (and that of a curl) of a vector field (as the limit of the average flux across the boundary of a region whose volume goes to zero) imposes the condition that when discretized, the result of a divergence should be computed on the interior of a discrete voxel.
On [a, b], we define \(x_i = a + \frac{i(b-a)}{2N}, \, i = 0,1,\ldots ,2N\) and consider:
-
the set of cell centers is \({\tilde{X}} = \{ x_{1/2},x_{3/2},\ldots x_{N-1/2} \}\),
-
the set of cell nodes is \(X = \{ x_0,x_1,\ldots ,x_N \}\), and
-
the set of centers extended (cell centers and interval boundaries a and b) is \({\hat{X}} = \{ x_0,x_{1/2},x_{3/2},\ldots ,x_{N-1/2},x_N \}\).
The mimetic divergence and gradient operators are defined as linear maps
Therefore, \(\textbf{D} \in {{\mathbb {R}}}^{N \times (N+1)}\) and \(\textbf{G} \in {{\mathbb {R}}}^{(N+1) \times (N+2)}\). A derivation of the mimetic fourth-order div and grad operators can be found in the “Appendix”.
The image of operator \(\textbf{D}\) is at the cell centers \(\tilde{X}\). We extend the divergence operator to include the interval boundaries or \({\hat{X}}\) by setting the value of this extension to zero. We denote this new operator by \(\hat{\textbf{D}}:X \rightarrow {\hat{X}}\). Notice that \(\hat{\textbf{D}} \in {{\mathbb {R}}}^{(N+2) \times (N+1)}\). As a linear map, \(\textbf{D}\) is extended to \(\hat{\textbf{D}}\) by appending a first row and last row of zeros.
For simplicity, we identify [a, b] with [0, 1].
In one dimension, Eq. (5) becomes
where \(\dfrac{\partial v}{\partial x} \) corresponds to the div operator, and \(\dfrac{\partial f}{\partial x}\) to the grad operator. Hence, v is seen as a discrete vector field and f is seen as a discrete scalar field.
Equation (6) can be rewritten as
Let \(V = v\vert _X = (V_i) = V(x_i), \, x_i \in X\) be the discrete version of the vector field v (V is v restricted to X), and let \(F = f\vert _{{\hat{X}}} = (F_i) = F(x_i), \, x_i \in {\hat{X}}\) be the discrete version of the scalar field f (F is f restricted to \({\hat{X}}\)).
Using mimetic operators \(\hat{\textbf{D}}\) and \(\textbf{G}\), the discrete equivalent of Eq. (7), for general diagonal positive-definite weight matrices Q and P is (see (1))
Rather than satisfy Eq. (8) exactly, our constructed operators up to an error term of order h satisfies Eq. (8). Specifically, we construct operators that satisfy the following equality
where E is defined in Eq. (14).
One property of these mimetic operators of \(k^{th}\) order is the zero row sum
where \(\mathbbm {1}\) is a vector of ones of the appropriate size. Notice that \({\mathbbm {1}}^T \hat{\textbf{D}}^T = 0\).
For \(V = {\mathbbm {1}}\), (8) becomes \(h {\mathbbm {1}}^T P \textbf{G} F = F_N - F_0 = (-1,0,\ldots ,0,1)^T F\), for any F, or equivalently, \(h \textbf{G}^T P {\mathbbm {1}} = b_{m+2} = (-1,0,\ldots ,0,1)\). Therefore,
where \(p = (p_i) = (P_{ii})\) is a vector that contains the diagonal of P.
Similarly, if one replaces \(F = {\mathbbm {1}}\) in (8) then
where \({\hat{q}} = ({{\hat{q}}}_i) = (Q_{ii})\) is a vector that contains the diagonal of Q and vector \(b_{m+1} = (-1,0,\ldots ,0,1)^T\).
Matrices P and Q are defined as the solutions of the programming problems
and
respectively.
From (8), define \(\textbf{B} \in {{\mathbb {R}}}^{(N+2) \times (N+1)}\), the mimetic boundary operator, as
Notice that if \(e_1 =(1,0,\ldots ,0)\) then the first row of \(\textbf{B}\) is given by
where the last identity follows from (11) and that the first row of \(\hat{\textbf{D}}\) (by construction since there are no divergence of boundary points, see “Appendix”) is zero. Similarly, the last row of \(\textbf{B}\) is \((0,\ldots ,0,1)\).
In addition, for \(2 \le i \le N+1\), the corresponding row sums of \(\textbf{B}\) are
where \( \delta _{ij}\) is the Kronecker delta. The last identity follows from (10) and (8).
If one defines \({\textbf{B}}_1 \in {{\mathbb {R}}}^{(N+2) \times (N+1)}\) by
and
the first and last rows of \(\textbf{E}\) are zero. All other row sums of \(\textbf{E}\) are zero. From Eq. (12) we see that \(\textbf{E}\) is order h so it goes to zero as h goes to zero.
Table 1 shows the quadrature weights for orders \(k = 2\,s = 2, 4, 6\), obtained from the mimetic method in Castillo and Grone (2017). The \(\lambda _i\)’s are the coefficients of the quadratures. The accuracy conditions that satisfy the truncation error for polynomials up to order \(k+1\) are
4 Quadrature properties of the mimetic coefficients
The Euler-Maclaurin summation formula (Apostol 1999) relates the integral and the numerical derivative of a function. Consider \(f:[0,1] \rightarrow {\mathbb {R}}, \, f \in C^{2m+2}\). The Euler-Maclaurin summation formula is
A direct consequence of this formula can be stated as follows:
Proposition 1
Consider an interval \(x \in [0,1]\) and a function \(g = f' \in C^{2\,m+2}\), with \(2\,m+2 \ge 2\,s\). Let W be a positive definite symmetric diagonal matrix of the form \(W = diag(W_L, I, W_R)\), where \(W_L = diag(\lambda _0, \lambda _1, \dots , \lambda _{2s-1})\), \( W_R = diag(\lambda _{2\,s-1}, \dots , \lambda _1, \lambda _0)\) and I is the identity matrix. A quadrature for the function g of the form \(\big < \mathbbm {1}, hWg \big>\) is a \(2\,s\)-order accurate approximation of \(f_1-f_0\) if and only if the 2s-quadrature weights satisfy the \((2s-1)\) Bernoulli conditions,
with \(r = 2\,s\), and \(\beta _j\) is the sequence of Bernoulli numbers, \(\beta _1 = -\frac{1}{2}, \beta _2 = \frac{1}{6}, \beta _4 = -\frac{1}{30}, \beta _6 = \frac{1}{42}, \beta _3 = \beta _5 = \dots =0\) (refer to theorem 1 in Hicken and Zingg (2013)).
Proposition 2
The \(P_i\)’s satisfy the \((2s-1)\) Bernoulli conditions.
Proof
By construction, \(\big <\mathbbm {1}, h \textbf{G}f \big >_P = f_1 - f_0\) is satisfied. Hence, the weights of P satisfy the \((2s-1)\) Bernoulli conditions. The exactness condition corresponds to Eqs. (27) and (29) in Castillo and Grone (2003). \(\square \)
Proposition 3
The algebraic system of 2s-equations is completed for the 2s-weights \(P_1, P_2, \dots , P_{2s}\) with the coefficients \(d_{ij}\)’s (as noted in the “Appendix”). These \(d_{ij}\)’s are the coefficients that arise from the Toeplitz-structure for the centered-difference stencil on a staggered grid that is of 2s-order of accuracy.
Proof
It is enough to take as the remaining complementary equation any appropriate simple column sum from \(h P\textbf{G}\) equated to zero. However, involving the conveniently adapted entries from the upper left corner of the stencil yields the desired 2 s-order of accuracy at the boundary nodes. This corresponds to the matrix \(I_l\) of Eq. (27) in Castillo and Grone (2003). \(\square \)
Proposition 4
The quadrature obtained using the diagonal weight matrix P is \((2s+1)\)-order accurate.
Proof
By construction \(\big < \mathbbm {1}, hP \textbf{G}f \big > = f_1 - f_0\) holds. Since \(\textbf{G}\) is 2s-order accurate, it follows that \(\textbf{G} f = f' + O(h^{2s})\). Thus, \(hP \textbf{G}f = hPf' + hP[O(h^{2\,s})]\). It follows that \(f_1 - f_0 = \big< \mathbbm {1}, hP \textbf{G}f \big> = \big< \mathbbm {1}, hPf' \big> + \big < \mathbbm {1}, O(h^{2\,s+1}) \big > \). So, the quadrature obtained by using the diagonal P matrix that is associated to \(\textbf{G}\) is \((2s+1)\)-order accurate. \(\square \)
The mimetic divergence operator and Q hold a similar property. It is well known that general higher-order FD schemes can accurately represent the divergence on a uniform grid. However, they fail to mimic the divergence theorem in the sense that the discrete quadrature of the volume integral does not produce a discrete quadrature for the surface integral. As noted in Hicken and Zingg (2013), the use of the corresponding diagonal matrix combined with the SBP operators produces a functional that mimics the divergence theorem. As shown in the previous section, P and Q, when combined with the mimetic \(\textbf{G}\) and \(\textbf{D}\) produce a functional that mimics the extended Gauss’ divergence theorem on a staggered grid.
Mimetic operator \(\textbf{D}\) can be generalized to higher dimensions by means of Kronecker products (Castillo and Grone 2017). By construction, \(\big < \mathbbm {1}, hQ \textbf{D} v \big > = v_n -v_0\) in [0, 1]. In a two dimensional grid, the exactness condition becomes \(\big < I_2, h\textbf{D}_{\textbf{xy}} v \big > _{Q_{xy}} = \mathbf {B_{xy}}v\), where \(Q_{xy}, \textbf{D}_{\textbf{xy}}, \textbf{B}_{\textbf{xy}}\) and \(I_2\) are obtained from the Kronecker products using the one dimensional operators. The implementation of the Kronecker products is demonstrated in example 4 of the numerical results section. Therefore, one can conclude that the divergence theorem is satisfied because the discrete quadrature of \(\textbf{D}v\) over the volume produces a discrete quadrature of the boundary flux v.
5 Mimetic quadratures and the divergence theorem
On a two dimensional grid with m and n equal size sub-intervals, the area integral on the left hand side of Eq. (5) can be discretized as
where \({\hat{\textbf{D}}_{xy}} = \big [ {{\hat{\textbf{I}}_n}} \otimes {{\hat{\textbf{D}}_m}}, {{\hat{\textbf{D}}_n}} \otimes {\hat{\textbf{I}}}_{m} \big ]\), \(\textbf{G}_{\textbf{xy}} = \big [ {{\hat{\textbf{I}}_n}}^T \otimes \mathbf {G_m}; \mathbf {G_n} \otimes {{\hat{\textbf{I}}_m}}^T \big ]\), \(\mathbf {B_{xy}} = \big [ {{\hat{\textbf{I}}_n}} \otimes \mathbf {B_m}, \mathbf {B_n} \otimes {{\hat{\textbf{I}}_m}} \big ]\), \(P_{xy} = diag([\mathbf {I_n} \otimes P_{m+1}, P_{n+1} \otimes \mathbf {I_m}])\), \(Q_{xy} = diag([\mathbf {I_{n+2}} \otimes Q_{m+2}, Q_{n+2} \otimes \mathbf {I_{m+2}}])\), \({\hat{\textbf{I}}_n} = [0; \mathbf {{I}_n}; 0]\).
The significance of Eq. (16) is that the 2 s-order of accuracy is retained in higher dimensions for the extended Gauss’ divergence theorem, since the higher dimension operators are formed, via Kronecker products, using the one-dimensional \(\textbf{D}\) and \(\textbf{G}\) matrices. Moreover, the discretization invokes the boundary operator, and therefore depends only on the boundary values for f and v. It can therefore be concluded that the mimetic quadratures accurately mimic the extended Gauss’ divergence theorem.
A special case with f a constant function in Eq. (16) results in the divergence theorem. The mimetic quadratures therefore satisfy the discrete version of the divergence theorem.
6 Higher order mimetic quadratures on curvilinear coordinates
Evaluation of integrals by a coordinate transformation require the calculation of its Jacobian. In one dimension, the Jacobian of a coordinate transformation to a uniform staggered grid \({\hat{X}}\) is simply \(\dfrac{\textrm{d}f}{\textrm{d}x} = f^{'}\). If the original integrand is some function z, with the corresponding discrete vector Z, one can consider an expression of the form \(\big < Z, hPf' \big>\) as an induced quadrature on the staggered grid. One can use proposition 4 for the quadrature of the form \(\big < \mathbbm {1}, hPf' \big>\). If z and f are polynomials of degree i and j, with \((i+j) \le 2\,s\), then the discrete equivalent of \( \int _{0}^{1} z(x) f'(x) \ \textrm{d}x\) can be expressed as \(\big < Z, h\textbf{D}f \big >_Q = Z^T hQ \textbf{D}f\). It now follows from the construction of \(\textbf{D}\) that if \(z(x)f' \in C^{2\,s} [0,1]\), then \(Z^T hQ \textbf{D}f = \int _{0}^{1} z(x) f'(x) \ \textrm{d}x + O(h^{2\,s})\). This is an accurate quadrature when the integrand is of the form \(z(x) f'(x)\) [18].
In higher dimensions, the Jacobian is a linear combination of products of first partial derivatives. Integrals in multiple coordinates on Cartesian domains can be expressed as iterated sums starting with one variable of integration. The mimetic operators in higher dimensions can be obtained from the one dimensional operators using the Kronecker products. Thus, the accuracy of the mimetic quadratures with curvilinear coordinates is retained in higher dimensions as well (Srinivasan et al. 2022).
7 Numerical examples
In this section, the implementation of higher order mimetic quadratures is illustrated in the first four numerical examples. The last two examples use the mimetic \(\textbf{D}\) and \(\textbf{G}\) operators for solving PDEs.
7.1 Example 1
The goal of this example is to evaluate the integral given in Schwartz (1969), and compare the numerical approximation proposed in this paper and its analytical solution.
The numerical solution was obtained for \(a=0.5\). A grid refinement study was performed to calculate the convergence rate for each of the methods considered. The errors are proportional to the \(p^{th}\) power of the grid spacing h, where p is the order of convergence, i.e., \(E(h) = Ch^p\).
C and p for each of the methods, have been fitted by least squares. The results are summarized in Table 2. Figure 1 shows the log-log errors as a function of grid spacing. The numerical results achieve the desired order of accuracy for second, fourth and sixth orders.
7.2 Example 2
Consider the integral \({\textbf {e2}}\) from Bailey & Borwein (2006).
This integral involves a coordinate transformation \(\xi = arctan(x), \xi \in [0,\frac{\pi }{4}]\). The numerical integration uses \(\mathcal {I}_{n2} = z' hP\textbf{G}x\), where z is the integrand in \(\mathcal {I}_2\). \(\textbf{G}x\) refers to the inverse of the Jacobian, which is the first derivative of the transformation \(\dfrac{\textrm{d}x}{\textrm{d}\xi }\).
Figure 2 shows the log-log errors. Since the sixth order numerical solution exhibits round-off errors as the grid size is decreased, the rate of convergence was computed at every step by halving the step size (as opposed to a least-square curve fit that was performed for the previous example). Table 3 shows the computed rates of convergence for each step size.
7.3 Example 3
Consider the double integral
from Hicken & Zingg (2013). The computational domain \((\xi , \eta )\) is mapped to the physical coordinates (x, y) via the transformation
where \(\xi \in [0,1]\) and \(\eta \in [0,1]\). For each grid size, the physical coordinates were evaluated using a nonlinear solver. The physical coordinates were then used to compute the integrand function z in \(\mathcal {I}_3\). The discrete equivalent of the double integral can be represented as
where the Jacobian J is given by
and where \(\circ \) denotes the element-wise product and \(\textbf{I}\) is the identity matrix (Table 4).
Figure 3 shows the log-log errors as a function of step size for example 3. The convergence for the sixth order scheme shows round-off errors since it quickly attains machine numeric precision for the calculations.
7.4 Example 4
This example demonstrates the numerical convergence of the boundary operator \(\textbf{B}\) and \({\textbf{B}}_1\) in 2D as shown in Eq. (16). Convenient functions v and f were chosen as
Figure 4 shows the calculated log-log errors as a function of step size. Both \(\textbf{B}\) and \({\textbf{B}}_1\) achieve the desired order of accuracy as expected (Table 5).
7.5 Example 5 - Brusselator
In this example the solution of a one dimension system of diffusion Eq. (Gerhard and Hairer 1996) defined by the set of PDEs
is approximated by mimetic operators.
The initial and boundary conditions were set to \(u(0,t) = u(1,t) = 1\), \(v(0,t) = v(1,t) = 3\), \(u(x,0) = 1+sin(2\pi x)\), \(v(x,0) = 3\) in the domain \(x \in [0,1]\) and \(t \in [0,10]\). The boundary conditions for u and v were imposed at each step of numerical integration.
The \(\nabla \cdot \nabla \) operator was discretized using the fourth order mimetic Laplacian \(\textbf{L} = \hat{\textbf{D}} \textbf{G}\). The Brusselator system has been solved as a system of equations (both u and v simultaneously). No special treatment was done for the nonlinear \(u^2v\) term here. As in, both u and v were defined simultaneously on staggered grids since this is a dissipative system.
The system of equations was solved using the adaptive fourth-order Runge Kutta time discretization after a mimetic fourth-order spatial discretization of the Laplacian was utilized. The numerical solution is shown in Fig. 5.
7.6 Example 6 - 2D inviscid Burgers’ equation
The 2D inviscid Burgers’ equation in quasilinear form (Jameson 2008) is given by
A 2D Gaussian input \(u(x,y,0) = exp \left( -\dfrac{x^2}{2 \sigma ^2_x} - \dfrac{y^2}{2 \sigma ^2_y } \right) \), \(\sigma _x = \sigma _y = 0.5\) was used as initial condition in the domain \(x \times y \in [-3,3]^2\), with periodic boundary conditions.
The \(\nabla \cdot \) operator was discretized using the sixth order \(\hat{\textbf{D}}\), along with the corresponding sixth order interpolant to have the quantities at the cell centers. The non-linear term was treated in quasilinear form as referenced in citejameson. Interpolation is necessary at each time step of integration, since the div operator maps u from nodes to cell centers. With \(I_D\) as the interpolant, the discretized mimetic divergence was written as \(D I_D\) at each time step. The sixth-order interpolant used is from (Srinivasan et al. 2022). The procedure to discretize \(\nabla \cdot u\) using interpolant matrices is also mentioned in that report.
Figure 6 shows the solution obtained from a fourth-order Runge Kutta scheme with sixth-order mimetic spatial discretization.
8 Conclusion
This paper presents an introduction and a theoretical framework for higher-order quadratures arising from the mimetic methods. The mimetic quadrature weights are positive definite diagonal matrices that satisfy the divergence theorem. The weights satisfy also the Bernoulli conditions of the Euler-Maclaurin series, and can therefore be used as end corrections on a grid for numerical integration of functions. Mimetic methods satisfy vector calculus identities as well as a discrete version of the extended Gauss’ divergence theorem. The mimetic \(\hat{\textbf{D}}\) and \(\textbf{G}\) operators also exhibit uniform order of accuracy at all (interior and the boundary) grid points. In addition, the accuracy of the higher-order mimetic quadratures is preserved under curvilinear coordinates.
References
LeVeque R.: Finite difference methods for ordinary and partial differential equations: steady-state and time-dependent problems (Classics in Applied Mathematics). Soc. for Industrial and Applied Math., Philadelphia, PA, USA (2007)
Castillo, J.E., Miranda, G.F.: Mimetic Discretization Methods. CRC Press, Boca Raton (2013)
O’Reilly, O., Nordström, J.: Provably non-stiff implementation of weak coupling conditions for hyperbolic problems. Numer. Math. 150, 551–589 (2022). https://doi.org/10.1007/s00211-021-01263-y
O’Reilly, O., Petersson, N.A.: Energy conservative SBP discretizations of the acoustic wave equation in covariant form on staggered curvilinear grids arXiv:1907.01105
Mattsson, K., O’Reilly, O.: Compatible diagonal-norm staggered and upwind SBP operators. J. Comput. Phys. 352(1), 52–75 (2018). https://doi.org/10.1016/j.jcp.2017.09.044
O’Reilly, O., Lundquist, T., Nordström, J., Dunham, E.M.: Energy stable and high-order-accurate finite difference methods on staggered grids. J. Comput. Phys. 346, 572–589 (2017). https://doi.org/10.1016/j.jcp.2017.06.030
Prochnow, B., O’Reilly, O., Dunham, E.M., Petersson, N.A.: Treatment of the polar coordinate singularity in axisymmetric wave propagation using high-order summation-by-parts operators on a staggered grid. Comput. Fluids 149, 138–149 (2017). https://doi.org/10.1016/j.compfluid.2017.03.015
Hicken, J.E., Zingg, D.W.: Summation-by-parts operators and high-order quadrature. J. Comput. Appl. Math. 237, 111–125 (2013). https://doi.org/10.1016/j.cam.2012.07.015
Navarro, R.V.: Higher order mimetic operators and quadratures to compute concentration profiles and mass-transport in carbon dioxide subsurface flow, Masters Thesis, San Diego State University, San Diego, CA (2015). https://paolini.sdsu.edu/apnum/Higher-order_mimetic_operators.pdf
Srinivasan, A., Castillo, J.E.: Implementation of the Newton-Cotes and Mimetic Quadrature Coefficients for Numerical Integration. Publication No: CSRCR2016-01 (2016) https://doi.org/10.13140/RG.2.2.31739.00805
Castillo, J.E., Grone, R.D.: A matrix analysis approach to higher-order approximations for divergence and gradients satisfying a global conservation law. SLAM J. Matrix Anal. Appl. 25, 128–142 (2003)
Castillo, J.E., Hyman, J.M., Shashkov, M.J., Steinberg, S.: Fourth and sixth-order conservative finite-difference approximations of the Divergence and Gradient. Appl. Numer. Math. 37, 171–187 (2001)
Kreiss, H.O., Scherer, G.: Finite element and finite difference methods for hyperbolic partial differential equations. Math. Asp. Finite Elem. Part. Differ. Equ. (1974). https://doi.org/10.1016/b978-0-12-208350-1.50012-1
Hildebrand, B.F.: Introduction to Numerical Analysis, 2nd edn. Dover Publications Inc, New York (1987)
Apostol, T.M.: An elementary view of Euler’s summation formula. Am. Math. Mon. 106(5), 409–418 (1999). https://doi.org/10.2307/2589145
Castillo, J.E., Grone, R.D.: Using kronecker products to construct mimetic gradients. J. Linear Multilinear Algebra, 2031–2045 (2017)
Castillo, J., Yasuda, M.: Linear systems arising for second-order mimetic divergence and gradient discretizations. J. Math. Model. Algorithms 4, 67–82 (2005)
Boada, A., Corbino, J., Castillo, J. E.: High-order mimetic operators and energy conservation on curvilinear staggered grids. submitted for publication
Srinivasan, A., Corbino, J., Castillo, J. E.: Implementation of mimetic relaxation Runge Kutta Methods, Publication No. CSRCR2022-01 (2022). http://www.csrc.sdsu.edu/research_reports/CSRCR2022-01.pdf
Schwartz, C.: Numerical integration of analytic functions. J. Comp. Phys. 4(1), 19–29 (1969)
Bailey, D.H., Borwein, J.M.: Effective bounds in Euler–Maclaurin- based quadrature (Summary for HPCS06). In: 20th International Symposium on High-Performance Computing in an Advanced Collaborative Environment (HPCS’06), St. John’s, NF, Canada, pp. 34–34 (2006)
O’Reilly, O., Petersson, N.A.: Energy conservative SBP discretizations of the acoustic wave equation in covariant form on staggered curvilinear grids. J. Comput. Phys. 411, 109386 (2020). https://doi.org/10.1016/j.jcp.2020.109386
Strand, B.: Summation by parts for finite difference approximations for d/dx. J. Comput. Phys. 110(1), 47–67 (1994). https://doi.org/10.1006/jcph.1994.1005
Gerhard, W., Hairer, E.: Solving Ordinary Differential Equations II, vol. 375. Springer, Berlin Heidelberg (1996)
Jameson, Antony: The construction of discretely conservative finite volume schemes that also globally conserve energy or entropy. J. Sci. Comput. 34(2), 152–187 (2008)
Sanchez, E., Castillo, J. E.: An algorithmic study of the construction of higher order one-dimensional Castillo-Grone mimetic operators, Publication No. CSRCR2013-02 (2013). https://www.csrc.sdsu.edu/research_reports/CSRCR2013-02.pdf
Runyan, J.: A novel higher order finite difference time domain method based on the Castillo-Grone mimetic curl operator with applications concerning time-dependent Maxwell equations, Masters Thesis, San Diego State University, San Diego, CA (2011)
Funding
No funding was received for conducting this study.
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
Conflict of interest
The authors have no relevant financial interests to disclose. Author José E. Castillo is an editor for Springer Nature collection Mathematical Modelling, Mimetic Methods and Simulations for Reactive Flows and Mechanics in Porous Media. The other authors have no relevant non-financial interests to disclose.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
A Appendix: Mimetic fourth-order \(\hat{\textbf{D}}\) and \(\textbf{G}\)
A Appendix: Mimetic fourth-order \(\hat{\textbf{D}}\) and \(\textbf{G}\)
Consider a staggered grid on [0, 1] of N cells and grid spacing \(h = \frac{1}{N}\). Define \(x_i = \frac{i}{2N}, \, i = 0,1,\cdots ,2N\). Let \({\tilde{X}} = \{ x_{1/2},x_{3/2},\cdots x_{N-1/2} \}\) (cell centers), \(X = \{ x_0,x_1,\cdots ,x_{N-1},x_N \}\) (cell nodes), and \({\hat{X}} = \{ x_0,x_{1/2},x_{3/2},\cdots ,x_{N-1/2},x_N \}\) (cell centers and boundary).
The mimetic divergence operator \(\textbf{D}:X \rightarrow {\tilde{X}}\) uses data on X to compute derivatives at \({\tilde{X}}\). A staggered fourth-order finite difference scheme is given by \([\frac{1}{24},-\frac{9}{8},\frac{9}{8},-\frac{1}{24}]\). This scheme suffices for points \(x_l \in {\tilde{X}}\) such \(x_{l-3/2},x_{l-1/2},x_{l+1/2},x_{l+3/2} \in X\). That is not the case for \(x_{1/2},x_{N-1/2}\), where a special stencil is needed for the boundaries. Symmetry suggests that it is necessary to find a fourth-order scheme for \(x_{1/2}\). However, the approach taken in Castillo and Grone (2017) is to consider special schemes for \({{\tilde{X}}}_b = \{ x_{1/2},x_{3/2},x_{5/2},x_{7/2} \}\) utilizing data from \(X_b = \{ x_0,x_1,x_2,x_3,x_4,x_5 \}\) (similarly at the other boundary). Fourth-order Taylor expansions of the points in \({{\hat{X}}}_b\) to compute the first-order derivative of the points in \(X_b\) generates a Vandermonde system of six unknowns (scheme weights) and five equations (degree of accuracy), with right hand side vector \(c = (0,1,0,0,0)^T\) (since one wants to approximate the first derivative). Since the Vandermonde matrix V is full rank, then \(\text {nullity}(V) = 1\).
The resulting fourth-order divergence matrix \(\textbf{D} \in \mathbb {R}^{(n, n+1)} \) takes the form
and it can be shown that the structure of V is such that its null space generator is \((-1,5,10,10,-5,1)\). Therefore, for each grid point in \({{\tilde{X}}}_b\), there is one degree of freedom, and hence \(\textbf{D}\) has four degrees of freedom.
Let \(\tilde{D}\) be the top-left corner sub-matrix of \(\textbf{D}\), then the general solution can be represented as
If one takes \(\alpha _2 = \alpha _3 = \alpha _4 = 0\), one can extend the standard fourth-order scheme as much as possible. On the other hand, \(\alpha _1\) is chosen conveniently.
If one extends the image of \(\textbf{D}\) from \({\tilde{X}}\) to \({\hat{X}}\) by padding with zeros the first and last rows then \(\hat{\textbf{D}} \in \mathbb {R}^{(n+2, n+1)}\) is given by
Symmetry of \(\hat{\textbf{D}}\) ensures that the bottom right corner can be determined from the coefficients of the top left portion of the matrix.
The weight matrix Q associated to \(\hat{\textbf{D}}\) is given by
The derivation for the coefficients of the fourth-order gradient follows a similar procedure as the one outlined above to obtain \(\textbf{G} \in \mathbb {R}^{(m+1, m+2 )}\) as
The weight matrix Q associated to \(\hat{\textbf{D}}\) is given by
As noted earlier in Sect. 5, \(\textbf{E} = \textbf{B} - \textbf{B}_1 \in \mathbb {R}^{(m+2, m+1)}\) is
The matrix \(\textbf{E}\) is predominantly zeros with non-zero elements corresponding to the boundaries. \(\textbf{E}\) is \(\mathcal {O}(h)\) and thus \(\textbf{E} \rightarrow 0\) as \(h \rightarrow 0\). This is illustrated in numerical example 4 of Sect. 7.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Srinivasan, A., Dumett, M., Paolini, C. et al. Mimetic finite difference operators and higher order quadratures. Int J Geomath 14, 19 (2023). https://doi.org/10.1007/s13137-023-00230-z
Received:
Accepted:
Published:
DOI: https://doi.org/10.1007/s13137-023-00230-z