JOURNAL OF COMPUTATIONAL PHYSICS ARTICLE NO.
138, 16–56 (1997)
CP975814
A Fast Adaptive Wavelet Collocation Algorithm for Multidimensional PDEs Oleg V. Vasilyev1 and Samuel Paolucci2 Department of Aerospace and Mechanical Engineering, University of Notre Dame, Notre Dame, Indiana 46556 E-mail:
[email protected] Received March 29, 1996; revised July 10, 1997
A fast multilevel wavelet collocation method for the solution of partial differential equations in multiple dimensions is developed. The computational cost of the algorithm is independent of the dimensionality of the problem and is O(N ), where N is the total number of collocation points. The method can handle general boundary conditions. The multilevel structure of the algorithm provides a simple way to adapt computational refinements to local demands of the solution. High resolution computations are performed only in regions where singularities or sharp transitions occur. Numerical results demonstrate the ability of the method to resolve localized structures such as shocks, which change their location and steepness in space and time. The present results indicate that the method has clear advantages in comparison with well established numerical algorithms. Q 1997 Academic Press Key Words: fast; wavelet; collocation; partial differential equations; adaptive; multilevel; numerical method.
1. INTRODUCTION
A multilevel wavelet collocation method for the solution of partial differential equations in one spatial dimension has been developed recently by Vasilyev et al. [1]. The method utilizes the classical idea of collocation with the wavelet approximation, which results in a differential-algebraic system of equations, where the algebraic part arises from boundary conditions. Liandrat and Tchiamichian [2], Maday et al. [3], Maday and Ravel [4], Bacry et al. [5], and Bertoluzza et al. [6] have shown that 1 2
Presently at Center for Turbulence Research, Stanford University, Stanford, CA 94305. Corresponding author. 16
0021-9991/97 $25.00 Copyright 1997 by Academic Press All rights of reproduction in any form reserved.
FAST ADAPTIVE WAVELET COLLOCATION
17
the multiresolution structure of wavelet bases is a simple and effective framework for spatially adaptive algorithms. In their Galerkin algorithms, they retain wavelets whose coefficients are larger than a given threshold. In order to be able to track singularities they also retain wavelets that are adjacent to such regions. This adaptive procedure, based on the analysis of wavelet coefficients, allows them to follow the local structures of the solution. In wavelet Galerkin algorithms nonlinearities can be handled using either the connection coefficients introduced by Beylkin [7] (see also [5]) or quadrature formulae [4]. The first approach is computationally expensive, due to summations over multiple indices [8]. In the second approach the accuracy might be lost due to approximate calculations of the scalar products [9]. In contrast, the treatment of nonlinear terms in the multilevel wavelet collocation method is a straightforward task due to the collocation nature of the algorithm [1]. Most of the wavelet algorithms for solving partial differential equations can handle periodic boundary conditions easily (see [2, 3, 5, 6]). The effective treatment of general boundary conditions is still an open question even though different possibilities of dealing with this problem have been studied. One approach is to use wavelets specified on an interval as suggested by Meyer [10] and Andesson et al. [11]. These wavelets are constructed satisfying certain boundary conditions. The disadvantages of this approach are inconvenience of implementation and wavelet dependence on boundary conditions. A more satisfactory approach for problems with Dirichlet boundary conditions is to use the tau method [4]. This approach may lead to some ambiguities associated with the introduction of extra equations to treat boundary conditions, which in turn makes the system of equations overdetermined. A dynamically adaptive multilevel wavelet collocation method for the solution of partial differential equations in one spatial dimension has been developed recently by Vasilyev and Paolucci [12] (hereafter referred as VP). The method extends the collocation method developed in [1] and incorporates the dynamically adaptive multilevel algorithm suggested by Liandrat and Tchamitchian [2]. The multilevel structure of the algorithm presented by VP provides a simple way to adapt computational refinements to local demands of the solution. High resolution computations are performed only in regions where sharp transitions occur. The method handles general boundary conditions. The algorithm is applied to the set of one-dimensional problems. The numerical results indicate that the method of VP is very accurate and efficient. Despite the relative success of the adaptive multilevel wavelet collocation algorithm proposed by VP, the computational cost of calculating spatial derivatives is O(N 2), where N is the total number of collocation points. This is mostly due to the fact that the method utilizes matrix derivative operators. A different approach is to project the space of functional values onto the space of wavelet coefficients, and then to project it back to the space of functional derivatives. This procedure can be very costly, unless there exists a fast projection algorithm. In the present paper we present such an algorithm which requires only O(N ) operations. Furthermore, the computational cost remains of order O(N ) regardless of the dimensionality of the problem. The main objective of the present work is to extend the dynamically adaptive
18
VASILYEV AND PAOLUCCI
collocation method of VP to multiple dimensions and to make it more computationally efficient by using the fast wavelet collocation transform. The rest of the paper is organized as follows. In Section 2 we present the fast wavelet collocation transform in the context of wavelet interpolation. Its implementation in a dynamically adaptive method for solving partial differential equations is described in Section 3. Finally, in Section 4, the method is applied to the solution of one- and two-dimensional test problems. 2. FAST WAVELET COLLOCATION TRANSFORM
2.1. One-Dimensional Case Let us consider a function u(x) defined on a closed interval V ; [X1 , X2]. If we take c kj (x) 5 a j21/2c((x 2 b kj )/aj), where c(x ) is a wavelet, and aj and b kj are defined as aj 5 22ja0, b kj 5
X 2 X1 X1 1 X2 1 aj b0k, a0 5 22L 2 , L [ Z, 2 b0
(1)
then it can be shown [1] that there exist b0 , L, N1 , N2 such that u(x ) can be approximated as u J(x ) 5
O O c c (x ), J
j k
j k
(2)
j50 k[Z j
where hZ j : 22L1j21 2 N1, ..., 2L1j21 1 N2j and N1 , N2 are the number of external wavelets on each side of the domain V. Note that levels j 5 0 and J correspond respectively to the coarsest and finest scales present in the approximation, and the largest scale present in approximation is determined by L. For clarity of discussion, all wavelets whose centers are located within the domain will be called internal wavelets; the other wavelets will be called external wavelets. In addition we will call wavelets corresponding to the same j as wavelets at the j level of resolution. For notational convenience we use the superscript to denote the level of resolution and the subscript to denote the location in physical space (with the exception of aj). We follow [1] in defining a set of collocation points hx ij : i [ Z jj in such a way that for any j (0 , j , J 2 1) the following relation between the collocation points at different levels of resolution is satisfied. hx ij j , hx ij11j.
(3)
This relation between collocation points of different levels enables us to have the same values of the function at different levels of resolution at the same collocation points: u j(x ij ) 5 ul(x kl ) if x ij 5 x kl ; 0 , j, l , J.
(4)
Since every wavelet is characterized by its location b kj , then for internal wavelets
FAST ADAPTIVE WAVELET COLLOCATION
19
FIG. 1. Locations of collocation points and wavelets near X1 for N1 5 2.
these locations seem to be the most natural choice for collocation points, provided that wavelets are symmetric and nonzero at b kj . Nonsymmetric wavelets can also be utilized, but in this case the choice for collocation points is not clear. Collocation points for external wavelets are located as described in [1]. Briefly, at any level of resolution j, the collocation points corresponding to the external wavelets are located in the intervals [X1, X1 1 b0aj] and [X2 2 b0aj, X2] and are taken to correspond to the collocation points of possible internal wavelets of smaller scales. The placement strategy is illustrated in Fig. 1 with two external wavelets (N1 5 2). We enumerate the collocation points in such a way that for any j (0 # j # J ) and hi, kj [ Z j, x ij , x kj if and only if i , k. Subsequently, it is easy to show that x 2j 2L1j212N1 5 X1; x 2j L1j211N2 5 X2.
(5)
The absolute value of the wavelet coefficient c kj appearing in the approximation (2) depends upon the local regularity of u(x ) in the neighborhood of location b kj . It was shown by VP that the approximation (2) can be rewritten as a sum of two terms composed respectively of wavelets whose amplitudes are above and below a threshold «, u J(x ) 5 u J$(x) 1 u J, (x ),
(6)
where u J$ (x) 5
O O J
j50
c kj c kj (x), u J, (x) 5 j
k[Z uc jku$a1/2 j «
O O J
j50
c kj c kj (x).
(7)
j
k[Z uc jku,a1/2 j «
It was proved by VP that a good approximation is retained even when wavelets whose coefficients are below a certain threshold are omitted and only those wavelets are kept whose coefficients are above the threshold. Due to the collocation nature of the algorithm, we are interested in the Ly norm of the error and since the magnitude of wavelet c kj (x) is of the order aj21/2, we only retain wavelets whose amplitudes satisfy the criteria uc kj u $ aj21/2 «.
(8)
20
VASILYEV AND PAOLUCCI
FIG. 2. (a) Function u(x) and (b) regular grid (« 5 0), (c) irregular grid (« 5 5 3 1023, La 5 0, Ma 5 0), (d) irregular grid (« 5 5 3 1023, La 5 1, Ma 5 1) of wavelet collocation points used in approximating the function.
Following VP we omit collocation points associated with wavelets whose amplitude is below the given threshold. We call the grid of collocation points an irregular grid G$ if at least one collocation point at any level of resolution is omitted. Otherwise we call it a regular grid G. Typical examples of regular and irregular grids of wavelet collocation points are presented respectively in Figs. 2(b) and 2(c). Note that the irregular grid becomes a regular one by setting the threshold parameter « to zero. If we look closely at Fig. 2(c) we see that relation (3) between collocation points at different levels is violated. Let us define two subsets of integers Z $j , Z j and Z J , Z J such that x ij [ G$ if and only if i [ Z $j and x Ji [