A Fast Cauchy-Riemann Solver - American Mathematical Society

0 downloads 0 Views 4MB Size Report
results that the present solver is second-order accurate, even for solutions which do not have the formally required .... the corners of an elementary mesh cell of area hk/4 (see Figure 1). No averaging ...... für das Differenzverfahren zur Lösung ...
MATHEMATICS OF COMPUTATION, VOLUME 33, NUMBER 146 APRIL 1979, PAGES 585-635

A Fast Cauchy-Riemann Solver By Michael Ghil* and Ramesh Balgovind** Abstract.

We present

a solution

of the inhomogeneous

speed and storage requirements crete approximation numerical

results indicate

accurate

The algorithm

Error estimates

solutions

of the problem

that second-order

accuracy

obtains

Different

modifications

of boundary

algorithm

form in

for the dis-

are established;

even for solutions

combinations

of the solution

discrete

is comparable

smooth

smoothness.

and suitable

for a second-order

equations.

with fast Poisson solvers.

of sufficiently

do not have the required are considered

algorithm

Cauchy-Riemann

which

conditions

are described

and

implemented.

1. Introduction.

Inhomogeneous Cauchy-Riemann equations appear naturally in

many fluid-dynamical problems, as the divergence and the vorticity equations of a

two-dimensional steady flow field (u, v) = (t/(x, y), u(x, y)).

The velocity components

u, v axe usually called in this context primitive variables, in contradistinction to the

derived variables \¡i, f in the stream function-vorticity formulation of the flow equations (e.g., Roache [28]).

In the latter formulation, the stream function \p satisfies a

Poisson equation; and computations with this formulation have greatly benefited from the rapid development of fast direct methods for the solution of Poisson's equation, or Poisson solvers (Buneman [4], Buzbee, Golub and Nielson [5], Dorr [9], Fischer,

Golub,Hald,Leivaand Widlund[12], Golub [18], Hockney[21], [22], Widlund[32]). Working in the primitive variables, however, permits the treatment of more general flows. Indeed, either nondivergence or irrotationality

of the flow are required in

order to introduce a stream function \p or a velocity potential 0, and obtain a Poisson

equation for them. There are many situations of practical interest in which neither of these assumptions holds. Furthermore, the formulation of boundary conditions is often easier in terms of the primitive variables, by using physical considerations which arise naturally from the problem. On the other hand, a boundary condition on the vorticity f for instance is at times hard to formulate (Langlois [23]); the construction of appropriate discrete versions of such a boundary condition is often even more difficult (Öliger and Sundström [27]). Hence, the desirability of simple, physically meaningful boundary conditions and, thus, of the use of primitive variables. Lomax and Martin [24] have developed a fast Cauchy-Riemann solver and Received April 10, 1978.

AMS (MOS) subject classifications (1970). 65N04, 65N05, 76B05, 86A10.

Primary 65F05, 65N15, 65N20; Secondary

Key words and phrases. Fast direct solvers, Cauchy-Riemann equations, elliptic first-order systems, transonic flow. *The work of this author was supported in part by NASA, Grant No. NSG-5130. **The work of this author was supported in part by NASA, Grant No. NSG-5034. © 1979 American Mathematical Society 0025-5718/79/0000-0058/$! 3.75

585 License or copyright restrictions may apply to redistribution; see http://www.ams.org/journal-terms-of-use

586

MICHAEL GHIL AND RAMESH BALGOVIND

applied it to a quasilinear problem in aerodynamics ([24],

[25] ). Additional versions of

their solver are given in [26]. Our interest in the problem stems from a different applica-

tion, dealing with a two-dimensional version of the equations of dynamic meteorology (Ghil [14], [15] ). The solver we present also differs from those of [24], [26] in a number of ways: the boundary conditions and their numerical treatment, the decoupling of

u, v and the reduction to a discrete Poisson problem, and finally the method of solution of the resulting discrete Poisson equation are all different. We substantiate by numerical results that the present solver is second-order accurate, even for solutions which do not have the formally required degree of smoothness. The solvers of [24], [26] seem to be only first-order accurate according to our numerical tests. The intended application of our solver is to a fully nonlinear first-order system, rather than a quasilinear one. This system is a generalization of a Monge-Ampére equation [15], [17]. Eventually, we hope to apply the solver to cases where the nonlinear equations are of mixed elliptic-hyperbolic type [16], [17]. Prehminary results are encouraging, and we expect to pursue the nonlinear problem in a future publication. The organization of the article is the following: Section 2 contains the description in continuous and then in discrete form of the model problem of which we seek a fast solution. Section 3 contains the derivation and description of the solution algorithm. Section 4 presents numerical results for test computations with the model problem. Section 5 presents modifications of the model problem arising from changes in boundary conditions. Section 6 contains a comparison of results with the solvers of [24], [26]. Section 7 gives conclusions and a discussion of possible extensions and generalizations. Finally, Appendix A presents an error estimate for the method, and Appendix B contains a listing of the basic program. Acknowledgements. It is gratifying to acknowledge useful discussions with Professors Eugene Isaacson and Olof Widlund. Numerical calculations were performed in part on the CDC 6600 of the Courant Mathematics and Computing Laboratory, New York

University under Contract EY-76-C-02-3077 with the U. S. Department of Energy.

2. The Model Problem. The Differential Equations. We wish to study the fast numerical solution of the elliptic system of two first-order linear equations in two independent variables,

(2.1a)

ux + vy = dix, y),

(2.1b)

Uy - vx = e(x, y).

The dependent variables u, v can be thought of as velocity components in the x, y directions, respectively. In this interpretation d, e axe the divergence and vorticity of the flow, which are assumed to be known. If d = 0 = e, (2.1) are the Cauchy-Riemann equations, and u, v axe analytic.

We are interested in the inhomogeneous

case, \d\ + \e\ ^ 0,

and we concentrate on real-valued d, e, u, v, although the method is applicable with minor changes to complex-valued functions as well.

We consider a rectangular domain R, taken without loss of generality to be R = {(x, y): 0 < x < 27T,0 < y < 7r}. The boundary conditions are that d is given on the

License or copyright restrictions may apply to redistribution; see http://www.ams.org/journal-terms-of-use

587

A FAST CAUCHY-RIEMANN SOLVER

lower and upper side of the rectangle,

(2.2a)

v = t/°>(x),

y = 0,

(2.2b)

V= v^0c),

y = 77,

and that both u and v axe periodic in the x-direction,

(2-3a)

u(x + 2tt, y) = u(x, y),

(2.3b)

v(x + 2ir, y) = v(x, y).

The Gauss divergence theorem implies that d(x, y), v^°\x), and i/^ix)

(2.3c)

have to satisfy

J02"/0" d(x, y)dxdy = f*" {v^(x) - „(*)} dx.

These conditions, together with (2.1), determine v completely and u up to an additive constant (compare Ghil [15]). The latter indeterminacy in the solution can be eliminated, for instance, by prescribing u at one arbitrary point (x0, y0) in the rectangle.

The boundary conditions we use are associated with a standard channel-flow problem in geophysical fluid dynamics (e.g., Elvius and Sundström [10], Gustafsson [20] ), from which the nonlinear problem mentioned in Section 1 is derived (Ghil [15], [17]). Extensions to different boundary conditions and to irregular domains will be discussed in Sections 5 and 7. 777eDifference Equations. The discretization of the problem we chose is to approximate the derivatives in (2.1) by finite differences. Let U, V, D, E stand for the mesh functions which approximate the continuous functions 77,v, d, e; and let h, k stand for the mesh size in the x, y-directions, respectively. It is natural to use centered differences to replace the corresponding derivatives in (2.1). We write

(A)

U(x + b, y) - U(x - b, y) s 2St7x(x,y), U(x, y + e) - U(x, y - e) s 2euy(x, y),

for « and similar formulas for v; this yields a second-order accurate approximation of the derivatives and allows us to expect that in some adequate norm ||-||,

||U- u|| + || V - u|| = 0(h2) + 0(k2). The use of centered differences in a straightforward manner, on an unstaggered mesh x¡ = ih, y ■= jk, leads, however, to the existence of spurious null vectors (U, V),

i.e., to zero eigenvectors of the discrete matrix operator which approximates the differential Cauchy-Riemann operator.

To avoid dealing with these null vectors and to ob-

tain an invertible discrete matrix operator, we used a staggered mesh (Figure 1). Such a mesh, suggested already by Lomax and Martin [24], can be formulated for Eqs. (2.1)

in a particularly efficient way. Let u, v denote points at which U, V axe defined, and let -, x (for the vector operators divergence and curl) denote the points at which the discrete versions (2.4a, b) (see below) of equations (2.1a, b) are written and at which D, E are defined. Thus,

License or copyright restrictions may apply to redistribution; see http://www.ams.org/journal-terms-of-use

588

MICHAEL GHIL AND RAMESH BALGOVIND

yiiU IT

*

^SLIT

^2^1

l,N

-*

l,N ~2,N

-»i-tír

2,N

l(27T,ir) M,N

V -»-

v¡, ta

v

1,3 }

1,2

-tf-

1,2 1,1

(0,0)

'.o

M V2,l

2,1 V3,l

1,1

2,1

2,

2,0

3,1

V

-tÖ-•-

3,1

M,l

M,0

3,0

277

x(¡)

Figure 1

u, v alternate on diagonals of the mesh and so do -, x on diagonals parallel to and al-

ternating with those of u, v; in other words, v, x, u, -, in clockwise direction, occupy the corners of an elementary mesh cell of area hk/4 (see Figure 1). No averaging of U, V is necessary in writing (2.4a, b) on this staggered mesh.

Furthermore,

the

boundary conditions (2.2) and the periodicity condition (2.3a, b) can be easily han-

dled. Indeed, let U, V be indexed independently, with y = 0, 7Tbeing horizontal F-lines corresponding to F-indices / = 0, N, and with x = 0, 27r being vertical F-lines

with F-indices i = 1, M + 1. Then the computational domain includes the points

((/ - l)h, jk), at which Vfj is defined, and the points ((/' - l/2)h, (j - l/2)k), at which Ujj is defined; in other words, Vtj approximates v((i - l)h, jk), 1 < i .

,

1.01

u(x0,y0)

v¿°>.

,

1.982

7.898 168 14 -1 1.975 89 -2 937 984 -2 1.234 7221 9793 9761

-1

-2 -3 -3

-1

-1

Table VI contains a study of the number of grid points per wave length which the method necessitates for given numerical accuracy. The results are given here as relative errors, l2(u — U)/\\u\\2, rather than as absolute errors, l2(u - U), and similarly for v and for /„. It seems that roughly 4 points per wave length wiU give 10 _1 rela-

tive error, 8 points wiU give 5 x 10~2, and 16 wiU give 10-2. We notice again that if u osciUates less than v, the error in u wiU be considerably smaUer than that in v. License or copyright restrictions may apply to redistribution; see http://www.ams.org/journal-terms-of-use

603

A FAST CAUCHY-RIEMANN SOLVER TABLE V (Continued) l,(U)

x(2tt-x)

lui 2=

22.9595

Ivl 2=

5.0966

,U,«T

Ivl

=

lui 2=

97.4091 9.8690

256

3.604

7.1378 -1 1.636 -1 3.989 -2 9.892

16/32

7.0428

32/64

4.201

64/128 128/256

4.048

x{2tt-x)

32

1.816 2.5178

Ivl

sin (16y)

x(2n-x)sin(32y)

5.0966 22.9595 9.8696 97.4091

256

1.471

16/32

2.566

32/64 64/128 128/256 16 32 64 128

7.212

6.1677 1.4347 3.518 5.236 3.634

4.221

4.299

4.053

4.078

9.32 9.176

7.511 2.901 1.2121

256

16/32 32/64 64/128

(2ir-x)sin

16 32

y

v = x{ïï-x)(2ïï-x)sin

y

64

u ■ x(it-x)

(2,r-x)sin

v = x(2n-x)sin

Ivl

lui

y

y

11.9343 "

9.8696

=

x(2tt-x)

=

x(2n-x)sin

sin

y y

1.174 2.241

5.964

128/256 u = x(tt-x)

5.406 4.363 4.101 4.032

128

64

y sin{32x)

lul„=

4.012 4.66

97.4091 9.8690

lut, =

64 128

2.459 5.853 1.446

16

22.9595 5.0966

Ivl „=

+1 3.8587

y sin(16x)

Ivl 2= -

sin(8y)

128 256 16/32 32/64 64/128 128/256 16 32 128 256 16/32 32/64 64/128 128/256 16 32 64 128

i

£,(U,V)

1.732

16 32

y sin(8x)

1.843 2.535

1.292

-1 1.8352 -1 4.3267 -2 1.064

6.2285 -1 2.0035 -1 5.3048

-3 2.647

-2 1.3449

7.040

312 109

4.242

4.0656 4.020 8.7105 1.3108

1.8458 4.353 1.071 6.630 7.118 4.241 4.061

5.813

5.176 2.123 1.316 1.8459

5.997

1.3647

4.356

1.0157 4.9795 7.2681

2.5888

2.39 2.085

2.4378 1.613 7.1300

4.228

4.259

4.237

1.4431 3.6692 9.2269

9.7688

1.2474

2.3104

2.4499 6.1387 1.5368

3.1389 7.8604 1.9651

5.7783 3.9330

3.8452 3.9874

3.9766 3.9937 3.9984

3.9910 3.9943 3.9968 1.2207 1.9011

1.3883 3.4733 8.6870 2.1720 5.4303 3.9970 3.9983 3.9995 3.9999 4.6542 2.3271

1.1639 5.8198

*„

(U)

+1 3.932

+1 7.2614 2.1761 5.130 -1 1.2653 -1 3.165

777

944

4677 +1 6798 +1 884 1700 7139 -1 3~86~ 781 172 798

e(u)

3.856

+1

9.640 410 -1 -1 6.025 -2 1.506

-1

-1

3.337 4.242 4.055 3.997

2.055 4.5798

1.783 4.106 1.006 4.487 2.568 4.343 4.080

2935 +2 1.564 277 +2 7.936 092 +1 2.7678 2431 1.4956 2600 3.4708 0128 1.9709 2.867 5081

030

1.851

205

4.309

+2 8.067 2.017 5.042 -1 1.260 -1 3.151

+3 1.467 +2 3.669 9.172 2.293

-1

732

+4

+3 +2 -.3 +1

+2

3.4316 9.5067 2.4802 6.3163

2.4159 6.3250 1.6099 4.0366

-1 -2 -2 -3

9116 3.9739 3.9933 4.0000 4.0002

1.5928 3.6097 3.8330 3.9267

1.0101 3.8196

1.3127 2.8241

3.0675 8.3754

3.9884 3.5960 2.5198 6.0616

4.8190

7.0539

2.1836

1.5363

2.365

-2

1.2.1.33 3.0443 6.4210 3.9450 3.9717 3.9856

1.7629 4.4065 4.6484 4.0036

5.5692 1.4059 3.6625

3.8529 9.6442 4.1570

-3 5.913 - 1.478

-3

3.8357

3.9456

4.0014

3.9207

4.0006

3.9613

5.0733 2.3676 1.2030 6.0629

4.8543

1.0241 5.6744 2.9686 1.5144

3.9873 3.9950 1.1306 5.7633 2.9230 1.4679 7.3474

1.565 3.912

-1 -2

9.780

-3

2.445

-3

6.112

-4

256

2.9100

16/32 32/64 64/128 128/256

2.0000

3.0434 2.1428

1.9994 1.9999 2.0000

1.9680 1.9842 1.9922

2.3468 1.1833

5.9417 2.9772 2.0685 1.9832 1.9916 1.9958

3.9656

7.6427

1.8647 1.9115 1.9603 1.9814

3.784 9.461

-1 -2

2.365

-2

5.913

-3

-3 1.478

-3

-1 3.784 -; 9.461

-1 -2

3.9287

1.961S 1.9717 1.9913 1.9978

-1 -1 -1 -2

-3

These conclusions are also supported by some of the results in Table V. It is interesting that experiments with solutions containing odd wave numbers give results which are only slightly worse than those for even wave numbers, if at aU; in other words, using M, N which are powers of 2 is not detrimental to accuracy, even when odd

wave numbers are present in the solution. License or copyright restrictions may apply to redistribution; see http://www.ams.org/journal-terms-of-use

604

MICHAEL GHIL AND RAMESH BALGOVIND TABLE V (Continued) i 2 (2tt-x) sin (y) 4 4 v - x (2n-x) sin(y) u=x

2

lul_ Ivl

1.6926 3.5778 8.674 2.155 4.7319 4.1236 4.0258

+1 1.2066 2.7330 -1 6.5176 -1 1.614 4.4148 4.1593 4.0706

+2 8.0018 +1 1.8850 4.6131

16 32

2.1348

64

1.0805

128 256

2.5536 6.1632 4.5167 4.3743 4.2313 4.1299

9.5464 2.3985 6.0150 1.5065 3.7699 3.9800 3.9877 3.9927 3.9961

1.5604 3.3996 7.7121 1.8158 4.3888

8/ié 16/32

■ 97.4091 = 9488.531

32/64

u£C

u=x (rr-x) (2ïï-x) sin (y)

vec°

v

-

8 16 32 64

0

16/32 32/64

64/128 128/256 uSC

u

= x(2tt-x)

uec"

v

= y sin(x)

sin(y)

16

A

32 64

lul^= Ivl

128 256

9.8696

16/32 32/64 64/128 128/256

= 97.4091

4.7264

1.1787 4.9757 2.3681 1.169 5.826 2.9107

2.1011 2.0257 2.0065

2.0016

1.0090 4.889 2.433

1.2179" 6.0988 3.052 2.0093 1.9978 1.9972 1.9982

1.427 4.2446 4.0867 4.0370

(U)

+1 3.3808 +1 8.311 2.009 4.9799 4.0678 4.1368 4.0344

1_(V)

+1 2.909 7.162

1.783

-1 4.4538

4.0618

e(u)

+2 2.310 +1 5.774 +1 1.443 3.609

+1

-1

4.0160 4.0040 2.4159 6.3250 1.6099 4.0366

-1 3.784 -2 9.461 -2 2.365 -3 5.913

-1

1.0101

-3 1.478

-3

4.2471 4.1375

4.2730 1.1174 2.8579 7.2238 1.8161 3.8241 3.9106 3.9554 3.9777

1.1091

2.8276

4.936

1.3147 6.4005 3.1481

1.9799 1.1202 5.7897

4.5899 4.4081

2.3999

1.193 5.963 2.982 2.0566 2.0110

2.0013 1.9996

1.559 7.754 2.0540 2.0332 2.0194 2.0105

-2

-2 -3

3.8196 3.9287 3.9884 3.9960 1.265 3.162 -1 7.904 2.9311 -1 1.976 1.4697 -1 4.940 7.352 -2 1.235 1.9349 1.9752 1.9944 1.9990

In particular, these results also show that the present solver would perform very

weU on Unearized versions of the original geophysical fluid dynamic problem we were interested in ([16],

[17]).

We shaU return to this point in Section 7.

5. Changes in Boundary Conditions.

In Section 2 we have formulated the model

problem (2.1)—(2.3) which motivated this study.

The algorithm of Section 3 has ob-

vious appUcations to many other situations; it is of interest, therefore, to consider a

number of different boundary conditions which could be associated with the CauchyRiemann equations (2.1) in a rectangle. We shaU assume throughout this section that the boundary conditions on y = 0,

77are still (2.2), i.e., v is prescribed there as v^°\x) and u^\x),

respectively. The two

different combinations of boundary conditions we consider explicitly are: (1) that u is given on the left boundary of the rectangle and v is given on the right boundary, and (2) that u is given on both vertical sides.

It is clear that if v is given on aU sides, the problem should be formulated as Poisson's equation for v with Dirichlet boundary conditions; similarly if u is given on all the sides, a Dirichlet problem for u is more suitable. A moment's thought wiU show thaf the two situations we shaU discuss can easUy be transformed into a considerable number of others, by reflections or by interchanging the roles of x and y, and of u and v. In fact, aU situations in which u as weU as v axe prescribed on some of the sides of the rectangle can be handled by sUght modifications of the algorithms we present, yielding second-order accurate numerical solutions. License or copyright restrictions may apply to redistribution; see http://www.ams.org/journal-terms-of-use

605

A FAST CAUCHY-RIEMANN SOLVER

Table VI Numerical results indicating the resolution (mesh points per wave length) required by the proposed discretization procedure and solution algorithm (versions C and F) to obtain prescribed accuracy. i2(V)/lvl2

H^lUl/lul,

6.6212

-4

1.3611

5.1958

-4

1.3611

8.6548 6.9789

8.444 3.1358 1.9450 8.0699 1.1422

-3 -2 +2 -1 -1

4.849 2.271 4.4180 4.4600 1.0867

t,(U)/lul. u = y sin(x)

v = y sin(x)

u = y sin(4x),

v = y sin(4x)

u * y sin(8x),

v = y sin(8x)

u = y sin(64x),

2 2 v = y sin(64x)

u = sintx)sin(y)

, v = sin(4x)sin(4y) v = x(2n-x)sin(y) v = x(2ir-x)sin(8y)

u = y sin(8x),

4

u » y sin(16x), 4 u = y sin{32x),

v ■= x(2ir-x)sin(16y)

v ■ x(2ir-x)sin(32y)

4 u - y sin(64x),

v « x(2Tf-x)sin(64y)

4

u * y sin(128x),

v - x(2tt-x)

u « x(2ir-x)sin(y),

v = y sin(x)

u - x2(2ir-x)2sin(y) u ■ x{tt-x)

,

(2n-x)sin{y)

y - x4 (2ir-x) 4sin(y) ,

v ■ 0

v = x(2rr-x)sin(3y)

u - y"sin(3x)

v = x(2rr-x)sin{5y)

u ■ y sin(5x)

v ■ x(2ir-x)

u = y sin(7x)

u - y sin(9x)

sin(128y)

,

v = x{2ir-x)

sin(7y)

sin(9y)

1.47

5.59 2.0070 5.6440 2.0238 4.4250 4.0074

6.5580 6.5578

4.1000

4.0170 u » y sin(x),

-3 -2 +1 -3 -1

1.7716 1.7716 3.2100 1.210 2.378 1.2598 1.2376

-3 -3 -2 -1 -1 +2 -1

1.1180

-1

6.956 2.6429 6.514

+2 -12 5.3360 -2 5.5526

-2 -2

5.270 5.270

-3 -3

1.121

-2

1.2937

9.4755

4.9081

-3

1.2937

1.785

-2

5.1124 5.267

3.0218 2.5784 2.5490 1.097 8.027 7.962 8.0577 1.1064 1.592 1.5906 1.0707

-4 -4 -2 -1 -1

3.394 2.2937

-1 -1 +1 +1 -1

1.3592 9.8728 2.0570 7.067 5.227 2.617 5.4615 7.6292 5.234

4.104 3.1896

5.2079

1.1205

3.6800

1.2851 3.2022 7.9989 1.9993

2.6395

6.4495 1.5969 3.9748

9.6328 2.4339 6.0900 1.5225

1.6604 3.8882

2.7604

1.2079

5.9866

3.1351

9.5680

1.4350

7.8489

2.3826

3.5362

5.9508

8.7915

1.9858 4.9629

3.7455

5.7315

2.7813

8.0104 1.9318 4.7869 1.1941

1.0879 1.9621 6.2087 1.5410

6.5915 1.6605 4.1578 1.0382

7.4843 1.3893 3.2567

1.1403 1.7668

1.1704

3.9733

2.8390

8.0160 1.9963

9.6458

7.1369

2.3893

1.7829

5.5451

We proceed now with the description of the algorithm for the two cases men-

tioned. Case 1. u Given on the Left Side. The rectangular domain is now taken as R j = {(x, y): -A/2 < x < 2tt, 0 < y < 77}. This is merely done for notational convenience, so as to leave Figure 1 unchanged. The boundary conditions are first (2.2), License or copyright restrictions may apply to redistribution; see http://www.ams.org/journal-terms-of-use

606

MICHAEL GHIL AND RAMESH BALGOVIND

which we repeat here as

(5.1a)

u = u(0>(x),

y.= 0,

(5.1b)

v = u(1)(x),

y = 77,

and also

(5.2a)

" = "(0)00.

x - ~hl2'

(5.2b)

v = v(x)(y),

x = 2ir.

Thus Eqs. (5.2) replace the periodicity conditions (2.3a, b). Eqs. (2.1), together with

(5.1), (5.2) completely determine u, v, and u need not and should not be prescribed any more at an interior point of R x. The difference equations are still (2.4), which we repeat for convenience as

(5.3a) (Uu - t/,._w)/A + iVUj- Vu_x)lk = Dip (5.3b) (t/./+1 - Uu)/k - iVi+x. - Vu) = Eif,

Ki, and I is the MN x MN identity matrix.

From (5.9) we have

(5.11a)

U = AF - PV,

(5.11b)

(Q - RP)y = h(E - RE),

with

S RP

(5.11c)

S

s

s hexe S = T*T is an (N-l)

(5.12)

s]

x (N - 1) matrix,

S = p2 -1

2j

Notice that 5, in contradistinction to S of Section 3, is nonsingular. We shall return to

it later. Written out expUcitly, (5.11b) becomes after a change of sign,

License or copyright restrictions may apply to redistribution; see http://www.ams.org/journal-terms-of-use

A FAST CAUCHY-RIEMANN SOLVER

S+I S

-I S+I

T*DX-EX

-I

T*(DX+D2)-E2

(5.13) -I

Lt*z>,--

S+I

-AÍ

where / is now the (TV- 1) x (/V - 1) identity. This system can be brought into blocktridiagonal form simply by subtracting the rth row from the (/ + l)st, starting from the top. This produces the system

S+I -I

-I S+ 21 -I

T*DX-EX T*D2+E1-E2

(5.14)

S+ 21 -I

S + 27_

J*0M + KM^X

DMJ

We see that the decoupling resulted in this case in the elimination of U, rather than of V. Equation (5.14) is rather similar to (3.11). Some of the differences have already been pointed out; as a result of these differences, the matrix of (5.14) is nonsingular. It can be brought to scalar tridiagonal form by diagonalizing S and then reindexing. We shaU comment on the fast solution of (5.14) further at the end of this section, together with the fast solution of the matrix equation obtained in the second

case we wish to discuss. Case 2. u Given on Both Vertical Sides. We fit the grid to the rectangular domain so that R2 = {(x, y): -A/2 < x < 27r - A/2, 0 < y < n}. The boundary conditions are (5.1) on the horizontal sides of the rectangle, and (5.15a)

u = 77(0)(y),

x = -A/2,

(5.15b)

u = u(1)(y),

x = 2?r - A/2,

on the vertical sides. Equations (2.1), (5.1) and (5.15) determine u and v completely,

subject to the requirement that the data d(x, y), u,0^(y), u,xAy), i/0)(x), v^(x) satisfy the Gauss divergence theorem:

ffdix, y) dxdy= f^-"'2 {v^\x) - u(*)} dx (5.16) + /;{"(1)(v)-«(0)(y)}dy. The difference equations are (5.3), with (5.3b) only being written for 1 < / < The boundary conditions for the mesh variables are (5.4) and

M-l,lo chose to eliminate the indeterminacy in the Neumann problem is exactly that these two terms cancel, and hence the estimate is not affected. If instead of ee* we have A, the same observation holds as after Lemma 2; i.e., prescribing the average of U- , rather than one of its components, U¡ ¡ , does not affect the estimate either.

'o-V

To analyze the situation for / = 1, it is convenient to rewrite (A.5) for / = 1 as a linear combination of two equations, involving an auxiliary vector U0; an entirely similar procedure can be carried out for / = N, introducing U^ +,, but we shall omit

writing out the latter analysis and merely draw the conclusions we need from it. The two equations for / = 1 are

(A.9a)

-U0 + (S + 2I)\JX - U2 = k(T*Dx + E0 - Ej),

(A.9b)

U0-Uj

=-xE0

+ r*V0;

here we revert to the original definition of Dj, which had been replaced by Dj + k~l V0 in writing Eq. (3.3). Equation (A.9a) is now simply the discrete analog of (A.4b)

for/ = 1, or y = k/2, with E0 defined on y = 0 in the usual manner. Equation (A.9b) is the discrete analog of (A.4c) written on y = 0. If the auxiliary vector U0 is thought of as given on y =-k¡2,

then both (A.9a) and (A.9b) are formally second-order accurate.

With this motivation in mind, it is easy to obtain

(LhW)x =(5 + /)Wj-W2 = (S + I)ux - u2 + k2Au\y = k/2 + fc(9/9y)77|y = 0

(A.lOa)

-k2(dx + ey)\y = k/2 - k(T*Dx + EQ - Ex) -k(e

+ vx)\y=i0+kE0-T*yo

= [(Lh-L)u]x

+ [f-F]x.

We have from (A. 10a) that [(Lh - L)u], = 0(k2(h2 + k)),

[f~F]x=

0(k2(h2 + k2)) + 0(kh2).

We assume throughout that k/h = 0(1) and drop the fourth-order terms; thus finaUy

(A. 10b)

(/.„IV), = 0(k(h2 + k2)).

For / = N we obtain in the same way

License or copyright restrictions may apply to redistribution; see http://www.ams.org/journal-terms-of-use

626

MICHAEL GHIL AND RAMESH BALGOVIND

(A-10c)

(LhW)N = 0(k(h2 + k2)).

At this point we have to exhibit a comparison function 4 bt 66 67

XZ'XJVUI VN(I)»VEXIXJVII

be b'i

99 10Ü 101 102 103 10* 105 106 107 108 109 110 111 112 113 11* 115 116

117

ue

119 120 121

122 XN,YN,XYN,XM,YM

License or copyright restrictions may apply to redistribution; see http://www.ams.org/journal-terms-of-use

123 12* 125 126 127 12B

630

MICHAEL GHIL AND RAMESH BALGOVIND A 129 A 130

WRITE (6,90) WRITE (6,90) WRITE (6,80) N,M,XL,XU,YL,YU WRITE (6,90) WRITE (6,90) 60 CONTINUE WRITE (6,90) DO 70 J = l,5 WA( 1,1) 220. A( L,2) *-A (1,2) A( KHALFP, 1)=X(K1) A( MHALFP, 2)*Y(K1) CALL F FT2 (SIG,MPOW,PI) 00 230 1 =1,M J = JF+I 230 E( J)=A (1,1)»AM

SOLUTION V WILL BE IN ARRAY D AND U WILL BE IN E IF

2*0

250

(ISAM.EQ.O) GU TO 300 GO TO 260 IF (ISAM.EC.-1) DO 250 K*1,N1 = K*M KM KMMP=KM-M A( 1,1)=ALAM»(E(KM)-E(KMMP + D) DO 2*0 J"2,M KJ =KMMP+J A( J,1)=ALAM*(L(KJ-l)-E(KJ)) DO 250 1*1,M J* KMMP+I D( J)=D(J)+«(1,1) IF (K.LL.l) GO TO 250 Kl I = J-M 0( J)=0(J)+D(KlI) CONTINUE

GO TO 300 2.60 Oq 270 1*1,M J-I+ILM 270 A(I,1)*0(J)

IS =1 IP*2 DO 290

KD*1,N1

IEX«IS IS = IP IP"IEX KM«M*(N-KD+1) KMMP*KM-M A(1,IP)=ALAM»(E(KM)-E(KMMP+1))+A(1»IP)

DO 280 J*2,M 280

1*2 1*3 1** 6 S B B B B

B B B B B 8 B B B B B B B B B 3 B B B B

B B B B B B 8 B B 8 B B B B B B B B B B B B 8

1*5 1*6 1*7 l*b 1*9 150

151 152 153 15*

155 156 157 15E 159 160 161 162 163 16*

165 166 167 16C 169 170 171 172 173 17* 175 176 177 176 179 18 0 161 162 183 18*

185 186 167 186 189 190 191 192 193 19* 195 196 197 198

8 B B B B 199 8 200 B 201 202 203 20* 205 206 207 20t 209 210 211 B 212 B 213 B 21*

KJ*KMMP+J A(J,IP)=ALAM*(£(KJ-1)-E(KJ))+A(J,IP)

B 215

DO 290 1=1,M

B 217 B 2i6

J-KMMP+I

License or copyright restrictions may apply to redistribution; see http://www.ams.org/journal-terms-of-use

B 21b

633

A FAST CAUCHY-RIEMANN SOLVER K1I-J-M A(I,IS)'0(K1I) 0(K1I)—A(I,IP) IF (KD.GT.l) D(K1I)»D(J)+D(K1I) 290 CONTINUE 300 CONTINUE RETURN END SUBROUTINE FFT2 (SIG,M,PI) COMMON/WET/ X(12f ),Y-(l26) FAST FOURIER TRANSFORM N=2*»M NV2-N/2 NM1=N-1 J =l DO 30 1=1,NM1 IF ( I.GE.J) GO TO 10 TX-XÍJ) TY*Y(J) X(J)=X(I) Y(J)=Y(I) X(1)=TX Y(I)*TY 10 K=NV2 20 IF (K.GE.J) GO TO 30 J-J-K K=K/2

B 219 3 22C B 221

B 222 o 223 à 22* B 225 26-

1 2 3 * 5 6 7 8 9 10 11 12

13 1* 15 16

17 16 19

20 21

GO TO 20 30 J*J+K DO 50 L=1,M LE*2**L LEl*LE/2 UX-1.0 UY*0.0 ANG*PI/FL0AT(LE1) WX=COS(ANG) WY=SIG*SIN(ANG) DO 50 J=1,LE1 DO *0 I*J,N,LE IP=I+LE1 TX*X(IP)*UX-Y(IP)»UY TY=X(IP)»UY+YI1P)*UX X(IPI*X(Il-TX Y(IP)*Y(I)-TY X(I)*X(I1+TX *0 Y(1)=Y(I)+TY US*UX»WX-UY*WY

37 36 39 *0 *1

UY=UX*WY+UY*WX

*2

50 UX=US

2*

25 26 27 2e 29 30 31

32 33 3* 35 36

*3 **

RETURN

END SUBROUTINE CONSOL (N,NEXT,1 CODE) COMMON/KEEP/ 2(8256) COMMON/WET/ X(126),Y(126) »♦»»♦»»♦»t**************************************************** * * * « * *

22

23

SOLVES A SPECIAL TP1-DIAGJNAL LINEAR SYSTEM BY LU FACTORIZATION . TWO R.H.S. ARE GIVEN AND STORED IN Y, STARTING AT Y(l) AND AT YIN+1) RESPECTIVELY . THE TWO CORRESPONDING VECTOR UNKNOWNSARE RETURNED IN X, STARTING AT X(l) AND AT XIN+i) RESPECTIVELY.

IF ICODE = 3 THEN Z ARRAY MUST BE KEPT RESERVED FOR USE BY CONSOL. ttl>tltt(>tttl

IF (ICODE.EO.3) Z(NEXT+1)*X(1) 00 10 K«2»N NEXTPL-NEXT+K

GO TO 20

Kl-K-1 X(K1)=1.0/Z(N[XTPL-1) 10 Z(NEXTPL)*X(KI-X(K1) 20 DO 30 K-2,N KPL=K+N KNEXT«NEXT+K-1 Y(K)=Y(K)-Y(K-1)/Z(KNEXT)

License or copyright restrictions may apply to redistribution; see http://www.ams.org/journal-terms-of-use

*51 2 3 6 7 f 9

10 11 12 13 1*

15 16 17 16 19 20 21 22 23 2* 25 26 27

634

MICHAEL GHIL AND RAMESH BALGOVIND 0 D D Û Û D D 0 D D

30 Y(KPLI*Y(KPL)-Y(KPL-1)/Z(KNEXT) NEXTPL-NEXT+N Y(N)«Y(N)/Z(NEXTPL) Y(2»N)=Y(2»N)/Z(NEXTPL)

DO *0 J*2,N K-N-J+l KPL-K+N KNEXT=K+NEXT Y(K)*(Y(K)-Y(K+1))/Z(KNEXT) '""(KPL>=(Y(KPL)-Y(KPL+1))/Z