22
SIAM J. NUMER. ANAL. c xxxx Society for Industrial and Applied Mathematics Vol. xx, No. x, pp. x–x NON-UNIFORM DISCONTINUOUS GALERKIN FILTERS VIA SHIFT AND SCALE * DANG-MANH NGUYEN AND J ¨ ORG PETERS Abstract. Convolving the output of Discontinuous Galerkin computations with symmetric Smoothness-Increasing Accuracy-Conserving (SIAC) filters can improve both smoothness and accu- racy. To extend convolution to the boundaries, several one-sided spline filters have recently been developed. This paper interprets these filters as instances of a general class of position-dependent (PSIAC) spline filters that can have non-uniform knot sequences and skip B-splines of the sequence. PSIAC filters with rational knot sequences have rational coefficients. For prototype knot se- quences, such as integer sequences that may have repeated entries, PSIAC filters can be expressed in symbolic form. Based on the insight that filters for shifted or scaled knot sequences are easily derived by non-uniform scaling of one prototype filter, a single filter can be re-used in different locations and at different scales. Computing a value of the convolution then simplifies to forming a scalar product of a short vector with the local output data. Restating one-sided filters in this form improves both stability and efficiency compared to their original formulation via numerical integration. PSIAC filtering is demonstrated for several established and one new boundary filter. Key words. Discontinuous Galerkin; spline filter; shifted convolution; SIAC filtering; boundary filter; symbolic representation AMS subject classifications. 65M12; 65D07 1. Introduction. Since the output of Discontinuous Galerkin (DG) computa- tions often captures higher order moments of the true solution [ML78], post-processing DG output by convolution can improve both smoothness and accuracy [BS77, CLSS03]. In the interior of the domain of computation, symmetric smoothness-increasing ac- curacy-conserving (SIAC) filters have been demonstrated to provide optimal accuracy [CLSS03]. However their symmetric footprint precludes using these filters near bound- aries of the computational domain. To filter near boundaries, Ryan and Shu [RS03] pioneered the use of one-sided spline filters. The Ryan-Shu filters improve the L 2 error, but not necessarily the point-wise errors. In fact, the filters are observed to increase the pointwise error near the boundary. This motivated the design of the SRV filter [SRV11], a filter kernel of increased support. Due to near-singular calculations, a stable numerical derivation of the SRV filter requires computing partly in quadruple precision. Indeed, the co- efficients of all the boundary filters [RS03, SRV11, MRK12, RLKV15, MRK15] are derived by inverting a matrix whose entries are determined by Gaussian quadrature; and, as pointed out in [RLKV15], SRV filter matrices are close to singular. [RLKV15] therefore introduced the RLKV filter, that augments the filter of [RS03] by a sin- gle additional B-spline. This improves stability, retains the support-size and has the boundary filter join the symmetric interior filter without jump. However, on canonical test problems, RLKV filter errors are higher than those of the corresponding symmet- ric filters and they have sub-optimal L 2 and L superconvergence rates [RLKV15]. Moreover, RLKV yields poorer derivative approximation than SRV filters [LRKV16]. The goal of this paper is to reformulate boundary filters in a framework that elimi- nates the need for inverting near-singular matrices and thereby arrive at stable filters that can obtain the optimal accuracy. * This work was supported in part by NSF grant CCF-1117695 and NIH R01 LM011300-01 Department of Computer & Information Science & Engineering, University of Florida. (dmN- [email protected]fl.edu, [email protected]fl.edu). 1

NON-UNIFORM DISCONTINUOUS GALERKIN FILTERS VIA SHIFT … · Non-uniform Discontinuous Galerkin Filters via Shift and Scale 3 proach with the new symbolic lter derivation and by adding

  • Upload
    others

  • View
    10

  • Download
    0

Embed Size (px)

Citation preview

Page 1: NON-UNIFORM DISCONTINUOUS GALERKIN FILTERS VIA SHIFT … · Non-uniform Discontinuous Galerkin Filters via Shift and Scale 3 proach with the new symbolic lter derivation and by adding

SIAM J. NUMER. ANAL. c© xxxx Society for Industrial and Applied MathematicsVol. xx, No. x, pp. x–x

NON-UNIFORM DISCONTINUOUS GALERKINFILTERS VIA SHIFT AND SCALE∗

DANG-MANH NGUYEN† AND JORG PETERS†

Abstract. Convolving the output of Discontinuous Galerkin computations with symmetricSmoothness-Increasing Accuracy-Conserving (SIAC) filters can improve both smoothness and accu-racy. To extend convolution to the boundaries, several one-sided spline filters have recently beendeveloped. This paper interprets these filters as instances of a general class of position-dependent(PSIAC) spline filters that can have non-uniform knot sequences and skip B-splines of the sequence.

PSIAC filters with rational knot sequences have rational coefficients. For prototype knot se-quences, such as integer sequences that may have repeated entries, PSIAC filters can be expressed insymbolic form. Based on the insight that filters for shifted or scaled knot sequences are easily derivedby non-uniform scaling of one prototype filter, a single filter can be re-used in different locations andat different scales. Computing a value of the convolution then simplifies to forming a scalar productof a short vector with the local output data. Restating one-sided filters in this form improves bothstability and efficiency compared to their original formulation via numerical integration. PSIACfiltering is demonstrated for several established and one new boundary filter.

Key words. Discontinuous Galerkin; spline filter; shifted convolution; SIAC filtering; boundaryfilter; symbolic representation

AMS subject classifications. 65M12; 65D07

1. Introduction. Since the output of Discontinuous Galerkin (DG) computa-tions often captures higher order moments of the true solution [ML78], post-processingDG output by convolution can improve both smoothness and accuracy [BS77, CLSS03].In the interior of the domain of computation, symmetric smoothness-increasing ac-curacy-conserving (SIAC) filters have been demonstrated to provide optimal accuracy[CLSS03]. However their symmetric footprint precludes using these filters near bound-aries of the computational domain.

To filter near boundaries, Ryan and Shu [RS03] pioneered the use of one-sidedspline filters. The Ryan-Shu filters improve the L2 error, but not necessarily thepoint-wise errors. In fact, the filters are observed to increase the pointwise error nearthe boundary. This motivated the design of the SRV filter [SRV11], a filter kernel ofincreased support. Due to near-singular calculations, a stable numerical derivationof the SRV filter requires computing partly in quadruple precision. Indeed, the co-efficients of all the boundary filters [RS03, SRV11, MRK12, RLKV15, MRK15] arederived by inverting a matrix whose entries are determined by Gaussian quadrature;and, as pointed out in [RLKV15], SRV filter matrices are close to singular. [RLKV15]therefore introduced the RLKV filter, that augments the filter of [RS03] by a sin-gle additional B-spline. This improves stability, retains the support-size and has theboundary filter join the symmetric interior filter without jump. However, on canonicaltest problems, RLKV filter errors are higher than those of the corresponding symmet-ric filters and they have sub-optimal L2 and L∞ superconvergence rates [RLKV15].Moreover, RLKV yields poorer derivative approximation than SRV filters [LRKV16].The goal of this paper is to reformulate boundary filters in a framework that elimi-nates the need for inverting near-singular matrices and thereby arrive at stable filtersthat can obtain the optimal accuracy.

∗This work was supported in part by NSF grant CCF-1117695 and NIH R01 LM011300-01†Department of Computer & Information Science & Engineering, University of Florida. (dmN-

[email protected], [email protected]).

1

Page 2: NON-UNIFORM DISCONTINUOUS GALERKIN FILTERS VIA SHIFT … · Non-uniform Discontinuous Galerkin Filters via Shift and Scale 3 proach with the new symbolic lter derivation and by adding

2 D-M. Nguyen, J. Peters

In particular, one contribution of this paper is to reinterpret the published one-sided filters in an explicit, symbolic form as position-dependent spline filters. Symbolicexpression of coefficients for spline filters have recently been developed in [MRK15] foruniform knot sequences and in [Pet15] for general knot sequences. Reinterpretationof the published filters in symbolic form mitigates their instability and allows themto reach their full potential.

x0 0.7

10-15

10-10

(a) DG output error

x0 0.7

10-15

10-10

(b) SRV numeric

x0 0.7

10-15

10-10

(c) SRV symbolic

x0 0.05 0.1 0.15 0.2

10-15

10-10

(d) Left zoom of (b) numeric

x0 0.05 0.1 0.15 0.2

10-15

10-10

(e) Left zoom of (c) symbolic

Fig. 1. Point-wise error (y-axis) over the x-domain for u(x, 0) := .7 sin(π√

10x/7). Thegraphs in each figure correspond, from top to bottom, to refining the interval width h splitting thedomain by m = 20, 40, 80 break points. The vertical scales of (a), (b) and (c) agree. (a) Thepointwise error of L2-projection of u(x, 0), interpreted as a DG approximation at time τ := 0, ontothe space of piecewise cubic Bernstein-Bezier polynomials. (b,c) The point-wise error after doubleprecision convolution. The vertical dotted lines separate the boundary DG output from the interiordata region. In the interior, the graphs of (b) and (c) agree since the same symmetric SIAC filter isapplied; comparison with (a) illustrates the error reduction. At the boundaries, the filter of [SRV11]is computed (b) by the numerical approach vs. (c) as PSIAC filter using the symbolic approach. (d)and (e) enlarge the portion of the filtered output at the left boundary to show the stabilizing effectof the symbolic approach.

Specifically, this paper. proves general properties of SIAC filters when their knots are shifted or scaled;. uses these properties to express the filter kernels in a factored, semi-explicit

form that becomes explicit for given knot patterns and yields rational coeffi-cients for rational knot sequences;

. characterizes a class of position-dependent SIAC spline filters (PSIAC filters)whose coefficients turn out to be polynomial expressions in the position forgeneral knot sequences;

. shows that SRV and RLKV [RS03, SRV11, MRK12, RLKV15, MRK15] arePSIAC filters;

. illustrates the general framework by comparing the established numerical ap-

Page 3: NON-UNIFORM DISCONTINUOUS GALERKIN FILTERS VIA SHIFT … · Non-uniform Discontinuous Galerkin Filters via Shift and Scale 3 proach with the new symbolic lter derivation and by adding

Non-uniform Discontinuous Galerkin Filters via Shift and Scale 3

proach with the new symbolic filter derivation and by adding a new effective,stably-computed filter of lower degree than SRV or RLKV.

The new characterization allows, in standard double precision, to replace thecurrent three-step numerical approach of approximate computation of the matrix, itsinversion and application to the data by Gauss quadrature, by a single-step symbolicapproach derived in Theorem 4.2. Fig. 1 contrasts, for standard double precision,the noisy error of numerical SRV filtering with the error of the new symbolic SRVformulation.

We will demonstrate that the symbolic approach is more stable and show that

. scaled and shifted versions of the filter are easily obtained from one symbolicprototype filter;

. computation is more efficient: filtering the DG output reduces to a single dotproduct of two vectors of small size;

. computing approximate derivatives of the filtered DG output [RSA05] (seealso [Tho77, RC09, LRKV16]) simplifies to differentiating the polynomialrepresentation of the filtered output;

. the smoothness of the so-filtered DG output is shown to be C∞.

The last point is of interest since [RS03, SRV11] observed and conjectured thatthe smoothness of the filtered DG computation is the same as the smoothness in thedomain interior where the symmetric filter applied. Not only does this conjecturehold, but the smoothness will be shown to be C∞.

Organization. Section 2 introduces the canonical test equation, B-splines, con-volution, and a generalization of the formula of [Pet15] for convolution with splinesbased on arbitrary knot sequences. Section 3 reformulates the generalized convolutionformula and derives the convolution coefficients when the knot sequence is a scaled orshifted copy of a prototype sequence. Section 4, in particular Theorem 4.2, summa-rizes the resulting efficient convolution with PSIAC filters based on scaled and shiftedcopies of a prototype sequence. Section 5 shows that RS, SRV and RLKV are PSIACfilters, and that the symbolic approach improves stability and leads to a broader classof new filters.

2. Notation, Canonical Problem and Filters. This section establishes thenotation for filters and DG output, exhibits the canonical test problem, the DGmethod, B-splines and reproducing filters and reviews one-sided and position-dependentSIAC filters in the literature.

2.1. Convolution, Sequences and Notation. We denote by f ∗ g the convo-lution of a function f with a function g, i.e.

(f ∗ g)(x) :=

∫Rf(t) g(x− t) dt = (g ∗ f)(x),

for every x where the integral exists. Filtering means convolving a function witha kernel. Here and in the following, we abbreviate (the ascending or descendingsequences)

i : j :=

{(i, i+ 1, . . . , j − 1, j), if i ≤ j,(i, i− 1, . . . , j + 1, j), if i > j,

and si:j :=

{(si, si+1, . . . , sj−1, sj), if i ≤ j,(si, si−1, . . . , sj+1, sj), if i > j.

(2.1)

Page 4: NON-UNIFORM DISCONTINUOUS GALERKIN FILTERS VIA SHIFT … · Non-uniform Discontinuous Galerkin Filters via Shift and Scale 3 proach with the new symbolic lter derivation and by adding

4 D-M. Nguyen, J. Peters

Sequences are also used as summation indices:∑i:j :=

∑j`=i. We reserve the following

symbols:

d degree of the DG output;m number of intervals of the DG output;s0:m prototype increasing break point sequence, typically integers;

the break sequence of the DG output is hs0:m;k degree of the filter kernel;r + 1 number of filter coefficients

for reproduction of polynomials up to degree r;J := 0 : jr index sequence;

if the B-splines of the filter are consecutive, then jr = r;n number of knot intervals spanned by the filter;

n = jr + k + 1;t := t0:n prototype (integer) knot sequence of the filter;

the input knot sequence of the filter is ht0:n + ξwhere ξ is the shift and h scales.

The notation is illustrated by the following example.Example 2.1. A linear DG output sequence on 200 uniform segments of the

interval [−1..1] implies d = 1, m = 200, h = 1100 and s0:m = −100 : 100 a sequence of

m + 1 consecutive integers. A degree-one spline filter defined over the knot sequencet := 0 : 6 and associated with the index sequence J := (0, 3, 4) corresponds to k = 1,n = 6, r = 2 and jr = 4. That is, the filter uses the B-splines (defined in Eq. (2.7))B(x|(0, 1, 2)) B(x|(3, 4, 5)) B(x|(4, 5, 6)) but omits, or sets to zero the coefficients ofthe two B-splines B(x|(1, 2, 3)) B(x|(2, 3, 4)) defined over the knot sequences 1 : 3 and2 : 4.

0 1 2 3 4 5 60

1

x

B(x|(i, i+ 1, i+ 2))

Fig. 2. Illustration of the index sequence of J of Example. 2.1. The B-splines selected by Jhave solid lines; the skipped B-splines not in J have dashed lines.

2.2. The canonical test problem, the Discontinuous Galerkin methodand B-splines. To demonstrate the performance of the filters on a concrete example,[RS03] used the following univariate hyperbolic partial differential wave equation:

du

dτ+

d

dx

(κ(x, τ)u

)= ρ(x, τ), x ∈ (a..b), τ ∈ (0..τ)(2.2)

u(x, 0) = u0(x), x ∈ [a..b]

subject to periodic boundary conditions, u(a, τ) = u(b, τ), or Dirichlet boundaryconditions u(e, τ) = u0(τ) where, depending on the sign of κ(x, τ), e is either a orb. Subsequent work [RS03, SRV11, RLKV15] adopted the same differential equationto test their new one-sided filters and to compare to the earlier work. Eq. (2.2) istherefore considered the canonical test problem. We note, however, that SIAC filtersapply more widely, for example to FEM and elliptic equations [BS77].

Page 5: NON-UNIFORM DISCONTINUOUS GALERKIN FILTERS VIA SHIFT … · Non-uniform Discontinuous Galerkin Filters via Shift and Scale 3 proach with the new symbolic lter derivation and by adding

Non-uniform Discontinuous Galerkin Filters via Shift and Scale 5

In the DG method, the domain [a..b] is partitioned into intervals by a sequencehs0:m of break points a =: hs0, . . . , hsm := b. Assuming that the sequence is rational,scaling by h will later allow us to consider a prototype sequence s0:m of integers. LetPdh be the linear space of all piecewise polynomials with break points hs0:m and ofdegree less than or equal to d. We use modal or nodal scalar-valued basis functionsφi(. ; hs0:m) 0 ≤ i ≤ m of Pdh that are linearly independent and satisfy the scalingrelations

(2.3) φi(hx ; hs0:m) = φi(x ; s0:m).

Relation (2.3) is typically used for refinement in FEM, DG or Iso-geometric PDEsolvers. Examples of basis functions φi are Bezier-Bernstein basis functions [dB05],Lagrange polynomials that are defined based on Legendre-Gauss-Lobatto quadraturepoints [HW07], and Legendre polynomials.

The DG method approximates the time-dependent solution to Eq. (2.2) by

(2.4) u(x, τ) :=

m∑i=0

ui(τ)φi(x ; hs0:m), φi ∈ Pdh.

Multiplying two sides of Eq. (2.4) with a test function v and integrating by partsyields the weak form of Eq. (2.2):

(2.5)

∫ b

a

(dudτ

v − κ(x, τ)udv

dx

)dx =

∫ b

a

ρ(x, τ) v dx−(κ(x, τ)u(x, τ)v(x)

)∣∣∣x=bx=a

.

Substituting u on the left of Eq. (2.5) by (2.4), treating the rightmost, non-integralterm of Eq. (2.5) as a numerical flux, and choosing v(x) := φj(x ; hs0:m), yields asystem of ordinary differential equations in τ with the coefficients ui(τ), 0 ≤ i ≤ m,as unknowns. This system can be solved by, e.g., a standard fourth-order four stageexplicit Runge-Kutta method (ERK) [HW07, Section 3.4].

The goal of SIAC filtering is to spatially smooth u(x, τ) by convolution in x witha linear combination of B-splines. Typically filtering is applied after the last timestep when τ = τ . We define B-splines in terms of divided differences [CS66]. For asufficiently smooth univariate real-valued function g with kth derivative g(k), divideddifferences are defined by (cf. [dB05])

∆tig := g(ti), and for j > i

∆ti:jg :=

{(∆ti+1:j

g − ∆ti:j−1g)/(tj − ti), if ti 6= tj ,

1(j−i)! g

(j−i)(ti), if ti = tj .(2.6)

If ti:j is a non-decreasing sequence, we call its elements t` knots. Repeated knotsti = tj equate divided differences with derivatives. The classical definition of theB-spline of degree k with knot sequence ti:j , j := i+ k + 1 is

B(x|ti:j) := (tj − ti) ∆ti:j (max{(· − x), 0})k.(2.7)

Here ∆ti:j acts on the function g : t → (max{(t− x), 0})k for a given x ∈ R. Conse-quently, a B-spline is a non-negative piecewise polynomial function in x with supporton the interval [ti..tj). If ν is the multiplicity of the number t` in the sequence ti:j ,then B(x|ti:j) is at least k − ν times continuously differentiable at t`. This definition

Page 6: NON-UNIFORM DISCONTINUOUS GALERKIN FILTERS VIA SHIFT … · Non-uniform Discontinuous Galerkin Filters via Shift and Scale 3 proach with the new symbolic lter derivation and by adding

6 D-M. Nguyen, J. Peters

of B(t | ti:i+k+1) agrees, after scaling, with the definition N(t | ti:i+k+1) of the B-splineby recurrence [dB02]:

(2.8) N(t | ti:i+k+1) =ti+k+1 − tik + 1

B(t | ti:i+k+1).

2.3. SIAC filter kernel coefficients. A piecewise polynomial f : R → R issaid to be a SIAC spline kernel of reproduction degree r if convolution of f withmonomials reproduces the monomials up to degree r, i.e., if

(f ∗ (·)δ)(x) = xδ, δ = 0..r.(2.9)

Mirzargar et al. [MRK15] derived semi-explicit formulas when the filter has uni-form knots while [Pet15] gives semi-explicit formulas for the coefficients of splinekernels over general knot sequences. The following definition further generalizes theseformulas by allowing to skip some B-splines when constructing the kernel.

Definition 2.1 (SIAC spline filter kernel). Let J := (0, . . . , jr) be a sequence ofstrictly increasing integers between 0 and jr. A SIAC spline kernel of degree k andreproduction degree r with index sequence J and knot sequence t0:n is a spline

f(x) :=∑j∈J

fjB(x|tj:j+k+1),

of degree k with coefficients fj chosen so that(∑j∈J

fjB(·|tj:j+k+1) ∗ (−·)δ)

(x) = (−x)δ, δ = 0..r.(2.9’)

When J = 0 : r then Definition 2.1 replicates the definition of [Pet15].Lemma 2.2 (SIAC coefficients). The vector f := [f0, . . . , fr]

t ∈ Rr+1 of B-splinecoefficients of the SIAC filter with index sequence J := (0, . . . , jr) and knot sequencet := t0:n is

f := first column of M−10,t,J , M0,t,J :=[∆tj:j+k+1

xk+1+δ]δ=0:r, j∈J .(2.10)

Proof. We need only prove invertibility of M0,t,J since the remaining claims ofthe lemma then follow as in [Pet15].

Let ` be a left null vector of M0,t,J , i.e. for all j ∈ J , κ := k + 1 and p(x) :=xκ∑δ `δx

δ

(2.11) 0 = ∆tj:j+κ

r∑δ=0

`δxκ+δ = ∆tj:j+κx

κr∑δ=0

`δxδ = ∆tj:j+κp(x).

Let q be the interpolant of p at tj:j+κ+1, i.e. spanning two consecutive hence overlap-ping knot sequences. If knots repeat, q is a Hermite interpolant. By Rolle’s theorem,the derivative D(p− q), vanishes at a set of knots t1j:j+κ interlaced with tj:j+κ+1, i.e.

ti ≤ t1i ≤ ti+1. The inequality is strict unless ti = t1i represents a multiple root. ThenDq (Hermite) interpolates Dp at t1j:j+κ and by the relation between divided differenceand derivatives,

κ∆tj:j+κp = ∆t1j:j+κ−1Dp, and κ∆tj+1:j+κ+1

p = ∆t1j+1:j+κDp.

Page 7: NON-UNIFORM DISCONTINUOUS GALERKIN FILTERS VIA SHIFT … · Non-uniform Discontinuous Galerkin Filters via Shift and Scale 3 proach with the new symbolic lter derivation and by adding

Non-uniform Discontinuous Galerkin Filters via Shift and Scale 7

Induction in κ yields

κ!∆tj:j+κp = 2∆tκ−1j:j+1

Dκ−1p, and κ!∆tj+1:j+κ+1p = 2∆tκ−1

j+1:j+2Dκ−1p

and finally

κ!∆tj:j+κp = Dκp(tκj ), and κ!∆tj+1:j+κ+1p = Dκp(tκj+1)

for tκj ≤ tκj+1. That is, the κth divided difference of each sequence equals the κthderivative at points tκj respectively tκj+1; and the shift of the subsequence of knotsfrom tj:j+κ to tj+1:j+κ+1 implies that where tκj+1 is either strictly to the right of tκj ortκj is a multiple root. Then (2.11) implies that Dκp, a polynomial of degree at most r,has r + 1 roots counting multiplicity, hence is the zero polynomial. Given the factortκ of p, this can only hold if ` = 0, i.e. M0,t,J has no non-trivial left null vector and,as a square matrix, M0,t,J is invertible.

Since all sequences tj:j+κ, j ∈ J can be obtained by repeated shifts to the right,the conclusion ` = 0 holds for j ∈ J and M−10,t,J is well-defined.

2.4. Review of Symmetric and Boundary SIAC filters. We split the DGdata at any known discontinuities and treat the domains separately. Then convolutioncan be applied throughout a given closed interval [a..b].

A SIAC spline kernel with knot sequence t0:r+k+1 is symmetric (about the originin R) if

(2.12) t` + tr+k+1−` = 0, for ` = 0 : d(r + k + 1)/2e.

Convolution with a symmetric SIAC kernel of a function g at x then requires g tobe defined in a two-sided neighborhood of x. Near boundaries, Ryan and Shu [RS03]therefore suggested convolving the DG output with a one-sided kernel whose supportis shifted to one side of the origin: for x near the left domain endpoint a, the one-sided SIAC kernel is defined over (x− a) + h

(− (3d+ 1) : 0

)where d is the degree of

the DG output. The Ryan-Shu x-position-dependent one-sided kernel yields optimalL2-convergence, but its point-wise error near a can be larger than that of the DGoutput.

In [SRV11], Ryan et al. improved the one-sided kernel by increasing its monomialreproduction from degree r = 2d to degree r = 4d. This one-sided kernel reduces theboundary error when d = 1 but the kernel support is increased by 2d additional knotintervals and numerical roundoff requires high precision calculations to determine thekernel’s coefficients. ([SRV11] did not draw conclusions for degrees d > 1.)

Ryan-Li-Kirby-Vuik [RLKV15] suggested an alternative position-dependent one-sided kernel that has the same support size as the symmetric kernel and its repro-duction degree is only higher by one. The new idea is that the spline space definingthe kernel is enriched by one B-spline. The new kernel computation is stable up todegree d = 4 in double precision. When d = 1 the RLKV kernel’s point-wise erroron the canonical test problem is as low as that of the symmetric SIAC kernel that isapplied in the interior. However, when d > 1, the RLKV error is higher than that ofthe symmetric kernel.

In [RS03, SRV11, MRK12, RLKV15] convolution with position-dependent one-sided kernels is computed as follows. For each domain position x,

. Calculate kernel coefficients:compute the entries of the position-dependent reproduction matrix M by

Page 8: NON-UNIFORM DISCONTINUOUS GALERKIN FILTERS VIA SHIFT … · Non-uniform Discontinuous Galerkin Filters via Shift and Scale 3 proach with the new symbolic lter derivation and by adding

8 D-M. Nguyen, J. Peters

Gaussian quadrature; solve a corresponding linear system M f = p for thekernel coefficients f to match the monomials to be reproduced that have beencollected in the vector p. As pointed out in [RLKV15], M may be closeto singular (for example, when d ≥ 3 for the SRV kernels) so that highernumerical precision (e.g. quadruple precision) is required to assemble andsolve the linear system.

. Convolve the kernel with the DG output by Gaussian quadrature.

Note that, unlike the (position-independent) classical symmetric SIAC filter, theposition-dependent boundary kernel coefficients have to be determined afresh for eachpoint x.

3. Coefficients of shifted and scaled filters. To calculate filters for DGoutput more efficiently and stably, we formulate Lemma 2.2 in multi-index notation:

tω0:n := tω00 . . . tωnn and |ω| :=

n∑j=0

|ωj |

as follows.

Lemma 3.1 (SIAC reproduction matrix). The matrix Eq. (2.10) has the alter-native form

M := M0,t0:n,J =

[ ∑|ω|=δ

tωj:j+k+1

]δ=0:r, j∈J

.(3.1)

Proof. Applying Steffensen’s formula [dB05, Eq. (27)]1, the divided differences ofmonomials in (2.10) can be rewritten as (3.1).

Denote the reproduction matrix associated with the shifted knot sequence tj:j+k+1

+ ξ, ξ ∈ R as

(3.2) Mξ =[Mξ(δ, j)

]δ=0:r, j∈J :=

[ ∑|ω|=δ

(tj:j+k+1 + ξ)ω]δ=0:r, j∈J

.

Since each entry Mξ(δ, j) is a polynomial of degree δ in ξ, the determinant of Mξ is apolynomial of degree r(r + 1)/2 in ξ. Using for example Cramer’s rule, the entries ofM−1ξ are rational functions in ξ whose numerator and denominator are polynomialsof degree r(r + 1)/2 in ξ. Since the convolution coefficients are the entries of thefirst column of M−1ξ , it is remarkable, that we can show that the coefficients are notrational but polynomial and of degree r rather than r(r + 1)/2 in ξ.

To prove this claim, we employ the following technical result that generalizes abinomial identity to multiple indices.

Lemma 3.2 (A binomial identity). We abbreviate(ba

):=(b0a0

). . .(bk+1

ak+1

)and write

a ≤ b to indicate that, for each kth component, ak ≤ bk. Then for δ > |a|,

(3.3)∑

α≥a, |α|=δ

a

)=

(δ + k + 1

|a|+ k + 1

)=

(δ + k + 1

δ − |a|

).

1The index α in [dB05, Eq. (27)] is misprinted. It should be: |α| = n− k + 1.

Page 9: NON-UNIFORM DISCONTINUOUS GALERKIN FILTERS VIA SHIFT … · Non-uniform Discontinuous Galerkin Filters via Shift and Scale 3 proach with the new symbolic lter derivation and by adding

Non-uniform Discontinuous Galerkin Filters via Shift and Scale 9

Proof. By the Maclaurin expansion: 1(1−x)k+1 =

∑∞`=0

(k+`k

)x`, |x| < 1, we see

that

(3.4)xk

(1− x)k+1=∑`≥k

(`

k

)x`, |x| < 1.

Applying Eq. (3.4) to both sides of the following identity

(3.5) xk+1 xa0

(1− x)a0+1· · · xak+1

(1− x)ak+1+1=

x|a|+k+1

(1− x)|a|+k+2,

and dividing both sides by xk+1, we see that

(3.6)∑α≥a

a

)x|α| =

∑`≥|a|+k+1

(`

|a|+ k + 1

)x`−k−1.

That is, multiplying both sides of Eq. (3.6) by xk+1 yields Eq. (3.5). Selecting thecoefficients of xδ from both sides of Eq. (3.6) yields Eq. (3.3).

Lemma 3.3 (Reproduction matrix for shifted knots). The matrices Mξ andM := M0,t0:n,J are related by

(3.7) Mξ = Pk,r(ξ)M :=

1 0 · · · 0(

1+k+11

)ξ 1 · · · 0

......

. . ....(

r+k+1r

)ξr · · ·

(r+k+1

1

)ξ 1

M.

Note that Pk,r(1) is the result of deleting the first k + 1 rows and k + 1 columns ofthe lower triangular Pascal matrix of order r+ k+ 1, a fact that will help in derivinga symbolic inverse of Pk,r(ξ).

Proof. Abbreviating tj := tj:j+k+1, the entry (δ, j) of Mξ defined by Eq. (3.2) is

Mξ(δ, j) =∑|ω|=δ

∑0≤`≤ω

`

)ξ|`| tω−`j

(3.8)

=∑|ω|=δ

δ∑β=0

ξβ∑

|`|=β, 0≤`≤ω

`

)tω−`j =

δ∑β=0

ξβ∑|a|=δ−β

taj∑

|ω|=δ,ω≥a

a

).

The last equality of Eq. (3.8) follows by substituting a = ω− `. Applying Lemma 3.2to Eq. (3.8) and noting that |a| = δ − β, we see that

(3.9) Mξ(δ, j) =

δ∑β=0

(δ + k + 1

β

)ξβM(δ − β, j).

Eq. (3.9) is the expanded form of Eq. (3.7).Next we consider the effect of scaling knots, as might be done to refine a DG

computation.Lemma 3.4 (Reproduction matrix for scaled knots). Let diag(v) denote the

square matrix with diagonal v and zero otherwise. Then for t := t0:n

M−10,ht,J = M−10,t,J diag(h−(0:r)), where h−(0:r) := [1, h−1, . . . , h−r].(3.10)

Page 10: NON-UNIFORM DISCONTINUOUS GALERKIN FILTERS VIA SHIFT … · Non-uniform Discontinuous Galerkin Filters via Shift and Scale 3 proach with the new symbolic lter derivation and by adding

10 D-M. Nguyen, J. Peters

Proof. By Lemma 3.1, multiplying the (δ + 1)-th row of M0,t,J by hδ yieldsM0,ht,J , δ = 0, . . . , r and hence

M0,ht,J = diag([1, h, . . . , hr])M0,t,J

which is equivalent to (3.10).Together, we obtain the following semi-explicit formula for the filter coefficients.Theorem 3.5 (Scaled and shifted SIAC coefficients). The SIAC filter coefficients

fξ;` associated with the knot sequence ht + ξ are polynomials of degree r in ξ:

(3.11) fξ := [fξ,`]`=0:r = M−10,t,J diag( [

(−1)`(`+k+1`

)]`=0:r

)[( ξh

)0:r]t.

Proof. By Lemma 3.3 and Lemma 3.4, the matrix Mξ corresponding to the scaledand shifted knot sequence ht + ξ has the inverse

(3.12) M−1ξ = M−10,t,J diag(h−(0:r))(Pk,r(ξ))−1.

According to [ES04], Pk,r(ξ) = (Pk,r(1))ξ and hence (Pk,r(ξ))−1 = P−ξk,r (1) = Pk,r(−ξ).

Since Theorem 2.2 requires only the first column of M−1ξ , we replace, in (3.12),Pk,r(−ξ) by its first column and obtain

(3.13) fξ = M−10,t,J diag(h−(0:r)) diag([(−1)`

(`+k+1`

)]`=0:r

)(ξ0:r)t.

Since the diagonal matrices in Eq. (3.13) commute, we have proven Eq. (3.11).Compared to (3.13), formula (3.11) is advantageous in that two matrices are

grouped together that can be pre-computed independent of h and ξ.The following corollary implies that the kernel coefficients fξ,`, can be computed

stably, as scaled integers.Corollary 3.6 (Rational SIAC filter coefficients fξ,`). If the knots t0:n are ra-

tional, then the filter coefficients fξ,` are polynomials in ξ/h with rational coefficients.

Proof. Lemma 3.1 implies that the entries of M are rational if the knots arerational. Since the determinant of a matrix with rational entries is rational, forexample Cramer’s rule implies that the convolution coefficients are rational.

4. Position-dependent (PSIAC) filtering. In this section, we first derive ageneral factored expression for the convolution of PSIAC filters with DG data. Thenwe specialize the setup to one-sided PSIAC filters when the DG breakpoint sequenceis uniform.

4.1. PSIAC filters. When symmetric SIAC filtering increases the smoothnessof the DG output, the result is in general a piecemeal function. One may expectthe same of any one-sided kernel. However, this section proves that convolution withPSIAC filters yields a single polynomial piece over their interval of application. Westart by defining position-dependent kernels.

Definition 4.1 (PSIAC kernel). A PSIAC kernel at position x has the form

(4.1) fx(s) :=∑j∈J

fx;jB(s |htj:j+k+1 + x), s ∈ h[t0..tn] + x.

Page 11: NON-UNIFORM DISCONTINUOUS GALERKIN FILTERS VIA SHIFT … · Non-uniform Discontinuous Galerkin Filters via Shift and Scale 3 proach with the new symbolic lter derivation and by adding

Non-uniform Discontinuous Galerkin Filters via Shift and Scale 11

s-4 -3 -2 -1 0 1 2

PSIA

Cke

rnel

f x(s

)

-1

0

1

2

3

4

s-4 -3 -2 -1 0 1 2

PSIA

Cke

rnel

f x(s

)

-1

0

1

2

3

4

s-4 -3 -2 -1 0 1 2

PSIA

Cke

rnel

f x(s

)

-1

0

1

2

3

4

Fig. 3. Position-dependent filtering at three locations x (marked as a diamond) near the leftendpoint a (red diamond) of the discontinuous DG output. Note the small gaps between the segments.(Top) The resulting convolved values are marked by a star. (Bottom) The rightmost knot of thekernel is at location x− a.

Fig. 3 illustrates position-dependent filtering when d = k = 1. Here we introducedthe scaling h in anticipation of using a prototype knot sequence, typically a subsetof integers, to create one filter whose shifts and scaled versions can be efficientlycomputed as explained in the previous section. That is, the DG output will beconvolved with a PSIAC kernel fx−hλ(s) of reproduction degree r, associated with anindex sequence J and defined over the scaled and shifted knot sequence ht0:n+x−hλwhere the constant hλ adjusts to the left or right boundary. Substituting x− hλ forx in Eq. (4.1), changing variable from s to x− s and recalling that n = jr + k+ 1, weobtain an alternative spline representation of fx−hλ(s) with x-dependent coefficientsfjr−j := fx−hλ;jr−j over the shifted and reversed knot sequence h(λ− tn:0):

(4.2) fx−hλ(s) =∑j∈J

fjr−j B(x− s |hλ− htn−j:jr−j), s ∈ h[t0..tn] + x− hλ.

Now consider the DG output u(s, τ) with break point sequence s0:m as in Eq. (2.4).Convolving u(s, τ) with fx−hλ(s) yields, after a change of variable t := x − s, thefiltered DG output(

u∗fx−hλ)(x)(4.3)

=∑j∈J

fjr−j

∫ htn+x−hλ

ht0+x−hλu(x− s, τ)B(x− s |hλ− htn−j:jr−j) ds

=∑

i∈I, j∈Jui(τ) fjr−j

∫ hλ−ht0

hλ−htnφi(t ; hs0:m)B(t |hλ− htn−j:jr−j) dt.

We note in the last expression that the integral no longer depends on x. Now thecoefficient fjr−j := fx−hλ;jr−j depends on x: by Theorem 3.5 fjr−j is a polynomial

Page 12: NON-UNIFORM DISCONTINUOUS GALERKIN FILTERS VIA SHIFT … · Non-uniform Discontinuous Galerkin Filters via Shift and Scale 3 proach with the new symbolic lter derivation and by adding

12 D-M. Nguyen, J. Peters

in x. This yields the following factored representation of the convolution.Theorem 4.2 (Efficient PSIAC filtering of DG output). Let fx(s) be a PSIAC

kernel of reproduction degree r with index sequence J = 0 : jr and knot sequenceht0:n + x − hλ. Let u(x, τ) :=

∑mi=0 ui(τ)φi(x ; hs0:m), x ∈ [a..b] and τ ≥ 0, be the

DG output. Let I be the set of indices of basis functions φi(. ; hs0:m) with supportoverlapping h[λ− tn..λ− t0]. Then the filtered DG approximation is a polynomial inx of degree r:(

u ∗ fx)(x) = uI Qλ

[(xh− λ)0:r]t

.(4.4)

uI := [ui(τ)]i∈I ,

Qλ := Gλ AM−10,t,J diag(

[(−1)`

(`+k+1`

)]`=0:r

),

Gλ :=

[∫ λ−t0

λ−tnφi(s ; s0:m)B(s |λ− tn−j:jr−j) ds

]i∈I, j∈J

,(4.5)

where A is the reversal matrix (1 on the anti-diagonal and zero else).Proof. Let fr:0 := fx−hλ;r:0 be the position-dependent coefficients of the parametrized

kernel fx−hλ arranged in reverse order. We rewrite Eq. (4.3) as(u∗fx−hλ

)(x) = uI Ghλ fr:0,(4.6)

Ghλ :=

[∫ h(λ−t0)

h(λ−tn)φi(t ; hs0:m)B(t |hλ− htn−j:jr−j) dt

]i∈I, j∈J

.

It follows from Eq. (2.3) that

B(hs |hλ− htn−j:jr−j) =1

hB(s |λ− tn−j:jr−j).

Then the change of variable s := t/h yields

Ghλ(i, j) =

∫ λ−t0

λ−tnφi(hs ; hsi:i+d+1)B(hs |hλ− htn−j:jr−j)hds = Gλ(i, j).

By Theorem 3.5

fr:0 = Af0:r = AM−10,t0:n,J diag( [

(−1)`(`+k+1`

)]`=0:r

) ((xh− λ

)0:r)t.(4.7)

Substituting Eq. (4.7) into Eq. (4.6) yields Eq. (4.4).The factored representation implies that instead of recomputing the filter coeffi-

cients afresh for each point x of the convolved output as in the established numericalapproach, we simply compute the coefficients corresponding to one prototype knotsequence t, scale by h as needed and at runtime pre-multiply with the data andpost-multiply with the vector of shifted monomials as stated in Eq. (4.4).

Increased multiplicity of an inner knot of the symmetric, position-independentSIAC kernel reduces its smoothness, and this, in turn, reduces the smoothness ofthe filtered output. By contrast, Theorem 4.2 shows that when the PSIAC knotsare shifted along evaluation points x then PSIAC convolution yields a polynomial,i.e. infinite smoothness regardless of the knot multiplicity. That is, we may viewposition-dependent filtering as a form of polynomial approximation.

Page 13: NON-UNIFORM DISCONTINUOUS GALERKIN FILTERS VIA SHIFT … · Non-uniform Discontinuous Galerkin Filters via Shift and Scale 3 proach with the new symbolic lter derivation and by adding

Non-uniform Discontinuous Galerkin Filters via Shift and Scale 13

The polynomial characterization directly provides a symbolic expression for thederivatives of the convolved DG output. By differentiating ` times both sides of Eq.(4.4), we arrive at the following result.

Corollary 4.3 (Derivatives of PSIAC-filtered DG output).

(4.8)d`

dx`(u ∗ fx

)(x) = uI Qλ diag(h−(0:r))

( d`

dx`(x− hλ)0:r

)t.

The following Corollary shows that for rational DG break points and rational kernelknots, we can pre-compute and store the prototype matrix Qλ stably in terms ofinteger fractions.

Corollary 4.4 (Rational PSIAC convolution coefficients). With the assump-tions and notation of Theorem 4.2, if the basis functions φi(. ; s0:m) are piecewisepolynomials with rational coefficients, the shift λ is rational and the sequences t0:nand s0:m are rational then the matrix Qλ has rational entries.

Proof. By Lemma 3.1, the reproduction matrix M−10,t,J has rational entries. Sincethe integral of a polynomial with rational coefficients over an interval with rationalend points is rational, Eq. (4.5) implies that Gλ also has rational entries. This impliesthat the entries of Qλ are rational.

4.2. Application to filtering at boundaries. We now derive explicit formsof the matrix Gλ of Theorem 4.2 when the DG break points s0:m are uniform andthe PSIAC filters are one-sided. For one-sided filters, λ is replaced by λL and λR forthe left-sided and right-sided kernels respectively. Recalling that convolution reversesthe direction of the filter kernel (cf. Fig. 3), it is natural to assume that, for the leftboundary kernel, the right-most knot is zero when evaluating at the left endpointx = a, i.e. (htn + x − hλL)|x=a = 0. An analogous assumption applies at the rightboundary. This yields

(4.9) λL = tn +a

h, λR = t0 +

b

h.

Corollary 4.5 (Gλ matrices for uniform DG spacing). Assume that the DGbreak point sequence s0:m is uniform, hence after scaling consists of consecutive inte-gers. Without loss of generality, the DG output on each interval [si..si+1] is defined interms of Bernstein-Bezier polynomials Bi` of degree d, where the superscript i indicatesthe interval and ` = 0..d, i.e.

Bi`(x) :=

{(d`

)(x− si)`(si+1 − x)d−` if x ∈ [si..si+1]

0 otherwise.

Let n0 be the smallest integer greater than or equal to tn − t0. Then, for i =0..(n0 − 1), ` = 0..d, and j ∈ J

GλL((d+ 1)i+ `, j

)=

∫ i+1

i

Bi`(t)B(t | tn − tn−j:jr−j)) dt,(4.10)

GλR((d+ 1)i+ `, j

)=

∫ n0−i+1

n0−iBn0−id−` (t)B(t | tj:j+k+1 − t0) dt.

Proof. First we consider GλL . In Eq. (4.5), we change to the variable t = s −λL + tn. Abbreviating tj := tn − tn−j , since the B-splines are translation invariant,

Page 14: NON-UNIFORM DISCONTINUOUS GALERKIN FILTERS VIA SHIFT … · Non-uniform Discontinuous Galerkin Filters via Shift and Scale 3 proach with the new symbolic lter derivation and by adding

14 D-M. Nguyen, J. Peters

for 0 ≤ tj = tn − tn−j ≤ tn − t0 ≤ n0,

(4.11) GλL(i, j) =

∫ tn−t0

0

φi(t ; s0:m − λL + tn)B(t | tj:j+k+1) dt.

Since s0 = ah , Eq. (4.9) implies that the first point of the sequence of translated DG

break points s0:m−λL + tn equals 0, i.e., s0−λL + tn = 0. Since the break points areconsecutive integers starting from 0 and 0 ≤ tj ≤ n0 the relevant DG break pointsare 0 : n0. We re-index the basis functions φi(s ; s0:m − λL + tn) in terms of theBernstein-Bezier basis functions Bi`. Since Bi` are non-zero on any interval [i..i + 1],Eq. (4.10) for GλL follows from Eq. (4.11).

Now consider GλR . The change of variable t := −(s− λR + t0) together with thetranslation invariance of B-splines imply that

GλR(i, j) =

∫ tn−t0

0

φi(−t ; s0:m − λR + t0)B(−t | t0 − tn−j:jr−j) dt.

=

∫ tn−t0

0

φm−i(t ; λR − t0 − sm:0)B(t | tj:j+k+1 − t0) dt.(4.12)

Because of Eq. (4.9) and sm = bh , λR−t0−sm = 0. Eq. (4.10) is derived by re-indexing

the basis functions φm−i as for the left boundary except that we have to count thefunctions Bi` backward from the last interval [tn0−1..tn0

] to the first one [t0..t1] wheni and j increase.

The explicit form of Gλ in Corollary 4.5 affords stable pre-computation of theentries of Qλ. Representing the DG output in Bernstein-Bezier form is for convenienceonly: the DG output can be represented in any piecewise polynomial form to arriveat similar formulas.

According to Theorem 4.2, the superposition of h-scaled columns of Qλ multi-plying the input data yields the filtered output. For each column of Qλ, we can ploteach entry as ordinate using its row index as abscissa. Linearly connecting consecutivepoints yields a piecewise linear function (see e.g. Fig. 4b) that we call ‘mode function’.Fig. 4 illustrates for [SRV11] the difference in magnitude between the kernel and themode functions: The kernel, shown in Fig. 4a, is six orders of magnitude larger thanthe largest mode function in Fig. 4b. (The remaining seven mode functions come ingroups that are 2 or 4 orders of magnitude smaller.) So, even while the filter coef-ficients are very large and alternating, they can be stably combined in a one-timesymbolic computation to form the entries of the mode matrix Gλ . And since Gλ hassmall entries compared to the kernel coefficients, applying Gλ to the data requires noincreased precision.

5. PSIAC kernels. In this section, we first restate the SRV and the RLKVfilters as PSIAC filters and compare convolution using the numerical approach tousing the symbolic approach. Then, to illustrate the generality of the setup, we definea new multiple-knot linear filter and compare it to the SRV and the RLKV filters.

5.1. An alternative view of the published boundary filters. We now re-cast several published boundary filters as special cases of PSIAC kernels defined overshifted knots in the sense of Theorem 4.2. The published filters considered in thissection all chose d = k, i.e. the filter has the same degree as the DG output.

Page 15: NON-UNIFORM DISCONTINUOUS GALERKIN FILTERS VIA SHIFT … · Non-uniform Discontinuous Galerkin Filters via Shift and Scale 3 proach with the new symbolic lter derivation and by adding

Non-uniform Discontinuous Galerkin Filters via Shift and Scale 15

-0.2 -0.15 -0.1 -0.05 0

#105

-3

-2

-1

0

1

2

3

(a) [SRV11] kernel (scale is 105)

10 20 30 40 50 60

-0.2

-0.1

0

0.1

0.2 Mode 1Mode 2Mode 3Mode 4Mode 5

(b) Leading [SRV11] mode functions

Fig. 4. (a) Left-sided [SRV11] kernel of degree 3 over uniform knots (interval size h = 1/80).The coefficients are of size 105 and their sign alternates. (b) The leading h-independent [SRV11]mode functions defined by the columns of Qλ are six orders of magnitude smaller.

RS and SRV filters. The boundary SIAC filters RS [RS03] and SRV [SRV11] ofreproduction degree r are both defined over the following shifted knots:

µ :=r + d+ 1

2, λL,d := a+ µ, λR,d := b− µ

t∗,d(x) :=(− µ,−µ+ 1, . . . , µ

)+ x− λ∗,d.(5.1)

Here L or R are substituted for ∗, we obtain the left-side and the right-side filtersrespectively. Both types of filter are associated with a consecutive index sequenceJ . However, the two kernels have different reproduction degrees: r(RS) = 2d andr(RV) = 4d. The prototype knot sequences t∗,d(λ∗,d) are chosen symmetrically sup-ported about the origin.

In Proposition 5.1 below we denote as bk the vectors of Bernstein-Bezier coeffi-cients of the d+ 1 polynomial pieces of the uniform B-spline of degree d defined overthe knots 0 : (d+ 1). For example,

d = 1 : [b0 b1] = [ 0 11 0 ]

d = 2 : [b0 b1 b2] =1

2

[0 1 10 2 01 1 0

](5.2)

d = 3 : [b0 b1 b2 b3] =1

6

[0 1 4 10 2 4 00 4 2 01 4 1 0

].

Proposition 5.1. Let bk denote the Bernstein-Bezier coefficients of polynomialpieces of a uniform B-spline of degree d defined over the knots 0 : (d+ 1) and Md the

Page 16: NON-UNIFORM DISCONTINUOUS GALERKIN FILTERS VIA SHIFT … · Non-uniform Discontinuous Galerkin Filters via Shift and Scale 3 proach with the new symbolic lter derivation and by adding

16 D-M. Nguyen, J. Peters

matrix with entries Md(`, j) := 12d+1

(d`

)(dj

)(2d`+j

)−1, `, j = 0..d. Then

GλL := GλL,d =

Mdb0 0 ··· 0Mdb1 Mdb0 ··· 0...

... ···...

Mdbd Mdbd−1 ··· 00 Mdbd ··· 00 0 ··· 0...

... ···...

0 0 ··· 00 0 ··· Mdb0

...... ···

...0 0 ··· Mdbd

(5.3)

and GλR is obtained from GλL by reversing the order of the columns and of the rows.

Proof. Using the notation of Corollary 4.5, n0 = n = r+d, since t0:n = tn−tn:0 =0 : (r + d),

(5.4) GλL((d+ 1)i+ `, j

)=

∫ i+1

i

Bi`(t)B(t | j : j + d+ 1) dt,

When i and ` vary, Eq. (5.4) gives the jth column of GλL . The support of B(t | j :j + d + 1) contains d + 1 intervals [j + ρ..j + ρ + 1], ρ = 0..d. Restricted to theinterval [j + ρ..j + ρ + 1], ` = 0..d, we can write B(· | j : j + d + 1) in terms of theBernstein-Bezier basis functions Bj+ρ`

B(· | j : j + d+ 1)∣∣[j+ρ,j+ρ+1]

=[Bj+ρ0 · · ·Bj+ρd

]bρ.

When [i..i + 1] ≡ [j + ρ..j + ρ + 1], i.e. when i = j + ρ, we can therefore rewriteEq. (5.4) as

[GλL

((d+ 1)i+ `, j

)]`=0:d

=

∫ i+1

i

[Bi`(t)

]`=0:d

[Bij(t)

]tj=0:d

bρ dt,(5.5)

=

[∫ 1

0

B0` (t)B0

j (t) dt

]`=0:d,j=0:d

bρ =:Mdbρ,

where

Md(`, j) =

∫ 1

0

B0` (t)B0

j (t) dt

=

(d

`

)(d

j

)(2d

`+ j

)−1 ∫ 1

0

(2d

`+ j

)x`+j(1− x)2d−`−j dt.(5.6)

Since the integral in Eq. (5.6) is the integral of a Bernstein-Bezier basis functionof degree 2d that equals 1

2d+1 [dB02], we have derived the formula for Md(`, j) inEq. (5.3). The formula for GλL follows, because the entries of the jth column vanishwhen the two intervals [i..i+ 1] and [j + ρ..j + ρ+ 1] do not overlap.

The formula for GλR in Eq. (4.10) is that of GλL except that the B-splines appearin reverse order. Therefore, reversing the column order of GλL and then the row orderof the result yields GλR .

Page 17: NON-UNIFORM DISCONTINUOUS GALERKIN FILTERS VIA SHIFT … · Non-uniform Discontinuous Galerkin Filters via Shift and Scale 3 proach with the new symbolic lter derivation and by adding

Non-uniform Discontinuous Galerkin Filters via Shift and Scale 17

RLKV filter. The index sequence J of the boundary kernel RLKV is non-consecu-tive. The left and right kernels are of degree 2d+ 1 and are defined over the followingshifted knots

tL,d(x) :=(− µ, . . . , µ− 1, µ, . . . , µ︸ ︷︷ ︸

d+ 1 times

)+ x− λL,d,(5.7)

JL := {1 : (2d+ 1), 3d+ 1};

tR,d(x) :=(−µ, . . . ,−µ︸ ︷︷ ︸d+ 1 times

,−µ+ 1, . . . , µ,)

+ x− λR,d,(5.8)

JR := {1, d : (3d+ 1)}.

The prototype knot sequence tL,d(λL,d) is chosen to have symmetric support aboutthe origin.

Proposition 5.2. Let Md be defined as in Proposition 5.1 and let M(1)d denote

its first column. Then

GλL,d =

(d+1)M(1)d Mdb0 0 ··· 0

0 Mdb1 Mdb0 ··· 0...

...... ···

...0 Mdbd Mdbd−1 ··· 00 0 Mdbd ··· 00 0 0 ··· 0...

...... ···

...0 0 0 ··· 00 0 0 ··· Mdb0

......

... ···...

0 0 0 ··· Mdbd

(5.9)

GλR is obtained from GλL by reversing the order of the columns and of the rows.Proof. The proof is the same as that of Proposition 5.1 except that the additional

B-spline of the kernel contributes the first column of (5.9).Another use of the explicit polynomial form of PSIAC coefficients is to determine

the smoothness of the filtered output across the transition between the boundary re-gion, where boundary filters are applied, and the interior region, where the symmetricfilter is applied. The RLKV filter of degree d = 1 consists of the symmetric SIAC fil-ter plus a B-spline whose position-dependent coefficient can be written out explicitly.The Taylor expansion of this coefficient at hλ is

(5.10)15

24(x− hλ)− 10

24(x− hλ)3.

Consequently, the only term that distinguishes the RLKV filter from the symmetricfilter vanishes, to first order, at the point of transition between the symmetric SIACkernel and the RLKV kernel. Since the next term 15

24 6= 0, the kernels join exactly C0.

5.2. A multiple-knot boundary PSIAC kernel. Even though [CLSS03] and[MRK15] discuss varying the number of kernel coefficients r + 1 and the degree k ofsymmetric kernels, ever since their introduction in the seminal paper [RS03] boundarykernels have been given the same degree as the symmetric kernel [RLKV15] – perhapsto guarantee the same smoothness near the boundary as in domain interior. Indeed,the authors of [SRV11] numerically observed and predicted that SRV-filtered DGoutputs would be as smooth as the SRV kernel. Theorem 4.2 implies not only that aPSIAC kernel need not have the same degree as the symmetric kernel, but confirms

Page 18: NON-UNIFORM DISCONTINUOUS GALERKIN FILTERS VIA SHIFT … · Non-uniform Discontinuous Galerkin Filters via Shift and Scale 3 proach with the new symbolic lter derivation and by adding

18 D-M. Nguyen, J. Peters

smoothness of the output. Theorem 4.2 shows that PSIAC kernels may have multipleknots without reducing the infinite smoothness of the filtered DG output.

We define a new multiple-knot left-sided kernel fL and a right-sided kernel fReach of degree k = 1 (hence double-knot filters) respectively over the knot sequences

tL := x− λL +(− µ, . . . , µ− 3, µ− 2, µ− 1, µ− 1, µ, µ

), µ :=

3d+ 1

2,

tR := x− λR +(− µ,−µ,−µ+ 1,−µ+ 1,−µ+ 2,−µ+ 3, . . . , µ

).(5.11)

Since the degree of the kernels is 1, their reproduction degree is 3d + 2 even thoughthey have the same support size as the symmetric SIAC kernel that one might applyin the interior of the DG domain. The two double-knots increase the reproductiondegree but not the support.

x-6 -5 -4 -3 -2 -1 0

-4

-2

0

2

4

6SRV filterRLKV filterdegree-one filter

x-10 -8 -6 -4 -2 0

-10

-5

0

5

10

(a) kernels for d = 1 (b) kernels for d = 2

x-15 -10 -5 0

-150

-100

-50

0

50

100

150

x-3 -2.5 -2 -1.5 -1 -0.5 0

-40

-30

-20

-10

0

10

(c) kernels for d = 3 (c’) right zoom of (c)

Fig. 5. Graphs of the three kernels defined at the left boundary x = a. Note that the degree of[SRV11] and [RLKV15] increases with d while the degree of the multiple-knot kernel stays linear.

5.3. Examples. Fig. 5 graphs instances of the [SRV11], [RLKV15] and of thenew multiple-knot kernel of degree-one. With the help of the following two exampleswe numerically verify the symbolic expression (4.4). We demonstrate improved stabil-ity of the symbolic approach over the numerical approach and we illustrate a possibleuse of a kernel of degree k 6= d (we will choose k = 1 < d) and illustrate a possibleuse of inner knots with higher multiplicity. Both test examples are special cases of

the canonical Eq. (2.2), dudτ + d

dx

(κ(x, τ)u

)= ρ(x, τ) for x ∈ (a..b), τ ∈ (0..τ), with

κ(x, τ) ≡ 1, ρ(x, τ) ≡ 0, 0 ≤ τ ≤ τ .(5.12)

Page 19: NON-UNIFORM DISCONTINUOUS GALERKIN FILTERS VIA SHIFT … · Non-uniform Discontinuous Galerkin Filters via Shift and Scale 3 proach with the new symbolic lter derivation and by adding

Non-uniform Discontinuous Galerkin Filters via Shift and Scale 19

Example 1 Consider Eq. (2.2) with specialization (5.12), aperiodic Dirichlet bound-

ary conditions and τ := 116 . The exact solution is u(x, τ) = 7

10 sin(π√

107 (x− τ)).

Example 2 Consider Eq. (2.2) with specialization (5.12), periodic boundary condi-tions and τ := 1, i.e. after a sequence of time steps. The exact solution is u(x, τ) =sin(2π(x− τ)).

x0 0.7

10-15

10-10

(a) DG output error

x0 0.7

10-15

10-10

(b) [SRV11] numeric

x0 0.7

10-15

10-10

(c) [SRV11] symbolic

x0.59 0.64 0.69

10-16

10-14

10-12

(d) Right zoom of 6(b)

x0.59 0.64 0.69

10-16

10-14

10-12

(e) Right zoom of 6(c)

x0 0.7

10-15

10-10

(f) [RLKV15] symbolic

x0 0.7

10-15

10-10

(g) new multiple-knot filter

Fig. 6. Example 1, d = 2, aperiodic boundary conditions: Point-wise errors (y-axis) ofDG approximations. The three graphs in each subfigure correspond, from top to bottom, (red, blue,green) to m = 20, 40 and 80 DG break points.

We used upwind numerical flux [HW07] and solved the resulting ordinary differen-tial equations with the help of a standard fourth-order four stage explicit Runge-Kuttamethod (ERK) [HW07, Section 3.4] and a time step small enough to attain super-convergence. Figures 6 and 7 show the error of the DG approximations of Example 1and Example 2, respectively, when using different post-filters. Since in the interior

Page 20: NON-UNIFORM DISCONTINUOUS GALERKIN FILTERS VIA SHIFT … · Non-uniform Discontinuous Galerkin Filters via Shift and Scale 3 proach with the new symbolic lter derivation and by adding

20 D-M. Nguyen, J. Peters

x0 1

10-15

10-10

10-5

(a) DG output error

x0 1

10-15

10-10

10-5

(b) [SRV11] numeric

x0 1

10-15

10-10

10-5

(c) [SRV11] symbolic

x0 0.05 0.1 0.15 0.2 0.25

10-15

10-10

10-5

(d) Left zoom of 7(b)

x0 0.05 0.1 0.15 0.2 0.25

10-15

10-10

10-5

(e) Left zoom of 7(c)

x0 1

10-15

10-10

10-5

(f) [RLKV15] symbolic

x0 1

10-15

10-10

10-5

(g) new multiple-knot filter

Fig. 7. Example 2, d = 3, periodic boundary conditions: Point-wise errors (y-axis) of DGapproximations. The three graphs in each subfigure correspond, from top to bottom, (red, blue,green) to m = 20, 40 and 80 DG break points.

the same symmetric SIAC filter is applied, we focus on the error near the endpoints.

For [SRV11], the numerical approach introduces high oscillations in the point-wiseerrors near the boundaries for both example problems. The increase of the oscillationswith decreasing mesh size is the result of near-singular matrices: when m = 80 andd = 3, the matricesM have condition numbers near the limit where MATLAB declaresthem singular. While the numerically computed filter wildly oscillates when m = 80(see the bottom-most graph of Fig. 7d), the symbolic inversion yields stable resultsregardless of mesh size, see Fig. 7e.

For the RLKV kernels we only show the result of the symbolic approach. Thedifference between the numerical approach and the symbolic approach is less than10−13 confirming on one hand the stability of the RLKV filter and on the other

Page 21: NON-UNIFORM DISCONTINUOUS GALERKIN FILTERS VIA SHIFT … · Non-uniform Discontinuous Galerkin Filters via Shift and Scale 3 proach with the new symbolic lter derivation and by adding

Non-uniform Discontinuous Galerkin Filters via Shift and Scale 21

hand the correctness of reformulation according to Theorem 4.2. The RLKV filter isjuxtaposed with our degree-one multiple-knot kernel. There is no indication that itsmultiple interior knot prevents superconvergence. For Example 1, displayed in Fig. 6,the multiple-knot filter shows errors on par with RLKV (a slightly higher right-sidederror and a smaller left-sided one). In Example 2, Fig. 7, the multiple-knot kernel hasa clearly lower error near the endpoints than both the RLKV filter and the symmetricSIAC filter.

6. Conclusion. The state-of-the-art approach for computing a filtered DG out-put [RS03, SRV11, MRK12, RLKV15] consists of, at each evaluation point x ∈ [a..b],(i) assembling followed by inverting the reproduction matrix to obtain the coefficientsof the position-dependent boundary kernel and then (ii) calculating the convolutionintegral by Gauss-Legendre quadrature to obtain the filtered DG output. Comparedto that numerical approach, the PSIAC filters presented in this paper provide a morestable, flexible, versatile and efficient approach:

. Stability: The knots t0:n can be chosen freely, e.g. so that the reproductionmatrix M is sufficiently regular. When the filter knots are rational, the entriesof the inverse of M can be pre-computed exactly as fractions of integers. Thisavoids the need for repeatedly inverting near-singular constraint matrices atrun-time.

. Flexibility: The PSIAC-filtered DG output is a single polynomial piece forthe length of application of the PSIAC filter. The PSIAC kernel can be ofany degree and it can be defined over a sequence of knots of any multiplicity.

. Versatility: The polynomial characterization of the PSIAC-filtered DG outputdirectly yields, for example, an explicit expression of the derivatives of thefiltered DG output.

. Efficiency: Given the prototype knot sequence and subset of B-splines onthat knot sequence chosen to define a filter, the convolution matrix Qλ canbe pre-computed once and stored. Scaling columns by powers of h yields thematrix for a filter of the h-scaled knot sequence.Given the vector uI of coefficients of the DG output, the vector of polynomialcoefficients uI Qλ of the filtered output (a vector of size r+1) can be computedper data set, for all convolution points. The convolution for a point x nearthe boundary then simplifies to a dot product of two vectors of size r + 1.

Acknowledgement. We thank Xiaozhou Li for pointing out the motivations fordevising the RLKV boundary filter.

REFERENCES

[BS77] J.H. Bramble and A.H. Schatz. Higher order local accuracy by averaging in the finiteelement method. Math Comput, 31(137):94–111, January 1977.

[CLSS03] B. Cockburn, M. l. Luskin, C.-W. Shu, and E. Suli. Enhanced accuracy by post-processing for finite element methods for hyperbolic equations. Math Comput,72(242):577–606, 2003.

[CS66] H. B. Curry and I. J. Schoenberg. On Polya frequency functions iv: the fundamentalspline functions and their limits. J Anal Math, 17:71107, 1966.

[dB02] C.W. de Boor. B-spline Basics. In M. Kim G. Farin, J. Hoschek, editor, Handbook ofComputer Aided Geometric Design. Elsevier, 2002.

[dB05] C. W. de Boor. Divided differences. Surveys in Approximation Theory, 1:46–69, 2005.[ES04] A. Edelman and G. Strang. Pascal matrices. Am Math Mon, 111:189–197, 2004.[HW07] J.S. Hesthaven and T. Warburton. Nodal Discontinuous Galerkin methods: algorithms,

analysis, and applications. Springer Science & Business Media, 2007.

Page 22: NON-UNIFORM DISCONTINUOUS GALERKIN FILTERS VIA SHIFT … · Non-uniform Discontinuous Galerkin Filters via Shift and Scale 3 proach with the new symbolic lter derivation and by adding

22 D-M. Nguyen, J. Peters

[LRKV16] X. Li, J.K. Ryan, R.M. Kirby, and C. Vuik. Smoothness-increasing accuracy-conserving(SIAC) filters for derivative approximations of Discontinuous Galerkin (DG) solu-tions over nonuniform meshes and near boundaries. J Comput Appl Math, 294:275– 296, 2016.

[ML78] M.S. Mock and P.D. Lax. The computation of discontinuous solutions of linear hyper-bolic equations. Commun Pur Appl Math, 31(4):423–430, 1978.

[MRK12] H. Mirzaee, J.K. Ryan, and R. M. Kirby. Efficient implementation of smoothness-increasing accuracy-conserving (SIAC) filters for Discontinuous Galerkin solutions.SIAM J Sci Comput, 52(1):85–112, 2012.

[MRK15] M. Mirzargar, J.K. Ryan, and R.M. Kirby. Smoothness-increasing accuracy-conserving(SIAC) filtering and quasi-interpolation: A unified view. SIAM J Sci Comput,pages 1–25, 2015.

[Pet15] J. Peters. General spline filters for Discontinuous Galerkin solutions. Comp Math Appl,70(5):1046 – 1050, 2015.

[RC09] J.K. Ryan and B. Cockburn. Local derivative post-processing for the DiscontinuousGalerkin method. J Comput Phys, 228(23):8642 – 8664, 2009.

[RLKV15] J.K. Ryan, X. Li, R.M. Kirby, and K. Vuik. One-sided position-dependent smoothness-increasing accuracy-conserving (SIAC) filtering over uniform and non-uniformmeshes. SIAM J Sci Comput, 64(3):773–817, 2015.

[RS03] J.K. Ryan and C.-W. Shu. On a one-sided post-processing technique for the Discon-tinuous Galerkin methods. Methods and Applications of Analysis, 10(2):295–308,2003.

[RSA05] J.K. Ryan, C.-W. Shu, and H. Atkins. Extension of a post processing technique forthe Discontinuous Galerkin method for hyperbolic equations with application toan aeroacoustic problem. SIAM J Sci Comput, 26(3):821–843, 2005.

[SRV11] P.v. Slingerland, J.K. Ryan, and C. Vuik. Position-dependent smoothness-increasingaccuracy-conserving (SIAC) filtering for improving Discontinuous Galerkin solu-tions. SIAM J Sci Comput, 33(2):802–825, 2011.

[Tho77] V. Thomee. High order local approximations to derivatives in the finite element method.Math Comput, 31(139):652–660, 1977.