COMPUTATIONAL METHODS IN APPLIED , Vol.4(2004), No.2, pp.228–261 °c 2004 Editorial Board of the Journal ”Computational Methods in Applied Mathematics” Joint Co. Ltd.

A DISCRETE WITH APPLICATIONS OF HIGH–ORDER DISCRETIZATIONS TO BOUNDARY–VALUE PROBLEMS

STANLY STEINBERG Department of Mathematics and , University of New Mexico Albuquerque NM 87131-1141 USA

Abstract — We develop a discrete analog of the differential calculus and use this to develop arbitrarily high-order approximations to Sturm–Liouville boundary-value problems with general mixed boundary conditions. An important feature of the method is that we obtain a discrete exact analog of the energy inequality for the continuum boundary-value problem. As a consequence, the discrete and continuum problems have exactly the same solvability conditions. We call such discretizations mimetic. Numerical test confirm the accuracy of the discretization. We prove the solvability and convergence for the discrete boundary-value problem modulo the invertibility of a matrix that appears in the discretization being positive definite. Numerical experiments indicate that the spectrum of this matrix is real, greater than one, and bounded above by a number smaller than three.

2000 Mathematics Subject Classification: 65N12; 65N06.

Keywords: mimetic discretization, compatible discretization, discrete Sturm-Liouville problems.

1. Introduction

There is a substantial interest in creating mimetic discretization methods, for example, the author maintains the website Mimetic Discretizations of Continuum Mechanics which contains a list of interested researchers and references to the literature. There was a workshop held at San Diego State University in 2003 and in 2004 there was an IMA “Hot Topics” Workshop: Compatible Spatial Discretizations for Partial Differential Equations. There is an interest in creating discrete analogs of the vector calculus [1,14–18,22] including the support- operators methods [35,37], differential forms [3,5], and [2,11,13,20,23]. Additionally, some authors have studied a range of discretization methods from a mimetic points of view [4,9,10,19,23,24,29,30,36]. There is also considerable interest in developing one-dimensional discretization methods that satisfy a by parts formula [21, 25–28, 38, 39], because such formulas mimic the continuum integration by parts formula. The reason for this interest is that such sum- mation by parts formulas can be used to guarantee the stability of discrete problems just as integration by parts can be used to do this in the continuum. The paper [6] discusses the difficulty of implementing stable BC using summation by parts methods. It has been A discrete calculus with applications of high–order discretizations to boundary–value problems 229 surprisingly difficult to find higher-order one-dimensional discretizations that satisfy a sum- mation by parts formula [6–8, 12]. Mimetic discretizations are set up so that they have a summation by parts formula ab initio. The main contributions of this paper are, first, to create a discrete version of calculus that has an exact fundamental theorem. This calculus provides a natural discretization of general Sturm–Liouville problems. The discrete problems are solvable under the same conditions as the continuum problems – an important reason for calling the discretization mimetic. The truncation errors for the discrete Sturm–Liouville problems are of order zero, so they cannot be used to show convergence. We give a novel proof of the basic estimate that implies mean-square convergence. This elegant proof underestimates the rate of convergence for smooth problems with smooth grids, but is optimal for problems with rough solutions. This proof is closely related to, but technically different from, that in [18]. Two of the author’s students have given alternate convergence proofs. In [40], optimal max-norm estimates are given, while in [33] second-order accurate discretizations are given for the Poisson equation with general mixed boundary conditions and rough coefficients on general grids.. A second contribution of this paper is that the structure of the mimetic discretization leads immediately to a method for producing general arbitrarily high-order discretizations. These are shown to converge modulo the invertibility of an interpolation matrix, which we leave as an open problem. Because we use a staggered grid, there are two discrete differentiation operators – dif- ference operators – and two discrete integration operators – summation operators that are quadrature rules – that pairwise satisfy the fundamental theorem of calculus. Additionally, the discrete difference and summation operators satisfy a summation by parts formula. In three dimensions, one of the differentiation operators is analogous to the divergence, the other is analogous to the gradient, while the are analogous to volume and surface in- tegrals. When we use our discrete calculus to discretize general symmetric Sturm–Liouville problem with smooth coefficients and general mixed boundary conditions, the discretized problems are solvable under the same conditions as the continuum problems. Additionally, the discretized problems are symmetric and their solutions converge to the solution of the continuum problem at second order (our theory predicts first order), in very irregular grids. We extend the low-order discretizations to arbitrarily high-order approximations for which the discrete Sturm–Liouville problem has the same solvability conditions as the con- tinuum problem, so the discretizations are mimetic. However, the discrete Sturm–Liouville problems are no longer symmetric. We prove that the approximations must converge at least at the designed rate provided that a certain non-symmetric “interpolation matrix” is positive definite. Numerical results show that the method converges at one order more than the predicted rate in very irregular grids. Numerics also indicate that the discretization matrix has real spectrum that is bounded below by one and above by three. Moreover, the spectrum accumulates at one, that is, these matrices are approximate identities. Our emphasis here is on finding methods that are higher order on rough grids, so what is a rough grid in one dimension? The estimates in our proofs indicate that the convergence of the method depends on the aspect ratio of the grid – the ratio of the longest to shortest cell. So we define an everywhere-rough grid by

x(0) ← 0 , x(i + 1) ← x(i) + mod(i, 2) + ρ (1 − mod(i, 2)) , 1 6 i 6 I, (1.1) and then x(i) ← x(i)/x(I) , 0 6 i 6 I. (1.2) 230 S. Steinberg

Such a grid has “everywhere” cell aspect ratio ρ. This is our main test grid with 1 6 ρ 6 106. We have tested grids where the cell aspect ratio grows, but then the convergence rates are reduced. Another unusual feature of our method is that to compare our discrete solutions to the continuum, we project the continuum solution onto the grid using average values. So our codes produce higher-order averages from which accurate values can be obtained using interpolation. We give error estimates using the mean-square norm, but all numerical results are generated for the maximum norm. Any computer programs can be used to create and estimate the accuracy of the discretizations used in this paper. We used Mathematica notebooks that are available on the author’s web page. One of these notebooks creates methods that have a uniform stencil width and are exact on polynomials of some given degree. We have also created methods with a given truncation error, but it appears that the solution error is more closely related to the method being exact on polynomials. Consequently, the truncation errors are one or two orders lower near the boundary. It is well known that the truncation error being one order lower near the boundary may not cause a reduction in accuracy. Two orders lower not mattering is a surprise. Should we expect higher-order discretization to be symmetric? For methods with stencil width 2 p + 1, the discretization at the point i involves information at i + p, while the discretization at i + p uses information at the point i. So if we look from i to i + p do we see the same things as we see when looking from i + p to i? If p = 1 then yes, but if p > 1, and the grid is not uniform or the material properties are not uniform, then certainly not. So the physical situation being modeled is not symmetric. However, this asymmetry disappears if the grid is refined in such a way that the grid becomes more uniform. We do not explicitly assume that the coefficients in the continuum boundary-value prob- lem are smooth, but we do assume that the problem has a classical solution, which does require some smoothness of the coefficients. Our proofs only use upper and lower bounds on the material-properties coefficient. So we give examples of problems with a piecewise contin- uous and discontinuous coefficients that indicates that our proven lowest-order convergence rates are optimal in this case. The natural finite volume difference methods discussed in [31–33] consider non-classical solutions of the one-dimensional Poisson equation with bounded and inverse bounded material-properties coefficients and integrable source term. It is shown that the solution and their fluxes converge for all combinations of Dirichlet, Neumann and Robin boundary conditions on irregular grids (first order convergence was shown for square integrable source terms and, with grid alignment to singularities, second order convergence for piecewise ab- solutely continuous source terms). Many if not most of the ideas in this paper appear in some form scattered in the numerical partial differential equation literature. Still, our development of the discrete calculus is crisp, clear and accessible to strong undergraduate students. The low order discretization is the same as that used in the support-operators method [35, 37], but again the presentation is novel and the proofs of the results are new, but related to those in [18]. The results on high-order methods are new. Much of our interest in the one-dimensional problem is that it provides substantial insight into what can be done in higher dimensions. In Section 2, we develop the discrete calculus that uses a staggered grid, in part, to avoid problems with spurious modes. A staggered grid consists of two interlaced grids. Because of this, there are two finite difference operators D and G, one for each grid, and two summation A discrete calculus with applications of high–order discretizations to boundary–value problems 231 operators, M and Q one of each for each grid. In higher dimensions, D is a discretization of the divergence, while G is a discretization of the gradient. Also, M is the mid-point quadrature rule, while Q is the trapezoid rule. However, there is only one summation by parts formula which connects all of the difference and summation operators. An important result is that the difference operators kill a function if and only if the function is constant, which prevents spurious modes. In Section 3, we analyze in some detail continuum symmetric Sturm–Liouville problems. This motivates the analysis of discrete problems, but more importantly allows us define a mimetic discretization – a discretization where the solvability conditions for the continuum and discrete problems are the same. The analysis of the discrete boundary–value problem is carried out in finite-dimensional linear spaces, so we do not need any results from functional analysis, and thus do not use functional analysis notation. However, the reader familiar with Sobolev space theory will recognize that we prove that the discrete boundary-value problem is uniformly (in the grid spacing) well posed in discrete Sobolev spaces. In Section 4, we estimate the truncation error for the operators that appear in the boundary-value problem and then use these estimates to prove, modulo the positive defi- niteness of the interpolation matrix, that the solutions of the discrete problem converge in mean-square norm to solutions of the continuum problem. A novel feature is that functions corresponding to scalars in higher dimensions are projected to the grid using average val- ues. For this projection, the operator D is exact – it has identically zero truncation error. However, in general grids, the G is only first order accurate. Consequently, we prove that the solutions of the discrete problem converge at first order to the solution of the continuum problem, provided the continuum problem has a classical solution. In Section 5, we show that discretizations of the derivative, that is the gradient in higher dimensions, can be written as a matrix – the differentiation matrix – times the lowest order discretization of the derivative, provided that the discretization is exact on constants. One of our Mathematica notebooks actually computes this matrix. We then provide some examples. The first example is required to be exact on linear polynomials. As the basic method has this property, this creates nothing new. We then look at methods exact on cubic and quintic polynomials because using odd order polynomials provide methods with a symmetric footprint. So far the methods presented all have an explicit discrete derivative. We also give a method exact on cubics that has an implicit (compact) discrete derivative. In all cases we only display formulas for the methods on uniform grids where it is easy to compare them to other discretizations. The general formulas are easily generated using one of the Mathematica notebooks. As noted, the numerical errors are measured in the maximum norm and we only report the order of convergence d defined by having the error e satisfy e ≈ C/N d, where N is the number of grid points and C is a constant. Numerics show that the mimetic discretization actually converges at one order higher than predicted, for problems with smooth coefficients. When the solution of the continuum problem has a piecewise continuous derivative, the solutions of the discrete problem converge at order one. The codes used to generate the numerics are also available on the author’s web page. (These codes do contain the general discretization formulas.) Formulas for computing accurate point values from higher order average values are given in Appendix 6. These formulas can be computed from one of the Mathematica notebooks. 232 S. Steinberg

2. A discrete calculus

Our discrete calculus uses a staggered grid that consists of two types of interlaced points. Consequently, there are two difference operators D and G that are discretizations of the derivative and two discrete summations M and Q that are discretizations of the and then there are two analogs of the fundamental theorem for these discrete operations. However, there is only one summation by parts theorem that is an analog of the integration by parts theorem. The summations are the midpoint and trapezoid quadrature rules, while, in higher dimensions, the difference operators are analogs of the divergence and gradient.

2.1. Staggered grids

A staggered non-uniform grid is illustrated in Fig. 1 and consists of two sets of points: those labeled by integers and those labeled by half-integers. So if N is a positive integer, then a grid of size N on the interval [a, b] consists of the N +1 points xi, 0 6 i 6 N, with x0 = a and xN = b and the N points xi+1/2, 0 6 i 6 N − 1. The points must satisfy xi < xi+1/2 < xi+1 for 0 6 i 6 N − 1. The intervals [xi, xi+1], 0 6 i 6 N − 1, are the cells of the grid. A uniform grid on the interval [a, b] is given by xi = i δx, 0 6 i 6 N, and xi+1/2 = (i + 1/2) δx, 0 6 i 6 N − 1, where δx = (b − a)/N.

i−1/2 i+1/2

i−1 i i+1

Figure 1. Non-uniform grid

2.2. Discrete functions

A discrete function is defined at either integer points or half-integer points, but not both. We will use fi+1/2, gi+1/2, ... for functions defined at half-integer points and ui, vi, ... for functions defined at integer points. To obtain the desired form of the boundary terms in the discrete fundamental theorems and the integration by parts formula, we must also introduce, on the boundary, the values f0 and fN for functions defined at the half-indexed points. (In higher dimensions, functions defined on the half-indexed points are discretizations of scalar fields, while the functions defined on the integer points are discretizations of vector fields.)

Figure 2. Positions of differences in the grid A discrete calculus with applications of high–order discretizations to boundary–value problems 233

2.3. Difference quotients We now define two discrete derivatives. First, define the lengths of the intervals in the grids by

δxi = xi+1/2 − xi−1/2 , 1 6 i 6 N − 1 , δxi+1/2 = xi+1 − xi , 0 6 i 6 N − 1 . If f is defined at half-integer points and v is defined at integer points, then their differences are defined by

δfi = fi+1/2 − fi−1/2 , 1 6 i 6 N − 1 , δvi+1/2 = vi+1 − vi , 0 6 i 6 N − 1 . Again, the desired form of the boundary terms in the discrete fundamental theorem and the summation by parts formula demand that

δx0 = x1/2 − x0 , δxN = xN − xN−1/2 , δf0 = f1/2 − f0 , δfN = fN − fN−1/2 . We will organize the proofs in what follows to make it clear why these definitions are chosen. The difference quotients (first divided differences) are then defined by

δfi δvi+1/2 (Gf)i = , 0 6 i 6 N, (Dv)i+1/2 = , 0 6 i 6 N − 1 . (2.1) δxi δxi+1/2 The positions of the difference quotients in the grid are illustrated in Fig. 2. The difference quotients not in the shaded area use the special boundary–value f0.

2.4. Summations We next introduce two summations, the midpoint M and the trapezoid Q quadrature rules Xi−1 (Mf)i = fk+1/2 δxk+1/2 , 0 6 i 6 N, k=0 Xi (Qv)i+1/2 = vk δxk , 0 6 i 6 N − 1 . (2.2) 0 It is natural to extend the definition of the trapezoid rule so that XN (Qv)0 = 0 , ( Qv)N = vk δxk . 0

2.5. The fundamental theorem The difference quotients and quadrature rules give two analogs of the fundamental theorem of calculus.

Theorem 2.1.

(MDv)i = vi − v0 , 0 6 i 6 N, (QGf)i+1/2 = fi+1/2 − f0 , 0 6 i 6 N − 1 , (2.3)

(GQv)i = vi , 0 6 i 6 N, (DMf)i+1/2 = fi+1/2 , 0 6 i 6 N − 1 . (2.4) Additionally,

(QGf)0 = 0 , (QGf)N = fN − f0 . (2.5) 234 S. Steinberg

Proof. The first formula in (2.3) and

(QGf)i+1/2 = fi+1/2 − f1/2 + δf0 , 0 6 i 6 N − 1 (2.6) are direct computations using telescoping sums. The definition of δf0 gives the result for QG. The formulas (2.4) are also given by direct computation.

2.6. Summation by parts Lemma 2.1. NX−1 XN δvi+1/2fi+1/2 + viδf i = vN fN − v0 f0 . (2.7) i=0 i=0 Proof. An analog of the is ¡ ¢ vi+1 fi+1/2 − vi fi−1/2 = (vi+1 − vi) fi+1/2 + vi fi+1/2 − fi−1/2 .

Summing this gives

NX−1 NX−1 ¡ ¢ (vi+1 − vi) fi+1/2 + vi fi+1/2 − fi−1/2 = vN fN−1/2 − v1 f1/2 i=1 i=1 and adding one more term to the first sum gives

NX−1 NX−1 ¡ ¢ (vi+1 − vi) fi+1/2 + vi fi+1/2 − fi−1/2 = vN fN−1/2 − v0 f1/2 . i=0 i=1 Adding two terms to the second sum gives

NX−1 XN ¡ ¢ ¡ ¢ δvi+1/2fi+1/2 + viδf i = vN δf N + fN−1/2 − v0 f1/2 − δf 0 . i=0 i=0

The definitions of the differences at the boundary then gives (2.7).

We trivially modify this so that it applies to our differences and summations.

Theorem 2.2. If we introduce the abbreviations

Mf = (Mf)N , Qv = (Qv)N , then M(Dv f) + Q(v Gf) = vN fN − v0 f0 . (2.8) Proof. If we divide and multiply by an appropriate δx in (2.7) we obtain

NX−1 XN (Dv)i+1/2 fi+1/2 δxi+1/2 + vi (Gf)i δxi = vN fN − v0 f0 , i=0 i=0 which the definitions of M and Q translate to the result. A discrete calculus with applications of high–order discretizations to boundary–value problems 235

An additional important result for the difference quotients is that they kill a function if and only if the function is constant.

Theorem 2.3. Gf = 0 ⇔ f = c , Dv = 0 ⇔ v = c , (2.9) where c is constant. This result is one of the important reasons for using staggered grids.

Proof. If Dv = 0 then (δv)i+1/2 = 0, 0 6 i 6 I − 1. So vi+1 = vi for 0 6 i 6 N − 1, that is, v is constant. The converse is clear and the same argument works for f.

2.7. Higher-order difference operators Higher-order difference operators will be defined as compositions of the first-order operators D and G. However, there is a problem in that D doesn’t produce values at the boundary points (see Fig. 3). There is a “slick” way of making this and several other questions about boundary values work out beautifully (see, for example [35] or [37]).

Figure 3. Positions for higher-order derivatives in the grid

We introduce two real linear spaces: HS is the space of all discrete functions defined on the half-indexed points and the boundary points, while HV is the space of functions defined on integer indexed points. The space HS has dimension N + 2 while HV has dimension N + 1. If f, g ∈ HS and u, v ∈ HV then their inner products are defined by

hf, giS = M(f g) + f0 g0 + fN gN , hu, viV = Q(u v) ,

2 2 and the associated norms are kfkS = hf, fiS and kukV = hu, uiV . Extend the definition (2.1) of discrete divergence by

(Dv)0 = +v0 , (Dv)N = −vN . (2.10)

This fills in the question mark in Fig. 3. From now on, D will mean this extended operator. Now Theorem 2.3 implies that D is one to one.

Corollary 2.1. Dv = 0 ⇐⇒ v = 0 . The extended definition of the divergence makes the summation by parts formula (2.8) simpler. 236 S. Steinberg

Corollary 2.2.

hDv, fiS + hv, GfiV = 0 . (2.11) Note that if we choose f ≡ 1 in (2.11), then we see that

0 = hDv, 1iS = M(Dv) + (Dv)0 + (Dv)N = M(Dv) + v0 − vN .

Also, if we choose v ≡ 1 in (2.11), then we see that

0 = f0 − fN + h1, GfiV = f0 − fN + Q(Gf)

These results are consistent with Theorem 2.1. The next result follows from the above discussion.

Proposition 2.1. The linear operators

D : HV → HS , G : HS → HV are negative adjoints of each other. In terms of matrices, the matrix of D has N + 2 rows and N + 1 columns and is minus the transpose of the matrix of G. The null space of D is the zero vector, while its range is the space of functions satisfying

Mf + fN + f0 = 0 . (2.12)

The null space of G is the space of constant functions and G is onto. Also, Theorem 2.1 implies:

Proposition 2.2. The linear operators

Q : HV → HS , M : HS → HV satisfy

DM = I on HS , GQ = I on HV .

3. The boundary–value problem

In this section, we introduce a Sturm–Liouville continuum boundary-value problem and then introduce a discrete analog of the continuum problem. For both problems, the important point is that the integration by parts or summation by parts theorem implies symmetry and an energy inequality for the solutions and then this energy inequality along with a Friedrichs– Poincar´einequality implies existence and uniqueness of the solution to the boundary-value problem. Alternatively, in one dimension, one can use successive integration to reduce the Sturm–Liouville problem to a compact integral equation, but we don’t follow this route as it doesn’t generalize nicely to multiple dimensions. The arguments given here follow those given in most rigorous texts on elliptic boundary–value problem, where a more detailed discussion can be found. The discussion of continuum boundary-value problem is motivational, and the proof of existence of a solution to the boundary-value problem, which needs techniques from functional analysis, is not needed for our results, so it is omitted. A discrete calculus with applications of high–order discretizations to boundary–value problems 237

3.1. The continuum boundary–value problem

If k, h and g are smooth functions defined on [0, 1] and αl, βl, γl, αr, βr and γr. are six constants, then the one–dimensional continuum Sturm–Liouville boundary-value problem is to find a smooth function f, defined on [0, 1], that satisfies the differential equation

L f + h f = g , (3.1) where L is the second-order differential operator µ ¶ d df L f(x) = − (k(x)f 0(x))0 = − k(x) (x) , (3.2) dx dx and where f satisfies the mixed or Robin boundary conditions

0 0 −αl k(0)f (0) + βl f(0) = γl , +αr k(1)f (1) + βr f(1) = γr . (3.3)

Assumption 3.1. There is a constant η > 0 such that

k(x) > η > 0 , 0 6 x 6 1 (3.4) and h(x) > 0 , 0 6 x 6 1 .

Assumption 3.2. The coefficients in the boundary conditions are assumed to satisfy the Non-Degeneracy, Non-Inflow and Non- conditions:

| αl | + | βl |> 0 , | αr | + | βr |> 0 ; (3.5)

αl βl > 0 ; αr βr > 0 ; (3.6)

| βl | + | βr |> 0 . (3.7) In fact, by multiplying the boundary conditions by a minus one, if necessary, we can and will take the α’s and β’s non-negative.

In this paper we will only discuss the generic case where αl > 0 and αr > 0 because the remaining cases are similar, but take substantial space. Even more general boundary conditions, including the cases omitted, are detailed in [33]. Additionally, we observe that by adding a liner function to f, we can assume that γl = γr = 0. We only make this assumption for the continuum problem; we have a nice way to include the γ’s in the discrete problem. The analysis of the solvability of the boundary-value problem (3.1) and (3.3) depends critically on an integration by parts argument and a Friedrichs–Poincar´einequality, which we now derive.

Proposition 3.1. (The Energy Inequality) If f satisfies the boundary conditions (3.3) with αr > 0, αl > 0, and γr = γl = 0, then Z1 Z1 β β f(x)(L f)(x) dx > η (f 0(x))2 dx + r f 2(1) + l f 2(0) . (3.8) αr αl 0 0 238 S. Steinberg

Proof. Multiply L f by f and integrate over the interval and then apply integration by parts to obtain Z1 Z1 f(x)(L f)(x) dx = − f(x)(k(x)f 0(x))0 dx

0 0 Z1 = k(x)(f 0(x))2 dx − f(1)k(1)f 0(1) + f(0)k(0)f 0(0) .

0

Because we assume that αl 6= 0 and αr 6= 0, the homogeneous boundary conditions (3.3) give Z1 Z1 β β f(x)(L f)(x) dx = k(x)(f 0(x))2 dx + r f 2(1) + l f 2(0) . αr αl 0 0 The use of Assumption 3.1 then completes the result.

Proposition 3.2. (The Continuum Friedrichs–Poincar´eInequality) If f is a smooth function on the interval [a, b], then Zb Zb f 2(x) dx 6 L2 (f 0(x))2 dx + 2 µ L f 2(a) + 2 (1 − µ) L f 2(b) (3.9)

a a where L = b − a and 0 6 µ 6 1. Proof. By the Fundamental Theorem of Calculus, Zb f(x) − f(a) = f 0(ξ) dξ ,

a and then the H¨olderinequality implies that   Zx 2 Zx Zx Zx (f(x) − f(a))2 6  f 0(ξ) dξ 6 (f 0(ξ))2 dξ dξ 6 (x − a) (f 0(ξ))2 dξ .

a a a a Next, interchanging the order of integration gives Zb Zb Zx Zb Zb (f(x) − f(a))2 dx 6 (x − a)(f 0(ξ))2 dξ dx = (x − a)(f 0(ξ))2 dx dξ

a a a a ξ Zb Zb (b − a)2 − (ξ − a)2 (b − a)2 = (f 0(ξ))2 dξ 6 (f 0(ξ))2 dξ . 2 2 a a Finally, the inequality (a + b)2 6 2 (a2 + b2) gives Zb Zb Zb Zb f 2(x)dx62 (f(x) − f(a))2 dx + 2 f 2(a)dx6(b − a)2 (f 0(ξ))2 dξ + 2 (b − a) f 2(a). a a a a Interchanging the roles of a and b and averaging the two results gives the proposition. A discrete calculus with applications of high–order discretizations to boundary–value problems 239

Proposition 3.3. Under the assumption (3.4) that k is bounded below and the assump- tions of Non-Degeneracy (3.5), Non-Inflow (3.6), and Non-Flux (3.7), and that αl > 0, αr > 0, γl = 0 and γr = 0, there exists a positive constant C > 0 such that Zb Zb f 2(x) dx 6 C f(x)(L f)(x) dx . (3.10)

a a

Proof. Because not both βl and βr are zero, β β ν = l + r > 0 , αl αr so we can choose 1 β µ = l , ν αl and then Z1 Z1 µ ¶ 2 β β f 2(x) dx 6 (f 0(x))2 dx + l f 2(0) + r f 2(1) by (3.9) ν αl αr 0 0   Z1 β β 6 max{1/η, 2/ν} η (f 0(x))2 dx + l f 2(0) + r f 2(1) αl αr 0 Z1 6 max{1/η, 2/ν} f(x)(L f)(x) dx. by (3.8)

0 So the result holds with C = max{1/η, 2/ν}. The discussion of the solvability of the boundary-value problem is made simpler by in- troducing the inner product Z1 hf, gi = f(x) g(x) dx

0 and associated norm k f k2= hf, fi.

Theorem 3.1. Under the conditions of the previous proposition, if f is a solution of the boundary-value problem (3.1) and (3.3), then there is a constant C such that

k f k6 C k g k , and consequently the boundary–value problem possesses a unique solution that depends con- tinuously on g. Proof. Multiplying the differential equation (3.1) by f and integrating gives

hL f, fi + hh f, fi = hg, fi , and because h > 0, hh f, fi > 0, so that

hL f, fi 6 hg, fi . 240 S. Steinberg

The estimate (3.10) can be written

k f k26 C hL f, fi 6 C hg, fi 6 C k g k k f k , which gives the estimate. Uniqueness, existence and continuous dependence follow from this inequality.

Corollary 3.1. Under the conditions of the previous proposition, if f is a solution of the boundary-value problem (3.1) and (3.3), then there is a constant K such that

k f 0 k6 K k g k .

Proof. Let µ = max06x61 h(x). Then the estimate (3.8) implies that 1 1 1 ¡ ¢ k f 0 k2 6 (hL f, fi + hhf, fi) 6 (hg, fi + µhf, fi) 6 k g k k f k +µ k f k2 η η η 1 ¡ ¢ 6 C + µ C2 k g k2 , η which gives the estimate with K2 = C(1 + µ C)/η. This corollary gives the continuity of the solution in the usual Sobolev space.

3.2. The discrete boundary–value problem

Figure 4. Positions for higher-order derivatives in the grid

We will use the definition of the “gradient” G given in (2.1) and the extended definition of the “divergence” D given in (2.10) to define a discrete Sturm–Liouville problem, but first we need an analog of the coefficient k. Let K : HV → HV be given by a N + 1 by N + 1 matrix (indexed from 0 to N) and then define the flux operator F : HS → HV by F = −K G .

We do not assume that K is symmetric. The second-order difference operator is given by

L = DF = −D K G . (3.11)

Also, let h ∈ HS . If f ∈ HS , then define

(h f)0 = h0 f0 , (h f)i+1/2 = hi+1/2 fi+1/2 , 0 6 i 6 N − 1 , (h f)N = hN fN . A discrete calculus with applications of high–order discretizations to boundary–value problems 241

Given g ∈ HS , the difference equation

L f + h f = g (3.12) for f now includes both interior equations

(L f)i+1/2 + (h f)i+1/2 = gi+1/2 , 0 6 i 6 N − 1 , (3.13) and boundary equations

−(KGf)0 + h0 f0 = g0 , +(KGf)N + hN fN = gN . (3.14)

If we assume that αl 6= 0, αr 6= 0 and choose

βl γl βr γr h0 = , g0 = , hN = , gN = , (3.15) αl αl αr αr then we see that we have a natural analog of the continuum boundary–value problem (3.1) and (3.3).

Assumption 3.3. Assume that αl > 0 and αr > 0. Also assume that h > 0 and if ½ ¾ βl βr µ = max h = max , , max hj+1/2 , αl αr 06j6N−1 then assume that µ > 0. Also, assume there is a constant η > 0 such that

2 hK v, viV > η kvkV , ∀v ∈ HV . (3.16)

Because of our extending the definitions of the operator D and the functions h and g to the boundary, the proof of the well–posedness of the discrete boundary–value problem is somewhat simpler and more general than in the continuum.

Proposition 3.4. (Discrete Energy Inequality) For any f ∈ HS ,

hL f, fiS = hK Gf, GfiV > η hGf, GfiV . (3.17)

Also, if K is symmetric, then so is L .

Proof. Setting v = −F f = −K Gf in the summation by parts formula (2.11) gives

h−DK Gf, fiS − hK Gf, GfiV = 0 .

Then the definition (3.11) of L and assumption (3.16) give the result.

Proposition 3.5. (Discrete Friedrichs–Poincar´e Inequality) If f ∈ HS and J ∈ {0, 1/2,...,N − 1/2,N}, then there is a constant C, independent of the grid, so that

kf − fJ kS 6 C kGfkV . (3.18) 242 S. Steinberg

Proof. When J = j − 1/2, the Discrete Fundamental Theorem (2.3) gives

Xk k+1/2 j−1/2 fk+1/2 − fj−1/2 = Q0 Gf − Q0 Gf = (Gf)i δxi , i=j where 0 6 k, j 6 N − 1. By the H¨olderinequality

¡ ¢ Xk Xk ¯ ¯ Xk 2 2 ¯ ¯ 2 fk+1/2 − fj−1/2 6 δxi (Gf)i δxi = xk+1/2 − xj−1/2 (Gf)i δxi . (3.19) i=j i=j i=j

If L = xN − x0, then

NX−1 NX−1 ¯ ¯ Xk 2 ¯ ¯ 2 (fk+1/2 − fj−1/2) δxk+1/2 6 xk+1/2 − xj−1/2 δxk+1/2 (Gf)i δxi by (3.19) k=0 k=0 i=j Xj Xj ¯ ¯ ¯ ¯ 2 6 xk+1/2 − xj−1/2 δxk+1/2 (Gf)i δxi k=0 i=k NX−1 Xk ¯ ¯ ¯ ¯ 2 + xk+1/2 − xj−1/2 δxk+1/2 (Gf)i δxi k=j i=j Xj Xi ¯ ¯ ¯ ¯ 2 = xk+1/2 − xj−1/2 δxk+1/2 (Gf)i δxi interchange i=0 k=0 NX−1 NX−1 ¯ ¯ ¯ ¯ 2 + xk+1/2 − xj−1/2 δxk+1/2 (Gf)i δxi i=j k=j Xj XN 2 2 2 2 6 L (Gf)i δxi + L (Gf)i δxi N − 1 → N i=0 i=j 2 2 6 L kGfkV .

So we have 2 2 2 2 2 kf − fJ kS 6 (fN − fJ ) + (f0 − fJ ) + L kGfkV . But we also have from (2.5) that

XN fN − fJ = (Gf)i δxi . i=j+1/2

Again, by the H¨olderinequality

XN XN XN 2 2 2 2 (fN − fJ ) 6 δxi (Gf)i δxi 6 L (Gf)i δxi = L kGfkV i=j+1/2 i=j+1/2 i=0 with a similar estimate for f0 − fJ . Also, the cases J = 0,N are similar, so we have the result with C2 = 2 L + L2. A discrete calculus with applications of high–order discretizations to boundary–value problems 243

Theorem 3.2. Assume that the parameters in the boundary conditions (3.14) satisfy αl > 0, αr > 0, Non-Degeneracy (3.5), and Non-Inflow (3.6), and that Assumptions 3.3 are satisfied. Then if f is a solution of the boundary–value problem (3.12), then there is a constant K (independent of f and g and the grid) such that

kfkS 6 K kgkS . Consequently, the boundary–value problem possesses a unique solution that depends contin- uously on g. Proof. From (3.12), hL f, fiS + hh f, fiS = hg, fiS . (3.20) From (3.17) and (3.18) η hL f, fi > η kGfk2 > kf − f k2 . (3.21) S V C2 J S From Assumption 3.3 we have that h > 0 and µ = max h > 0. So there exist a J ∈

{0, 1/2,...,N − 1/2,N} such that µ = hJ . In fact, hJ is one of βl/αl, βr/αr, or gj+1/2, 0 6 j 6 N − 1. Consequently 2 hh f, fiS > µfJ , (3.22) and then η hg, fi = hL f, fi + hh f, fi > kf − f k2 + µ f 2 . (3.23) S S S C2 J S J But 2 2 2 2 2 2 kfkS 6 2 kf − fJ kS + 2 kfJ kS = 2 kf − fJ kS + 2 L fJ (3.24) and ³ η ´ 2 kf − f k2 + 2 L2 f 2 6 K kf − f k2 + µ f 2 (3.25) J S J C2 J S J for ½ ¾ 2 C2 2 L2 K = max , . (3.26) η µ So 2 kfkS 6 K hg, fiS 6 K kgkS kfkS , (3.27) which gives the estimate. The estimate implies that the matrix that defines f is invertible, so the boundary-value problem has a unique solution.

Corollary 3.2. Under the assumptions of the previous theorem, there exists a constant M (independent of f, g, and the grid) such that

kGfkV 6 MkgkS . Proof. From (3.17) 1 hGf, Gfi 6 hL f, fi from (3.17) V η S 1 = (hg, fi − hh f, fi ) from (3.20) η S S 1 ¡ ¢ 1 ¡ ¢ 6 kgk kfk + µ kfk2 6 K + µK2 kgk2 . η S S S η S So the estimate holds with M 2 = (K + µK2)/η. This estimate gives the continuity of the solution of the discrete problem in an appropriate discrete Sobolev space. 244 S. Steinberg

4. Approximating the continuum

Truncation error is used for comparing a continuum and a discrete operator by applying the continuum operator and then projecting the results onto the grid and then comparing this to the discrete operator applied to the projection of the continuum function. One difficulty comes from our having defined the discrete operators at the boundary, but not the continuum operators. But still the truncation errors can be defined in a natural way that provides the necessary tools for estimating the error in the solution of the boundary–value problem. Another difficulty is that, in non-uniform grids, the truncation error for the second order operator DG is order zero and thus cannot be directly used to show convergence. This will be circumvented by estimating the error in the solution in terms of the truncation error for D and G. Because we use average projections for scalar fields, the results here are analogous to, but distinct from those in [18]. Note that the average projection is a second-order estimate of the point projection at the cell center, so the choice of projection doesn’t make any difference for second-order methods. To obtain nice estimates, we assume that the half-indexed points are at the centers of the cells: x + x x = i+1 i , 0 6 i 6 N − 1 (4.1) i+1/2 2 and then

δ δx + δx δ δx = 1/2 , δx = i−1/2 i+1/2 , 1 6 i 6 N − 1 , δx = N−1/2 . (4.2) 0 2 i 2 N 2

4.1. Projections and truncation errors

If f is a smooth function on the real line, then its scalar projection PS f onto the space HS is given by

(PS f)0 ≡ f(x0) , Zxi+1 1 (PS f)i+1/2 ≡ f(ξ) dξ , 0 6 i 6 N − 1 , (4.3) δxi+1/2 xi

(PS f)N ≡ f(xN ) ,

while if v is a smooth function on the real line, then its vector projection PV v onto the space HV is given by

(PV v)i ≡ v(xi) , 0 6 i 6 N. (4.4) A discrete calculus with applications of high–order discretizations to boundary–value problems 245

4.1.1. The truncation error for the difference operators. If f is a smooth func- tion, then in the interior, the truncation error TG for G is 0 TG(f)i ≡ (PV f )i − (GPS f)i (P f) − (P f) = f 0 (x ) − S i+1/2 S i−1/2 i x − x  i+1/2 i−1/2  Zxi+1 Zxi 0 1 1 1 (4.5) = f (xi) −  f(s) ds − f(s) ds δxi δxi+1/2 δxi−1/2 xi xi−1 2 2 δx − δx δx − δxi−1/2 δxi+1/2 + δx ≈ i−1/2 i+1/2 f 00(x ) − i−1/2 i+1/2 f 000(x ) , 3 i 12 i where 1 6 i 6 N − 1. At the boundaries, the truncation error is (P f) − (P f) T (f) ≡ (P f 0) − (GP f) s = f 0 (x ) − S 1/2 S 0 G 0 V 0 S 0 0 x − x  1/2 0 Zx1 0 1 1 δx1/2 00 = f (x0) −  f(s) ds − f (x0) ≈ − f (x0) , (4.6) δx0 δx1/2 3 x0 δx T (f) ≡ (P f 0) − (GP f) ≈ + N−1/2 f 00(x ) . G N V N S N 3 N So G is a first-order approximation at the boundaries and in the interior for non-uniform grids, and a second-order approximation in the interior for uniform grids. If v is any smooth function, then in the interior, the truncation error TD for D is Zxi+1 0 1 0 v (xi+1) − v (xi) TD(v)i+1/2 ≡ (PS v )i+1/2 − (DPV v)i+1/2 = v (ξ) dξ − ≡ 0 δxi+1/2 xi+1 − xi xi for 0 6 i 6 N − 1. At the boundaries

TD(v)0 ≡ +v(x0) − (DPV v)0 = +v(0) − +v(0) ≡ 0 ,

TD(v)N ≡ −v(xN ) − (DPV v)N = −v(N) − −v(N) ≡ 0 . The truncation error for discrete divergence is identically zero on any grid. So this difference operator is exact. This is no accident and we will use this fact in a critical way when constructing higher-order methods.

4.1.2. The truncation error for summation operators. If we set Zx Zx F (x) = f(ξ) dξ , V (x) = v(ξ) dξ ,

0 0 then the truncation error TM for the midpoint quadrature M is Xi−1 TM(f)i ≡ (PV F )i − (MPS f)i = F (xi) − (PS f)k+1/2 δxk+1/2 k=0 x xk+1 Z i Xi−1 Z = f(ξ) dξ − f(ξ) dξ ≡ 0 , 0 0 xk 246 S. Steinberg for 0 6 i 6 N. So we also have an exact quadrature rule. The truncation error TQ for the trapezoid quadrature rules Q is

TQ(v)i+1/2 ≡ (PS V )i+1/2 − (QPV v)i+1/2 Zxi+1 1 Xi = V (x) dx − v (xk) δxk , 0 6 i 6 N − 1 , δxi+1/2 k=0 xi

TQ(v)0 = (PS V )0 − (QPV v)0 = V (x0) − 0 ≡ 0 , XN TQ(v)N = (PS V )N − (QPV v)N = V (xN ) − vk δxk . k=0

Using (4.1), for any v ∈ HV , we can rewrite (2.2) as

Xi Xi−1 v + v 1 (Qv) = v δx = k k+1 δx + v δx , i+1/2 k k 2 k+1/2 2 i i+1/2 k=0 k=0 and for any smooth function v we have

xk+1 x Xi−1 Z Z V (x) = v(ξ) dξ + v(ξ) dξ . k=0 xk xi Consequently   xk+1 xi+1 x Xi−1 Z Z Z vk + vk+1 1 1 TQ(v)i+1/2 =  v(ξ) dξ− δxk+1/2+ v(ξ) dξ dx− viδxi+1/2 2 δxi+1/2 2 k=0 xk xi xi  x  x x Xi−1 Zk+1 Zi+1Zi+1 vk + vk+1 1 1 =  v(ξ) dξ− δxk+1/2+ v(ξ) dx dξ− viδxi+1/2 2 δxi+1/2 2 k=0 xk xi ξ x  x Xi−1 Zk+1 Zi+1 vk + vk+1 1 1 =  v(ξ) dξ− δxk+1/2+ (xi+1 −ξ)v(ξ)dξ− viδxi+1/2. 2 δxi+1/2 2 k=0 xk xi Each term in the truncation error is now an approximation of an integral using the trapezoid rule, which is locally third-order accurate, so

Xi 3 2 TQ(v)i+1/2 6 δxi+1/2 6 L max δxi+1/2 , 06i6N−1 k=0 where L = xN − x0 = b − a. Also, TQ(v)N is the truncation error for the usual trapezoid rule, and thus satisfies the same estimate. So the trapezoid quadrature is second order in any grid.

4.1.3. The truncation error for the BVP operators. The continuum and discrete second-order operators can be written as A discrete calculus with applications of high–order discretizations to boundary–value problems 247

d L = F , L = DF , dx where the flux operators are d F = −k , F = −K G . (4.7) dx If we choose K as a diagonal matrix with

K i,i = k(xi) , 0 6 i 6 N, then the truncation error for the flux is

0 (TF (f))i ≡ (PV F f)i − (FPS f)i = −k(xi) f (xi) + k(xi) Gf(xi) = −k(xi)TG(f) , (4.8) where 0 6 i 6 N. Consequently

kTF (f)kV 6 max k(x) kTG(f)kV . a6x6b For the next operators, the continuum operators are not defined on the boundary, so these estimates show how to define the continuum and discrete operators on the boundary so that the truncation error can be used to prove convergence. The truncation error Th for multiplication by h is

(Th(f))i+1/2 ≡ (PS (h f))i+1/2 − (h PS f)i+1/2 Zxi+1 Zxi+1 1 h(x ) = h(x) f(x) dx − i+1/2 f(x) dx δxi+1/2 δxi+1/2 xi xi 2 f 0(x ) h0(x ) + f(x ) h00(x ) ≈ i+1/2 i+1/2 i+1/2 i+1/2 δ2 (4.9) 24 i+1/2 for 0 6 i 6 N − 1. At the boundaries

(Th(f))0 ≡ (PS (h f))0 − (h PS f)0 = h(x0) f(x0) − h0 f(x0) ,

(Th(f))N ≡ (PS (h f))N − (h PS f)N = h(xN ) f(xN ) − hN f(xN ) . We will choose h and h, using the boundary conditions, so that these truncation errors are zero. The truncation error for the second-order operator L can be written in terms of the truncation error for the flux

0 TL (f)i+1/2 ≡ (PS L f)i+1/2 − (LPS f)i+1/2 = (PS (F f) )i+1/2 − (DFPS f)i+1/2 Zxi+1 1 d = (F f)(ξ) dξ − (DFPS f)i+1/2 δxi+1/2 dξ x i (4.10) (F f)(x ) − (F f)(x ) (FPS f) − (FPS f) = i+1 i − i+1 i δxi+1/2 δxi+1/2

(TF (f))i+1 − (TF (f))i = = (DTF (f))i+1/2 δxi+1/2 248 S. Steinberg for 0 6 i 6 N − 1. At the boundaries 0 TL (f)0 ≡ (PS L f)0 − (LPS f)0 = (PS (F f) )0 − (DFPS f)0 = (PV F f)0 − F PS f 0 = (TF f)0 = D(TF f)0, 0 TL (f)N ≡ (PS L f)N − (LPS f)N (PS (F f) )n − (DFPS f)N = −PS (F f)N − (FPS f)N = −(TF f)N = D(TF f)N . If we were using standard point projections, and the flux was first order, then we would expect that a difference operator D applied to the flux would reduce the order by one, and so the truncation error for L would be order zero. But then here the D is exact and should not increase the truncation error. However, we will show in the next section, that in fact, in general grids, L = DG has truncation error order zero. So we cannot directly use the truncation error of L to show convergence of our method.

4.2. Error in the solution of the BVP Under the conditions of Theorem 3.1, we know that the continuum BVP given by (3.1), (3.2) and (3.3) has a unique solution f. Let

γl γr g0 = , gN = , gi+1/2 = (PS g)i+1/2 , 0 6 i 6 N − 1 , (4.11) αl αr βl βr ¡ ¢ h0 = , hN = , hi+1/2 = h xi+1/2 , 0 6 i 6 N − 1 , (4.12) αl αr which is consistent with (3.15). Under the conditions of Theorem 3.2, we know that the discrete BVP (3.12) possesses a unique solution. The error e in the discrete solution is defined by

e0 = (PS f)0 − f0 , ei+1/2 = (PS f)i+1/2 − fi+1/2 , eN = (PS f)N − fN , (4.13) where 0 6 i 6 N − 1. We now show that the error satisfies the discrete boundary–value problem (3.12) with “small” inhomogeneous terms. On the interior of the grid,

L e + h e = L (PS f − f) + h (PS f − f) by (4.13)

= LPS f + h PS f − g by (3.13)

= PS L f − TL (f) + PS (h f) − Th(f) − g by (4.10) and (4.9)

= −TL (f) − Th(f) + PS L f + PS (h f) − PS g by (4.11)

= −DTF (f) − Th(f) . by linearity and (3.1) At the boundaries (3.3), (3.14) and (4.7) give

+αl (F e)0 + βl e0 = αl ((FPS f)0 − (F f)0) + βl ((PS f)0 − f0) by (4.13)

= αl (FPS f)0 + βl(PS f)0 − αl(−K Gf)0 − βlf0 by (4.7) = +αl (FPS f)0 + βl f(0) − γl by (4.3) and (3.14)

= +αl ((PV F f)0 − (TF (f))0) + βl f(0) − γl by (4.8) 0 = −αl (TF f)0 + αl (−k(0) f (0)) + βl f(0) − γl by (4.4) and (4.7)

= −αl (TF (f))0 by (3.3)

= −αl (DTF (f))0 by (2.10)

−αr (F e)N + βr eN = −αr (DTF (f))N as above. A discrete calculus with applications of high–order discretizations to boundary–value problems 249

Dividing the boundary conditions by αl or αr gives

L e + h e = −DTF (f) − Th(f) , (4.14) where D is the extended divergence (2.10), h is extended to the boundary using (4.12) so that Th is zero at the boundaries (4.10).

Theorem 4.1. Under assumptions of Theorem 3.2, there exists a constant M that is independent of the grid, such that

kekS + kGekV 6 M (kTF (f)kV + kTh(f)kS ) . (4.15)

Proof. Taking the inner product of (4.14) with the error and using the summation by parts formula (2.11) gives

hL e, eiS + hh e, eiS = +hTF (f), GeiV − hTh(f), eiS .

From (3.17) and (3.22) we have 1 hGe, Gei 6 hL e, ei , hh e, ei > 0 , V η S S and thus 1 kGek2 6 (kT (f)k kGek + kT (f)k kek ) . V η F V V h S S Also, the proof of Theorem 3.2 (equations (3.20) - (3.27)) gives a constant K so that

2 kekS 6 K (kTF (f)kV kGekV + kTh(f)kS kekS ) . Thus 2 2 ˜ kekS + kGfkV 6 M (kTF (f)kV kGekV + kTh(f)kS kekS ) , ˜ with M = K√ + 1/η. Now some simple inequalities for quadratic polynomials give the result with M = 2 M˜ .

Corollary 4.1. If δx = max δxi+1/2 06i6N−1 then under assumptions of Theorem 4.1 there exists a constant M that is independent of the grid, such that kekS + kGekV 6 M δx .

Proof. If K = max06x61 k(x), then (4.8) gives

kTF (f)kV 6 K kTG(f)kV .

In estimate (4.5), if the truncated Taylor expansion is replaced by a Taylor expansion with remainder, then kTG(f)kV 6 M1 δx 00 with M1 = L max06x61 | f (x) | /3 with L the length of the interval. Similarly, using (4.9),

2 kTh(f)kS 6 M2 δx , 250 S. Steinberg

0 0 00 where M2 = L max06x61 | 2f (x) h (x) + f(x) h (x) | /24. Combining these 3 estimates gives the result. This last estimate along with the error estimates on the quadrature rules imply that the mimetic method converges at least at first order on families of grids where the aspect ratio

max δx ρ = 06i6N−1 i+1/2 min06i6N−1 δxi+1/2 is bounded for all grids in the family (see [18] for the details).

4.3. Numerical results The numerical experiments presented in the next section, which use smooth k, h, g and everywhere-rough grids with 1 6 ρ 6 1000, show that our discretization converges at second order in max norm. So the estimates in this paper are too weak (first-order in mean square norm). Optimal sup-norm results are given in [40]. Numerical experiments with non- smooth coefficients show that our estimates are optimal in this case. An extensive study of the non-smooth case is given in [33].

5. Higher-order methods

The estimate (4.15) in Theorem 4.1 implies that if we can find approximations of the flux and multiplication by h that are higher-order, then the approximation of the BVP will be higher order. That is, we need to find operators A : HS → HV and E : HS → HS such that the truncation errors (4.8) and (4.9)

TF (f) = PV (F f) − A PS f , Th(f) = PS (h f) − E PS f are higher-order approximations of zero. This can be done by using one of the Mathematica notebooks to find matrices for the operators that, for all polynomials f of some degree, make TF (f) = 0 and Th(f) = 0. The degree of the polynomials can depend on the grid point, for example to make the method more or less accurate near the boundaries. We will always assume that our approximate flux is exact for constant functions.

Lemma 5.1. If B : HS → HV satisfies B f = 0 when f ≡ 1, then there is a C : HV → HV such that B = CG .

Proof. This is a direct computation based on the fact that if a matrix kills the vector whose components are all 1, then its row sums are zero.

If the approximate flux is exact for linear functions, then we get

Lemma 5.2. In addition to the hypotheses in the previous lemma, if B f = 1 when f(x) = x, then the matrix of C of the previous lemma has row sums one.

Proof. The estimates (4.5) and (4.6) given in Section 4 show that our basic discretization has a G that is exact on polynomials of degree one, that is, if f(x) = x then Gf = 1, so Cf = 1 when f(x) ≡ 1, so now the row sums are 1. A discrete calculus with applications of high–order discretizations to boundary–value problems 251

We will look for flux operators of the form F = KH , H = CG , where K is diagonal with entries of the cell-centered values of k. For computational efficiency it is important to find operators C with banded matrices, or more generally, matrices of the form C = M−1 N , where M and N are banded. Discretiza- tions of the latter form are called compact differences in the literature [34]. In this case, we require that a modified truncation error 0 MPV (f ) − N PS f must be zero for all polynomials f of some degree. We also want that M is bounded below and is thus invertible. Explicit methods are given by M = I and implicit methods are given by N = I (in which case we set M = C). Multiplication by h is approximated by E, multiplication by a banded matrix NX−1 (Ef)i+1/2 = Ei+1/2,j+1/2 fj+1/2 . (5.1) j=0 We want E positive. Because of the use of staggered grids and average projection, our discretizations are not the usual ones appearing in the literature. To prove convergence, we will need to know that E is positive and C is bounded below independent of the grid, which we leave as important open questions. However, numerical experiments strongly support the results. We do not insist, as is common, that the constructed operators C be symmetric. Note that even if M and N are symmetric C typically will not be symmetric. In the next few sections we will present some examples of higher-order methods. For the cases we consider, the rows of the matrices for C and E have the same number of contiguous non-zero entries in a row as the highest degree of the polynomials. The requirement that the truncation errors TF and Th be zero on the polynomials gives a non-singular system of equations for determining the required matrices. One of the Mathematica notebooks available on the author’s web page was used to find the discretizations presented here. We have created and experimented with others, particularly in uniform grids with reduced order of truncation error at the boundaries. We create our standard test problem by choosing a smooth solution f, and also k and then h and computing the right-hand side g f(x) = sin(π x) + (1 + x) , k(x) = 1 + x (1 − x), h(x) = ex . The numerical program computes the values for g. For the boundary conditions we choose αl, βl, αr and βr and compute γl and γr. The typical result is that the order of convergence is one order greater than our theory predicts. This is apparently due to the smoothness of the solution. In the last sub-section of this section, we introduce a problems with non-smooth solutions that exhibits the predicted convergence rate.

5.1. Examples of higher-order discretizations of L Here we focus on examples where discretizations of the gradient H is exact on polynomials of degree 1, 3, and 5 and has minimal stencil width. We use odd orders because these methods have a symmetric footprint in the interior of the grid. C is never symmetric, but in uniform grids the asymmetry is only near the boundary. 252 S. Steinberg

5.1.1. An explicit method exact on linear polynomials. The estimates (4.5) and (4.6) given in Section 4 show that our basic discretization has a G that is exact on polynomials of degree one. Also, the Mathematica notebook returns this method when creating a method G exact on polynomials of degree one. So the discretization exact on linears with the smallest stencil gives H = G. On general grids, the computer algebra code can be used to show that the truncation error for G is everywhere order one, while the truncation error (4.10) of L = DH = DG is everywhere order zero. Approximating the multiplication by h by multiplying by the value of h at the center of the cells is everywhere second order. So our theory predicts that the convergence rate is at least one. Numerical experiments show that this method converges at order two on everywhere-rough grids for problems where k and h are smooth. On uniform grids, the truncation error for the higher order gradient and multiplication by the center value are second order, while

f 00 δx2 f (4) T (f) ≈ , T (f) ≈ − ,... L 1/2 2 L 3/2 12 So the truncation error for L is order zero near the boundary. In any case, our theory predicts second order convergence, and that is what is seen numerically. Here is the upper left corner of the matrix for L   2 −3 1 0 0 ...    0 1 −2 1 0 ...      1  0 0 1 −2 1 ...  DKG =   . δx2  0 0 0 1 −2 ...       0 0 0 0 1 ...  ......

We see that, in the interior, this discretization is the standard one, but at the boundaries, it is unusual.

5.1.2. A method exact on cubic polynomials. For the method that is exact on polynomials of degree three, C has three contiguous non-zero entries in each row (but is not quite tridiagonal), as does multiplication by h. When we make the truncation error for multiplication by h zero on polynomials, the moments of h naturally occur. So we will write the formulas for the discretization of multiplication by h in terms of dimensionless versions of the moments: Zxi+1 (k) 1 k Mi+1/2 = k+1 h(s)(s − xi+1/2) ds . (5.2) δxi+1/2 xi The method that is exact on cubics depends on the first three moments of h (k = 0, 1, 3). If we use the Mathematica notebook to find a discretization of multiplication by h ex- act on linear polynomials, then the approximation should be multiplication by M (0) rather than multiplication by the center value as we used in the previous section. This does not significantly change the numerical results. On nonuniform grids, the truncation error for the gradient is order 3, the truncation error for L is order 2, and the truncation error for multiplication by h is order 4. So our theory A discrete calculus with applications of high–order discretizations to boundary–value problems 253 predicts that the solutions will converge at order 3. However, in the everywhere rough grid, with smooth k and h, the numerical convergence rates of the solution and its higher-order gradient are order 4. On uniform grids, the truncation error for the gradient is order 4, the truncation error for multiplication by h is still everywhere order 4, and the truncation error for the first few rows of L = DCG are

7 h2 f (4) h2 f (4) h4 f (6) T (f) ≈ , T (f) ≈ − , T (f) ≈ ,... L 1/2 60 L 3/2 60 L 5/2 90 So on uniform grids this method should and does converge at order 4. When N = 6,   11 − 19 2 0 0 0 0  6 18 9     1 23 1   − − 0 0 0 0   6 18 9     0 − 1 7 − 1 0 0 0   12 6 12     1 7 1  C =  0 0 − − 0 0  .  12 6 12     0 0 0 − 1 7 − 1 0   12 6 12     1 23 1   0 0 0 0 − −   9 18 6  2 19 11 0 0 0 0 9 − 18 3

The eigenvalues of C are in the interval [1, 2.064 ··· ] for N = 5, 9, 17, 33, 65, 129. The upper left corner of the second-order operator is   4 − 19 8 − 1 0 0 ...  3 3 3     1 61 95 49 1   − − − 0 ...   3 36 36 36 12     0 − 1 4 − 5 4 − 1 ...   12 3 2 3 12  1   L = DCG =  1 4 5 4  . 2  0 0 − − ...  h  12 3 2 3     0 0 0 − 1 4 − 5 ...   12 3 2     1 4   0 0 0 0 − ...   12 3  ......

In uniform grids, the modified truncation error for the first few rows of L = DA−1G are

2 h2 f (4)(x ) h4 f (6)(x ) h4 f (6)(x ) T (f) ≈ 0 , T (f) ≈ 0 , T (f) ≈ i , ··· . L 1/2 45 L 3/2 240 L 5/2 240

In a uniform grid, multiplication by E (5.1) is given by a matrix with entries Ei+1/2,j+1/2, 254 S. Steinberg

0 6 i, j 6 N − 1, that are everywhere zero except for 23 M 3 M M −M − 12 M + 12 M E = 0 − 1 + 2 ,E = 0 1 2 , 1/2,1/2 24 2 2 i+1/2,i−1/2 24 M 13 M E = 0 + 2 M − M ,E = 0 − M , 1/2,3/2 12 1 2 i+1/2,i+1/2 12 2 −M0 M1 M2 −M0 + 12 (M1 + M2) E1/2,5/2 = − + ,Ei+1/2,i+ 3 = , 24 2 2 2 24 −M + 12 (M + M ) E = 0 1 2 , N−1/2,N−5/2 24 M E = 0 − 2 M − M , N−1/2,N−3/2 12 1 2 23 M + 12 (3 M + M ) E = 0 1 2 , N−1/2,N−1/2 24 were 1 6 i 6 N − 2. The moments Mi are given in (5.2).

5.1.3. A method exact on quintic polynomials. The formulas for the methods exact of fifth-degree polynomials are large enough that they should be extensively optimized before being implemented (but they can easily be computed and partially optimized using the author’s Mathematica notebook). We did not implement this method as it is clear the resulting code will work as predicted. We can get some idea of what the method is like by looking at uniform grids. When N = 7,   137 3799 1721 93 2  60 − 1800 900 − 200 25 0 0 0       − 13 2501 − 46 7 − 1 0 0 0   60 1800 225 200 300     1 38 284 7 1   30 − 225 225 − 50 75 0 0 0       0 1 − 23 37 − 23 1 0 0   90 180 30 180 90  C =   .  1 23 37 23 1   0 0 90 − 180 30 − 180 90 0       0 0 0 1 − 7 284 − 38 1   75 50 225 225 30     1 7 46 2501 13   0 0 0 − 300 200 − 225 1800 − 60    2 93 1091 3799 137 0 0 0 25 − 200 900 − 1800 60

The eigenvalues of C are in the interval [1, 2.7 ··· ] for N = 9, 17, 33, 65, 128, 129.

5.1.4. An example of a compact discretization. We created a method for compact discretization of the form H = C−1 G that is exact on cubic polynomials, that is, the modified truncation error TF (f) = CPV (F f) − PS f is zero on the polynomials. The method gives the same numerical results as the explicit method in Section 5.1.2. A discrete calculus with applications of high–order discretizations to boundary–value problems 255

On a uniform grid, when N = 5,   7 1 1  12 2 − 12 0 0 0       1 5 1 0 0 0   12 6 12     1 5 1   0 12 6 12 0 0  C =   .    0 0 1 5 1 0   12 6 12     1 5 1   0 0 0 12 6 12    1 1 7 0 0 0 − 12 2 12

5.2. Examples with non-smooth solution We look at two examples, one with continuous material proprieties, that is where k is continuous but where k0 has a jump, and an example where k is discontinuous. It is important to note that we did not make any explicit smoothness assumption on the coefficient k, it merely needed to be bounded above and below. We do assume that the continuum problem has a classical solution, and this means that k must have a continuous first derivative. In fact, the mimetic method works if k0 and consequently f 00 are piecewise continuous. For a thorough study of problems with non-smooth coefficients, see [31–33]. If we take k(x) = 3/2 − |x − 1/2| , then the derivative of k has a jump. But still, on everywhere-rough grids, the method that is exact on linears converges at order two, while the method that is exact on cubics converges at fourth order. If we choose ( 1 , 0 6 x < a, k(x) = b , a 6 x 6 1 and h ≡ 0, and then the solution of the BVP is  b x  , 0 6 x < a, f(x) = 1 − a + a b  1 − x  1 − , a 6 x 6 1. 1 − a + a b

So k is discontinuous, and thus f 0 is discontinuous, but the flux k f 0 is continuous. If the grid is uniform and has an even number of cells, so that x = 1/2 is in the grid, and a = 1/2 and b = 10, so that the jump is at a grid point, then the convergence rates of the solution and both the gradient and the flux are first order. With an odd number of cells, the solution converges at first order while the gradient and flux are essentially exact. For the everywhere rough grids, for a wide range of aspect ratios, the convergence rate is still one with the gradient and fluxes still being exact. We conclude that rough material properties, that is rough k, impact the convergence rates more than rough grids. 256 S. Steinberg

6. Computing point values from average values

Formulas for computing point values from average values can be derived in the same way as formulas for computing derivatives. So we assume that we have good estimates of the boundary point values given by f0 and fN , and that we also have good estimates of the averages values given by fi+1/2, 0 6 i 6 N − 1. Away from the boundaries, a symmetric formula of width 2 K can be used, while near the boundaries, a one-sided formula of width of 2 K or more must be used. The point values at the interior nodes are estimated using

KX−1 f(xi) ≈ bi,j+1/2 fi+j+1/2 , j=−K where K > 0. The higher-order algorithm computes f0 and fN with the required accuracy. Near the boundaries, we choose M sufficiently large and then use non-symmetric stencils. When 0 < i < K, XM f(xi) ≈ bi,0 f0 + bi,−i+j+1/2 fj+1/2 , j=0 and XM f(xN−i) ≈ bN−i,N fN + bN−i,i−j−1/2 fN−j−1/2 . j=0 The point values at the cell centers are estimated using

XK f(xi+1/2) ≈ bi+1/2,j+1/2 fi+j+1/2 , j=−K where K > 0. For 0 < i < K,

XK f(xi+1/2) ≈ bi+1/2,0 f0 + bi+1/2,−i+j+1/2 fj+1/2 , j=0 while X0 f(xN−1/2−i) ≈ bN−1/2−i fN + bN−1/2−i,i−j+1/2 fN−i−1/2 . i=−K

6.1. Second-order values If we assume that we have second-order accurate values given, then we have second-order estimates for f(x0) and f(xN ) and the averages are second-order estimates of the point values at the cell centers. The remaining nodal values can be estimated to second-order by

f(xi) ≈ bi,−1/2 fi−1/2 + bi,+1/2 fi+1/2 , where δi+1/2 δi−1/2 bi,−1/2 = , bi,+1/2 = . δi−1/2 + δi+1/2 δi−1/2 + δi+1/2 A discrete calculus with applications of high–order discretizations to boundary–value problems 257

6.2. Fourth-order nodal values

If the point values f0 and fN and the averages values fi+1/2 are fourth-order accurate then, on a uniform grid, the coefficients for estimating f(x1) are 1 17 4 1 b = − , b = , b = , b = − . 1,0 3 1,−1/2 18 1,1/2 9 1,3/2 18

The coefficients for estimating f(xi), 2 6 i 6 N − 2, are 1 7 7 1 b = − , b = , b = , b = − . i,−3/2 12 i,−1/2 12 i,+1/2 12 i,+3/2 12

The coefficients for estimating f(xN−1) are 1 4 17 1 b = − , b = , b = , b = − . N−1,−3/2 18 N−1,−1/2 9 N−1,+1/2 18 N−1,N 3

On a general grid, the coefficients for estimating f(x1) are

δ3/2 (δ3/2 + δ5/2) b1,0 = −¡ ¢ ¡ ¢ , δ1/2 + δ3/2 δ1/2 + δ3/2 + δ5/2 ¡ 2 2 ¢ δ3/2 (δ3/2 + δ5/2) 4 δ1/2 + 6 δ1/2 δ3/2 + 2 δ3/2 + 3 δ1/2 δ5/2 + 2 δ3/2 δ5/2 b1,1/2 = ¡ ¢2 ¡ ¢2 , δ1/2 + δ3/2 δ1/2 + δ3/2 + δ5/2 2 ¡ ¢ ¡ 2 2¢ δ1/2 δ1/2 + 2 δ3/2 + δ5/2 2 δ1/2 δ3/2 + 2 δ3/2 + δ1/2 δ5/2 + 2 δ3/2 δ5/2 + δ5/2 b1,3/2 = ¡ ¢2 ¡ ¢2 , δ1/2 + δ3/2 (δ3/2 + δ5/2) δ1/2 + δ3/2 + δ5/2 2 δ1/2 δ3/2 b1,5/2 = − ¡ ¢2 . (δ3/2 + δ5/2) δ1/2 + δ3/2 + δ5/2

On a general grid, the coefficients for estimating f(xi), 2 6 i 6 N − 1, are ¡ ¢ δ δ δ + δ b = −¡ i−1/2 i¢+1 ¡/2 i+1/2 i+3/2 ¢ , i,−3/2 δ + δ δ + δ + δ S i−3/2 i−1/2 i−3/2 ¡i−1/2 i+1/2 ¢ δ δ + δ T b = ¡ ¢ ¡ i+1/2 i+1/2 i+¢3/ ¡2 i,−1/2 ¢ , i,−1/2 δ + δ δ + δ + δ δ + δ + δ A S i−3/2 i−1/2 i−3/2 i−¡1/2 i+1/2 ¢i−1/2 i+1/2 i+3/2 i i δ δ + δ T b = ¡ i−¢1 ¡/2 i−3/2 i−¢1/ ¡2 i,+1/2 ¢ , i,+1/2 δ + δ + δ δ + δ δ + δ + δ A S i−3/2 i−1/2 ¡ i+1/2 i+1/¢2 i+3/2 i−1/2 i+1/2 i+3/2 i i δi−1/2 δi−3/2 + δi−1/2 δi+1/2 bi,+3/2 = −¡ ¢ ¡ ¢ , δi+1/2 + δi+3/2 δi−1/2 + δi+1/2 + δi+3/2 S where

Ai = δi−1/2 + δi+1/2 ,

Si = δi−3/2 + δi−1/2 + δi+1/2 + δi+3/2 , 3 2 2 3 2 Ti,−1/2 = δi−3/2 + 4 δi−3/2 δi−1/2 + 6 δi−3/2 δi−1/2 + 4 δi−1/2 + 2 δi−3/2 δi+1/2 2 2 2 + 6 δi−3/2 δi−1/2 δi+1/2 + 6 δi−1/2 δi+1/2 + δi−3/2 δi+1/2 + 2 δi−1/2 δi+1/2 2 2 + δi−3/2 δi+3/2 + 3 δi−3/2 δi−1/2 δi+3/2 + 3 δi−1/2 δi+3/2 + δi−3/2 δi+1/2 δi+3/2

+ 2 δi−1/2 δi+1/2 δi+3/2 , 258 S. Steinberg and

2 2 2 3 Ti,+1/2 = 2 δi−3/2 δi−1/2 δi+1/2 + 2 δi−1/2 δi+1/2 + 3 δi−3/2 δi+1/2 + 6 δi−1/2 δi+1/2 + 4 δi+1/2 2 + δi−3/2 δi−1/2 δi+3/2 + δi−1/2 δi+3/2 + 3 δi−3/2 δi+1/2 δi+3/2 + 6 δi−1/2 δi+1/2 δi+3/2 2 2 2 2 3 + 6 δi+1/2 δi+3/2 + δi−3/2 δi+3/2 + 2 δi−1/2 δi+3/2 + 4 δi+1/2 δi+3/2 + δi+3/2 .

On a general grid, the coefficients for estimating f(xN−1) are

2 δN−3/2 δN−1/2 bN−1,N−3/2 = − ¡ ¢2 , (δN−5/2 + δN−3/2) δN−5/2 + δN−3/2 + δN−1/2 2 ¡ ¢ δN−1/2 δN−5/2 + 2 δN−3/2 + δN−1/2 TN−3/2 bN−1,N−1/2 = ¡ ¢2 ¡ ¢2 , (δN−5/2 + δN−3/2) δN−3/2 + δN−1/2 δN−5/2 + δN−3/2 + δN−1/2

δN−3/2 (δN−5/2 + δN−3/2) TN−1/2 bN−1,N+1/2 = ¡ ¢2 ¡ ¢2 , δN−3/2 + δN−1/2 δN−5/2 + δN−3/2 + δN−1/2

δN−3/2 (δN−5/2 + δN−3/2) bN−1,N = −¡ ¢ ¡ ¢ , δN−3/2 + δN−1/2 δN−5/2 + δN−3/2 + δN−1/2 where

2 2 TN−3/2 = δN−5/2 + 2 δN−5/2 δN−3/2 + 2 δN−3/2 + δN−5/2 δN−1/2 + 2 δN−3/2 δN−1/2 , and

2 2 TN−1/2 = 2 δN−5/2 δN−3/2 + 2 δN−3/2 + 3 δN−5/2 δN−1/2 + 6 δN−3/2 δN−1/2 + 4 δN−1/2 .

6.3. Fourth-order cell-center values

Again, if the point values f0 and fN and the averages values fi+1/2 are fourth-order accurate then, on a uniform grid, the coefficients for estimating f(x1/2) are 1 91 1 1 b = − , b = , b = − , b = . 1/2,0 6 1/2,1/2 72 1/2,3/2 9 1/2,5/2 72

The coefficients for estimating f(xi+1/2), 1 6 i 6 N − 1 are 1 13 1 b = − , b = , b = − . i,−1/2 24 i,+1/2 12 i,+3/2 24

The coefficients for estimating f(xN−1/2) are 1 1 91 1 b = , b = − , b = , b = − . N−1/2,−5/2 72 N−1/2,−3/2 9 N−1/2,−1/2 72 N−1/2,N 6

On a general grid, the coefficients for estimating f(x1/2) are ¡ ¡ ¢¢ − δ1/2 δ1/2 + 2 δ3/2 + δ5/2 b1/2,0 = ¡ ¢ ¡ ¢ , 4 δ1/2 + δ3/2 δ1/2 + δ3/2 + δ5/2

T1/2 b1/2,1/2 = ¡ ¢2 ¡ ¢2 , 4 δ1/2 + δ3/2 δ1/2 + δ3/2 + δ5/2 A discrete calculus with applications of high–order discretizations to boundary–value problems 259

¡ 2 ¡ ¢ ¡ 2 2¢¢ − δ1/2 δ1/2 + 2 δ3/2 + δ5/2 2 δ1/2 δ3/2 + 2 δ3/2 + δ1/2 δ5/2 + 2 δ3/2 δ5/2 + δ5/2 b1/2,3/2 = ¡ ¢2 ¡ ¢2 , 4 δ1/2 + δ3/2 (δ3/2 + δ5/2) δ1/2 + δ3/2 + δ5/2 2 δ1/2 δ3/2 b1/2,5/2 = ¡ ¢2 , 4 (δ3/2 + δ5/2) δ1/2 + δ3/2 + δ5/2 where

4 3 2 2 3 T1/2 = 6 δ1/2 + 24 δ1/2 δ3/2 + 32 δ1/2 δ3/2 + 18 δ1/2 δ3/2 4 3 2 2 + 4 δ3/2 + 12 δ1/2 δ5/2 + 32 δ1/2 δ3/2 δ5/2 + 27 δ1/2 δ3/2 δ5/2 3 2 2 2 2 2 + 8 δ3/2 δ5/2 + 6 δ1/2 δ5/2 + 9 δ1/2 δ3/2 δ5/2 + 4 δ3/2 δ5/2 .

On a general grid, the coefficients for estimating f(xi+1/2) are 2 −δi+1/2 bi,−1/2 = ¡ ¢ ¡ ¢ , 4 δi−1/2 + δi+1/2 δi−1/2 + δi+1/2 + δi+3/2

Ti,1/2 bi,+1/2 = ¡ ¢ ¡ ¢ ¡ ¢ , 4 δi−1/2 + δi+1/2 δi+1/2 + δi+3/2 δi−1/2 + δi+1/2 + δi+3/2 2 −δi+1/2 bi,+3/2 = ¡ ¢ ¡ ¢ , 4 δi+1/2 + δi+3/2 δi−1/2 + δi+1/2 + δi+3/2 where

2 2 3 2 Ti,1/2 = 4 δi−1/2 δi+1/2 + 9 δi−1/2 δi+1/2 + 6 δi+1/2 + 4 δi−1/2 δi+3/2 2 2 2 + 12 δi−1/2 δi+1/2 δi+3/2 + 9 δi+1/2 δi+3/2 + 4 δi−1/2 δi+3/2 + 4 δi+1/2 δi+3/2 .

On a general grid, the coefficients for estimating f(xN−1/2) are 2 δN−3/2 δN−1/2 bN−1/2,−5/2 = ¡ ¢2 , 4 (δN−5/2 + δN−3/2) δN−5/2 + δN−3/2 + δN−1/2 2 ¡ ¢ −δN−1/2 δN−5/2 + 2 δN−3/2 + δN−1/2 TN−3/2 bN−1/2,−3/2 = ¡ ¢2 ¡ ¢2 , 4 (δN−5/2 + δN−3/2) δN−3/2 + δN−1/2 δN−5/2 + δN−3/2 + δN−1/2

TN−1/2 bN−1/2,−1/2 = ¡ ¢ ¡ ¢ , 4 δ + δ 2 δ + δ + δ 2 N−¡3/2 N¡−1/2 N−5/2 N−3/2 N¢¢−1/2 − δN−1/2 δN−5/2 + 2 δN−3/2 + δN−1/2 bN−1/2,N = ¡ ¢ ¡ ¢ , 4 δN−3/2 + δN−1/2 δN−5/2 + δN−3/2 + δN−1/2 where

2 2 TN−3/2 = δN−5/2 + 2 δN−5/2 δN−3/2 + 2 δN−3/2 + δN−5/2 δN−1/2 + 2 δN−3/2 δN−1/2 , and

2 2 3 4 2 TN−1/2 = 4 δN−5/2 δN−3/2 + 8 δN−5/2 δN−3/2 + 4 δN−3/2 + 9 δN−5/2 δN−3/2 δN−1/2 2 3 2 2 + 27 δN−5/2 δN−3/2 δN−1/2 + 18 δN−3/2 δN−1/2 + 6 δN−5/2 δN−1/2 2 2 2 3 + 32 δN−5/2 δN−3/2 δN−1/2 + 32 δN−3/2 δN−1/2 + 12 δN−5/2 δN−1/2 3 4 + 24 δN−3/2 δN−1/2 + 6 δN−1/2 . 260 S. Steinberg

References

[1] N. M. Bessonov and D. J. Song, Application of vector calculus to numerical simulation of continuum mechanics problems, J. Comput. Phys., 167 (2001), pp. 28–38. [2] A. Bossavit, Mixed finite elements and the complex of Whitney forms, in: The Mathematics of Finite Elements and Applications, VI (Uxbridge, 1987), Academic Press, London, 1988, pp. 137–144. [3] A. Bossavit, Differential forms and the computation of fields and forces in , Eur. J. Mech., B, Fluids, 10 (1991), no. 5, pp. 474–488. [4] A. Bossavit, Variational Formulations, Complementarity, Edge Elements, Computational Electromag- netism, Academic Press Inc., San Diego, CA, 1998. [5] A. Bossavit, The discrete Hodge operator in electromagnetic wave propagation problems, in: Mathemat- ical and Numerical Aspects of Wave Propagation (Santiago de Compostela, 2000), SIAM, Philadelphia, PA, 2000, pp. 753–759. [6] M. H. Carpenter, D. Gottlieb, and S. Abarbanel, Time-stable boundary conditions for finite difference solving hyperbolic systems: Methodology and applications to high-order compact schemes, J. Comp. Phys., 111 (1994), pp. 220–236. [7] J. Castillo, J. Hyman, M. Shashkov, and S. Steinberg, High-order mimetic finite difference methods on nonuniform grids, in: ICOSAHOM-95, Proc. of the Third International Conference on Spectral and High Order Methods, pp. 347–361, special Issue of Houston Journal of Mathematics, 1995. [8] J. Castillo, J. Hyman, M. Shashkov, and S. Steinberg, Fourth and sixth-order conservative finite differ- ence approximations of the divergence and gradient, Appl. Numer. Math., 37 (2001), pp. 171–187. [9] J. A. Chard and V. Shapiro, A multivector data structure for differential forms and equations, Math. Comput. Simul., 37 (2000), no. 1–3, pp. 33–64. [10] A. A. Dezin, Multidimensional analysis and discrete models, CRC Press, Boca Raton, FL, 1995, trans- lated from the Russian by Irene Aleksanova. [11] R. Hiptmair, High order Whitney forms, J. Electromagn. Waves Appl., 15 (2001), no. 3, pp. 291–436. [12] J. M. Hyman, R. J. Knapp, and J. C. Scovel, High order finite volume approximations of differential operators on nonuniform grids, Physica D, 60 (1992), pp. 112–138. [13] J. M. Hyman and J. C. Scovel, Deriving mimetic difference approximations to differential operators using algebraic topology, Tech. report NM 87545, Los Alamos National Laboratory, Los Alamos, 1988. [14] J. M. Hyman and J. M. Shashkov, Adjoint operators for the natural discretizations of the divergence, gradient and curl on logically rectangular grids, Appl. Numer. Math., 25 (1997), no. 4, pp. 413–442. [15] J. M. Hyman and J. M. Shashkov, Natural discretizations for the divergence, gradient, and curl on logically rectangular grids, Comput. Math. Appl., 33 (1997), no. 4, pp. 81–104. [16] J. M. Hyman and J. M. Shashkov, The approximation of boundary conditions for mimetic finite differ- ence methods, Comput. Math. Appl., 36 (1998), pp. 79–99. [17] J. M. Hyman and J. M. Shashkov, The orthogonal decomposition theorems for mimetic finite difference methods, SIAM J. Numer. Anal., 36 (1999), no. 3, pp. 788–818, electronic. [18] J. M. Hyman and S. Steinberg, The convergence of mimetic discretization for rough grids, in press, 2004. [19] B. Karasozen and V. Tsybulin, Proceedings of the computer algebra in scientific computing, in: Con- servative finite difference schemes for cosymmetric systems, CASC-2001. [20] L. Kettunen, K. Forsman, and A. Bossavit, Gauging in Whitney spaces, IEEE Trans. Magnetics, 35 (May 1999), no. 3, pp. 1466–1469. [21] H.-O. Kreiss and G. Scherer, Finite element and finite difference methods for hyperbolic partial differ- ential equations, in: Mathematical Aspects of Finite Elements in Partial Differential Equations, 1974, pp. 195–212. A discrete calculus with applications of high–order discretizations to boundary–value problems 261

[22] L. Margolin, M. J. Shashkov, and P. Smolarkiewicz, Gauging in Whitney spaces, Comput. Meth. Appl. Mech. Eng., 187 (2000), pp. 365–383. [23] C. Mattiussi, An analysis of finite volume, finite element, and finite difference methods using some concepts from algebraic topology, J. Comput. Phys., 133 (1997), pp. 289–309. [24] C. Mattiussi, The finite volume, finite element, and finite difference methods as numerical methods for physical field problems, in: Advances in Imaging and Electron , vol. 113, 2000, pp. 1–146. [25] K. Mattsson, Boundary procedures for summation-by-parts operators, J. Sci. Comput., 18 (2003), no. 1, pp. 122–153. [26] K. Mattsson, Summation-by-Parts Operators for High Order Finite Difference Methods, Phd thesis, Uppsala University, Uppsala, Sweden, 2003. [27] K. Mattsson and J. Nordstr¨om, Summation by parts operators for finite difference approximations of second derivatives, to appear., 2004. [28] P. Olsson, Summation by parts, projections, and stability I., Math. Comput., (1995), pp. 64–211:1035– 1065. [29] R. S. Palmer, Chain models and finite element analysis: an executable CHAINS formulation of plane stress, Comput. Aided Geom. Des., 12 (1995), no. 7, pp. 733–770, grid generation, finite elements, and geometric design. [30] R. S. Palmer and V. Shapiro, Chain models of physical behavior for engineering analysis and design, Res. Eng. Des., 5 (1993), pp. 161–184. [31] N. Robidoux, A new method of construction of adjoint gradients and divergences on logically rectan- gular smooth grids, in: Finite Volumes for Complex Applications: Problems and Perspectives, First International Symposium, July 15-18, 1996,Rouen, France, Editions Herm`es,Paris, 1996, pp. 261–272. [32] N. Robidoux, Natural finite volume discretizations of the gradient, divergence, laplacian, diffusion ten- sor and advective term on grids with quadrilateral cells, Thesis draft, available from the author or http://www.math.unm.edu/~mia, 1997. [33] N. Robidoux, Numerical solution of the steady diffusion equation with discontinuous coefficients, Phd thesis, University of New Mexico, 2002. [34] M. E. Rose, Compact finite volume methods for the diffusion equation, Res. Eng. Des., 3 (1989), pp. 261–290. [35] A. A. Samarskii, The Theory of Difference Schemes, Monographs and Textbooks in Pure and Applied Mathematics, Marcel Dekker Inc., New York, 2001, transl. from the Russian. [36] W. M. Seiler, Completion to involution and semi-discretization, (preprint), see http://www.math.uni-mannheim.de/~wms. [37] M. Shashkov and S. Steinberg, Support-operator finite-difference algorithms for general elliptic problems, J. Comput. Phys., 118 (1995), no. 1, pp. 131–151. [38] B. Strand, Summation by parts for finite difference approximations for d/dx, J. Comput. Phys., 110 (1994), pp. 47–67. [39] M. Sv¨ard,K. Mattsson, and J. Nordstr¨om, Steady state computations using summation-by-parts oper- ators, to appear, 2004. [40] J. P. Zingano, Convergence of mimetic methods for Sturm-Liouville problems on general grids, Phd thesis, University of New Mexico, Albuquerque, New Meixico, 2003.

Received 18 Mar. 2004 Revised 9 Jun. 2004