21.06.2014 Views

Numerical Methods for Partial Differential ... - SAM - ETH Zürich

Numerical Methods for Partial Differential ... - SAM - ETH Zürich

Numerical Methods for Partial Differential ... - SAM - ETH Zürich

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Numerical</strong> <strong>Methods</strong> <strong>for</strong><br />

<strong>Partial</strong> <strong>Differential</strong> Equations<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

1.5.1 Galerkin discretization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78<br />

1.5.1.1 Spectral Galerkin scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87<br />

1.5.1.2 Linear finite elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108<br />

1.5.2 Collocation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127<br />

1.5.2.1 Spectral collocation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131<br />

1.5.2.2 Spline collocation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137<br />

1.5.3 Finite differences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139<br />

1.6 Convergence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143<br />

1.6.1 Norms on function spaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145<br />

1.6.2 Algebraic and exponential convergence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Contents<br />

Prof. Ralf Hiptmair, Prof. Christoph Schwab,<br />

Prof. H. Harbrecht, Dr. V. Gradinaru, and Dr. A. Chernov<br />

Draft version December 14, 2010, SVN rev. 30831<br />

(C) Seminar für Angewandte Mathematik, <strong>ETH</strong> Zürich<br />

URL: http://www.sam.math.ethz.ch/~hiptmair/tmp/NPDE10.pdf<br />

1 Case Study: A Two-point Boundary Value Problem 21<br />

1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23<br />

1.2 A model problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26<br />

1.2.1 Linear elastic string . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26<br />

1.2.2 Mass-spring model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33<br />

1.2.3 Continuum limit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38<br />

1.3 Variational approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47<br />

1.3.1 Virtual work equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47<br />

1.3.2 Regularity requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56<br />

1.3.3 <strong>Differential</strong> equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60<br />

1.4 Simplified model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65<br />

1.5 Discretization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

0.0<br />

p. 1<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

0.0<br />

p. 2<br />

2 Second-order Scalar Elliptic Boundary Value Problems 168 R. Hiptm<br />

C. Schwa<br />

2.1 Equilibrium models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172 H.<br />

Harbrech<br />

2.1.1 Taut membrane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173<br />

V.<br />

Gradinar<br />

2.1.2 Electrostatic fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180<br />

A. Chern<br />

DRAFT<br />

2.1.3 Quadratic minimization problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185<br />

2.2 Sobolev spaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196<br />

2.3 Variational <strong>for</strong>mulations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215<br />

2.3.1 Linear variational problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215<br />

2.3.2 Stability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221<br />

2.4 Equilibrium models: Boundary value problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229<br />

2.5 Diffusion models (Stationary heat conduction) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241<br />

2.6 Boundary conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247<br />

2.7 Characteristics of elliptic boundary value problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252<br />

2.8 Second-order elliptic variational problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256<br />

2.9 Essential and natural boundary conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263<br />

3 Finite Element <strong>Methods</strong> (FEM) 272<br />

3.1 Galerkin discretization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275<br />

3.2 Case study: Triangular linear FEM in two dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285<br />

3.2.1 Triangulations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286<br />

3.2.2 Linear finite element space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288<br />

3.2.3 Nodal basis functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291<br />

3.2.4 Sparse Galerkin matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296<br />

3.2.5 Computation of Galerkin matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301<br />

3.2.6 Computation of right hand side vector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311<br />

3.3 Building blocks of general FEM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316<br />

3.3.1 Meshes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317<br />

3.3.2 Polynomials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321<br />

3.3.3 Basis functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

3.4 Lagrangian FEM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330 Harbrech<br />

V.<br />

3.4.1 Simplicial Lagrangian FEM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331 Gradinar<br />

A. Chern<br />

3.4.2 Tensor-product Lagrangian FEM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338<br />

DRAFT<br />

3.5 Implementation of FEM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349<br />

3.5.1 Mesh file <strong>for</strong>mat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350<br />

3.5.2 Mesh data structures [6, Sect. 1.1] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355<br />

3.5.3 Assembly [6, Sect. 5] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 361<br />

3.5.4 Local computations and quadrature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374<br />

3.5.5 Incorporation of essential boundary conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389<br />

3.6 Parametric finite elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397<br />

3.6.1 Affine equivalence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398<br />

3.6.2 Example: Quadrilaterial Lagrangian finite elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407<br />

3.6.3 Trans<strong>for</strong>mation techniques . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414<br />

3.6.4 Boundary approximation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 420<br />

3.7 Linearization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 422<br />

0.0<br />

p. 3<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

0.0<br />

p. 4


4 Finite Differences (FD) and Finite Volume <strong>Methods</strong> (FV) 432<br />

4.1 Finite differences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434<br />

4.2 Finite volume methods (FVM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 446<br />

4.2.1 Gist of FVM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 446<br />

4.2.2 Dual meshes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 449<br />

4.2.3 Relationship of finite elements and finite volume methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453<br />

5 Convergence and Accuracy 461<br />

5.1 Galerkin error estimates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462<br />

5.2 Empirical Convergence of FEM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 471<br />

5.3 A priori finite element error estimates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 487<br />

5.3.1 Estimates <strong>for</strong> linear interpolation in 1D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 489<br />

5.3.2 Error estimates <strong>for</strong> linear interpolation in 2D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 496<br />

5.3.3 The Sobolev scales . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 509<br />

5.3.4 Anisotropic interpolation error estimates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 514 DRAFT<br />

5.3.5 General approximation error estimates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 524<br />

5.4 Elliptic regularity theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 539<br />

5.5 Variational crimes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 550<br />

5.5.1 Impact of numerical quadrature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 552<br />

5.5.2 Approximation of boundary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 555<br />

5.6 Duality techniques . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 559<br />

5.6.1 Linear output functionals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 559<br />

5.6.2 Case study: Boundary flux computation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 569<br />

5.6.3 L 2 -estimates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 579<br />

5.7 Discrete maximum principle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 589<br />

6 2nd-Order Linear Evolution Problems 604<br />

6.1 Parabolic initial-boundary value problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 608<br />

6.1.1 Heat equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 608<br />

6.1.2 Spatial variational <strong>for</strong>mulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 612<br />

6.1.3 Method of lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 621<br />

6.1.4 Timestepping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 624<br />

6.1.4.1 Single step methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 625<br />

6.1.4.2 Stability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 629<br />

6.1.5 Convergence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 652<br />

6.2 Wave equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 662<br />

6.2.1 Vibrating membrane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 663<br />

6.2.2 Wave propagation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 671<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

6.2.3 Method of lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 678<br />

6.2.4 Timestepping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 681<br />

6.2.5 CFL-condition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 694<br />

7 Convection-Diffusion Problems 705<br />

7.1 Heat conduction in a fluid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 706<br />

7.1.1 Modelling fluid flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 707<br />

7.1.2 Heat convection and diffusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 711<br />

7.1.3 Incompressible fluids . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 715<br />

7.1.4 Transient heat conduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 720<br />

0.0<br />

p. 5<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

0.0<br />

p. 6<br />

7.2 Stationary convection-diffusion problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 721<br />

7.2.1 Singular perturbation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 725<br />

7.2.2 Upwinding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 731<br />

7.2.2.1 Upwind quadrature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 742<br />

7.2.2.2 Streamline diffusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 751<br />

7.3 Transient convection-diffusion BVP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 767<br />

7.3.1 Method of lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 768<br />

7.3.2 Transport equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 774<br />

7.3.3 Lagrangian split-step method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 778<br />

7.3.3.1 Split-step timestepping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 778<br />

7.3.3.2 Particle method <strong>for</strong> advection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 784<br />

7.3.3.3 Particle mesh method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 793<br />

DRAFT<br />

7.3.4 Semi-Lagrangian method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 807<br />

8 <strong>Numerical</strong> <strong>Methods</strong> <strong>for</strong> Conservation Laws 820<br />

8.1 Conservation laws: Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 822<br />

8.1.1 Linear advection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 824<br />

8.1.2 Inviscid gas flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 829<br />

8.2 Scalar conservation laws in 1D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 834<br />

8.2.1 Integral and differential <strong>for</strong>m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 834<br />

8.2.2 Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 839<br />

8.2.3 Weak solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 846<br />

8.2.4 Jump conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 850<br />

8.2.5 Riemann problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 853<br />

8.2.6 Entropy condition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 863<br />

8.2.7 Properties of entropy solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 868<br />

8.3 Conservative finite volume discretization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 872<br />

8.3.1 Semi-discrete conservation <strong>for</strong>m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 875<br />

8.3.2 Discrete conservation property . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 880<br />

8.3.3 <strong>Numerical</strong> flux functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 884<br />

8.3.3.1 Central flux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 884<br />

8.3.3.2 Lax-Friedrichs flux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 889<br />

8.3.3.3 Upwind flux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 892<br />

8.3.3.4 Godunov flux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 899<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

8.3.4 Montone schemes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 908 DRAFT<br />

8.4 Timestepping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 919<br />

8.4.1 CFL-condition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 923<br />

8.4.2 Linear stability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 929<br />

8.4.3 Convergence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 943<br />

8.5 Higher-order conservative schemes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 954<br />

8.5.1 Piecewise linear reconstruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 956<br />

8.5.2 Slope limiting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 969<br />

8.5.3 MUSCL scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 980<br />

8.6 Outlook: systems of conservation laws . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 986<br />

0.0<br />

p. 7<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

0.0<br />

p. 8


9 Finite Elements <strong>for</strong> the Stokes Equations 987<br />

9.1 Viscous fluid flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 988<br />

9.2 The Stokes equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 997<br />

9.2.1 Constrained variational <strong>for</strong>mulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 997<br />

9.2.2 Saddle point problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1003<br />

9.2.3 Stokes system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1014<br />

9.3 Saddle point problems: Galerkin discretization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1017<br />

9.3.1 Pressure instability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1022<br />

9.3.2 Stable Galerkin discretization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1034<br />

9.3.3 Convergence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1048<br />

9.4 The Taylor-Hood element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1054<br />

R. Hiptmair<br />

C. Schwab,<br />

10 Adaptive Finite Element Discretization 1060 H.<br />

Harbrecht<br />

10.1 Concept of adaptivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .<br />

V.<br />

1061 Gradinaru<br />

A. Chernov<br />

10.2 A priori hp-adaptivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1061<br />

DRAFT<br />

10.2.1 Graded meshes in 1D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1061<br />

10.2.2 Triangular graded meshes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1061<br />

10.2.3 hp-approximation in 1D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1061<br />

10.2.4 hp-adapted Lagrangian finite elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1061<br />

10.3 A posteriori mesh adaptation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1061<br />

10.3.1 Equidistribution principle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1061<br />

10.3.2 Local mesh refinement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1061<br />

10.3.3 Refinement control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1061<br />

10.4 A posteriori error estimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1061<br />

10.4.1 Hierarchical error estimator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1061<br />

10.4.2 Goal oriented error estimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1061<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

11 Multilevel iterative solvers 1062<br />

<strong>Numerical</strong><br />

11.1 Solving finite element linear systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1063 <strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

11.2 Subspace correction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1063<br />

11.2.1 Successive subspace correction algorithm (SSC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1063<br />

11.2.2 Gauss-Seidel iteration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1063<br />

11.2.3 Hierarchical basis multigrid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1063<br />

11.2.3.1 Hierarchical basis in 1D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1063<br />

11.2.3.2 Hierarchical trans<strong>for</strong>mations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1063<br />

11.2.3.3 Hierarchical basis in 2D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1063<br />

11.2.3.4 Convergence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1063<br />

11.3 Multigrid method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1063 R. Hiptmair<br />

C. Schwab,<br />

11.3.1 Multilevel subspace corrections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1063 H.<br />

Harbrecht<br />

11.3.2 Multigrid algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .<br />

V.<br />

1063 Gradinaru<br />

A. Chernov<br />

11.3.2.1 Transfer operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1063<br />

DRAFT<br />

11.3.2.2 Local relaxations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1063<br />

11.3.3 Nested iteration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1063<br />

11.4 Algebraic multigrid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1063<br />

11.5 Multilevel preconditioning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1063<br />

12 Sparse Grids Galerkin <strong>Methods</strong> 1064<br />

12.1 The curse of dimension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1065<br />

12.2 Hierarchical basis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1065<br />

12.3 Sparse grids . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1065<br />

12.4 Approximation on sparse grids . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1065<br />

12.5 Sparse grids algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1065<br />

0.0<br />

p. 9<br />

0.0<br />

p. 10<br />

Index 1065<br />

Keywords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .<br />

Numerica<br />

1065 <strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1077<br />

Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1083<br />

MATLAB-CODE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1085<br />

Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1086<br />

Course history<br />

• Summer semester 04, R. Hiptmair (<strong>for</strong> RW/CSE undergraduates)<br />

• Winter semester 04/05, C. Schwab (<strong>for</strong> RW/CSE undergraduates)<br />

• Winter semester 05/06, H. Harbrecht (<strong>for</strong> RW/CSE undergraduates)<br />

• Winter semester 06/07, C. Schwab (<strong>for</strong> BSc RW/CSE)<br />

• Autumn semester 07, A. Chernov (<strong>for</strong> BSc RW/CSE)<br />

• Autumn semester 08, C. Schwab (<strong>for</strong> BSc RW/CSE)<br />

• Autumn semester 09, V. Gradinaru (<strong>for</strong> BSc RW/CSE, Subversion Revision: 22844)<br />

• Spring semester 10, R. Hiptmair (<strong>for</strong> BSc Computer Science)<br />

• Autumn semester 10, R. Hiptmair (<strong>for</strong> BSc RW/CSE, Subversion Revision: 30025)<br />

Preamble<br />

This lecture is a core course <strong>for</strong><br />

• BSc in Computational Science and Engineering (RW/CSE),<br />

• BSC in Computer Science with focus Computational Science.<br />

Main skills to be acquired in this course:<br />

Ability to implement advanced numerical methods <strong>for</strong> the solution of partial differential equations<br />

in MATLAB efficiently<br />

Ability to modify and adapt numerical algorithms guided by awareness of their mathematical foundations<br />

Ability to select and assess numerical methods in light of the predictions of theory<br />

Ability to identify features of a PDE (= partial differential equation) based model that are relevant<br />

<strong>for</strong> the selection and per<strong>for</strong>mance of a numerical algorithm<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

0.0<br />

p. 11<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

0.0<br />

p. 12


Ability to understand research publications on theoretical and practical aspects of numerical methods<br />

<strong>for</strong> partial differential equations.<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

<strong>Numerical</strong> analysis of PDE (→ mathematics curriculum)<br />

TODOs<br />

This course<br />

≠<br />

(401-3651-00V <strong>Numerical</strong> methods <strong>for</strong> elliptic and parabolic partial differential<br />

equations, )<br />

Cleanse index and code index.<br />

Instruction on how to apply software packages<br />

State “learning outcomes” at the end of each section/chapter.<br />

Reading instructions<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

What to expect<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

This course materials are neither a textbook nor lecture notes.<br />

They are meant to be supplemented by explanations given in class.<br />

The course is difficult and demanding (ie. <strong>ETH</strong> level)<br />

Do not expect to understand everything in class. The average student will<br />

Some pieces of advice:<br />

these lecture slides are not designed to be self-contained, but to supplement explanations in class.<br />

this document is not meant <strong>for</strong> mere reading, but <strong>for</strong> working with,<br />

turn pages all the time and follow the numerous cross-references,<br />

0.0<br />

p. 13<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

• understand about one third of the material when attending the lectures,<br />

• understand another third when making a serious ef<strong>for</strong>t to solve the homework problems,<br />

• hopefully understand the remaining third when studying <strong>for</strong> the examnination after the end of<br />

the course.<br />

Perseverance will be rewarded!<br />

0.0<br />

p. 15<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

study the relevant section of the course material when doing homework problems.<br />

Practical in<strong>for</strong>mation<br />

Teaching instructions<br />

Explanations in class should haevily rely on the blackboard: a 2 : 1 split between developing<br />

material at the blackboard and discussing <strong>for</strong>mulas and examples given on the slides has emerged<br />

as proper balance.<br />

Many technical details given in supplementary parts of the lecture material can be skipped or<br />

simplified.<br />

Use slides <strong>for</strong> repetition: after having sketched a method at the blackboard, again go through the<br />

presentation on the slides.<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

0.0<br />

p. 14<br />

Course:<br />

401-3663-00L <strong>Numerical</strong> <strong>Methods</strong> <strong>for</strong> <strong>Partial</strong> <strong>Differential</strong> Equations<br />

Lectures: Mon 13-15 HG D 5.2<br />

Wed 10-12 HG D 5.2<br />

Tutorials: Mon 08-10 HG D 5.2<br />

Mon 10-12 HG D 5.2<br />

Lecturer: Prof. Ralf Hiptmair, office: HG G 58.2, e-mail: hiptmair@sam.math.ethz.ch<br />

Assistants: Eivind Fonn, office: HG J 59, e-mail: eivind.fonn@sam.math.ethz.ch<br />

Dr. Erhan Turan,<br />

(2nd year PhD student at Seminar of Applied Mathematics, D-MATH)<br />

office: CAB F 81, e-mail: erhan.turan@inf.ethz.ch<br />

(Postdoctoral researcher at Chair of Computational Science, D-INFK)<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

0.0<br />

p. 16


Assignments: 12 weekly assignment sheets, handed out on Monday, discussed in tutorial<br />

classes in the following week.<br />

“Testat” requirement:<br />

• Take part in the tutorial classes. The attendance is mandatory: at most<br />

two tutorial classes can be skipped during the semester.<br />

• Take active part during the tutorial. Every student will be asked to present<br />

the solution of a few exercises at the blackboard.<br />

• Work extensively on the exercises and hand in the approaches/solutions. In<br />

order to obtain the access to the examination, about 33% of the exercises<br />

proposed during the semester should be solved and handed in.<br />

Examination: “Sessionsprüfung”: computer based examination, programming and theoretical<br />

tasks<br />

✗<br />

✖<br />

3 hour examination on Friday, January 28, 2011<br />

✔<br />

✕<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

to be found at the URL<br />

<strong>Numerical</strong> <strong>Methods</strong> <strong>for</strong> <strong>Partial</strong> <strong>Differential</strong> Equations<br />

http://<strong>for</strong>um.vis.ethz.ch/<strong>for</strong>umdisplay.php?f=79<br />

This <strong>for</strong>um has been set up so that you can post questions on the programming exercises that accompany<br />

the course. One of the assistants will look at the entries in this <strong>for</strong>um and<br />

• write an answer in this <strong>for</strong>um or<br />

• discuss the question in a consulting session and post an answer later.<br />

A second purpose of this <strong>for</strong>um is that the assistants can collect FAQs and post answers here.<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Web page: http://www.math.ethz.ch/education/bachelor/lectures/hs2010/math/numpdecse<br />

Reporting errors<br />

Please report errors in the electronic lecture notes via a wiki page !<br />

http://elbanet.ethz.ch/wikifarm/rhiptmair/index.php?n=Main.NPDECourse<br />

0.0<br />

p. 17<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Literature<br />

This course is designed to be rather self-contained and additional study of literature should not be<br />

crucial to follow the lecture. These references point to futher sources of in<strong>for</strong>mation, mainly devoted<br />

mathematical theory.<br />

0.0<br />

p. 19<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

(Password: NPDE, please choose EDIT menu to enter in<strong>for</strong>mation)<br />

• D. Braess. Finite Elements. Cambridge University Press, 2nd edition, 2001.<br />

Please supply the following in<strong>for</strong>mation:<br />

• (sub)section where the error has been found,<br />

• precise location (e.g, after Equation (4), Thm. 2.3.3, etc. ). Refrain from giving page numbers,<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

• S. Brenner and R. Scott. Mathematical theory of finite element methods. Texts in Applied<br />

Mathematics. Springer–Verlag, New York, 1994.<br />

• A. Ern and J.-L. Guermond. Theory and Practice of Finite Elements, volume 159 of Applied<br />

Mathematical Sciences. Springer, New York, 2004.<br />

• Ch. Großmann and H.-G. Roos. Numerik partieller <strong>Differential</strong>gleichungen. Teubner<br />

Studienbücher Mathematik. Teubner, Stuttgart, 1992.<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

• brief description of the error.<br />

• W. Hackbusch. Elliptic <strong>Differential</strong> Equations. Theory and <strong>Numerical</strong> Treatment, volume 18 of<br />

Springer Series in Computational Mathematics. Springer, Berlin, 1992.<br />

• P. Knabner and L. Angermann. <strong>Numerical</strong> <strong>Methods</strong> <strong>for</strong> Elliptic and Parabolic <strong>Partial</strong> <strong>Differential</strong><br />

Equations, volume 44 of Texts in Applied Mathematics. Springer, Heidelberg, 2003.<br />

Online discussion <strong>for</strong>um<br />

• S. Larsson and V. Thomée. <strong>Partial</strong> <strong>Differential</strong> Equations with <strong>Numerical</strong> <strong>Methods</strong>, volume 45 of<br />

Texts in Applied Mathematics. Springer, Heidelberg, 2003.<br />

Contribute to the <strong>for</strong>um<br />

0.0<br />

p. 18<br />

• R. LeVeque. Finite Volume <strong>Methods</strong> <strong>for</strong> Hyperbolic Problems. Cambridge Texts in Applied<br />

Mathematics. Cambridge University Press, Cambridge, UK, 2002.<br />

0.0<br />

p. 20


1<br />

Case Study: A Two-point Boundary<br />

Value Problem<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

1.1 Introduction<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

OPTIONAL (WITH QUALIFICATIONS)<br />

This chapter provides a quick tour of modelling and discretization in the case of a concrete mechanical<br />

system, of which everybody should have some intuitive grasp. The modelling focus is on extremal<br />

principles and variational calculus. Different discretization approaches are introduced and discussed<br />

in 1D, which enables students to develop implementations from scratch. Thus, they can conduct<br />

numerical simulations right from the outset of the course.<br />

Most topics covered in this chapter are revisited later, but students benefit a lot from this repetition:<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

The term “partial differential equation” (PDE) usually conjures up <strong>for</strong>mulas like<br />

√<br />

div( 1+‖gradu(x)‖ 2 gradu(x))+v·gradu = f(x) , x ∈ Ω ⊂ R d .<br />

This chapter aims to wean you off this impulse and instil an appreciation that<br />

★<br />

✧<br />

a meaningful PDE encodes structural principles<br />

(like equilibrium, conservation, etc.)<br />

✥<br />

✦<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

• The elastic string model discussed in Sects. 1.2 and Sect. 1.4 is instrumental in understanding<br />

the membrane model of Sect. 2.1.1<br />

1.0<br />

p. 21<br />

!<br />

The design and selection of numerical methods has to take into account these governing<br />

principles.<br />

1.1<br />

p. 23<br />

• The brief introduction into variational calculus in Sect. 1.3 prepares <strong>for</strong> the in-depth treatment<br />

given in Ch. 2<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Remark 1.1.1 (Mathematical modelling).<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

• Galerkin discretization introduced in Sect. 1.5.1 is addressed again in 3.1.<br />

Prerequisite <strong>for</strong> numerical simulation:<br />

Mathematical modelling<br />

• Finite differences are covered in Sect. 1.5.3 and, again, in 4.1.<br />

Physics Biology ··· Economics<br />

Appropriate & necessary simplifications<br />

This chapter offers a brief tour of<br />

mathematical modelling of a physical system based on variational principles,<br />

the derivation of differential equations from these variational principles,<br />

the discretization of the variational problems and/or of the differential equations using various<br />

approaches.<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

(PDE based) mathematical model<br />

Necessary simplification:<br />

{ }<br />

system<br />

described by a few variables/functions in configuration space<br />

phenomenon<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

The art of modelling:<br />

devise “faithful model”<br />

1.1<br />

p. 22<br />

Essential/relevant traits of<br />

{ }<br />

system<br />

phenomenon<br />

−→ structural properties of model<br />

1.1<br />

p. 24


△<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Remark 1.1.2 (“PDEs” <strong>for</strong> univariate functions).<br />

The classical concept of a PDE inherently involves functions of several independent variables. However,<br />

when one embraces the concept of a PDE as encoding fundamental structural properties of a<br />

model, then simple representatives in a univariate setting can be discussed.<br />

☞<br />

ordinary differential equations (ODEs) offer simple specimens of important classes of PDEs!<br />

Thus, in this chapter we examine ODEs that are related to the important class of elliptic PDEs.<br />

△<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Fig. 2<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Note: The developments below cannot live up to standards of mathematical rigour, because what<br />

has deliberately omitted is the discussion of the functional analytic framework (function space<br />

theory) required <strong>for</strong> a complete statement of, <strong>for</strong> instance, minimization problems and variational<br />

problems.<br />

Sought:<br />

(Approximation of) “shape” of elastic string<br />

1.2 A model problem<br />

1.2.1 Linear elastic string<br />

1.2<br />

p. 25<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

u 2<br />

a<br />

(a,u a )<br />

(b,u b )<br />

Configuration space<br />

= space of curves ‘w<br />

☞ shape of string<br />

↕<br />

curveu : [0,1] ↦→ R 2 ,u = u(ξ)<br />

(physical units[u] = 1m)<br />

1.2<br />

p. 27<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Static mechanical problem:<br />

De<strong>for</strong>mation of elastic “1D” string (rubber<br />

band) under its own weight<br />

Constraint: string pinned at endpoints<br />

✄<br />

Rubber band<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

<strong>for</strong>ce fieldf<br />

b<br />

Fig. 3<br />

u 1 ☞ Pinning conditions (boundary conditions):<br />

( ) ( )<br />

a b<br />

u a u b<br />

u(0) =<br />

∈ R 2 , u(1) =<br />

∈ R 2 .<br />

(1.2.1)<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Gravity<br />

Fig. 1<br />

Note:<br />

description of a curve in the plane by a mapping[0,1] ↦→ R 2 requires coordinate system. Of<br />

course, the choice of the coordinate system must not affect the shape obtained from the mathematical<br />

model, a property called frame indifference.<br />

1.2<br />

p. 26<br />

Current concept of <strong>for</strong>ce field f: <strong>for</strong>ce “pulls” at elastic string. Alternative: <strong>for</strong>ce due to a potential.<br />

Gravitational <strong>for</strong>ce (i.e., a constant <strong>for</strong>ce field) allows both descriptions.<br />

1.2<br />

p. 28


Terminology: [0,1] ˆ= parameter domain, ✎ notationΩ<br />

Remark 1.2.2 (Parametrization of a curve). → [29, Sect. 7.4]<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Remark 1.2.3 (Material coordinate).<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Interpretation of curve parameterξ:<br />

We consider a curve in R 2<br />

u ∈ (C 0 ([0,1])) 2<br />

⇕<br />

u : [0,1] ↦→ R 2 ✄<br />

u 2<br />

u(0)<br />

u(ξ)<br />

u ′ (ξ)<br />

connected curve u<br />

Fig. 4 1<br />

u(1)<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

ξ: unique identifier <strong>for</strong> each infinitesimal section of the string,<br />

a label <strong>for</strong> each “material point” on the string<br />

ξ ˆ= material coordinate, unrelated to “position in space” (= physical coordinate),<br />

ξ has no physical dimension ➤ ′ does not affect dimension.<br />

△<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

✎ notation: C k ([a,b]) ˆ= k-times continuously differentiable functions on [a,b] ⊂ R , see [29,<br />

Sect. 5.4]<br />

(C k ([a,b])) 2 ˆ= k-times continuously differentiable curvesu : [a,b] ↦→ R 2 , that is, if<br />

u = ( u 1<br />

u 2<br />

)<br />

, thenu1 ,u 2 ∈ C k ([a,b]).<br />

Remark 1.2.4 (Non-dimensional equations).<br />

By fixing reference values <strong>for</strong> the basic physical units occurring in a model (“scaling”), one can switch<br />

to a non-dimensional <strong>for</strong>m of the model equations.<br />

Geometric intuition:<br />

u(ξ) moves along the curve asξ increases from0to1.<br />

1.2<br />

p. 29<br />

In the case of the elastic string model the basic units are<br />

1.2<br />

p. 31<br />

Interpretation of curve parameterξ: “virtual time”<br />

➣<br />

∥ ∥u ′∥ ∥ ˆ= “speed” with which curve is traversed<br />

∫ 1 ∥<br />

➣ ∥u ′ (ξ) ∥ dξ ˆ= length of curve<br />

0<br />

✎ notation: ‖·‖ ˆ= Euclidean norm of a vector∈ R n<br />

➣ parametrization is supposed to be locally injective:<br />

∀ξ ∈]0,1[: ∃ǫ > 0: ∀η, |η −ξ| < ǫ: u(η) ≠ u(ξ) .<br />

Foru ∈ (C 1 ([0,1])) 2 we expect u ′ (ξ) ≠ 0 <strong>for</strong> all0 ≤ ξ ≤ 1<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

• unit of length1m,<br />

• unit of <strong>for</strong>ce1N.<br />

Thus, non-dimensional equations arise from fixing a reference lengthl 0 and a reference <strong>for</strong>cef 0 .<br />

Below, following a (bad) habit of mathematicians, physical units will be routinely dropped, which tacitly<br />

assumes a priori scaling.<br />

Quantities that have to be specified to allow the unique determination of a comfiguration in a mathematical<br />

model are called problem data/parameters. In the elastic string model the problem parameters<br />

are<br />

△<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

✎<br />

notation:<br />

′ ˆ= derivative w.r.t. curve parameter, hereξ<br />

the boundary conditions (1.2.1),<br />

the <strong>for</strong>ce fieldf : [0,1] ↦→ R 2 ,[f] = 1N,f(ξ) ˆ= <strong>for</strong>ce “pulling at” a material pointξ.<br />

△<br />

1.2<br />

p. 30<br />

Special case: gravitational <strong>for</strong>cef(ξ) := −gρ(ξ) ( 0<br />

1<br />

) ,0 ≤ ξ ≤ 1,g = 9.81ms −2<br />

with densityρ : [0,1] ↦→ R + ,[ρ] = kg,<br />

1.2<br />

p. 32


local elastic material properties, see Sect. 1.2.3.<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Models, <strong>for</strong> which configurations can be described by means of finitely many real numbers are called<br />

discrete. Hence, the mass-spring model is a discrete model, see Sect. 1.5.<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

1.2.2 Mass-spring model<br />

Idea:<br />

model string as a system of many simple components that interact in simple ways<br />

Rubber band<br />

elastic string<br />

Fig. 5<br />

Assumption: linear springs ↔ Hooke’s law<br />

↔<br />

m 8<br />

R<br />

m m 7 1<br />

m 2 m 6<br />

m 3 m4<br />

m 5<br />

Fig. 6<br />

n point masses connected withn+1 springs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

1.2<br />

p. 33<br />

Total elastic energy of mass-spring model in configuration (u 1 ,...,u n ) ∈ (R 2 ) n :<br />

(1.2.6) ⇒ J (n)<br />

el = J (n) n∑<br />

el (u 1 ,...,u n ) := 2<br />

1 κ i ∥<br />

( ∥u i+1 −u i∥ ∥ ∥−li ) 2 , (1.2.7)<br />

l<br />

i=0} i<br />

{{ }<br />

elastic energy ofi-th spring<br />

where u 0 := ( a) ua ,u n+1 := ( b)<br />

ub (pinning positions (1.2.1)),<br />

κ i ˆ= spring constant ofi-th spring,i = 0,...,n,<br />

l i > 0 ˆ= equilibrium length ofi-th spring.<br />

where<br />

Total “gravitational” energy of mass-spring model in configuration(u 1 ,...,u n ) due to external<br />

<strong>for</strong>ce field:<br />

J (n)<br />

f = J (n)<br />

f (u 1 ,...,u n ) := −<br />

f i ˆ= <strong>for</strong>ce acting oni-th mass,i = 1,...,n.<br />

n∑<br />

f i·u i , (1.2.8)<br />

i=1<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

1.2<br />

p. 35<br />

Force<br />

( ) l<br />

F(l) = κ −1<br />

l 0<br />

(relative elongation) . (1.2.5)<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

✎ notation: u·v := u T ∑<br />

v = n u i v i ˆ= inner product of vectors in R n .<br />

j=1<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

κ ˆ= spring constant (stiffness),[κ] = 1N,κ > 0,<br />

l 0 ˆ= equilibrium length of (relaxed) spring.<br />

Known from classical mechanics, static case:<br />

equilibrium principle<br />

elastic energy stored in linear spring at lengthl > 0<br />

∫ l<br />

E el = F(τ)dτ = 1 κ<br />

(l−l<br />

l 0<br />

2l 0 ) 2 R. Hiptmair<br />

, [E el ] = 1J . (1.2.6)<br />

0<br />

DRAFT<br />

Configuration space <strong>for</strong> mass-spring model:<br />

u i ∈ R 2 ˆ= position ofi-th mass point,i = 1,...,n<br />

➣ finite-dimensional configuration space = (R 2 ) n<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

1.2<br />

p. 34<br />

systems attains configuration(s) of minimal (potential) energy<br />

J (n) := J (n)<br />

el +J (n)<br />

f<br />

equilibrium configurationu 1 ∗,...,u n ∗ of mass-spring system solves<br />

(u 1 ∗,...,u n ∗) = argmin<br />

(u 1 ,...,u n )∈R 2n J (n) (u 1 ,...,u n ) . (1.2.9)<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

1.2<br />

p. 36


J<br />

Plot ofJ (1) (u 1 )<br />

✄<br />

150<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Assumption: equal equilibrium lengths of all springs l i = L ,L > 0,<br />

n+1<br />

➣ L ˆ= equilibrium length of elastic string: L = ∑ i l i,[L] = 1m.<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

100<br />

Mass-spring system with only one point mass<br />

(non-dimensional l 1 = l 2 = 1, κ 1 = κ 2 = 1,<br />

u 0 = ( 0) 0 ,u 2 = ( 1 )<br />

0.2 ,f 1 = ( 0 )<br />

−1 )<br />

50<br />

0<br />

−50<br />

10<br />

5<br />

0<br />

y<br />

−5<br />

−10<br />

−10<br />

−5<br />

x<br />

0<br />

5<br />

10<br />

Fig. 7<br />

Equilibrium configuration of mass-spring system✄<br />

0.2<br />

0.1<br />

n = 5<br />

n = 10<br />

n = 20<br />

n = 40<br />

n = 80<br />

0<br />

Note: solutions of (1.2.9) need not be unique !<br />

∑<br />

To see this, consider the case L := n ∥<br />

l i > ∥u n+1 −u 0∥ ∥ and f ≡ 0 (slack ensemble of springs<br />

i=0<br />

without external <strong>for</strong>cing). In this situation many crooked arrangements of the masses will have zero<br />

total potential energy.<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

(non-dimensionall i = n+1 L , κ i = 1, m i = n 1 , f i =<br />

1<br />

( 0<br />

n<br />

)<br />

−1 ,L = 1,nvarying)<br />

−0.2<br />

−0.3<br />

−0.2 0 0.2 0.4 0.6 0.8 1 1.2<br />

u(1)<br />

−0.1<br />

u(0)<br />

Fig. 9<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

1.2<br />

p. 37<br />

1.2<br />

p. 39<br />

u(1)<br />

0.4<br />

0.2<br />

0<br />

−0.2<br />

−0.4<br />

−0.6<br />

−0.8<br />

−1<br />

−1.2<br />

−0.2 0 0.2 0.4 0.6 0.8 1 1.2<br />

u(0)<br />

1.2.3 Continuum limit<br />

L = 0.5<br />

L = 1<br />

L = 1.5<br />

Fig. 8<br />

✁ minimal energy configuration of a mass spring<br />

system <strong>for</strong> variableL.<br />

(n = 10, non-dimensional κ i = 1, l i = L/n, i =<br />

1,...,10)<br />

Heuristics: elastic string = spring-mass system with “infinitely many infinitesimal masses”<br />

Policy:<br />

and “infinitesimally short” springs.<br />

consider sequence(SMM n ) n∈N of spring-mass systems withnmasses,<br />

identify material coordinate (→ Rem. 1.2.3) of point masses,<br />

choose system parameters with meaningful limits,<br />

derive expressions <strong>for</strong> energies asn → ∞,<br />

use them to define the “continuous elastic string model”.<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

1.2<br />

p. 38<br />

u 2<br />

m 8<br />

m 1<br />

m 7<br />

m 2 m 6<br />

m 3 m 4<br />

m 5<br />

u 1<br />

0<br />

Fig.<br />

ξ 1 ξ 2 ξ 3 ξ 4 ξ 5 ξ 6 ξ 7 ξ 8<br />

m 1<br />

10ξ<br />

masses are uni<strong>for</strong>mly spaced on string u :<br />

[0,1] ↦→ R 2<br />

➣ material coordinate ofi-th mass inSMM n :<br />

ξ (n)<br />

i := i<br />

n+1 : ui := u(ξ (n)<br />

i )<br />

In the spring-mass model each spring has its own stiffness κ i and every mass point its own <strong>for</strong>ce f i<br />

acting on it. When considering the “limit” of a sequence of spring-mass models, we have to detach<br />

stiffness and <strong>for</strong>ce from springs and masses and attach them to material points, cf. Rem. 1.2.3. In<br />

other words stiffnessκ i and <strong>for</strong>cef i have to be induced by a stiffness functionκ(ξ) and <strong>for</strong>ce function<br />

f(ξ). This linkage has to be done in a way to allow <strong>for</strong> a meaningful limit n → ∞ <strong>for</strong> the potential<br />

energy.<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

1.2<br />

p. 40


“Limit-compatible” system parameters:<br />

(ξ (n)<br />

i+1/2 := 1 2 (ξ(n) i+1 +ξ(n) i<br />

))<br />

κ i = κ(ξ (n)<br />

i+1/2 ) with integrable stiffness functionκ : [0,1] ↦→ R+ ,<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Tool: Taylor expansion: <strong>for</strong>u = ( u ) 1<br />

u ∈ C 2 with derivativeu<br />

′ ,1 ≫ η → 0<br />

2<br />

√<br />

‖u(ξ +η)−u(ξ −η)‖ = (u 1 (ξ +η)−u 1 (ξ −η)) 2 +(u 2 (ξ +η)−u 2 (ξ −η)) 2<br />

√<br />

= (2u ′ 1 (ξ)η +O(η3 )) 2 +(2u ′ 2 (ξ)η +O(η3 )) 2<br />

(1.2.13)<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

f i =<br />

ξ (n)<br />

i+1/2<br />

∫<br />

ξ (n)<br />

i−1/2<br />

f(ξ)dξ “lumped <strong>for</strong>ce”, integrable <strong>for</strong>ce fieldf : [0,1] ↦→ R 2<br />

energies, see (1.2.7), (1.2.8)<br />

J (n) n∑<br />

(<br />

el (u) = 2<br />

1 n+1 ∥∥∥u(ξ L κ(ξ(n) i+1/2 ) (n)<br />

i+1 )−u(ξ(n) ∥<br />

i ) ∥− L ) 2<br />

, (1.2.10)<br />

n+1<br />

i=0<br />

J (n) n∑<br />

f (u) = −<br />

i=1<br />

ξ (n)<br />

i+1/2<br />

∫<br />

ξ (n)<br />

i−1/2<br />

f(ξ)dξ ·u(ξ (n)<br />

i ) . (1.2.11)<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

1.2<br />

p. 41<br />

Apply this to (1.2.10) withη = 1 2 1<br />

n+1 <strong>for</strong>n → ∞<br />

J (n) n∑<br />

el (u) = 1 2<br />

i=0<br />

= 1 1<br />

n∑<br />

2Ln+1<br />

i=0<br />

= 2η ∥ ∥u(ξ) ′∥ ∥ √ 1+O(η 2 ) = 2η ∥ ∥u ′ (ξ) ∥ ∥+O(η 2 ) .<br />

∥<br />

∥u ′ (ξ (n) ∥ ∥∥+O(<br />

n+1 i+1/2 ) 1 L ) 2<br />

(n+1) 2)− n+1<br />

( ∥∥∥u<br />

κ(ξ (n)<br />

i+1/2 ) ′ (ξ (n) ∥ ) (1.2.14)<br />

∥∥+O(<br />

i+1/2 ) 1 2<br />

n+1 )−L<br />

n+1<br />

L κ(ξ(n) i+1/2 ) ( 1<br />

Consideration: integral as limit of Riemann sums, see [29, Sect. 6.2]:<br />

q ∈ C 0 1<br />

n∑<br />

([0,1]): lim q( j +1/2 ∫ 1<br />

n→∞n+1<br />

n+1 ) = q(ξ)dξ . (1.2.15)<br />

j=0<br />

0<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

1.2<br />

p. 43<br />

Assumption:<br />

u ∈ (C 2 ([0,1])) 2 (twice continuously differentiable)<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

⇒ J el (u) = lim<br />

n→∞ J(n) el (u) = 1 ∫1<br />

κ(ξ) (∥ ∥u ′ (ξ) ∥ ∥−L ) 2 dξ . (1.2.16)<br />

2L<br />

0<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

➊<br />

Simple limit <strong>for</strong> potential energy due to external <strong>for</strong>ce:<br />

Equilibrium condition <strong>for</strong> limit model<br />

(minimal total potential energy):<br />

➋<br />

n J f (u) = lim<br />

n→∞ J(n) f (u) = lim<br />

n→∞ − ∑<br />

i=1<br />

Limit of elastic energy:<br />

ξ (n)<br />

i+1/2<br />

∫<br />

ξ (n)<br />

i−1/2<br />

∫1<br />

f(ξ)dξ ·u(ξi n ) = − f(ξ)·u(ξ)dξ . (1.2.12)<br />

0<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

∫1<br />

κ(ξ) (∥<br />

u ∗ = argmin ∥ u ′ (ξ) ∥ ∥−L ) 2 −f(ξ)·u(ξ)dξ<br />

u∈(C 1 ([0,1])) 2 & (1.2.1)<br />

2L<br />

0<br />

} {{ }<br />

=:J(u)<br />

. (1.2.17)<br />

total potential energy functional,[J] = 1J<br />

= a minimization problem in a function space !<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Example 1.2.18 (Tense string without external <strong>for</strong>cing).<br />

1.2<br />

p. 42<br />

1.2<br />

p. 44


Setting:<br />

no external <strong>for</strong>ce: f ≡ 0<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

1.3 Variational approach<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

homogeneous string:<br />

κ = κ 0 = const<br />

tense string:<br />

L < ‖u(0)−u(1)‖<br />

(➣ positive elastic energy) Fig. 11<br />

∫1<br />

κ<br />

(1.2.17) ⇔ u ∗ = argmin 0 (∥ ∥ u ′ (ξ) ∥ ∥−L ) 2 dξ . (1.2.19)<br />

u∈(C 1 ([0,1])) 2 & (1.2.1)<br />

2L<br />

0<br />

Note: in (1.2.19)uentersJ only throughu ′ !<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

We face the task of minimizing a functional over an ∞-dimensional function space. In this section<br />

necessary conditions <strong>for</strong> the minimizer will <strong>for</strong>mally be derived in the <strong>for</strong>m of variational equations.<br />

This idea is one of the cornerstone of a branch of analysis called calculus of variations.<br />

We will not dip into this theory, but per<strong>for</strong>m manipulations at a <strong>for</strong>mal level. Yet, all considerations<br />

below can be justified rigorously.<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Constraint onu ′ : by triangle inequality <strong>for</strong> integrals, see [29, Sect. 6.3]<br />

∫ 1<br />

l := ‖u(1)−u(0)‖ =<br />

u ′ ∫ 1<br />

(ξ)dξ<br />

∥ 0 ∥ ≤ ∥<br />

∥u ′ (ξ) ∥ dξ . (1.2.20)<br />

0<br />

1.3.1 Virtual work equation<br />

➥ Consider related minimization problem<br />

⎧<br />

⎪⎨ ∫1 w ∈ (C<br />

κ 0 ([0,1])) 2 ⎫<br />

, ⎪⎬<br />

w ∗ = argmin 0<br />

(w−L) 2 dξ:<br />

∫ 1<br />

w ⎪⎩ 2L w(ξ)dξ ≥ l ⎪⎭ . (1.2.21)<br />

0 0<br />

⇒ unique solution w ∗ (ξ) = l (constant solution)<br />

∥<br />

∥u ′ (ξ) ∥ = l and the boundary conditions (1.2.1) are satisfied <strong>for</strong> the straight line solution of (1.2.19)<br />

u ∗ (ξ) = (1−ξ)u(0)+ξu(1) .<br />

1.2<br />

p. 45<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

✎ notation: C k 0 ([0,1]) := {v ∈ Ck ([0,1]):v(0) = v(1) = 0},k ∈ N 0<br />

Main “idea of calculus of variations”:<br />

u ∗ solves (1.2.17) ⇒ J(u ∗ ) ≤ J(u ∗ +tv) ∀t ∈ R, v ∈ (C 2 0 ([0,1]))2 . (1.3.1)<br />

ϕ(t) := J(u ∗ +tv) has global minimum <strong>for</strong>t = 0<br />

Ifϕdifferentiable, then<br />

dϕ<br />

dt (0) = 0<br />

Note: v(0) = v(1) = 0, because we must not tamper with the pinning conditions (1.2.1).<br />

1.3<br />

p. 47<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

It is exactly the “straight string” solution that physical intuition suggests.<br />

Rule:<br />

Variationvmust vanish where argument functionuis fixed.<br />

✸<br />

1.3<br />

p. 46<br />

Computation of dϕ<br />

dt (0) <strong>for</strong> J from (1.2.17) amounts to computing a “configurational derivative” in directionv.<br />

1.3<br />

p. 48


We pursue a separate treatment of energy contributions (This also demonstrates a simple <strong>for</strong>mal<br />

approach to computing configurational derivatives.):<br />

➊<br />

Potential energy (1.2.12) due to external <strong>for</strong>ce:<br />

∫1 ∫1<br />

J<br />

lim f (u ∗ +tv)−J f (u ∗ ) 1<br />

= − lim f(ξ)·tv(ξ)dξ = − f(ξ)·v(ξ)dξ . (1.3.2)<br />

t→0 t t→0 t<br />

0<br />

0<br />

➋ Elastic energy (1.2.16): more difficult, tool: Taylor expansion [29, Sect. 5.5]<br />

Analoguous to (1.2.13),x ∈ R 2 \{0},h ∈ R 2 , <strong>for</strong> R ∋ t → 0<br />

√<br />

√<br />

‖x+th‖ = (x 1 +th 1 ) 2 +(x 2 +th 2 ) 2 = ‖x‖ 2 +2tx·h+t 2 ‖h‖ 2<br />

= ‖x‖ √ x·h 1+2t<br />

‖x‖ 2 +t2‖h‖2<br />

‖x‖ 2 = ‖x‖+tx·h<br />

‖x‖ +O(t2 ) ,<br />

(1.3.3)<br />

√ where we used the truncated Taylor series <strong>for</strong> 1+x<br />

√<br />

1+δ = 1+ 1<br />

2 δ +O(δ 2 ) <strong>for</strong> δ → 0 . (1.3.4)<br />

Use (1.3.3) in the perturbation analysis <strong>for</strong> the elastic energy:<br />

( ∥ ∥u ′ (ξ)+tv ′ (ξ) ∥ ( ∥∥<br />

∥−L) 2 = u ′ (ξ) ∥ ∥+t u′ (ξ)·v ′ ) 2<br />

(ξ)<br />

‖u ′ +O(t 2 )−L<br />

(ξ)‖<br />

= (∥ ∥u ′ (ξ) ∥ ∥−L ) 2 (∥<br />

+2t ∥ u ′ (ξ) ∥ ∥−L ) u ′ (ξ)·v ′ (ξ)<br />

‖u ′ +O(t 2 ) .<br />

(ξ)‖<br />

J el (u+tv)−J el (u) = t ∫1<br />

κ(ξ) (∥ ∥u ′ (ξ) ∥ ∥−L )u′ (ξ)·v ′ (ξ)<br />

L<br />

‖u ′ +O(t 2 )dξ . (1.3.5)<br />

(ξ)‖<br />

0<br />

∫1<br />

J<br />

lim el (u ∗ +tv)−J el (u ∗ )<br />

=<br />

t→0 t<br />

0<br />

κ(ξ)<br />

L<br />

(∥ ∥ u ′ (ξ) ∥ ∥−L )u′ (ξ)·v ′ (ξ)<br />

‖u ′ dξ . (1.3.6)<br />

(ξ)‖<br />

Here we take <strong>for</strong> granted ∥ ∥u ′ (ξ) ∥ ∥ ≠ 0, which is an essential property of a meaningful parameterization<br />

of the elastic string, see Rem. 1.2.2.<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

1.3<br />

p. 49<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Necessary condition <strong>for</strong> u ∗ solving (1.2.17)<br />

∫1<br />

0<br />

κ(ξ)<br />

L<br />

(∥ ∥ u ′ ∗(ξ) ∥ ∥−L )u′ ∗(ξ)·v ′ (ξ)<br />

∥<br />

∥u ′ ∗(ξ) ∥ −f(ξ)·v(ξ)dξ = 0 ∀v ∈ (C0 2 ([0,1]))2 . (1.3.7)<br />

This is a non-linear variational equation on domainΩ = [0,1]<br />

Remark 1.3.8 (Differentiating a functional on a space of curves).<br />

For aC 2 -function F : R d ×R d ↦→ R,d ∈ N, consider the functional<br />

∫ 1<br />

J : (Cpw([0,1])) 1 d ↦→ R , J(u) := F(u ′ (ξ),u(ξ))dξ .<br />

0<br />

Use the multidimensional Taylor’s <strong>for</strong>mula [29, Satz 7.5.2]<br />

F(u+δu,v+δv) = F(u,v)+D 1 F(u,v)δu+D 2 F(u,v)δv+O(‖δu‖ 2 +‖δv‖ 2 ) . (1.3.9)<br />

Here, D 1 F and D 2 F are the partial derivatives of F w.r.t the first and second vector argument,<br />

respctively. These are row vectors.<br />

∫ 1<br />

J(u+tv) = J(u)+t D 1 F(u ′ (ξ),u(ξ))v ′ (ξ)+D 2 F(u ′ (ξ),u(ξ))v(ξ)dξ+O(t ) . (1.3.10)<br />

}<br />

0<br />

{{ }<br />

“directional derivative” (D u J)(u)(v)<br />

The derivativesu ′ ,v ′ are just regular 1D derivatives w.r.t. the parameterξ. They yield column vectors.<br />

Hence, we deal with a scalar integrand.<br />

Remark 1.3.11 (Virtual work principle).<br />

In statics, the derivation of variational equations from energy minimization (equilibrium principle, see<br />

(1.2.9)) is known as the method of virtual work: Small admissible changes of the equilibrium configuration<br />

of the system invariably entail active work.<br />

Remark 1.3.12 (Non-linear variational equation).<br />

△<br />

△<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

1.3<br />

p. 51<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Now we unravel the structure behind the non-linear variational problem (1.3.7).<br />

1.3<br />

p. 50<br />

Recall essential terminology from linear algebra:<br />

1.3<br />

p. 52


Definition 1.3.13 ((Bi-)linear <strong>for</strong>ms).<br />

Given an R-vector space V , a linear <strong>for</strong>m (linear functional) l is a mapping f : V ↦→ R that<br />

satisfies<br />

l(αu+βv) = αl(u)+βl(v) ∀u,v ∈ V , ∀α,β ∈ R .<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Explanation of terminology:<br />

• trial space ˆ= the function space in which we seek the solution<br />

• test space ˆ= the space of eligible test functionsv in a variational problem like (1.3.14)<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

A bilinear <strong>for</strong>maonV is a mappinga : V ×V ↦→ R, <strong>for</strong> which<br />

a(α 1 v 1 +β 1 u 1 ,α 2 v 2 +β 2 u 2 ) =<br />

= α 1 α 2 a(v 1 ,v 2 )+α 1 β 2 a(v 1 ,u 2 )+β 1 α 2 a(u 1 ,v 2 )+β 1 β 2 a(u 1 ,u 2 )<br />

<strong>for</strong> allu i ,v i ∈ V ,α i ,β i ∈ R,i = 1,2.<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

The two spaces need not be the same:<br />

V ≠ V 0 is common and already indicated by the notation.<br />

For many variational problem, which are not examined in this course, they may even comprise<br />

functions with different smoothness properties.<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

✎ notation: a,b,... ˆ= bilinear <strong>for</strong>ms<br />

In the case of (1.3.7) we make a very important observation, namely that, keeping u ∗ fixed, the left<br />

hand side is a linear functional (linear <strong>for</strong>m) in the test functionv:<br />

Structure of<br />

∫1<br />

(∥ ∥ u ′ ∗(ξ) ∥∥ −L )u′ ∗(ξ)·v ′ (ξ)<br />

∥<br />

∥u ′ ∗(ξ) ∥ −f(ξ)·v(ξ)dξ = 0 ∀v ∈ (C0 2 ([0,1]))2 : (1.3.7)<br />

κ(ξ)<br />

L<br />

0<br />

✄ abstract non-linear variational equation<br />

u ∈ V: a(u;v) = l(v) ∀v ∈ V 0 , (1.3.14)<br />

1.3<br />

p. 53<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

In concrete terms (<strong>for</strong> elastic string continuum model):<br />

V 0 := (C 2 0 ([0,1]))2 ,<br />

V := {u ∈ (C 2 ([0,1])) 2 : u(0) =<br />

(<br />

a<br />

u a<br />

)<br />

, u(1) =<br />

(<br />

b<br />

u b<br />

)<br />

= [ξ ↦→ (1−ξ)u(0)+ξu(1)] +V<br />

} {{ } 0 , (1.3.16)<br />

=:u 0<br />

∫ 1<br />

l(v) := f(ξ)·v(ξ)dξ , (1.3.17)<br />

0<br />

∫1<br />

a(u;v) :=<br />

0<br />

κ(ξ)<br />

L<br />

(∥ ∥ u ′ (ξ) ∥ ∥−L )u′ (ξ)·v ′ (ξ)<br />

‖u ′ dξ . (1.3.18)<br />

(ξ)‖<br />

Thus, <strong>for</strong> variational problem (1.3.7) arising from the elastic string model we find the common pattern<br />

V = V 0 +u 0 , that is, the trial space is an affine space, arising from the test space V 0 by adding an<br />

offset functionu 0 .<br />

}<br />

1.3<br />

p. 55<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

V 0 ˆ= (real) vector space of functions,<br />

V ˆ= affine space of functions: V = u 0 +V 0 , with offset functionu 0 ∈ V ,<br />

l ˆ= a linear mappingV 0 ↦→ R, a linear <strong>for</strong>m,<br />

a ˆ= a mappingV ×V 0 ↦→ R, linear in the second argument, that is<br />

a(u;αv +βw) = αa(u;v)+βa(u;w) ∀u ∈ V , v,w ∈ V 0 , α,β ∈ R . (1.3.15)<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

IfV = V 0 +u 0 , then there is a way to recast (1.3.14) as a variational problem with the same trial and<br />

test spaceV 0 :<br />

Rewriting (1.3.14) using the offset functionu 0 ∈ V :<br />

(1.3.14) ⇒ w ∈ V 0 : a(u 0 +w;v) = l(v) ∀v ∈ V 0 and u = u 0 +w . (1.3.19)<br />

△<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Terminlogy related to variational problem (1.3.14): V is called trial space<br />

V 0 is called<br />

test space<br />

1.3<br />

p. 54<br />

1.3.2 Regularity requirements<br />

1.3<br />

p. 56


Issue:<br />

The derivation of the continuum models (1.2.17) (→ Sect. 1.2.3) and (1.3.7) was based on<br />

the assumptionu ∈ (C 2 ([0,1])) 2 .<br />

Is u ∈ (C 2 ([0,1])) 2 required to render the minimization problem (1.2.17)/variational problem<br />

1.2.3) meaningful?<br />

We will find that curves with less smoothness can still yield relevant solutions of<br />

(1.2.17)/(1.3.7).<br />

Obvious (→ Rem. 1.2.2): u ∈ (C 0 ([0,1])) 2<br />

Observation:<br />

u ∗ =<br />

argmin<br />

∫1<br />

(string must not be torn)<br />

κ(ξ) (∥ ∥ u ′ (ξ) ∥ ∥−L ) 2 −f(ξ)·u(ξ)dξ . (1.2.17)<br />

2L<br />

u∈(C 1 ([0,1])) 2 & (1.2.1)<br />

0<br />

J(u) from (1.2.17),a,lfrom (1.3.18) well defined <strong>for</strong><br />

merely continuous, piecewise continuously differentiable functionsu,v : [0,1] ↦→ R 2 ,<br />

➣ u ′ will be piecewise continuous and can be integrated.<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

➩<br />

u 2 /f(ξ)<br />

(a,u a )<br />

<strong>for</strong>ce<br />

u 1 /ξ<br />

a/0 b/1<br />

✔<br />

discontinuousf<br />

u ∗ ∉ (C 2 ([0,1])) 2 physically meaningful:<br />

(b,u b )<br />

Fig. 14<br />

u ∗ ∈ (C 1 ([0,1])) 2 <strong>for</strong> discontinuousf<br />

merelyu ∗ ∈ (C 0 ([0,1])) 2 <strong>for</strong> point <strong>for</strong>ce concentrated<br />

inξ 0) : kink atξ 0 !<br />

u 2 /f(ξ)<br />

(a,u a )<br />

(b,u b )<br />

u 1 /ξ<br />

a/0 ξ 0 b/1<br />

<strong>for</strong>ce<br />

Fig. 15<br />

✔ point <strong>for</strong>cef(x) = δ(ξ −ξ 0 ) ( 0)<br />

1<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

mere integrability ofκ,f sufficient.<br />

✎ notation: Cpw([a,b]) k ˆ= globallyC k−1 and piecewisek-times continuously differentiable functions<br />

on [a,b] ⊂ R: <strong>for</strong> each v ∈ Cpw([a,b]) k there is a finite partition {a =<br />

τ 0 < τ 1 < ··· < τ m = b} such that v |]τi−1 ,τ i [ can be extended to a function<br />

∈ C k ([τ i−1 ,τ i ]). Cpw([a,b]) 0 ˆ= piecewise continuous functions with only a finite<br />

number of discontinuities.<br />

u ∈ C 1 pw([0,1])<br />

u ′ ∈ Cpw([0,1])<br />

0<br />

0 x 1 x 2 x 3 ··· 1<br />

0 x 1 x 2 x 3 ···<br />

Fig. 1 12 Fig. 13<br />

1.3<br />

p. 57<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

1.3.3 <strong>Differential</strong> equation<br />

Consider non-linear variational equation (1.3.7):<br />

∫1<br />

0<br />

κ(ξ)<br />

L<br />

Fig. 16<br />

✸<br />

(∥ ∥ u ′ (ξ) ∥ ∥−L )u′ (ξ)·v ′ (ξ)<br />

‖u ′ −f(ξ)·v(ξ)dξ = 0 ∀v ∈ (C 1 (ξ)‖<br />

0,pw ([0,1]))2 . (1.3.7)<br />

Assumption: u ∈ (C 2 ([0,1])) 2 &κ ∈ C 1 ([0,1]) &f ∈ (C 0 ([0,1])) 2 (1.3.21)<br />

1.3<br />

p. 59<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Example 1.3.20 (Non-smooth external <strong>for</strong>cing).<br />

Setting:<br />

κ = const (homogeneous string)<br />

1.3<br />

p. 58<br />

Recall: integration by parts <strong>for</strong>mula [29, Satz 6.1.2]:<br />

∫1<br />

0<br />

∫1<br />

u(ξ)v ′ (ξ)dξ = −<br />

0<br />

u ′ (ξ)v(ξ)+(u(1)v(1)−u(0)v(0))<br />

} {{ }<br />

boundary terms<br />

∀u,v ∈ C 1 pw([0,1]) . (1.3.22)<br />

1.3<br />

p. 60


Apply to elastic energy contribution in (1.3.7):<br />

∫1<br />

0<br />

( κ(ξ) (∥ ∥ u ′ (ξ) ∥ ∥−L ) u′ )<br />

(ξ)<br />

L ‖u ′ ·v ′ (ξ)−f(ξ)·v(ξ)dξ<br />

(ξ)‖<br />

∫1<br />

=<br />

0<br />

{<br />

− d dξ<br />

( κ(ξ) (∥ ∥ u ′ (ξ) ∥ ∥−L ) u ′ ) }<br />

(ξ)<br />

L ‖u ′ −f(ξ) ·v(ξ)dξ .<br />

(ξ)‖<br />

Note: v(0) = v(1) = 0 ⇒ boundary terms vanish !<br />

(1.3.7) ⇒<br />

∫1 {<br />

− d ( κ(ξ) (∥ ∥ u ′ (ξ) ∥ ∥−L ) u′ ) }<br />

(ξ)<br />

dξ L ‖u ′ −f(ξ) ·v(ξ)dξ = 0<br />

(ξ)‖<br />

0 } {{ }<br />

∈Cpw([0,1])<br />

0<br />

∀v ∈ (C 1 0 ([0,1]))2<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Minimization problem<br />

(1.2.17)<br />

u ∗ = argminJ(v)<br />

v∈V<br />

❶<br />

⇒<br />

Variational problem<br />

(1.3.7)<br />

a(u;v) = f(v) ∀v<br />

❷<br />

⇒<br />

❶: equivalence (“⇔”) holds if minimization problem has unique solution<br />

Two-point BVP<br />

F(u,u ′ ,u ′′ ) = f ,<br />

u(0),u(1) fixed .<br />

❷: meaningful two-point BVP stipulates extra regularity (smoothness) ofu, see Rem. 1.3.25.<br />

Terminology:<br />

{ }<br />

minimization problem (1.2.17)<br />

variational problem (1.3.7)<br />

is called the weak <strong>for</strong>m of the string model,<br />

Two-point boundary value problem (1.3.24), (1.2.1) is called the strong <strong>for</strong>m of the<br />

string model.<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

A solutionuof (1.3.24), <strong>for</strong> which all occurring derivatives are continuous is called<br />

a classical solution of the two-point BVP.<br />

✬<br />

Lemma 1.3.23 (fundamental lemma of the calculus of variations).<br />

Letf ∈ C 0 pw([a,b]),−∞ < a < b < ∞, satisfy<br />

∫ b<br />

f(ξ)v(ξ)dξ = 0 ∀v ∈ C k ([a,b]), v(a) = v(b) = 0 .<br />

a<br />

<strong>for</strong> somek ∈ N 0 . This impliesf ≡ 0.<br />

✫<br />

✩<br />

✪<br />

1.3<br />

p. 61<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Remark 1.3.25 (Extra regularity requirements). → Ex. 1.3.20<br />

Minimization problem<br />

(1.2.17):<br />

=<br />

κ,f integrable,<br />

u piecewiseC 1<br />

Variational problem<br />

(1.3.7):<br />

κ,f integrable,<br />

u piecewiseC 1<br />

≠<br />

Two-point BVP:<br />

κ ∈ C 1 ([0,1]),<br />

f ∈ (C 0 ([0,1]) 2 ,<br />

u ∈ (C 2 ([0,1])) 2 .<br />

1.3<br />

p. 63<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Ass. (1.3.21) & (1.3.7)<br />

Lemma 1.3.23<br />

=⇒ − d dξ<br />

( κ(ξ) (∥ ∥ u ′ (ξ) ∥ ∥−L ) u′ )<br />

(ξ)<br />

L ‖u ′ = f(ξ) 0 ≤ ξ ≤ 1 .<br />

(ξ)‖<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

☞<br />

<strong>for</strong>mulation as a classical two-point BVP imposes (unduly) restrictive smoothness on solution<br />

and coefficient functions.<br />

✬<br />

△<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

✩DRAFT<br />

Ifκ ∈ C 1 ,f ∈ C 0 , then aC 2 -minimizer ofJ/aC 2 -solution of (1.3.7) solve the 2nd-order ODE<br />

− d ( κ(ξ) (∥ ∥ u ′∥ ∥−L ) u′ )<br />

dξ L ‖u ′ = f on [0;1] . (1.3.24)<br />

‖<br />

Lemma 1.3.26 (Classical solutions are weak solutions).<br />

For ˜κ ∈ C 1 ([0,1]), any classical solution of (1.3.24) also solves (1.3.7).<br />

✫<br />

Proof. (“Derivation of (1.3.24) reversed”)<br />

✪<br />

ODE (1.3.24) + boundary conditions (1.2.1) = two-point boundary value problem<br />

(on domainΩ = [0,1])<br />

1.3<br />

p. 62<br />

1.3<br />

p. 64


Multiply (1.3.24) withv ∈ C0,pw 1 ([0,1]) and integrate over[0,1]. The push a derivative ontov by using<br />

(1.3.22). ✷<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

☛ variational problem corresponding to (1.4.2): use<br />

‖x+th‖ 2 = ‖x‖+2tx·h+t 2 ‖h‖ 2 = ‖x‖+2tx·h+O(t 2 ) .<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

1.4 Simplified model<br />

Setting:<br />

➥<br />

expected:<br />

taut string<br />

L ≪ ‖u(0)−u(1)‖ . (1.4.1)<br />

∥<br />

∥u ′ ∗(ξ) ∥ ≫ L <strong>for</strong> all0 ≤ ξ ≤ 1 <strong>for</strong> solutionu ∗ of (1.2.17)<br />

“Intuitive asymptotics”: renormalize stiffness κ → ˜κ := L κ ,[˜κ] = Nm−1<br />

suppress equilibrium length: L = 0 in (1.2.17).<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

˜J(u+tv)−<br />

lim<br />

˜J(u) ∫1<br />

= ˜κ(ξ)u ′ (ξ)·v ′ (ξ)−f(ξ)·v(ξ) dξ = 0 , v ∈ (C<br />

t→0 t<br />

pw,0 1 ([0,1]))2 .<br />

0<br />

Variational equation satisfied by solutionũ ∗ of (1.4.2):<br />

∫ 1<br />

˜κ(ξ)u ′ ∗(ξ)·v ′ (ξ)−f(ξ)·v(ξ)dξ = 0 ∀v ∈ (Cpw,0 1 ([0,1]))2 . (1.4.4)<br />

0<br />

Remark 1.4.5 (Linear variational problems). → Rem. 1.3.12<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Simplified equilibrium model:<br />

ũ ∗ =<br />

∫1<br />

argmin<br />

2˜κ(ξ)∥ 1<br />

∥u ′ (ξ) ∥ 2 −f(ξ)·u(ξ)dξ<br />

u∈(Cpw([0,1])) 1 2 & (1.2.1)<br />

0<br />

} {{ }<br />

=:˜J(u)<br />

. (1.4.2)<br />

1.4<br />

p. 65<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

(1.4.4) has the structure (1.3.14)<br />

where now<br />

u ∈ V: a(u,v) = l(v) ∀v ∈ V 0 , (1.4.6)<br />

a : V 0 ×V 0 ↦→ R is a bilinear <strong>for</strong>m (→ Def. 1.3.13), that is, linear in both arguments.<br />

1.4<br />

p. 67<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

= a quadratic minimization problem in a function space !<br />

Remark 1.4.3 (Quadratic minimization problem).<br />

The functional (= mapping from a function space to R) ˜J from (1.4.2) has the structure<br />

˜J(u) = 1 2 a(u,u)−l(u) ,<br />

with a symmetric bilinear <strong>for</strong>ma : V ×V ↦→ R and a linear <strong>for</strong>ml : V ↦→ R.<br />

Minimization problems <strong>for</strong> functionals of this <strong>for</strong>m have been dubbed quadratic minimization problems.<br />

△<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

1.4<br />

p. 66<br />

In general, quadratic minimization problems give rise to linear variational problems .<br />

This can be confirmed by an elementary computation:<br />

J(u) = 1 2 a(u,u)−l(u)<br />

J(u+tv)−J(u) ta(u,v)+ 1 lim = lim 2 t2 a(v,v)−tl(v)<br />

= a(u,v)−l(v) ,<br />

t→0 t t→0 t<br />

where the bilinearity ofaand the linearity oflwas crucial, see Rem. 1.4.3.<br />

△<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

1.4<br />

p. 68


☛ Corresponding two-point boundary value problem: by integration by parts, see (1.3.22),<br />

∫1<br />

∫1<br />

˜κ(ξ)u ′ ∗(ξ)·v ′ (ξ)−f(ξ)·v(ξ)dξ =<br />

0<br />

Then use Lemma 1.3.23.<br />

0<br />

{<br />

− d (˜κ(ξ) d ) }<br />

dξ dξ u(ξ) −f(ξ) ·v(ξ)dξ<br />

∀v ∈ (C 1 pw,0 ([0,1]))2 .<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

Ifκ ∈ C 1 ,f ∈ C 0 , then aC 2 -solution of (1.4.4) solves the two-point BVP<br />

Special setting: “gravitational <strong>for</strong>ce” f(ξ) = −g(ξ)e 2<br />

− d (<br />

˜κ(ξ) du )<br />

dξ dξ (ξ) = f(ξ) , 0 ≤ ξ ≤ 1 ,<br />

( ) ( )<br />

(1.4.7)<br />

a b<br />

u(0) = , u(1) = .<br />

u a u b<br />

DRAFT<br />

(1.4.2) decouples into two minimizatin problems <strong>for</strong> the components ofu!<br />

∫1<br />

ũ 1,∗ = argmin 1<br />

u∈Cpw([0,1]),u(0)=a,u(1)=b<br />

1 2 ˜κ(ξ)(u ′ (ξ)) 2 dξ ,<br />

0<br />

(1.4.2) ⇒<br />

∫1<br />

ũ 2,∗ = argmin 2˜κ(ξ)(u′ 1 (ξ)) 2 +g(ξ)u(ξ) dξ .<br />

u∈Cpw 1 ([0,1]),u(0)=u a,u(1)=u b 0<br />

The minimization problem <strong>for</strong>ũ 1,∗ has a closed-<strong>for</strong>m solution:<br />

(1.4.8)<br />

∫<br />

b−a<br />

ξ<br />

ũ 1,∗ (ξ) = a+ ∫ 10 ˜κ −1 ˜κ −1 (τ)dτ , 0 ≤ ξ ≤ 1 . (1.4.9)<br />

(τ)dτ<br />

0<br />

This solution can easily be found by converting the minimization problem to a 2-point boundary value<br />

problem as was done above, cf. (1.4.4), (1.4.7).<br />

The minimization problem <strong>for</strong>ũ 2,∗ leads to the linear variational problem, cf. (1.4.4)<br />

ũ 2,∗ ∈ C 1 pw([0,1])<br />

ũ 2,∗ (0) = u a , ũ 2,∗ (1) = u b<br />

:<br />

∫1<br />

0<br />

∫1<br />

˜κ(ξ)ũ ′ 2,∗ (ξ)v′ (ξ)dξ = −<br />

0<br />

g(ξ)v(ξ)dξ ∀v ∈ C 1 0,pw ([0,1]) .<br />

(1.4.10)<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

1.4<br />

p. 69<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

1.4<br />

p. 70<br />

Remark 1.4.11 (Graph description of string shape).<br />

Focus: situation with vertical gravitational <strong>for</strong>ce, see (1.4.9), (1.4.10)<br />

u<br />

a<br />

(a,u l )<br />

Load functionĝ(x)<br />

u(x)<br />

(b,u r )<br />

b<br />

Fig. 17<br />

x<br />

Describe shape of string through graph of displacement<br />

function û ∗ = û ∗ (x), û : [a,b] ↦→ R<br />

(physical units[û] = 1m).<br />

boundary conditions:<br />

u ∗ (a) = u a , u ∗ (b) = u b . (1.4.12)<br />

û(x) = ũ 2,∗ (Φ −1 (x)) with Φ(ξ) := ũ 1,∗ (ξ) . (1.4.13)<br />

Here ũ 1,∗ (ξ), ũ 1,∗ (ξ) are the components of the curve description of the equilibrium shape of the<br />

string, see Sect. 1.2.1:<br />

u ∗ (ξ) =<br />

) (ũ1,∗ (ξ)<br />

, 0 ≤ ξ ≤ 1 .<br />

ũ 2,∗ (ξ)<br />

Of course, the graph description is possible only <strong>for</strong> special string shapes. It also hinges on the choice<br />

of suitable coordinates.<br />

Note: ξ ↦→ Φ(ξ) is monotone,Φ ′ (ξ) ≠ 0 <strong>for</strong> all0 ≤ ξ ≤ 1,Φ(0) = a,Φ(1) = b.<br />

By chain rule [29, Thm. 5.1.3]:<br />

v(ξ) = ̂v(Φ(ξ)) ⇒ v ′ (ξ) = d̂v<br />

dx (x)Φ′ (ξ) , x := Φ(ξ) . (1.4.14)<br />

Recall: trans<strong>for</strong>mation <strong>for</strong>mula <strong>for</strong> integrals in one dimension (substitution rule, x := Φ(ξ), “dx =<br />

Φ ′ (ξ)dξ”):<br />

q ∈ C 0 pw([0,1]):<br />

∫1 b=Φ(1) ∫<br />

1<br />

q(ξ)dξ = ̂q(x)|<br />

Φ ′ (Φ −1 (x)) |dx , ̂q(x) := g(Φ−1 (x)) . (1.4.15)<br />

0 a=Φ(0)<br />

← (1.4.14) & (1.4.15)<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

1.4<br />

p. 71<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

1.4<br />

p. 72


Variational problem of taut string problem described as a function of spatial coordinate:<br />

∫1<br />

0<br />

∫b<br />

˜κ(ξ)ũ ′ 2,∗ (ξ)v′ (ξ)dξ =<br />

∫1<br />

−<br />

0<br />

a<br />

∫b<br />

=<br />

a<br />

∫b<br />

g(ξ)v(ξ)dξ = −<br />

˜κ(Φ −1 (x))Φ ′ (ξ) dû<br />

dx (x)Φ′ (ξ) d̂v<br />

dx (x) 1<br />

|Φ ′ (ξ)| dx<br />

˜κ(Φ −1 (x))|Φ ′ (Φ −1 dû<br />

(x))| (x)d̂v<br />

} {{ } dx dx (x)dx ,<br />

=:̂σ(x)<br />

a<br />

g(Φ −1 (x))<br />

|Φ ′ (Φ −1 ̂v(x)dx .<br />

(x))|<br />

} {{ }<br />

=:ĝ(x), [ĝ]=Nm −1<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

✛<br />

✚<br />

Only option:<br />

<strong>Numerical</strong> algorithm<br />

Computer<br />

−−−−−−→<br />

Finitely many floating point operations<br />

<strong>Numerical</strong> algorithms can only operate on discrete models<br />

Continuous (PDE) model<br />

(“∞-dimensional”)<br />

Discretization<br />

−−−−−−−−→<br />

approximate solution<br />

Discrete model<br />

(“finitely many unknowns”)<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

✘<br />

✙<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Linear variational problem in physical space coordinate on spatial domainΩ = [a,b]:<br />

û ∗ ∈ C 1 pw([a,b]),<br />

û ∗ (a) = u a , û ∗ (b) = u b<br />

:<br />

∫b<br />

(assuming ̂σ ∈ C 1 ([a,b]))<br />

(1.4.16) ⇒<br />

a<br />

̂σ(x) dû ∗<br />

(x)d̂v ∫b<br />

dx dx (x)dx = −<br />

a<br />

ĝ(x)̂v(x)dx ∀̂v ∈ C 1 0,pw ([a,b]) .<br />

Two-point BVP<br />

{ (<br />

d<br />

̂σ(x) dû )<br />

∗<br />

dx dx (x) = ĝ(x) , a ≤ x ≤ b ,<br />

û ∗ (a) = u a , û ∗ (b) = u b .<br />

(1.4.16)<br />

(1.4.17)<br />

△<br />

1.4<br />

p. 73<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

as small as possible<br />

(only a few unknowns)<br />

as accurate as possible<br />

(good approximation (∗))<br />

as faithful as as possible<br />

(structure preserving)<br />

(∗): needs a measure <strong>for</strong> quality of a solution, usually a norm of the error, error = difference of<br />

exact/analytic and approximate solution.<br />

Remark 1.5.1 (“Physics based” discretization).<br />

Mass-spring model (→ Sect. 1.2.2) = discretization of the minimization problem (1.2.17) describing<br />

the elastic string.<br />

1.5<br />

p. 75<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

1.5 Discretization<br />

Goal:<br />

“computation” of a/the solutionu : [0,1] ↦→ R 2 of<br />

⎧<br />

⎨ minization problem (1.2.17)<br />

variational problem (1.3.7)<br />

⎩<br />

two-point BVP (1.3.24) & (1.2.1)<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

This discretization may be called “physics based”, because it is inspired by the (physical) context of<br />

the model.<br />

Note: Other approaches to discretization discussed below will lead to equations resembling the massspring<br />

model, see 1.5.1.2.<br />

△<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

a function: infinite amount of in<strong>for</strong>mation, see [18, Rem. 3.1.3].<br />

! Well, just provide a <strong>for</strong>mula <strong>for</strong>u (analytic solution): in general elusive<br />

<strong>for</strong> the above problems<br />

1.5<br />

p. 74<br />

This section will present a few strategies on how to derive discrete models <strong>for</strong> the problem of computing<br />

the shape of an elastic string. The different approaches start from different <strong>for</strong>mulations, some<br />

target the minization problem (1.2.17), or, equivalently, the variational problem (1.3.7), while others<br />

tackle the ODE (1.3.24) together with the boundary conditions (1.2.1).<br />

1.5<br />

p. 76


Remark 1.5.2 (Timestepping <strong>for</strong> ODEs).<br />

For initial value problems <strong>for</strong> ODEs, whose solutions are functions, too, we also face the problem of<br />

discretization: timestepping methods compute a finite number of approximate values of the solutions<br />

at discrete instances in time, see [18, Ch. 12].<br />

△<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Note that a subscript tag N distinguishes “discrete functions/quantities”, that is, functions/operators<br />

etc. that are associated with a finite dimensional space. In some contexts, N will also be an integer<br />

designating the dimension of a finite dimensional space.<br />

Formal presentation: V ,V 0 : (affine) function spaces,dimV 0 = ∞,<br />

V N ,V N,0 : subspacesV N ⊂V ,V N,0 ⊂V 0 , N := dimV N,0 ,dimV N < ∞.<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Remark 1.5.3 (Coefficients/data in procedural <strong>for</strong>m).<br />

For the elastic string model (→ Sect. 1.2.3) the stiffness κ(ξ), and <strong>for</strong>ce field f may not be available<br />

in closed <strong>for</strong>m (as <strong>for</strong>mulas).<br />

Instead they are usually given in procedural <strong>for</strong>m:<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Galerkin discretization of minimization problem <strong>for</strong> functionalJ : V ↦→ R:<br />

Continuous minimization problem<br />

u = argminJ(v) . (1.5.4)<br />

v∈V<br />

Galerkin disc.<br />

−−−−−−−−→<br />

Discrete minimization problem<br />

u N = argmin<br />

v N ∈V N<br />

J(v N ) . (1.5.5)<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

function k = kappa(xi);,<br />

function f = <strong>for</strong>ce(xi);,<br />

1.5<br />

p. 77<br />

Galerkin discretization of abstract (non-linear) variational problem (1.3.14), see Rem. 1.3.12<br />

1.5<br />

p. 79<br />

because they may be obtained<br />

as results of another computation,<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Continuous variational problem<br />

u ∈ V: a(u;v) = l(v) ∀v ∈ V 0 .<br />

(1.5.6)<br />

Galerkin disc.<br />

−−−−−−−−→<br />

Discrete variational problem<br />

u N ∈ V N : a(u N ;v N ) = l(v N )<br />

∀v N ∈ V N,0 . (1.5.7)<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

by interpolation from a table.<br />

Terminology: u N ∈ V N satisfying (1.5.5)/(1.5.7) is called a Galerkin solution of (9.2.21)/(9.3.62)<br />

viable discretizations must be able to deal with data in procedural <strong>for</strong>m!<br />

△<br />

R. Hiptmair V N is called the (Galerkin) trial space,V N,0 is the (Galerkin) test space.<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Remark 1.5.8 (Relationship between discrete minimization problem and discrete variational problem).<br />

Simple idea of first step of Galerkin discretization<br />

In Sect. 1.3.1 we discovered the equivalence<br />

⎧<br />

⎨ minization problem, e.g., (1.2.17)<br />

replace function spaceV/V<br />

In ⇕<br />

0 with<br />

⎩<br />

finite dimensional subspaceV<br />

variational problem, e.g. (1.3.7)<br />

N /V N,0<br />

Continuous minimization problem<br />

Continuous variational problem<br />

⇐⇒<br />

1.5<br />

(9.2.21)<br />

(9.3.62)<br />

1.5.1 Galerkin discretization<br />

p. 78<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

1.5<br />

p. 80


Now it seems that we have two different strategies <strong>for</strong> Galerkin discretization:<br />

1. Galerkin discretization via the discrete minimization problem (1.5.5),<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Below we will always make the assumption V = u 0 +V 0 .<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

2. Galerkin discretization based on the discrete variational problem (1.5.7).<br />

However,<br />

the above equivalence extends to the discrete problems!<br />

△<br />

More precisely, we have the commuting relationship:<br />

minization problem<br />

Galerkin discretization<br />

−−−−−−−−−−−−−→ discrete minimization problem<br />

⏐ ⏐<br />

Configurational ⏐↓ ⏐↓ Configurational<br />

derivative inV 0 derivative inV N,0<br />

(1.5.9)<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

However, a computer is clueless about a concept like “finite dimensional subspace”. What it can<br />

process are arrays of floating point numbers.<br />

Idea: choose basis B N = {b 1 N ,...,bN N } ofV N,0 : V N,0 = Span{B N }<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

variational problem<br />

Galerkin discretization<br />

−−−−−−−−−−−−−→ discrete variational problem .<br />

The commuting diagram means that the same discrete variational problem is obtained no matter<br />

whether<br />

insert basis representation into minimization problem (1.5.5)<br />

v N ∈ V N,0 ⇒ v N = u 0 +ν 1 b 1 N +···+ν Nb N N , ν i ∈ R , (1.5.13)<br />

and variational equation (1.5.7)<br />

1. the minimization problem is first restricted to a finite dimensional subspace and the result is converted<br />

into a variational problem according to the recipe of Sect. 1.3.1.<br />

1.5<br />

p. 81<br />

v N ∈ V N,0 ⇒ v N = ν 1 b 1 N +···+ν Nb N N , ν i ∈ R , (1.5.14)<br />

u N ∈ V N ⇒ u N = u 0 +µ 1 b 1 N +···+µ Nb N N , µ i ∈ R . (1.5.15)<br />

1.5<br />

p. 83<br />

2. or whether the variational problem derived from the minimization problem is restricted to the subspace.<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Remark 1.5.16 (Ordered basis of test space).<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

To see this, understand that the manipulations of Sect. 1.3.1 can be carried out <strong>for</strong> infinite and finite<br />

dimensional function spaces alike.<br />

△<br />

Once we have choosen a basis B and ordered it, as already indicated in the notation above, the<br />

test space V N,0 can be identified with R N : a coefficient vector ⃗µ = (µ 1 ,...,µ N ) T ∈ R N provides<br />

a unique characterization of a functionu ∈ V N,0 (basis property)<br />

Remark 1.5.10 (Offset functions and Galerkin discretization).<br />

Often: V = u 0 +V 0 , with offset functionu 0 → Rem. 1.3.19, (1.3.16)<br />

Ifu 0 is sufficiently simple, we msay choose a trial space V N = u 0 +V N,0<br />

➣ Discrete variational problem analoguous to (1.3.19)<br />

w N ∈ V N,0 : a(u 0 +w N ;v N ) = l(v N ) ∀v N ∈ V N,0 ➥ u N := w N +u 0 . (1.5.11)<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Discrete minimization problem<br />

u N = argminJ(v N ) . (1.5.5)<br />

v N ∈V<br />

N∑<br />

u = µ j b j N . R. Hiptm<br />

j=1<br />

△<br />

DRAFT<br />

Minimization problem on R N<br />

⃗µ = argminF(⃗ν) , (1.5.17)<br />

⃗ν∈R N<br />

F(⃗ν) := J(u 0 +ν 1 b 1 N +···+ν Nb N N ) .<br />

Basis<br />

−−−−−−−−→<br />

representation<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

In the case of a linear variational problem (→ Rem. 1.4.5), that is, a bilinear <strong>for</strong>ma, we have<br />

(1.5.11) ⇔ a(w N ,v N ) = l(v N )−a(u 0 ,v N ) ∀v N ∈ V N,0 . (1.5.12)<br />

1.5<br />

p. 82<br />

1.5<br />

p. 84


amenable to classical optimization<br />

techniques<br />

✎ notation: ⃗ν, ⃗µ ˆ= vectors of coefficients (ν i ) N i=1 , (µ i) N i=1 , in basis representation of functions<br />

v N ,u N ∈ V N according to (1.5.13).<br />

Discrete variational problem<br />

u N ∈ V N : a(u N ;v N ) = l(v N )<br />

∀v N ∈ V N,0 . (1.5.7)<br />

Basis<br />

−−−−−−−−→<br />

representation<br />

System of equations<br />

N∑<br />

a(u 0 + µ j b j N ;bk N ) = l(bk N )<br />

j=1<br />

∀k = 1,...,N . (1.5.18)<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

1.5.1.1 Spectral Galerkin scheme<br />

A simple function space (widely used <strong>for</strong> interpolation, see [18, Ch. 9], and approximation, see [18,<br />

Sec. 9.1]): <strong>for</strong> intervalΩ ⊂ R<br />

V N,0 = P p (R)∩C 0 0 (Ω)<br />

ˆ= space of univariate polynomials of degree ≤ p vanishing at endpoints ofΩ ,<br />

N := dimV N = p−1<br />

(1.5.19)<br />

[18, Sect. 3.2] <strong>for</strong> more in<strong>for</strong>mation.<br />

Obvious: choice (1.5.19) guarantees V N ⊂ C 1 pw,0 (Ω) (evenV N,0 ⊂ C ∞ (Ω))<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

use techniques <strong>for</strong> linear/non-linear<br />

systems of equations, see [18, Ch. 2],<br />

[18, Ch. 4].<br />

Please note thatV N,0 is a space of global polynomials onΩ.<br />

Example 1.5.20 (Spectral Galerkin discretization of linear variational problem).<br />

The choice of the basisBhas no impact on the (set of) Galerkin solutions of (1.5.7)!<br />

Below, we apply Galerkin approaches to<br />

• (1.4.16) as an example <strong>for</strong> the treatment of a linear variational problem:<br />

u ∈ C 1 pw([a,b]),<br />

u(a) = u a , u(b) = u b<br />

:<br />

Here:<br />

∫b<br />

a<br />

σ(x) du ∫b<br />

dx (x)dv dx (x)dx = −<br />

spatial domainΩ = [a,b], linear offset functionu 0 (x) = b−x<br />

b−a u a+ x−a<br />

b−a u a,<br />

function space V 0 = C0,pw 1 ([a,b]).<br />

• (1.3.7) to demonstrate its use in the case of a non-linear variational equation:<br />

a<br />

g(x)v(x)dx ∀v ∈ C 1 0,pw ([a,b]) .<br />

(1.4.16)<br />

1.5<br />

p. 85<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Targetted:<br />

linear variational problem (1.4.16) with<br />

a = 0,b = 1 ➣ domainΩ =]0,1[,<br />

constant coefficient functionσ ≡ 1,<br />

loadg(x) = −4π(cos(2πx 2 )−4πx 2 sin(2πx 2 )),<br />

boundary valuesu a = u b = 0.<br />

Concrete variational problem<br />

∫1<br />

u ∈ C0,pw 1 ([0,1]):<br />

0<br />

du<br />

dx (x) dv<br />

∫1<br />

dx (x)dx = −<br />

0<br />

u(x) = sin(2πx 2 ) , 0 < x < 1 .<br />

because d2 u<br />

dx2(x) = g(x).<br />

g(x)v(x)dx ∀v ∈ C 1 0,pw ([0,1]) .<br />

1.5<br />

p. 87<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

(1.5.21) C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

u ∈ Cpw([0,1])<br />

1 ∫1<br />

u(0),u(1) : from (1.2.1)<br />

Here:<br />

0<br />

κ(ξ)<br />

L<br />

(∥ ∥ u ′ (ξ) ∥ ∥−L )u′ (ξ)·v ′ (ξ)<br />

‖u ′ −f(ξ)·v(ξ)dξ = 0<br />

(ξ)‖<br />

∀v ∈ (C 1 0,pw ([0,1]))2 . (1.3.7)<br />

parameter domainΩ = [0,1], linear offset functionu 0 (ξ) = ξu(0)+(1−ξ)u(1),<br />

function space V 0 = (C 1 0,pw ([a,b]))2 .<br />

1.5<br />

p. 86<br />

1.5<br />

p. 88


1.5<br />

1<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

0.6<br />

0.4<br />

Integrated Legendre polynomials<br />

n=1<br />

n=2<br />

n=3<br />

n=4<br />

n=5<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Polynomial spectral Galerkin discretization, degreep<br />

∈ {4,5,6}.<br />

Plots of approximate/exact solutions<br />

✄<br />

u<br />

0.5<br />

0<br />

M n<br />

(t)<br />

0.2<br />

0<br />

−0.2<br />

✁ integrated Legendre polynomials<br />

M 1 ,...,M 5<br />

Remark 1.5.22 (Choice of basis <strong>for</strong> polynomial spectral Galerkin methods).<br />

−0.5<br />

N=4<br />

N=5<br />

N=6<br />

u(x)<br />

−1<br />

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1<br />

x<br />

Fig. 18<br />

✸<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

−0.4<br />

−0.6<br />

−1 −0.5 0 0.5 1<br />

t<br />

Fig. 20<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Sought: (ordered) basis of V N,0 := C 1 0 ([−1,1])∩P p(R)<br />

➊ “Tempting”:<br />

monomial-type basis<br />

{<br />

V N,0 = Span 1−x 2 ,x(1−x 2 ),x 2 (1−x 2 ),...,x p−2 (1−x 2 }<br />

) . (1.5.23)<br />

1.5<br />

p. 89<br />

Definition 1.5.25 (Legendre polynomials). → [18, Def. 10.4.12]<br />

Then-th Legendre polynomialP n ,n ∈ N 0 , is defined by (Rodriguez <strong>for</strong>mula)<br />

P n (x) := 1<br />

n!2 n d n<br />

dx n[(x2 −1) n ] .<br />

1.5<br />

p. 91<br />

P n<br />

(t)<br />

Monomial basis polynomials (1−x 2 )x n<br />

1<br />

0.8<br />

0.6<br />

0.4<br />

0.2<br />

0<br />

−0.2<br />

n=0<br />

n=1<br />

−0.4<br />

n=2<br />

n=3<br />

n=4<br />

−0.6<br />

n=5<br />

n=6<br />

−0.8<br />

−1 −0.5 0 0.5 1<br />

t<br />

Fig. 19<br />

➋ “Popular”:<br />

✁ Monomial basis polynomials<br />

→ Ex. 1.5.46 below<br />

Beware: ill-conditioned !<br />

integrated Legendre polynomials<br />

{ ∫ x<br />

}<br />

V N,0 = Span x ↦→ M n (x) := P n (τ)dτ, n = 1,...,p−1 , (1.5.24)<br />

−1<br />

whereP n ˆ= n-th Legende polynomial.<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

1.5<br />

p. 90<br />

Legendre polynomialsP 0 ,...,P 5<br />

P 0 (x) = 1 ,<br />

P 1 (x) = x ,<br />

P 2 (x) = 3 2 x2 − 1 2 ,<br />

0.8<br />

0.6<br />

0.4<br />

0.2<br />

−0.2<br />

P 3 (x) = 5 2 x3 − 3 2 x ,<br />

−0.4<br />

P 4 (x) = 35<br />

8 x4 − 15<br />

4 x2 + 3 8 . −0.6<br />

−0.8<br />

−1<br />

−1 −0.5 0 0.5 1<br />

Some facts about Legendre polynomials:<br />

Symmetry:<br />

P n is<br />

Orthogonality<br />

{<br />

even<br />

odd<br />

<strong>for</strong><br />

P n<br />

(t)<br />

1<br />

0<br />

Legendre polynomials<br />

t<br />

n=0<br />

n=1<br />

n=2<br />

n=3<br />

n=4<br />

n=5<br />

Fig. 21<br />

{<br />

evenn<br />

oddn , P n(1) = 1 , P n (−1) = (−1) n . (1.5.26)<br />

∫ 1<br />

P n (x)P m (x)dx =<br />

−1<br />

{ 2<br />

2n+1 , ifm = n ,<br />

0 else.<br />

(1.5.27)<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

1.5<br />

p. 92


3-term recursion<br />

P n+1 (x) := 2n+1<br />

n+1 xP n(t)− n<br />

n+1 P n−1(x) , P 0 := 1 , P 1 (x) := x . (1.5.28)<br />

This <strong>for</strong>mula paves the way <strong>for</strong> the efficient evaluation of all Legendre polynomials at many (quadrature)<br />

points, see Code 1.5.28.<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Note the effect of this trans<strong>for</strong>mation on the derivative (chain rule!):<br />

db i N<br />

dx (x) = dM (<br />

i<br />

2 x−a ) (<br />

dx b−a −1 2<br />

·<br />

b−a = P i 2 x−a )<br />

b−a −1 ·<br />

2<br />

b−a . (1.5.35)<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Code 1.5.29: Computation of Legendre polynomials based on 3-term recursion (1.5.28)<br />

1 f u n c t i o n V= legendre(n,x)<br />

2 % Computes values of Legendre polynomials up to degree n<br />

3 % in the points x j passed in the row vector x.<br />

4 % Exploits the 3-term recursion (1.5.28) <strong>for</strong> Legendre polynomials<br />

5 V = ones( s i z e(x)); V = [V; x];<br />

6 f o r j=1:n-1<br />

7 V = [V; ((2*j+1)/(j+1)).*x.*V(end,:) - j/(j+1)*V(end-1,:)];<br />

8 end<br />

Representation of derivatives and primitives, cf. Code 1.5.31:<br />

P n (x) = ( dx d P n+1(x)− dx d P n−1(x))/(2n+1) , n ∈ N , (1.5.30)<br />

1<br />

M n (x) =<br />

2n+1 (P n+1(x)−P n−1 (x)) and dM n<br />

dx = P n . (1.5.31)<br />

Code 1.5.32: Computation of (integrated) Legendre polynomials using (1.5.28) and (1.5.31)<br />

1 f u n c t i o n [V,M] = intlegpol(n,x)<br />

2 % Computes values of the first n+1 Legendre polynomials P n (returned in<br />

3 % matrix V) and the first n−1 integrated Legendre polynomials<br />

4 % M n (returned in matrix M) in the points x j passed in the<br />

5 % row vector x. Uses the recursion <strong>for</strong>mulas (1.5.28) and<br />

6 % (1.5.31)<br />

7 V = ones( s i z e(x)); V = [V; x];<br />

8 f o r j=1:n-1, V = [V; ((2*j+1)/(j+1)).*x.*V(end,:) -<br />

j/(j+1)*V(end-1,:)]; end<br />

9 M = diag(1./(2*(1:n-1)+1))*(V(3:n+1,:) - V(1:n-1,:));<br />

Remark 1.5.33 (Trans<strong>for</strong>mation of basis functions).<br />

On a “general domainΩ = [a,b]”, we obtain the basis function by a so-called affine trans<strong>for</strong>mation of<br />

the basis functions on[0,1], cf. [18, Rem. 10.1.3], e.g., in the case of integrated Legendre polynomials<br />

as basis functions onΩ = [a,b] we use the basis functions<br />

(<br />

b i N (x) = M i 2 x−a )<br />

b−a −1 , a ≤ x ≤ b . (1.5.34)<br />

△<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

1.5<br />

p. 93<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

1.5<br />

p. 94<br />

Remark 1.5.36 (Spectral Galerkin discretization with quadrature).<br />

Consider the linear variational problem, cf. (1.4.16),<br />

u ∈ C 1 0,pw ([a,b]):<br />

∫b<br />

a<br />

σ(x) du<br />

dx (x)dv<br />

∫b<br />

dx (x)dx =<br />

Assume: σ,g only given in procedural <strong>for</strong>m, see Rem. 1.5.3.<br />

a<br />

g(x)v(x)dx ∀v ∈ C0,pw 1 ([a,b]) . (1.5.37)<br />

Analytic evaluation of integrals becomes impossible even ifu,v polynomials !<br />

Only remaning option: <strong>Numerical</strong> quadrature, see [18, Ch. 10]<br />

Replace integral withm-point quadrature <strong>for</strong>mula on[a,b],m ∈ N → [18, Sect. 10.1]:<br />

∫ b<br />

m∑<br />

f(t)dt ≈ Q n (f) := ωj m f(ζm j ) . (1.5.38)<br />

a<br />

j=1<br />

ωj n : quadrature weights , ζn j : quadrature nodes ∈ [a,b] .<br />

(1.5.37) ➣ discrete variational problem with quadrature:<br />

u N ∈ V N :<br />

m∑<br />

ωj m σ(ζm j )du N<br />

dx (ζm j )dv N<br />

dx (ζm j ) = ∑ m ωj m g(ζm j )v(ζm j ) ∀v ∈ V N . (1.5.39)<br />

j=1<br />

j=1<br />

Popular (global) quadrature <strong>for</strong>mulas: Gauss quadrature → [18, Sect. 10.4]<br />

Important: Accuracy of quadrature <strong>for</strong>mula and computational cost (no. m of quadrature nodes) have<br />

to be balanced.<br />

△<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

1.5<br />

p. 95<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

1.5<br />

p. 96


Remark 1.5.40 (Implementation of spectral Galerkin discretization <strong>for</strong> linear 2nd-order two-point<br />

BVP).<br />

Setting:<br />

linear variational problem (1.5.37) ➣ u 0 = 0,<br />

coefficientsσ,g in procedural <strong>for</strong>m, see Rem. 1.5.3,<br />

approximation of integrals byp-point Gaussian quadrature <strong>for</strong>mula,<br />

polynomial spectral Galerkin discretization, degree≤ p,p ≥ 2,<br />

basisB: integrated Legendre polynomials, see (1.5.24):<br />

V N,0 = Span{M n , n = 1,...,p−1} , M n ˆ= integrated Legendre polynomials .<br />

Trial expression, cf. (1.5.13)<br />

Note:<br />

by definition<br />

From (1.5.39) with (1.5.40)<br />

u N = µ 1 M 1 +µ 2 M 2 +···+µ N M N , µ i ∈ R , N := p−1 .<br />

d<br />

dx M n = P n .<br />

m∑<br />

ωj m σ(ζm j ) ∑ N µ l P l (ζj m )P k(ζj m ) = ∑ m ωj m g(ζm j )M k(ζj m )<br />

j=1 l=1 j=1<br />

} {{ }<br />

=:ϕ k<br />

, k = 1,...,N . (1.5.41)<br />

⇕<br />

⎛<br />

⎞<br />

N∑ m∑<br />

⎝ ωj m σ(ζm j )P l(ζj m )P k(ζj m ) ⎠µ l = ϕ k , k = 1,...,N . (1.5.42)<br />

l=1 j=1<br />

⇕<br />

△<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

1.5<br />

p. 97<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Code 1.5.44: Polynomial spectral Galerkin solution of (1.5.37)<br />

1 f u n c t i o n u = lin2pbvpspecgalquad(sigma,g,N,x)<br />

2 % Polynomial spectral Galerkin discretization of linear 2nd-order two-point BVP<br />

3 % − d ) = g(x), u(0) = u(1) = 0<br />

dx (σ(x)du dx<br />

4 % on Ω = [0,1]. Trial space of dimension N.<br />

5 % Values of approximate solution in points x j are returned in the row vector u<br />

6 m = N+1; % Number of quadrature nodes<br />

7 [zeta,w] = gaussquad(m); % Obtain Gauss quadrature nodes w.r.t [−1,1]<br />

8 % Compute values of (integrated) Legendre polynomials at Gauss nodes<br />

9 [V,M] = intlegpol(N+1,zeta’);<br />

10 omega = w’.*sigma((zeta’+1)/2)*2; % Modified quadrature weights<br />

11 A = V(2:N+1,:)*diag(omega)*V(2:N+1,:)’; % Assemble Galerkin matrix<br />

12 phi = M*(0.5*w’.*g((zeta’+1)/2))’; % Assemble right hand side<br />

vector<br />

13 mu = A\phi; % Solve linear system<br />

14 % Compute values of integrated Legendre polynomials at output points<br />

15 [V,M] = intlegpol(N+1,2*x-1); u = mu’*M;<br />

Code 1.5.45: MATLAB driver script creating plots of Ex. 1.5.20<br />

1 % MATLAB script: Driver routine <strong>for</strong> polynomial spectral Galerkin<br />

discretization of linear 2nd-order<br />

2 % two-point boundary value problem<br />

3 c l e a r a l l ;<br />

4 % Coefficient functions (function handles, see MATLAB help)<br />

5 sigma = @(x) ones( s i z e (x));<br />

6 g = @(x) -4* p i *(cos(2* p i *x.^2)-4* p i *x.^2.* s in(2* p i *x.^2));<br />

7 x = 0:0.01:1; % Evaluation points<br />

8 % Computation with trial space of dimension 4,5,6<br />

9 N = 4; U = [lin2pbvpspecgalquad(sigma,g,N,x); ...<br />

10 lin2pbvpspecgalquad(sigma,g,N+1,x); ...<br />

11 lin2pbvpspecgalquad(sigma,g,N+2,x)];<br />

12 % Graphical output<br />

13 f i g u r e (’name’,’Polynomial spectral Galerkin’);<br />

14 p l o t (x,U); hold on;<br />

15 p l o t (x,sin (2* p i *x.^2),’g--’,’linewidth’,2);<br />

16 x l a b e l (’{\bf x}’,’fontsize’,14);<br />

17 y l a b e l (’{\bf u}’,’fontsize’,14);<br />

18 legend(’N=4’,’N=5’,’N=6’,’u(x)’,’location’,’southwest’);<br />

19 p r i n t -depsc2 ’../../../Slides/NPDEPics/specgallinsol.eps’;<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

1.5<br />

p. 99<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

A⃗µ = ⃗ϕ with<br />

m∑<br />

(A) kl := ωj m σ(ζm j )P l(ζj m )P k(ζj m ), k,l = 1,...,N ,<br />

j=1<br />

⃗µ = (µ l ) N l=1 ∈ RN , ⃗ϕ = (ϕ k ) N k=1 ∈ RN .<br />

(1.5.43)<br />

Example 1.5.46 (Conditioning of spectral Galerkin system matrices).<br />

△<br />

A linear system of equations !<br />

The Galerkin discretization of a linear variational problem leads to a linear system of equations.<br />

1.5<br />

p. 98<br />

1.5<br />

p. 10


Finally we can provide a rationale <strong>for</strong> preferring integrated Legendre polynomials to plain monomials<br />

<strong>for</strong> polynomial spectral Galerkin discretization: the argument is based on condition number of the<br />

system matrix from (1.5.43).<br />

Linear variational problem (1.5.21) with bilinear <strong>for</strong>m<br />

∫ 1<br />

a(u,v) = du<br />

dx (x) dx dv(x)dx<br />

, u,v ∈ C1 0,pw ([0,1]) .<br />

0<br />

Choice of basis functions <strong>for</strong> Galerkin trial/test space V N,0 := P p (R) ∩ C0 0 ([0,1]): monomial<br />

basis (1.5.23), integrated Legendre polynomials (1.5.24).<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Example 1.5.47 (Implementation of spectral Galerkin discretization <strong>for</strong> elastic string problem).<br />

Targetted: non-linear variational equation on domainΩ = [0,1]<br />

∫1<br />

0<br />

(<br />

κ(ξ)<br />

1− L )<br />

L ‖u ′ u ′ (ξ)·v ′ (ξ)−f(ξ)·v(ξ)dξ = 0 ∀v ∈ (C 1 (ξ)‖<br />

0,pw ([0,1]))2 . (1.3.7)<br />

Dataκ,f given in procedural <strong>for</strong>m, see Rem. 1.5.3.<br />

Spectral Galerkin discretization, basisB= {M n } K n=1 ,K ∈ N, consists of integrated Legendre<br />

polynomials, see (1.5.24) ➣ basis representation, cf. (1.5.40)<br />

( )<br />

µ1<br />

u N (ξ) = u(0)(1−ξ)+u(1)ξ+<br />

M<br />

} {{ } µ 1 (ξ)+···+<br />

K+1<br />

=:u 0 (ξ) (offset function)<br />

( )<br />

µK<br />

M<br />

µ K (ξ) . (1.5.48)<br />

2K<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

1.5<br />

p. 101<br />

Approximate evaluation of integrals by m-point Gaussian quadrature on [0,1], m := K + 1<br />

below: nodesζ j , weightsω j ,j = 1,...,m.<br />

1.5<br />

p. 10<br />

Monitored: condition number (w.r.t. Euclidean<br />

matrix norm → [18, Def. 2.5.26]) of Galerkin matrices<br />

condition number<br />

10 12 monomial basis<br />

Legendre basis<br />

10 10<br />

10 8<br />

10 6<br />

10 4<br />

10 2<br />

10 0<br />

2 3 4 5 6 7 8 9 10<br />

N<br />

Fig. 22<br />

Recall that a condition number of 10 m involves a loss of m digits w.r.t. the precision guaranteed <strong>for</strong><br />

the right hand side of the linear system. Thus, using the monomial basis <strong>for</strong> N > 10 may no longer<br />

produce reliable results.<br />

✸<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

1.5<br />

p. 102<br />

In analogy to (1.5.41) we arrive at the non-linear system of equations: (M ′ k = P k !)<br />

m∑ K∑<br />

m∑<br />

s j (b−a+ µ l P l (ζ j ))·P k (ζ j ) = ω j f 1 (ζ j )·M k (ζ j ) , k = 1,...,K ,<br />

j=1 l=1<br />

j=1<br />

m∑ K∑<br />

m∑<br />

s j (u b −u a + µ K+l P l (ζ j ))·P k (ζ j ) = ω j f 2 (ζ j )·M k (ζ j ) , k = 1,...,K ,<br />

j=1 l=1<br />

j=1<br />

( )<br />

1<br />

with s j := ω j κ(ζ j )<br />

L − 1 (s<br />

∥<br />

∥u ′ N (ζ j) ∥ ) = s(⃗µ) .<br />

Rewrite in compact <strong>for</strong>m:<br />

( ) ( )<br />

R(⃗µ) 0 ⃗ϕ1<br />

⃗µ =<br />

0 R(⃗µ) ⃗ϕ 2<br />

, (1.5.49)<br />

m∑<br />

with (R) k,l := s j P l (ζ j )P k (ζ j ) ,<br />

j=1<br />

m∑<br />

m∑<br />

(⃗ϕ 1 ) k = ω j f 1 (ζ j )·M k (ζ j )−(b−a) s j P k (ζ j ) ,<br />

j=1<br />

j=1<br />

m∑<br />

m∑<br />

(⃗ϕ 1 ) k = ω j f 2 (ζ j )·M k (ζ j )−(u b −u a ) s j P k (ζ j ) .<br />

j=1<br />

j=1<br />

(1.5.50)<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

1.5<br />

p. 10


Iterative solution of (1.5.49) by fixed point iteration:<br />

Initial guess ⃗µ (0) ∈ R N ; k = 0;<br />

repeat<br />

k ← k +1;<br />

Solve the linear system of equations<br />

∥<br />

until ∥⃗µ (k) − ⃗µ (k−1)∥ ∥ ∥∥⃗µ ≤ tol·∥<br />

(k) ∥ ∥<br />

(<br />

R(⃗µ (k−1) ) ( )<br />

) 0<br />

0 R(⃗µ (k−1) ⃗µ (k) ⃗ϕ1<br />

= ;<br />

) ⃗ϕ 2<br />

Code 1.5.51: Polynomial spectral Galerkin discretization of elastic string variational problem<br />

1 f u n c t i o n [vu,figsol] = stringspecgal(kappa,f,L,u0,u1,K,xi,tol)<br />

2 % Solving the non-linear variational problem (1.3.7) <strong>for</strong> the elastic string by<br />

means of polynomial<br />

3 % spectral Galerkin discretization based on K integratted Legendre polynomials.<br />

Approximate<br />

4 % evaluation of integrals by means of Gaussian quadrature.<br />

5 % kappa, f are handles of type @(xi) providing the coefficient function<br />

6 % κ and the <strong>for</strong>ce field f. The column vectors u0 and u1 pass the<br />

7 % pinning points. M is the number of mesh cells, tol specifies the tolerance<br />

<strong>for</strong> the<br />

8 % fixed point iteration. return value: 2×length(xi)-matrix of node<br />

9 % positions <strong>for</strong> curve parameter values passed in the row vector xi.<br />

10 i f (nargin < 8), tol = 1E-2; end<br />

11 m = K+1; % Number of quadrature nodes<br />

12 [zeta,w] = gaussquad(m); % Obtain Gauss quadrature nodes w.r.t [−1,1]<br />

13 % Compute values of (integrated) Legendre polynomials at Gauss nodes and<br />

evaluation points<br />

14 [V,M] = intlegpol(K+1,zeta’);<br />

15 [Vx,Mx] = intlegpol(K+1,2*xi-1); Mx = [1-xi;Mx;xi]; %<br />

16 % Compute right hand side based on m-point Gaussian quadrature on [0,1].<br />

17 <strong>for</strong>ce = f((zeta’+1)/2); phi = M*(0.5*[w’;w’].*<strong>for</strong>ce)’;<br />

18 sv = kappa((zeta’+1)/2); % Values of coefficient function κ at Gauss<br />

points in [0,1].<br />

19 % mu is an 2×(K +2)-matrix, containing the vectorial basis expansion<br />

coefficients<br />

20 % of u N . The first and last column are contributions of the two functions<br />

21 % ξ ↦→ (1−ξ) and ξ ↦→ ξ, which represent the offset function.<br />

22 % Initial guess <strong>for</strong> fixed point iteration: straight string<br />

23 mu = [u0,zeros(2,K),u1];<br />

24 figsol = f i g u r e ; hold on;<br />

25 f o r k=1:100 % loop <strong>for</strong> fixed point iteration, maximum 100 iterations<br />

26 % Plot shape of string<br />

27 vu = mu*Mx; p l o t (vu(1,:),vu(2,:),’--g’); drawnow;<br />

28 t i t l e ( s p r i n t f (’K = %d, iteration #%d’,K,k));<br />

29 x l a b e l (’{\bf x_1}’); y l a b e l (’{\bf x_2}’);<br />

30 % Compute values of derivatives of u N and ‖u ′ N ‖ at Gauss points<br />

31 up = mu(:,2:K)*V(2:K,:) + repmat(u1-u0,1,m);<br />

32 lup = s q r t(up(1,:).^2 + up(2,:).^2);<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

1.5<br />

p. 106<br />

33 s = 0.5*(w’).*sv.*(1/L - 1./lup); % Initialization of s j<br />

34 % Modification of right hand side due to offset function<br />

35 phi1 = phi(:,1) + (2*(u1(1)-u0(1))*V(2:K+1,:)*s’);<br />

36 phi2 = phi(:,2) + (2*(u1(2)-u0(2))*V(2:K+1,:)*s’);<br />

37 % Assemble K ×K-matrix blocks R of linear system<br />

38 R = 4*V(2:K+1,:)*diag(s)*V(2:K+1,:)’;<br />

39 mu_new = [u0,[(R\phi1)’;(R\phi2)’],u1];<br />

40 % Check simple termination criterion <strong>for</strong> fixed point iteration.<br />

41 i f (norm(mu_new - mu,’fro’) < tol*norm(mu_new,’fro’)/K)<br />

42 vu = mu*Mx; fig = p l o t (vu(1,:),vu(2,:),’r--’);<br />

43 legend(fig,’spectral Galerkin<br />

solution’,’location’,’southeast’);break; end<br />

44 mu = mu_new;<br />

45 end<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

R. Hiptm<br />

DRAFT<br />

✸<br />

Example 1.5.52 (Spectral Galerkin discretization <strong>for</strong> elastic string simulation).<br />

Test of polynomial spectral Galerkin method <strong>for</strong> elastic string problem, algorithm of Ex. 1.5.47, Code 1.5.50,<br />

with<br />

1.5<br />

p. 105 pinning positionsu(0) = ( 1.5<br />

0) (<br />

0 ,u(1) =<br />

1 )<br />

0.2 , p. 10<br />

equilibrium lengthL = 0.5,<br />

x 2<br />

0.15<br />

0.05<br />

−0.05<br />

−0.1<br />

−0.15<br />

constant coefficient functionκ ≡ 1N,<br />

gravitational <strong>for</strong>ce fieldf(ξ) = − ( 0<br />

2<br />

)<br />

.<br />

0.2<br />

0.1<br />

0<br />

K = 8, iteration #7<br />

spectral Galerkin solution<br />

−0.2<br />

0.5<br />

x 1<br />

0.9 1<br />

Fig. 23<br />

0 0.1 0.2 0.3 0.4 0.6 0.7 0.8<br />

iteration history<br />

1.5.1.2 Linear finite elements<br />

Two ways to approximate functions by polynomials:<br />

x 2<br />

0.2<br />

0.15<br />

0.1<br />

0.05<br />

0<br />

−0.05<br />

−0.1<br />

−0.15<br />

K=4<br />

K=6<br />

K=8<br />

−0.2<br />

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1<br />

x 1<br />

solutionsu N <strong>for</strong> different resolutions<br />

Fig. 24<br />

✸<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

1.5<br />

p. 10


global polynomials<br />

[18, Ch. 9]<br />

←→<br />

piecewise polynomials<br />

[18, Ch. ??]<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

db j 1<br />

⎧⎪ ⎨hj , ifx j−1 ≤ x ≤ x j ,<br />

N<br />

dx (x) = −h 1 , ifx<br />

⎪ j+1 j < x ≤ x j+1 ,<br />

⎩<br />

0 elsewhere. (piecewise derivative!)<br />

(1.5.55)<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

The spectral polynomial Galerkin approach presented in Sect. 1.5.1.1 relies on global polynomials.<br />

Now let us examine the use of piecewise polynomials.<br />

Preliminaries: piecewise polynomials have to be defined w.r.t. partitioning of the domainΩ ⊂ R<br />

➣ Ω = [a,b] equipped with nodes (M ∈ N)<br />

X := {a = x 0 < x 1 < ··· < x M−1 < x M = b} .<br />

➤<br />

mesh/grid<br />

M := {]x j−1 ,x j [: 1 ≤ j ≤ M} .<br />

a<br />

x 0 x 1 x 2 x 3 x 4 x 5 x 6 x 7 x 8 x 9 x 10x 11x 12x 13x 14<br />

Special case:<br />

equidistant mesh:<br />

x j := a+jh , h := b−a<br />

M .<br />

b<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Remark 1.5.56 (Benefit of variational <strong>for</strong>mulation of BVPs).<br />

The possibility of using simple piecewise linear trial and test functions is a clear benefit of the variational<br />

<strong>for</strong>mulation that can accommodate merely piecewise continuously differentiable functions, see<br />

Sect. 1.3.2.<br />

Below, in Sect. 1.5.2 we will learn about a method that targets the strong <strong>for</strong>m of the 2-point BVP and,<br />

thus, has to impose more regularity on the trial functions.<br />

△<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

☞ [x j−1 ,x j ],j = 1,...,M, ˆ= cells ofM, cell size h j := |x j −x j−1 |,j = 1,...,M<br />

meshwidth h M := max|x j −x j−1 |<br />

j<br />

Recall from Sect. 1.3.2:<br />

merely continuous, piecewise C 1 trial and test functions provide valid trial/test<br />

functions!<br />

1<br />

a<br />

x 1 x 2 x 3 ···<br />

⇑ function∈ S 0 1,0 (M)<br />

Choice of (ordered) basisB N ofV N ?<br />

1D “tent functions”<br />

Fig. 25<br />

B = {b 1 N ,...,bM−1 N } , (1.5.53) 1<br />

{<br />

b j 1 , ifi = j ,<br />

N (x i) = δ ij :=<br />

(1.5.54)<br />

0 , ifi ≠ j ,<br />

b<br />

✄<br />

Simplest choice <strong>for</strong> test space<br />

➣<br />

V N = S1,0 0 {<br />

(M)<br />

v ∈ C<br />

:=<br />

0 }<br />

([0,1]): v |[xi−1 ,x i ] linear,<br />

i = 1,...,M,v(a) = v(b) = 0<br />

a<br />

N := dimV N = M −1<br />

x 1 x 2 x 3 ···<br />

Fig. 26<br />

b<br />

1.5<br />

p. 109<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

1.5<br />

p. 110<br />

➊ simplest case: linear variational problem with constant stiffness coefficient<br />

u ∈ C 1 0,pw ([a,b]):<br />

∫b<br />

a<br />

du<br />

dx (x)dv<br />

∫b<br />

dx (x)dx =<br />

Discrete variational problem withu N = µ 1 b 1 N +···+µ Nb N N :<br />

∫b<br />

a<br />

N∑<br />

l=1<br />

⎛<br />

N∑<br />

∫b<br />

⎜<br />

⎝<br />

l=1 a<br />

µ l<br />

db l N<br />

dx (x)dbk N<br />

db l N<br />

dx (x)dbk N<br />

A⃗µ = ⃗ϕ with<br />

∫b<br />

dx (x)dx =<br />

A linear system of equations, cf. Rem. 1.5.40!<br />

a<br />

g(x)v(x)dx ∀v ∈ C 1 0,pw ([a,b]) .<br />

g(x)b k N (x)dx k = 1,...,N .<br />

a<br />

⇕<br />

⎞<br />

∫b<br />

dx (x)dx ⎟<br />

⎠µ l = g(x)b k N (x)dx ,k = 1,...,N .<br />

a<br />

} {{ }<br />

=:ϕ k<br />

⇕<br />

∫b<br />

db l (A) kl := N<br />

dx (x)dbk N(x)dx, k,l = 1,...,N ,<br />

dx<br />

a<br />

⃗µ = (µ l ) N l=1 ∈ RN , ⃗ϕ = (ϕ k ) N k=1 ∈ RN .<br />

1.5<br />

p. 11<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

1.5<br />

p. 11


∫b<br />

✄ system matrix A = (a ij ) ∈ R M−1,M−1 , a ij :=<br />

∫b<br />

✄ r.h.s. vector ⃗ϕ ∈ R M−1 , ϕ k :=<br />

The detailed computations start with the evident fact that<br />

db i N<br />

dx (x) dbj N<br />

dx (x)dx,<br />

a<br />

piecewise derivatives<br />

a<br />

1 ≤ i,j ≤ N<br />

g(x)b k N (x)dx, k = 1,...,N .<br />

|i−j| ≥ 2 ⇒ bj N<br />

dx (x)· bi N(x) = 0 ∀x ∈ [a,b] ,<br />

dx<br />

because there is no overlap of the supports of the two basis functions.<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Natural choice: piecewise polynomial trial/test spaces ←→ composite quadrature rule<br />

∫1<br />

e.g, composite trapezoidal rule: ϕ k =<br />

0<br />

g(x)b k N (x)dx ≈ 1 2 (h k +h k+1 )g(x k ), 1 ≤ k ≤ N .<br />

(1.5.59)<br />

For equidistant mesh with uni<strong>for</strong>m cell sizeh > 0 we arrive at the linear system of equations:<br />

⎛<br />

⎞<br />

2 −1 0 0 ⎛ ⎞ ⎛ ⎞<br />

−1 2 −1<br />

µ 1 g(x 1 )<br />

1<br />

0 . .. . .. ...<br />

h<br />

⎜ .<br />

⎟<br />

.<br />

⎜<br />

.. ... ... 0<br />

= h ⎜ .<br />

⎟ . ⎝ ⎠ ⎝ ⎠ (1.5.60)<br />

⎟<br />

⎝ −1 2 −1⎠<br />

µ N g(x N )<br />

0 0 −1 2<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Definition 1.5.57 (Support of a function).<br />

The support of a functionf : Ω ↦→ R is defined as<br />

supp(f) := {x ∈ Ω: f(x) ≠ 0} .<br />

Exercise 1.5.1. Show that the 1D linear finite element Galerkin solution of −u ′′ = f agrees with the<br />

exact solution at the grid points, provided that all integrals are evaluated exactly [?, Sect. 2].<br />

In addition, we use that the gradients of the tent functions are piecewise constant, see (1.5.55).<br />

➡<br />

∫1<br />

0<br />

0 , if|i−j| ≥ 2 →<br />

⎧⎪<br />

db j ⎨ −<br />

N<br />

dx (x)dbi N<br />

dx (x)dx = h 1 , ifj = i+1 →<br />

i+1<br />

−h 1 , ifj = i−1 →<br />

i<br />

⎪ ⎩<br />

1<br />

h + 1<br />

i h<br />

, if1 ≤ i = j ≤ M −1 →<br />

i+1<br />

A symmetric, positive definite and tridiagonal:<br />

⎛<br />

1<br />

h + 1 h 1 − 1 ⎞<br />

2 h 0 0<br />

2 − 1 1<br />

h 2 h2<br />

+ h 1 − 1 3 h 3<br />

0 . .. ... ...<br />

A =<br />

... 0<br />

⎜<br />

... ... − 1<br />

⎝<br />

h ⎟<br />

M−1<br />

0 0 −h 1 1<br />

M−1 h + 1 ⎠<br />

M−1 h M<br />

✍ notation: h j := |x j −x j−1 | local meshwidth, cell size<br />

Mandatory:<br />

computation of right hand side vector by numerical quadrature<br />

1<br />

0 1<br />

1 b i N b j N<br />

0 1<br />

1 b j N b i N<br />

0 1<br />

1<br />

b j N<br />

0 1<br />

(1.5.58)<br />

1.5<br />

p. 113<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

1.5<br />

p. 114<br />

➋ case: linear variational problem with variable stiffness, cf. (1.4.16)<br />

u ∈ C 1 0,pw ([a,b]):<br />

∫b<br />

a<br />

σ(x) du<br />

dx (x)dv<br />

∫b<br />

dx (x)dx =<br />

Discrete variational problem withu N = µ 1 b 1 N +···+µ Nb N N :<br />

Here:<br />

∫b N∑<br />

σ(x)<br />

a l=1<br />

µ l<br />

db l N<br />

dx (x)dbk N<br />

∫b<br />

dx (x)dx =<br />

a<br />

a<br />

g(x)v(x)dx ∀v ∈ C 1 0,pw ([a,b]) .<br />

g(x)b k N (x)dx k = 1,...,N . (1.5.61)<br />

numerical quadrature required <strong>for</strong> both integrals<br />

Choice: composite midpoint rule <strong>for</strong> left hand side integral → [18, Sect. 10.3]<br />

∫ b M∑<br />

f(x)dx ≈ h j f(m j ) , m j := 2 1(x j +x j−1 ) . (1.5.62)<br />

a<br />

j=1<br />

composite trapezoidal rule [18, Eq. 10.3.3] <strong>for</strong> right hand side integral, see (1.5.59).<br />

1.5<br />

p. 11<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

1.5<br />

p. 11


Assumption:<br />

σ ∈ C 0 pw([a,b]) with jumps only at grid nodesx j<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Benefits of this choice of offset function:<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

•u 0 is a simple function (since p.w. linear),<br />

(1.5.61)<br />

⇕<br />

⎛<br />

⎞<br />

N∑ M∑<br />

⎝ h j σ(m j ) dbl N<br />

dx (m j) dbk N<br />

dx (m j) ⎠µ l = 2 1(h k+1 +h k )g(x k ) , k = 1,...,N ,<br />

} {{ }<br />

l=1 j=1<br />

} {{ } =:ϕ k<br />

=(A) k,l<br />

⇕<br />

A⃗µ = ⃗ϕ .<br />

Resulting linear system of equations equidistant mesh with uni<strong>for</strong>m cell sizeh > 0<br />

⎛<br />

⎞<br />

σ 1 +σ 2 −σ 2 0 0 ⎛ ⎞<br />

−σ 2 σ 2 +σ 3 −σ 3<br />

µ 1<br />

1<br />

0 ... ... ...<br />

h<br />

⎜ .<br />

⎟<br />

.<br />

⎜<br />

.. . .. ... 0<br />

⎝ ⎠<br />

⎟<br />

⎝<br />

−σ M−2 σ M−2 +σ M−1 −σ M−1<br />

⎠ µ N<br />

0 0 −σ M−1 σ M−1 +σ M<br />

⎛ ⎞<br />

g(x 1 )<br />

= h<br />

⎜ .<br />

⎟ , ⎝ ⎠ (1.5.63)<br />

g(x N )<br />

with<br />

σ j = σ(m j ),j = 1,...,m.<br />

Remark 1.5.64 (Offset function <strong>for</strong> finite element Galerkin discretization).<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

1.5<br />

p. 117<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

•u 0 is locally supported: contributions from u 0 will alter only first and last component of right hand<br />

side vector.<br />

Example 1.5.66 (Linear finite element Galerkin discretization <strong>for</strong> elastic string model).<br />

Targetted: non-linear variational equation on domainΩ = [0,1]<br />

∫1 (<br />

κ(ξ)<br />

1− L )<br />

L ‖u ′ u ′ (ξ)·v ′ (ξ)−f(ξ)·v(ξ)dξ = 0 ∀v ∈ (C<br />

(ξ)‖<br />

0,pw 1 ([0,1]))2 . (1.3.7)<br />

0<br />

Dataκ,f given in procedural <strong>for</strong>m, see Rem. 1.5.3.<br />

trial spaceV N,0 = (S 0 1,0 (M))2 on equidistant meshM, meshwidthh := 1 M .<br />

Basis:<br />

1D tent functions, lexikographic ordering<br />

{( ) ( ) ( ),( ) ( ) ( )}<br />

b 1<br />

B = N0 b 2<br />

, N0 b<br />

M−1<br />

,..., N 0 0 0<br />

0 b 1 ,<br />

N b 2 ,...,<br />

N bN<br />

M−1 .<br />

Evaluation of right hand side by composite trapezoidal rule (1.5.59).<br />

Evaluation left hand side by composite midpoint rule (1.5.62).<br />

△<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

1.5<br />

p. 11<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

In the case of general boundary conditions<br />

1<br />

u(a) = u a , u(b) = u b u a<br />

use piecewise linear offset function<br />

a x 1 x 2 x 3 ···<br />

⎧<br />

⎪⎨ u a (1− x−a<br />

h ) , ifa ≤ x ≤ x 1 1 ,<br />

u 0 (x) = u b (1− b−x<br />

h ) , ifx M M−1 ≤ x ≤ b ,<br />

⎪⎩ 0 elsewhere.<br />

b<br />

u b<br />

Fig. 27<br />

(1.5.65)<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

1.5<br />

p. 118<br />

Preliminary consideration:<br />

( )<br />

b 1<br />

u N := u 0 +µ N0 1<br />

the derivative of<br />

+···+µ M−1<br />

(<br />

b<br />

M−1<br />

N<br />

0<br />

)+µ M<br />

(<br />

0<br />

b 1 N<br />

with offset function according to Rem. 1.5.64 is piecewise constant onM:<br />

)<br />

( )<br />

0<br />

+···+µ 2M−2<br />

bN<br />

M−1<br />

in]x j−1 ,x j [: s j (⃗µ) := u ′ N (ξ) = u(x j)−u(x j−1 )<br />

⎧(<br />

h )<br />

µ j −µ j−1<br />

= 1 ⎪⎨<br />

, if2 ≤ j ≤ M −1 ,<br />

h ·<br />

µ j+M−1 −µ<br />

( j+M−2<br />

µ1<br />

)<br />

µ −u(0) , ifj = 1 ,<br />

M<br />

⎪⎩ u(1)− ( µ ) M−1<br />

µ , ifj = M .<br />

2M−2<br />

(1.5.67)<br />

(1.5.68)<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

1.5<br />

p. 12


Set: r j = r j (⃗µ) := h κ(m (<br />

j)<br />

1−<br />

L<br />

)<br />

L<br />

∥<br />

∥s j (⃗µ) ∥ Single row non-linear system of equations arising from Galerkin finite element discretization:<br />

row1: (r 1 +r 2 )µ 1 −r 2 µ 2 = hf 1 (h)+r 1 a , (1.5.69)<br />

rowj: −r j µ j +(r j +r j+1 )µ j+1 −r j+1 µ j+2 = f 1 (jh) , 2 ≤ j < M −1 , (1.5.70)<br />

rowM −1: −r M−1 µ M−2 +(r M−1 +r M )µ M−1 = hf 1 ((M −1)h)+r M b , (1.5.71)<br />

rowM: (r 1 +r 2 (⃗µ))µ M −r 2 µ M+1 = hf 2 (h)+r 1 u a , (1.5.72)<br />

rowj: −r j µ j+M−1 +(r j +r j+1 )µ j+M −r j+1 µ j+M+1 = f 2 (jh) , 2 ≤ j < M −1 ,<br />

(1.5.73)<br />

rowM −1: −r M−1 µ 2M−3 +(r M−1 +r M )µ 2M−2 = hf 2 ((M −1)h)+r M u b . (1.5.74)<br />

Here the dependencer j = r j (⃗µ) has been suppressed to simplify the notation.<br />

Please study the derivation of (1.5.63) in order to understand how (1.5.69)-(1.5.74) arise.<br />

These equations can be written in a more compact <strong>for</strong>m:<br />

with<br />

(1.5.69)-(1.5.74) ⇔<br />

( ) ( )<br />

R(⃗µ) 0 ⃗ϕ1<br />

⃗µ =<br />

0 R(⃗µ) ⃗ϕ 2<br />

. (1.5.75)<br />

⎛<br />

⎞<br />

r 1 +r 2 −r 2 0 0<br />

−r 2 r 2 +r 3 −r 3<br />

0 ... ... ...<br />

R(⃗µ) :=<br />

∈ R M−1,M−1 ,<br />

.<br />

⎜<br />

.. . .. . .. 0<br />

⎟<br />

⎝<br />

−r M−2 r M−2 +r M−1 −r M−1<br />

⎠<br />

0 0 −r M−1 r M−1 +r M<br />

(⃗ϕ 1 ) j := hf 1 (hj) , (⃗ϕ 2 ) j := hf 2 (hj) , j = 1,...,M −1 .<br />

Iterative solution of (1.5.75) by fixed point iteration, see Ex. 1.5.47<br />

Initial guess ⃗µ (0) ∈ R N ; k = 0;<br />

repeat<br />

k ← k +1;<br />

Solve the linear system of equations<br />

(<br />

R(⃗µ (k−1) ) ( )<br />

) 0<br />

0 R(⃗µ (k−1) ⃗µ (k) ⃗ϕ1<br />

= ;<br />

) ⃗ϕ 2<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

1.5<br />

p. 121<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

1.5<br />

p. 122<br />

until<br />

∥<br />

∥⃗µ (k) − ⃗µ (k−1)∥ ∥ ∥ ≤ tol·∥ ∥∥⃗µ (k) ∥ ∥ ∥<br />

Code 1.5.76: Linear finite element discretization of elastic string variational problem<br />

1 f u n c t i o n [vu,Jrec,figsol,figerg] =<br />

stringlinfem(kappa,f,L,u0,u1,M,tol)<br />

2 % Solving the non-linear variational problem (1.3.7) <strong>for</strong> the elastic string by<br />

means of piecewise<br />

3 % linear finite elements on an equidistant mesh with M −1 interior nodes.<br />

4 % kappa, f are handles of type @(xi) providing the coefficient function<br />

5 % κ and the <strong>for</strong>ce field f. u0 and u1 pass the pinning points.<br />

6 % M is the number of mesh cells, tol specifies the tolerance <strong>for</strong> the fixed<br />

point<br />

7 % iteration. return value: 2×(M +1)-matrix of node positions<br />

8 i f (nargin < 7), tol = 1E-2; end<br />

9 h = 1/M; % meshwidth<br />

10 phi = h*f(h*(1:M-1)); % Right hand side vector<br />

11<br />

12 % Initial guess: straight string, condition L > ‖u(0)−u(1)‖.<br />

13 i f (L >= norm(u1-u0)), e r r o r (’String must be tense’); end<br />

14 vu_new = u0*(1-(0:1/M:1))+u1*(0:1/M:1);<br />

15 % Meaning of components of vu:<br />

µ M ,...,µ 2M−2 .<br />

vu(1,2:M) ↔ µ 1 ,...,mu M−1 , vu(2,2:M) ↔<br />

16 figsol = f i g u r e ; Jrec = []; hold on;<br />

17 f o r k=1:100 % loop <strong>for</strong> fixed point iteration, maximum 100 iterations<br />

18 vu = vu_new;<br />

19 % Plot shape of string<br />

20 p l o t (vu(1,:),vu(2,:),’--g’); drawnow;<br />

21 t i t l e ( s p r i n t f (’M = %d, iteration #%d’,M,k));<br />

22 x l a b e l (’{\bf x_1}’); y l a b e l (’{\bf x_2}’);<br />

23 %Compute the cell values s j , r j , j = 1,...,M, see (1.5.68).<br />

24 d = (vu(:,2:end) - vu(:,1:end-1))/h;<br />

25 s = s q r t (d(1,:).^2 + d(2,:).^2);<br />

26 r = kappa(h*((1:M)-0.5)).*(1/L - 1./s)/h;<br />

27 % Compute total potential energy<br />

28 Jel = h/(2*L)*kappa(h*((1:M)-0.5))*((s-L).^2)’;<br />

29 Jf = - (phi(1,:)*vu(1,2:M)’+phi(2,:)*vu(2,2:M)’);<br />

30 Jrec = [Jrec; k , Jel, Jf, Jel+Jf];<br />

31 % Assemble triadiagonal matrix R = R(⃗µ)<br />

32 R = g a l l e r y (’tridiag’,-r(2:M-1),r(1:M-1)+r(2:M),-r(2:M-1));<br />

33 % modify right hand side in order to take into account pinning conditions<br />

34 phi1 = phi(1,:); phi1(1) = phi1(1) + r(1)*u0(1); phi1(M-1) =<br />

phi1(M-1) + r(M)*u1(1);<br />

35 phi2 = phi(2,:); phi2(1) = phi2(1) + r(1)*u0(2); phi2(M-1) =<br />

phi2(M-1) + r(M)*u1(2);<br />

36 % Solve linear system and compute new iterate<br />

37 vu_new = [u0,[(R\phi1’)’;(R\phi2’)’],u1];<br />

38 % Check simple termination criterion <strong>for</strong> fixed point iteration.<br />

39 i f (norm(vu_new - vu,’fro’) < tol*norm(vu_new,’fro’)/M)<br />

40 p l o t (vu(1,:),vu(2,:),’r-*’); break; end<br />

41 end<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

1.5<br />

p. 12<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

1.5<br />

p. 12


42 % Plot of total potential energy in the course of the iteration<br />

43 figerg = f i g u r e (’name’,’total potential energy’);<br />

44 t i t l e ( s p r i n t f (’elastic string, M = %d’,M));<br />

45 p l o t (Jrec(:,1),Jrec(:,4),’m-*’,...<br />

46 Jrec(:,1),Jrec(:,2),’b-+’,...<br />

47 Jrec(:,1),Jrec(:,3),’g-^’);<br />

48 x l a b e l (’{\bf no. of iteration step}’); y l a b e l (’{\bf energy}’);<br />

49 legend(’total potential energy’,’elastic energy’,’energy in <strong>for</strong>ce<br />

field’,’location’,’east’);<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

x 2<br />

0.2<br />

0.15<br />

0.1<br />

0.05<br />

0<br />

−0.05<br />

−0.1<br />

M = 20, iteration #23<br />

energy<br />

0.5<br />

0.4<br />

0.3<br />

0.2<br />

0.1<br />

0<br />

total potential energy<br />

elastic energy<br />

energy in <strong>for</strong>ce field<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

✸<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

−0.15<br />

−0.2<br />

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1<br />

x 1<br />

Fig. 29<br />

−0.1<br />

−0.2<br />

0 5 10 15 20 25<br />

no. of iteration step<br />

Fig. 30 ✸<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

Example 1.5.77 (Elastic string shape by finite element discretization).<br />

DRAFT<br />

DRAFT<br />

Linear finite element discretization of (1.3.7), see Ex. 1.5.66, Code 1.5.75.<br />

κ ≡ 1,L = 0.5,u(0) = ( 0) (<br />

0 ,u(1) =<br />

1 )<br />

0.2<br />

gravitational <strong>for</strong>ce fieldf(ξ) = − ( 0<br />

2<br />

)<br />

.<br />

1.5.2 Collocation<br />

1.5<br />

p. 125<br />

OPTIONAL Section: will only be references in Sect. 1.6 below, Ex. 1.6.19, but examples involving<br />

collocation methods can safely be skipped.<br />

1.5<br />

p. 12<br />

0.2<br />

0.15<br />

M=5<br />

M=10<br />

M=20<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Targetted: Two-point BVP = ODEL(u) = f + boundary conditions<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Piecewise linear finite element solution of (1.3.7),<br />

equidistant meshes withM cells,M = 5,10,20✄<br />

Convergence of fixed point iteration (M = 20):<br />

x 2<br />

0.1<br />

0.05<br />

0<br />

−0.05<br />

−0.1<br />

−0.15<br />

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1<br />

x 1<br />

Fig. 28<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Note: In contrast to the Galerkin approach, collocation techniques do not tackle the weak <strong>for</strong>m of a<br />

boundary value problem, but rather the “classical”/strong <strong>for</strong>m.<br />

Idea: ➊<br />

➋<br />

seek solution in finite-dimensional trial spaceV N,0 ,N := dimV N,0 < ∞<br />

pick collocation nodesN := {x 1 ,...,x N } ⊂ Ω such that x<br />

{<br />

VN,0 ↦→ R N<br />

“point evaluation”<br />

is a bijective linear mapping.<br />

v ↦→ ( v(x j ) ) N<br />

j=1<br />

(1.5.78)<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Collocation conditions: u N ∈ V N : L(u N )(x j ) = f(x j ) , j = 1,...,N .<br />

(1.5.79)<br />

1.5<br />

p. 126<br />

1.5<br />

p. 12


➌ choose ordered basis B = {b 1 N ,...,bN N } ofV N,0 & plug basis representation<br />

u N = u 0 +µ 1 b 1 N +···+µ Nb N N (u 0ˆ= offset function, cf. Rem. 1.5.10)<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Remark 1.5.83 (Collocation: smoothness requirements <strong>for</strong> coefficients).<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

into collocation conditions (1.5.79)<br />

⃗µ = (µ l ) N l=1 : L(u 0+µ 1 b 1 N +···+µ Nb N N )(x j) = f(x j ) , j = 1,...,N . (1.5.80)<br />

For 2-point BVP (1.5.81): σ must be differentiable in collocation collocation nodes, with known values<br />

dσ<br />

dx (x j ),j = 1,...,N, in the sense of Rem. 1.5.3: extra difficulty whenσ given in procedural <strong>for</strong>m.<br />

△<br />

In general: (1.5.80) is a non-linear system of equation (N equations <strong>for</strong> N unknownsµ 1 ,...,µ N ).<br />

Note: bijectivity of point evaluation (1.5.78) ⇒ ♯{nodes} = dimV N,0<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

1.5.2.1 Spectral collocation<br />

Focus: linear two point boundary value problem (1.5.81)<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

trial space <strong>for</strong> polynomial spectral collocation:<br />

V N,0 = P p (R)∩C0 2 ([a,b]), p ≥ 2 . (1.5.84)<br />

1.5<br />

p. 129<br />

= polynomials of degree≤ p, vanishing at endpoints of domain, N := dimV N,0 = p−1 .<br />

➣ same trial space as <strong>for</strong> polynomial spectral Galerkin approach, see Sect. 1.5.1.1.<br />

1.5<br />

p. 13<br />

Below: detailed discussion <strong>for</strong> linear two point boundary value problem<br />

L(u) := − d (<br />

σ(x) du )<br />

dx dx (x) = g(x) , a ≤ x ≤ b ,<br />

u(a) = u a , u(b) = u b ,<br />

on domainΩ = [a,b], related to variational problem (1.4.16).<br />

(1.5.81)<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Discussion: polynomial spectral collocation <strong>for</strong> two-point BVP (1.5.81)<br />

offset function<br />

u 0 (x) := b−x<br />

b−a u a+ x−a<br />

b−a u b .<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Basis B := {b j N := M j} consisting of integrated Legendre polynomials, see (1.5.24).<br />

Remark 1.5.82 (Smoothness requirements <strong>for</strong> collocation trial space).<br />

For two-point BVP (1.5.81) consider space V N,0 := S1,0 0 (M) of M-piecewise linear finite element<br />

functions. → Sect. 1.5.1.2<br />

Note: v N ∈ S 0 1,0 (M) is not differentiable in nodesx j of the mesh.<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Note:<br />

Terminology:<br />

L from (1.5.81) is a linear differential operator!<br />

A differential operator is a mapping on a function space involving only values of the<br />

function argument and some of its derivatives in the same point.<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Natural choice collocation points = nodes of the mesh is not possible!<br />

(because <strong>for</strong> v N ∈ S1,0 0 (M) the functionL(v N) is discontinuous in the nodes of the mesh)<br />

A differential operatorLis linear, if<br />

Assuming σ ∈ C 1 ([a,b]) global continuity of L(v N ) entails V N,0 ⊂ C 2 ([a,b]), cf.<br />

Sect. 1.5.2.2.<br />

△<br />

1.5<br />

p. 130<br />

L(αu+βv) = αL(u)+βL(v) ∀α,β ∈ R, ∀functionsu,v (1.5.85)<br />

1.5<br />

p. 13


(1.5.80)<br />

(1.5.85)<br />

=⇒<br />

A⃗µ = ⃗ϕ ,<br />

N∑<br />

L(b l N )(x k)µ l = f(x k )−L(u 0 )(x k ) , k = 1,...,N . (1.5.86)<br />

l=1<br />

⇕<br />

(A) k,l := L(b l N )(x k) , k,l ∈ {1,...,N} ,<br />

ϕ k := f(x k )−L(u 0 )(x k ) , k ∈ {1,...,N} .<br />

AnN ×N linear system of equations<br />

For BVPs featuring linear differential operators, collocation invariably leads to a linear system<br />

of equations <strong>for</strong> the unknown coefficients of the basis representation of the collocation solution.<br />

Remark 1.5.88 (Bases <strong>for</strong> polynomial polynomial spectral collocation).<br />

Same choices as <strong>for</strong> spectral Galerkin methods, see Rem. 1.5.22.<br />

(1.5.87)<br />

△<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

13 i f (nargout < 3)<br />

14 D = [zeros( s i z e (x)); ones( s i z e (x))];<br />

15 f o r j=1:n-1, D = [D;(2*j+1)*V(j+1,:)+D(j,:)]; end<br />

16 end<br />

Code 1.5.92: Spectral collocation <strong>for</strong> linear 2nd-order two-point BVP<br />

1 f u n c t i o n u = linspeccol(g,N,x)<br />

2 % Polynomial spectral collocation discretization of linear 2nd-order two-point<br />

BVP<br />

3 % − d2 u<br />

dx 2 = g(x), u(0) = u(1) = 0<br />

4 % on Ω = [0,1]. Trial space of dimension N, collocation in Chebychev nodes.<br />

5 % Values of approximate solution in points x j are returned in the row vector u<br />

6 cn = cos((2*(1:N)-1)* p i /(2*N)); % Chebychev nodes, see (1.5.90)<br />

7 [V,M,D] = dilegpol(N+1,cn); % Obtain values of (2nd<br />

derivatives) of M m<br />

8 mu = (-4*D(2:N+1,:))’\(g(0.5*(cn+1))’); % Solve collocation system<br />

9 % Compute values of integrated Legendre polynomials at output points<br />

10 [V,M] = dilegpol(N+1,2*x-1); u = mu’*M;<br />

Example 1.5.93 (Polynomial spectral collocation <strong>for</strong> 2-point BVP).<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Remark 1.5.89 (Collocation points <strong>for</strong> polynomial spectral collocation).<br />

Rule of thumb (without further explanation, see [16]):<br />

choose collocation points x j , j = 1,...,N such that the induced Lagrangian interpolation<br />

operator (→ [18, Thm. 3.3.8]) has a small∞-norm, see [18, Lemma 3.3.17].<br />

1.5<br />

p. 133<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Setting of Ex. 1.5.20, spectral polynomial collocation, on ,N = 5,7,10, basis from integrated Legendre<br />

polynomials, plot of solutionu N .<br />

1.5<br />

p. 13<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Popular choice (due to [18, Eq. 9.2.15]): Chebychev nodes<br />

( )<br />

x k := a+ 2 1(b−a) (2k −1<br />

cos<br />

2N π) +1 , k = 1,...,N . (1.5.90)<br />

1.5<br />

1<br />

2.5<br />

2<br />

Spectral collocation: equidistant nodes<br />

△<br />

0.5<br />

1.5<br />

1<br />

Code 1.5.91: Computation of derivatives of Legendre polynomials using (1.5.30)<br />

1 f u n c t i o n [V,M,D] = dilegpol(n,x)<br />

2 % Computes values of the first n+1 Legendre polynomials (returned in matrix V)<br />

3 % the first n−1 integrated Legendre polynomials (returned in matrix M), and<br />

the<br />

4 % first n+1 first derivatives of Legendre polyomials in the points x j passed<br />

5 % in the row vector x.<br />

6 % Uses the recursion <strong>for</strong>mulas (1.5.28) and (1.5.24)<br />

7 V = ones( s i z e(x)); V = [V; x];<br />

8 % recursion (1.5.28) <strong>for</strong> Legendre polynomials<br />

9 f o r j=1:n-1, V = [V; ((2*j+1)/(j+1)).*x.*V(end,:) -<br />

j/(j+1)*V(end-1,:)]; end<br />

10 % Formula (1.5.24) <strong>for</strong> integrated Legendre polynomials<br />

11 M = diag(1./(2*(1:n-1)+1))*(V(3:n+1,:) - V(1:n-1,:));<br />

12 % Recursion <strong>for</strong>mula (1.5.30) <strong>for</strong> derivatives of Legendre polynomials<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

1.5<br />

p. 134<br />

u<br />

0<br />

−0.5<br />

−1<br />

N=4<br />

N=5<br />

N=6<br />

u(x)<br />

−1.5<br />

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1<br />

x<br />

Fig. 31<br />

Collocation in Chebychev nodes<br />

u<br />

0.5<br />

0<br />

−0.5<br />

−1<br />

N=4<br />

N=5<br />

N=6<br />

u(x)<br />

−1.5<br />

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1<br />

x<br />

Fig. 32<br />

Collocation in equidistant nodes<br />

✸<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

1.5<br />

p. 13


1.5.2.2 Spline collocation<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Example 1.5.95 (Cubic spline collocation discretization of 2-point BVP).<br />

1.5<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

1<br />

Analoguous to Sect. 1.5.1.2:<br />

now collocation based on piecewise polynomials<br />

Setting of Ex. 1.5.20<br />

0.5<br />

Rem. 1.5.82 ➣ <strong>for</strong> BVP (1.5.81) smoothnessV N,0 ⊂ C 2 ([a,b]) is required.<br />

Which piecewise polynomial spaces offer this kind of smoothness ?<br />

Recall [18, Def. 3.7.1], cf. [18, Sect. 3.7.1]:<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Cubic spline collocation with equidistant nodes,<br />

M = 5,7,12<br />

Solutionu N ✄<br />

u<br />

0<br />

−0.5<br />

−1<br />

exact<br />

M = 5<br />

M = 7<br />

M = 12<br />

−1.5<br />

0 0.2 0.4 0.6 0.8 1<br />

x<br />

Fig. 33<br />

✸<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

1.5.3 Finite differences<br />

Definition 1.5.94 (Cubic spline).<br />

s :]a,b[↦→ R is a cubic spline function w.r.t. the node set T := {a = x 0 < x 1 < x 2 < ... <<br />

x M−1 < x M = b},if<br />

(i) s ∈ C 2 ([a,b]) (twice continuously differentiable),<br />

(ii) s |]xj−1 ,x j [ ∈ P 3(R) (piecewise cubic polynomial)<br />

✎ notation: S 3,T ˆ= vector space of cubic splines on node setX<br />

Known: dimS 3,T = ♯T +2 = M +3<br />

Trial space <strong>for</strong> collocation <strong>for</strong> 2-point BVP (1.5.81)<br />

{<br />

natural cubic splines: V N,0 := s ∈ S 3,T : s′′ (a) = s ′′ }<br />

(b) = 0 ,<br />

s(a) = s(b) = 0<br />

Choice of collocation nodes:<br />

⇒ dimN := V N = M −1 ,<br />

1.5<br />

p. 137<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Focus:<br />

2nd-order linear two-point BVP<br />

L(u) := − d (<br />

σ(x) du )<br />

dx dx (x) = g(x) , a ≤ x ≤ b , (1.5.81)<br />

u(a) = u a , u(b) = u b ,<br />

Idea:<br />

E.g.<br />

Replace<br />

Setting as in Sect. 1.5.1.2:<br />

➣ Ω = [a,b] equipped with nodes (M ∈ N)<br />

X := {a = x 0 < x 1 < ··· < x M−1 < x M = b} .<br />

➤<br />

mesh/grid<br />

M := {]x j−1 ,x j [: 1 ≤ j ≤ M} .<br />

derivatives−→ difference quotients<br />

(in finitely many special points = nodes of a mesh)<br />

d 2 u u(x+h)−2u(x)+u(x−h)<br />

dx2(x) ≈<br />

h 2 , h > 0 “small” . (1.5.96)<br />

a<br />

x 0 x 1 x 2 x 3 x 4 x 5 x 6 x 7 x 8 x 9 x 10x 11x 12x 13x 14<br />

Special case:<br />

equidistant mesh:<br />

x j := a+jh , h := b−a<br />

M .<br />

b<br />

1.5<br />

p. 13<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

collocation nodes <strong>for</strong> cubic spline collocation = spline nodesx j :<br />

N = T<br />

1.5<br />

p. 138<br />

☞ [x j−1 ,x j ],j = 1,...,M, ˆ= cells ofM, cell size h j := |x j −x j−1 ,j = 1,...,M<br />

meshwidth h M := max|x j −x j−1 |<br />

j<br />

1.5<br />

p. 14


➊ replacement of outer derivative (x j−1/2 = 1 2 (x j +x j−1 )):<br />

(<br />

d<br />

σ(x) du )<br />

dx dx (x)<br />

|x=x j<br />

≈<br />

(<br />

2<br />

σ(x<br />

h j−1 +h j+1/2 ) du<br />

)<br />

j dx (x j+1/2 )−σ(x j−1/2 )du dx (x j−1/2 ) .<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

(Up to scaling with h) the finite difference approach and the linear finite element Galerkin<br />

scheme (→ Sect. 1.5.1.2) yield the same system matrix <strong>for</strong> the BVP (1.5.81) and its associated<br />

variational problem (1.4.16), cf. (1.5.100) and (1.5.63).<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

➋<br />

replacement of inner derivative, e.g.,<br />

du<br />

dx (x j+1/2 ) ≈ u(x j+1)−u(x j )<br />

.<br />

h j<br />

1.6 Convergence<br />

− d (<br />

σ(x) du )<br />

dx dx (x) =<br />

|x=x j<br />

σ(x j−1/2 ) u(x j)−u(x j−1 )<br />

−σ(x<br />

h j+1/2 ) u(x j+1)−u(x j )<br />

j−1 h j<br />

1<br />

2 (h . (1.5.97)<br />

j−1+h j )<br />

On equidistant mesh, uni<strong>for</strong>m meshwidthh j = h > 0,j = 1,...,M:<br />

− d (<br />

σ(x) du )<br />

dx dx (x) |x=x j<br />

= 1 )<br />

(−σ(x<br />

h 2 j+1/2 )u(x j+1 )+(σ(x j+1/2 )+σ(x j−1/2 ))u(x j )−σ(x j−1/2 )u(x j−1 ) . (1.5.98)<br />

Unknowns in finite difference method: µ l = u(x l ), l = 1,...,M −1<br />

− d (<br />

σ(x) du )<br />

dx dx (x) = g(x) ,a ≤ x ≤ b .<br />

← restriction toX , use (1.5.98)<br />

−σ(x j+1/2 )µ j+1 +(σ(x j+1/2 )+σ(x j−1/2 ))µ j −σ(x j−1/2 )µ j−1<br />

h 2 = g(x j ) , j = 1,...,M −1 .<br />

A⃗µ = ⃗ϕ , with<br />

⇕<br />

⎧<br />

0 , if|j −l| > 1 ,<br />

(A) jl = h −2·<br />

⎪⎨ −σ(x j+1/2 ) , ifj = l−1 ,<br />

σ(x j−1/2 )+σ(x j−1/2 ) , ifj = l ,<br />

⎪⎩<br />

−σ(x l+1/2 ) , ifl = j −1 .<br />

⎧<br />

⎪⎨ g(x 1 )+σ(x 1/2 )u a , ifj = 1 ,<br />

ϕ j = g(x j ) , if1 < j < M −1 ,<br />

⎪⎩ g(x M−1 )+σ(x M−1/2 )u b , ifj = M −1 .<br />

(1.5.99)<br />

(1.5.100)<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

1.5<br />

p. 141<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

For elastic string model (1.2.17)/(1.3.7), taut string model in graph description (1.4.16) with exact<br />

solutionu : [0,1] ↦→ R 2 oru : [a,b] ↦→ R, respectively:<br />

Discretization schemes<br />

(Galerkin approach, Sect. 1.5.1<br />

collocation methods, Sect. 1.5.2)<br />

−→<br />

Approximate solution<br />

u N : [0,1] ↦→ R 2 /u N : [a,b] ↦→ R<br />

(functions∈ V N )<br />

Desirable: approximationu N “close to” exact solutionu: rigorous meaning ?<br />

↕<br />

Remark 1.6.1 (Grid functions).<br />

Note:<br />

How to measure discretization erroru−u N ?<br />

<strong>for</strong> finite differences (→ Sect. 1.5.3) we get no solution function, only grid function X ↦→ R<br />

(“point values”)<br />

☞<br />

Remark 1.6.2.<br />

reconstruction of a function through postprocessing, e.g., linear interpolation<br />

We encountered the issues of convergence of approximate solutions be<strong>for</strong>e:<br />

△<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

1.6<br />

p. 14<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

An (M −1)×(M −1) linear system of equations<br />

<strong>Numerical</strong> quadrature [18, Ch. 10]: study of asymptotic behavior of quadrature error<br />

<strong>Numerical</strong> integration [18, Ch. 12]: discretization error of single step methods<br />

1.5<br />

p. 142<br />

△<br />

1.6<br />

p. 14


1.6.1 Norms on function spaces<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Definition 1.6.6 (Mean square norm/L 2 -norm). → Def. 2.2.5<br />

For a functionu ∈ (C 0 pw(Ω)) n the mean square norm/L 2 -norm is given by<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Tools <strong>for</strong> measuring discretization errors:<br />

norms on function spaces/grid function spaces<br />

‖u‖ 0<br />

(‖u‖ L 2 (Ω)<br />

) (∫ 1/2<br />

:= ‖u(x)‖ dx) 2 , u ∈ (L 2 (Ω)) n .<br />

Ω<br />

Reminder → [18, Sect. 2.5.1]<br />

Definition 1.6.3 (Norm).<br />

A norm‖·‖ V on an R-vector spaceV is a mapping‖·‖ V : V ↦→ R + 0 , such that<br />

(definiteness) ‖v‖ V = 0 ⇐⇒ v = 0 ∀v ∈ V (N1)<br />

(homogeneity) ‖λv‖ V = |λ|‖v‖ V ∀λ ∈ R, ∀v ∈ V , (N2)<br />

(triangle inequality) ‖w +v‖ V ≤ ‖w‖ V +‖v‖ V ∀w,v ∈ V . (N3)<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

L 2 (Ω) designates the vector space of square integrable functions, another L p -space (<strong>for</strong> p = 2)<br />

and a Hilbert space.<br />

The “0” in the notation‖·‖ 0 refers to the absense of derivatives in the definition of the norm.<br />

Obviously, theL 2 -norm is weaker than the supremum norm:<br />

‖v‖ L 2 ([a,b]) ≤ √|b−a|‖v‖ L ∞ ([a,b]) ∀v ∈ C 0 pw([a,b]) .<br />

In particular, the L 2 -norm of the discretization error may be small despite large deviations of u N<br />

fromu, provided that these deviations are very much localized.<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Next: important norms on function spaces, cf. [18, Eq. 3.3.14], [18, Eq. 3.3.15], [18, Eq. 3.3.16]:<br />

1.6<br />

p. 145<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

✗<br />

✖<br />

Remark 1.6.7 (Energy norm).<br />

Relevant error norms suggested by application context/physics!<br />

1.6<br />

p. 14<br />

✔<br />

Numerica<br />

<strong>Methods</strong><br />

✕<strong>for</strong> PDEs<br />

Definition 1.6.4 (Supremum norm).<br />

The supremum norm of an (essentially) bounded functionu : Ω ↦→ R n is defined as<br />

(<br />

‖u‖ ∞ = ‖u‖L (Ω)) ∞ := sup ‖u(x)‖ , u ∈ (L ∞ (Ω)) n . (1.6.5)<br />

x∈Ω<br />

1.6<br />

p. 146<br />

We consider the model <strong>for</strong> a homogeneous taut string in physical space, see (1.4.16), with associated<br />

total potential energy functional<br />

∫b<br />

R. Hiptmair J(u) :=<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

a<br />

V.<br />

Gradinaru where, <strong>for</strong> the sake of simplicity, we assumeu<br />

A. Chernov<br />

a = u b = 0.<br />

L ∞ DRAFT<br />

(Ω) denotes the vector space of essentially bounded functions. It is the instance <strong>for</strong>p = ∞ of<br />

anL p A manifestly relevant error quantity of interest is the deviation of energies<br />

-space.<br />

E J := |J(u)−J(u N )| .<br />

The notation ‖·‖ ∞ hints at the relationship between the supremum norm of functions and the<br />

maximum norm <strong>for</strong> vectors in R n .<br />

Forn = 1 the Euclidean vector norm in the definition reduces to the modulus|u(x)|.<br />

The norm‖u−u N ‖ L ∞ (Ω) measures the maximum distance of the function values ofuandu N .<br />

∣ ∣<br />

1 ∣∣∣ du ∣∣∣ 2<br />

2 dx (x) +ĝ(x)u(x)dx , u ∈ C0,pw 1 ([a,b]) , (1.6.8)<br />

We adopt the concise notations introduced <strong>for</strong> abstract (linear) variational problems in<br />

Rems. 1.3.12, 1.4.5:<br />

∫b<br />

du<br />

a(u,v) :=<br />

dx (x)dv dx (x)dx ,<br />

J(u) = 1 2 a(u,u)−l(u) , a<br />

∫b<br />

l(v) := − ĝ(x)v(x)dx ,<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

1.6<br />

p. 14


whereais a bilinear <strong>for</strong>m, see Def. 1.3.13.<br />

Assumption: u N ∈ V N,0 ˆ= Galerkin solution based on discrete trial spaceV N,0 ⊂V 0 .<br />

a(u,v) = l(v) ∀v ∈ V 0 := C0,pw 1 ([a,b]) ,<br />

a(u N ,v N ) = l(v N ) ∀v N ∈ V N,0 ⊂ V 0 .<br />

We can use the defining variational equations <strong>for</strong>uandu N to express<br />

(1.6.9)<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

From (1.6.11)<br />

☛<br />

‖u−u N ‖ H 1 (Ω) ≤ ǫ<br />

|J(u)−J(u N)| ≤ |u+u N | H 1 (Ω) |u−u N| H 1 (Ω) (1.6.14)<br />

(N3)<br />

≤ (2|u| H 1 (Ω) +ǫ)ǫ .<br />

estimate of the energy norm of the discretization error paves the way <strong>for</strong> bounding the energy<br />

deviation.<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

J(u)−J(u N ) = − 1 2 (a(u,u)−a(u N,u N )) (∗) = − 1 2 a(u+u N,u−u N ) . (1.6.10)<br />

(∗): a straight<strong>for</strong>ward consequence of the bilinearity ofa, see Def. 1.3.13, c.f. a 2 −b 2 = (a+b)(a−b)<br />

<strong>for</strong>a,b ∈ R.<br />

Concretely,<br />

∫ |J(u)−J(u N )| = 2<br />

1 b d<br />

∣ a dx (u+u d<br />

N)·<br />

dx (u−u N)dx<br />

∣<br />

(<br />

(∗) ∫ b<br />

≤ 1 2 | d<br />

) 1/2 ( ∫ b<br />

a dx (u+u N)| 2 dx | d<br />

) 1/2<br />

a dx (u−u N)| 2 dx .<br />

(∗): due to Cauchy-Schwarz inquality (2.2.15)<br />

(1.6.11)<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

1.6<br />

p. 149<br />

Remark 1.6.15 (Norms on grid function spaces).<br />

To measure the discretization error <strong>for</strong> finite difference schemes (→ Sect. 1.5.3) one may resort to<br />

mesh dependent norms<br />

(discrete)l 2 -norm : ‖⃗µ‖ 2 M l 2 (X) := ∑<br />

1<br />

2 (h j +h j+1 )|µ j | 2 , (1.6.16)<br />

j=0<br />

△<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

1.6<br />

p. 15<br />

Definition 1.6.12 (H 1 -seminorm). → Def. 2.2.12<br />

For a functionu ∈ C 1 pw([a,b]) theH 1 -seminorm reads<br />

|u| 2 H 1 ([a,b]) := ∫ b<br />

a<br />

| du<br />

dx (x)|2 dx . (1.6.13)<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

(discrete) maximum norm : ‖⃗µ‖ l ∞ (X)<br />

(under convention h 0 := 0, h M+1 := 0) ,<br />

:= max<br />

j=0,...,M |µ j| . (1.6.17)<br />

△<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

|·| H 1 ([a,b]) is merely a semi-norm, because it only satisfies norm axioms (N2) and (N3), but fails<br />

to be definite: |·| H 1 ([a,b]) = 0 <strong>for</strong> constant functions.<br />

In the setting of the homogeneous taut string model, we have<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Remark 1.6.18 (Approximate computation of norms).<br />

Standard testing of implementations of numerical methods <strong>for</strong> 2-point BVP: Examine norm of<br />

discretization error <strong>for</strong> test cases with (analytically) known exact solutionu.<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

|u| 2 H 1 (iab) = a(u,u) |·| H 1 ([a,b]) is called the energy norm <strong>for</strong> the model.<br />

More explanations in Sect. 2.1.3.<br />

On C0,pw 1 ([a,b]) the semi-norm |·| H 1 (iab) is a genuine norm → Def. 1.6.3. See proof of<br />

Thm. 2.2.16.<br />

Even <strong>for</strong> numerical methods computingu N ∈ V N ⊂ V (Galerkin methods→Sect. 1.5.1, collocation<br />

methods→Sect. 1.5.2):<br />

usually exact computation of ‖u−u N ‖ is impossible/very difficult.<br />

1.6<br />

p. 150<br />

Option: approximate evaluation of norm‖u−u N ‖<br />

1.6<br />

p. 15


supremum norm‖·‖ ∞ : approximation by sampling on discrete point set.<br />

L 2 -norm, energy norm: numerical quadrature<br />

(Gauss quadrature <strong>for</strong> spectral schemes, composite quadrature <strong>for</strong> mesh based schemes)<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

0.35<br />

0.3<br />

0.25<br />

maximum norm<br />

L 2 norm<br />

energy norm<br />

10 −1<br />

maximum norm<br />

L 2 norm<br />

energy norm<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

! Eror intrroduced by approximation of norm must be smaller than discretization error<br />

(➣ use “overkill” quadrature/sampling, cost does not matter much in testing).<br />

△<br />

error norms<br />

0.2<br />

0.15<br />

0.1<br />

error norms<br />

10 −2<br />

10 −3<br />

10 −4<br />

1.6.2 Algebraic and exponential convergence<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

0.05<br />

0<br />

0 50 100 150 200 250 300 350 400 450 500<br />

M<br />

Fig. 34<br />

10 0 M<br />

10 −5<br />

10 0 10 1 10 2 10 3<br />

Fig. 35<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

✬<br />

Crucial: convergence is an asymptotic notion !<br />

✩<br />

What is plotted are the discrete versions of theL 2 -norm and supremum norm, see Rem. 1.6.15.<br />

The energy norm of the error was computed according to the <strong>for</strong>mula<br />

✫<br />

sequence of discrete models ⇒ sequence of approximate solutions(u (i)<br />

N ) i∈N<br />

⇒ study sequence(‖u (i)<br />

N −u‖) i∈N<br />

✪<br />

∣<br />

M∑ ∣∣∣∣<br />

energy norm(error) 2 µ j −µ j−1<br />

:= h j<br />

h<br />

j=1 j<br />

− du<br />

dx (x j−1/2 ) ∣ ∣∣∣∣ 2<br />

.<br />

created by variation of a discretization parameter:<br />

1.6<br />

p. 153<br />

❷ Spectral collocation, polynomial degreep ∈ N → Sect. 1.5.2.1<br />

1.6<br />

p. 15<br />

Discretization parameters:<br />

meshwidth h > 0 <strong>for</strong> finite differences (→ Sect. 1.5.3), p.w. linear finite elements<br />

(→ Sect. 1.5.1.2), spline collocation (→ Sect. 1.5.2.2)<br />

polynomial degree <strong>for</strong> spectral collocation (→ Sect. 1.5.2.1),<br />

spectral Galerkin discretization (→ Sect. 1.5.1.1)<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Monitored:<br />

supremum norm (1.6.5),L 2 -norm (1.6.6) of discretization erroru−u N (approximated<br />

by “overkill” Gaussian quadrature with10 4 nodes)<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Example 1.6.19 (<strong>Numerical</strong> studies of convergence).<br />

Spectral collocation, Chebychev points<br />

L ∞ −norm<br />

L 2 −norm<br />

energy norm<br />

10 0<br />

Spectral collocation, Chebychev points<br />

L ∞ −norm<br />

L 2 −norm<br />

energy norm<br />

Focus: Linear 2-point boundary value problem − d2 u<br />

dx2 = g(x), u(0) = u(1) = 0 on Ω =]0,1[,<br />

variational <strong>for</strong>m (1.5.21),<br />

exact solutionu(x) = sin(2πx 2 ) (→ setting of Ex. 1.5.20)<br />

❶ finite difference discretization on equidistant mesh, meshwidthh > 0 (→ Sect. 1.5.3)<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

error norm<br />

10 0 N<br />

10 −2<br />

10 −4<br />

10 −6<br />

error norm<br />

10 1 N<br />

10 −1<br />

10 −2<br />

10 −3<br />

10 −4<br />

10 −5<br />

10 −6<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

10 −8<br />

10 −7<br />

10 −8<br />

10 −10<br />

10 1<br />

Fig. 36<br />

10 −9<br />

3 4 5 6 7 8 9 10 11 12<br />

Fig. 37<br />

❸ Spline collocation on equidistant mesh, meshwidthh > 0 (→ Sect. 1.5.2.2)<br />

1.6<br />

p. 154<br />

Monitored:<br />

supremum norm (1.6.5),L 2 -norm (1.6.6) ofu−u N (approximated by sampling on fine<br />

grid with10 4 points)<br />

1.6<br />

p. 15


0 50 100 150 200 250 300 350 400 450 500<br />

0.8<br />

0.7<br />

0.6<br />

maximum norm<br />

L 2 norm<br />

10 0<br />

maximum norm<br />

L 2 norm<br />

O(M −2 )<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Unified view:<br />

✗<br />

✖<br />

Study‖u−u N ‖ as function of number N of unknowns (degrees of freedom)<br />

measure <strong>for</strong> costs incurred by method<br />

✔<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

✕<br />

10 −1<br />

0.5<br />

error norms<br />

0.4<br />

0.3<br />

0.2<br />

error norms<br />

10 −2<br />

10 −3<br />

Definition 1.6.20 (Convergence rate). → [18, Sect. 9.1], [18, Eq. 9.1.3]<br />

‖u−u N ‖ = O(N −α ),α > 0 :⇐⇒ algebraic convergence with rateα<br />

‖u−u N ‖ = O(exp(−γN δ )), withγ,δ > 0 :⇐⇒ exponential convergence<br />

10 −4<br />

0.1<br />

0<br />

M<br />

Fig. 38<br />

10 1 M<br />

10 −5<br />

10 0 10 1 10 2 10 3<br />

❹ Spectral Galerkin based on degreep ∈ N polynomials → Sect. 1.5.1.1<br />

Fig. 39<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

✍<br />

recall notation (Landau-O):<br />

f(N) = O(g(N)) :⇔<br />

∃N 0 > 0,∃C > 0 independent ofN<br />

such that|f(N)| ≤ Cg(N) <strong>for</strong>N > N 0 .<br />

(1.6.21)<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Monitored:<br />

supremum norm (1.6.5),L 2 -norm (1.6.6) of discretization erroru−u N (approximated<br />

by trapezoidal rule on fine grid with10 4 points)<br />

1.6<br />

p. 157<br />

1.6<br />

p. 15<br />

error norm<br />

1<br />

0.9<br />

0.8<br />

0.7<br />

0.6<br />

0.5<br />

0.4<br />

Spectral Galerkin error convergence<br />

L ∞ −norm<br />

L 2 −norm<br />

error norm<br />

10 −1<br />

10 −2<br />

10 −3<br />

10 −4<br />

10 −5<br />

10 −6<br />

Spectral Galerkin error convergence<br />

L ∞ −norm<br />

L 2 −norm<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Φ(N)<br />

0.9<br />

0.8<br />

0.7<br />

0.6<br />

0.5<br />

0.4<br />

0.3<br />

−2<br />

N −1<br />

exp(−N −1/2<br />

1/3 exp(−N 1/5 )<br />

exp(−N 1/3 /10)<br />

Φ(N)<br />

0.05<br />

0.04<br />

0.03<br />

0.02<br />

−1<br />

−2<br />

N<br />

exp(−N −1/2<br />

1/3 exp(−N 1/5 )<br />

exp(−N 1/3 /10)<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

0.3<br />

0.2<br />

0.1<br />

2 4 6 8 10 12 14 16 18 20<br />

N<br />

Fig. 40<br />

10 −7<br />

10 −8<br />

10 −9<br />

10 −10<br />

10 0 N<br />

2 4 6 8 10 12 14 16 18 20<br />

Fig. 41<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

0.2<br />

0.1<br />

0<br />

0 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000<br />

N<br />

0.01<br />

0<br />

100 200 300 400 500 600 700<br />

N<br />

Linear plot of qualitative convergence behavior: algebraic/exponential convergence rates<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

DRAFT<br />

Observation:<br />

✄ ‘Empiric convergence” in all cases<br />

✄ different qualitative behavior (of norm of discretization error)<br />

Exponential convergence will always win (asymptotically)<br />

✸<br />

How to compare different discretizations ?<br />

1.6<br />

p. 158<br />

1.6<br />

p. 16


Φ(N)<br />

10 0<br />

10 −1<br />

10 −2<br />

10 −3<br />

10 −4<br />

10 −5<br />

10 −6<br />

10 −7<br />

10 −8<br />

N −2<br />

N −1<br />

N −1/2<br />

10 −9<br />

exp(−N 1/3 )<br />

exp(−N 1/5 )<br />

exp(−N 1/3 /10)<br />

10 −10<br />

0 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000<br />

N<br />

Log-linear plot of decrease of discretization error <strong>for</strong> algebraic/exponential convergence rates<br />

10 0<br />

10 −1<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

1.6<br />

p. 161<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Remark 1.6.22 (Exploring convergence experimentally). → [18, Rem. 9.1.4]<br />

How to determine qualitative asymptotic convergence from raw norms of discretization error?<br />

Given: data tuples(N i ,ǫ i ),i = 1,2,3,..., N i ˆ= problem sizes,ǫ i ˆ= error norms<br />

1. Conjecture: algebraic convergence: ǫ i ≈ CN −α<br />

i<br />

➤<br />

log(ǫ i ) ≈ log(C)−αlogN i<br />

(affine linear in log-log scale).<br />

linear regression on data(logN i ,logǫ i ),i = 1,2,3,... to determine rateα.<br />

2. Conjecture: exponential convergence: ǫ i ≈ Cexp(−γN δ i )<br />

➤<br />

logǫ i ≈ log(C)−γN δ i .<br />

non-linear least squares fit (→ [18, Sect. 7.5]) to determineδ:<br />

⎧ ⎫<br />

⎨∑<br />

⎬<br />

(c,γ,δ) = argmin |logǫ<br />

⎩ i −c+γNi δ |2 ⎭ ,<br />

i<br />

residual↔validity of conjecture. This can be done by a short MATLAB code (→ exercise)<br />

Example 1.6.23 (Asymptotic nature of convergence).<br />

1<br />

△<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

1.6<br />

p. 16<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

10 −2<br />

10 −3<br />

0.8<br />

0.6<br />

0.4<br />

0.2<br />

2-point BVP − d2 u<br />

dx 2 = g(x), u(0) = u(1) = 0,<br />

Ω =]0,1[,<br />

✁ u(x) = sin(50πx 2 )<br />

Φ(N)<br />

10 −4<br />

10 −5<br />

10 −6<br />

10 −7<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

u<br />

0<br />

−0.2<br />

−0.4<br />

−0.6<br />

−0.8<br />

−1<br />

0 0.2 0.4 0.6 0.8 1<br />

x<br />

Fig. 42<br />

❶<br />

❷<br />

finite difference discretization on equidistant<br />

mesh, meshwidthh > 0 (→ Sect. 1.5.3)<br />

Spectral Galerkin based on degree p ∈ N<br />

polynomials → Sect. 1.5.1.1<br />

Evaluations as in Ex. 1.6.19<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

10 −8<br />

10 −9<br />

10 −10<br />

N −2<br />

N −1<br />

N −1/2<br />

exp(−N 1/3 )<br />

exp(−N 1/5 )<br />

exp(−N 1/3 /10)<br />

10 1 10 2 10 3 10 4<br />

N<br />

Log-log plot of decrease of discretization error <strong>for</strong> algebraic/exponential convergence rates<br />

1.6<br />

p. 162<br />

1.6<br />

p. 16


10 3<br />

maximum norm<br />

L 2 norm<br />

10 2<br />

Spectral Galerkin error convergence<br />

L ∞ −norm<br />

L 2 −norm<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Observations:<br />

• no more exponential convergence of spectral Galerkin<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

10 2<br />

10 0<br />

• FD: different rate of algebraic convergence <strong>for</strong> even/oddM !<br />

10 1<br />

10 −2<br />

error norms<br />

10 0<br />

10 −1<br />

error norm<br />

10 −4<br />

10 −6<br />

✸<br />

10 −2<br />

10 −8<br />

10 4 M<br />

10 −3<br />

10 −4<br />

10 0 10 1 10 2 10 3<br />

❶ Finite Difference Method<br />

Fig. 43<br />

10 4 N<br />

10 −10<br />

10 −12<br />

0 20 40 60 80 100 120 140 160<br />

❷ Spectral Galerkin Method<br />

Fig. 44<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Qualitative asymptotic convergence also depends on data !<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Observation: <strong>for</strong> h → 0, p → ∞, algebraic convergence of the finite difference solution, and<br />

exponential convergence of the spectral Galerkin solution emerge. This is the “typical” asymptotic<br />

behavior of the discretization error norms <strong>for</strong> these discretization methods.<br />

However, the onset of asymptotic convergence occurs only <strong>for</strong> rather small meshwidth or large p,<br />

respectively, beyond thresholds that may never be reached in a computation. During a long preasymptotic<br />

phase the error is hardly reduced when increasing the resolution of the discretization.<br />

1.6<br />

p. 165<br />

1.6<br />

p. 16<br />

Example 1.6.24 (Convergence and smoothness of solution).<br />

Ω =]0,1[ (<strong>for</strong> finite differences),Ω =]−1,1[ (<strong>for</strong> spectral Galerkin),<br />

exact solution of 2-point BVP <strong>for</strong> ODE− d2 u<br />

dx 2 = g(x),<br />

✸<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

2<br />

Second-order Scalar Elliptic<br />

Boundary Value Problems<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

10 −2<br />

u(x) =<br />

{ 34 −x 2 , if|x| < 1 2 ,<br />

1−|x| , if|x| ≥ 1 2 . ↔ g(x) =<br />

{<br />

2 , if|x| < 1<br />

2 ,<br />

0 elsewhere .<br />

supremum norm<br />

L 2 norm<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

CORE CHAPTER<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

DRAFT<br />

10 −3<br />

error norms<br />

10 −4<br />

10 −5<br />

error norms<br />

10 −2<br />

Preface<br />

10 −6<br />

10 −1 M<br />

maximum norm<br />

L 2 norm<br />

10 −7<br />

10 0 10 1 10 2 10 3<br />

❶ Finite Difference Method<br />

10 −1 p<br />

10 −3<br />

10 20 30 40 50 60 70 80 90 100<br />

❷ Spectral Galerkin Method<br />

Fig. 45<br />

1.6<br />

p. 166<br />

The previous chapter discussed the trans<strong>for</strong>mation of a minimization problem on a function space<br />

via a variational problem to a differential equation. To begin with, in Sect. 2.1–Sect. 2.4, this chapter<br />

2.0<br />

p. 16


evisits this theme <strong>for</strong> models that naturlly rely on function spaces over domains in two and three<br />

spatial dimensions. Thus the trans<strong>for</strong>mation leads to genuine partial differential equations.<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Terminology: boundary value problem is scalar :⇔ n = 1<br />

(in this case the unknown is a real valued function)<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Sect. 2.2 ventures into the realm of Sobolev spaces, which provide the framework <strong>for</strong> rigorous mathematical<br />

investigation of variational equations. However, we will approach Sobolev spaces as “spaces<br />

of physically meaningful solutions” or “spaces of solutions with finite energy”. From this perspective<br />

dealing with Sobolev spaces will be reduced to dealing with their norms.<br />

What does elliptic mean ?<br />

Mathematical theory of PDEs distinguishes three main classes of boundary value problems (BVPs)<br />

<strong>for</strong> partial differential equations (PDE):<br />

In Sect. 2.5, we change tack and consider a physical phenomenon (heat conduction) where modelling<br />

naturally leads to partial differential equations. On this occasion, we embark on a general discussion<br />

of boundary conditions in Sect. 2.6.<br />

Then the fundamental class of second-order elliptic boundary value problems is introduced. Appealing<br />

to “intuitive knowledge” about the physical systems underlying the models, key properties of their<br />

solutions are presented in Sect. 2.7.<br />

In 2.6 Sect.in the context of stationary heat conduction we introduce the whole range of standard<br />

boundary conditions <strong>for</strong> 2nd-order elliptic boundary value problems. Their discussion in variational<br />

context will be resumed in Sect. 2.9.<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

2.0<br />

p. 169<br />

• Elliptic BVPs (➣ “equilibrium problems”, as discussed in Sects. 1.2.3, 2.1.1, 2.1.2)<br />

• Parabolic initial boundary value problems (IBVPs) (➣ evolution towards equilibrium)<br />

• Hyperbolic IBVPs, among them wave propagation problems and conservation laws (➣<br />

transport/propagation)<br />

The rigorous mathematical definition is complicated and often fails to reveal fundamental properties<br />

of, e.g., solutions that are intuitively clear against the backdrop of the physics modelled by a certain<br />

PDE. Further discussion of classification in [3, § 1] and [15, Ch. 1].<br />

➣ In the spirit of Sect. 1.1<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

2.0<br />

p. 17<br />

Supplementary and further reading:<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Structural properties of a BPV inherited from the modelled system are more important than<br />

<strong>for</strong>mal mathematical classification.<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

An excellent mathematical introduction to partial differential equations is Evans’ book [12]. Chapter<br />

2 gives a very good idea about fundamenal properties of various simple PDEs. Chapters 6 and 7 fit<br />

the scope of this course chapter, but go way beyond it in terms of mathematical depth.<br />

△<br />

Remark 2.0.1 (Boundary value problems (BVPs)).<br />

The traditional concept of a boundary value problem <strong>for</strong> a partial differential equation:<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

2.1 Equilibrium models<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Boundary value problem (BVP)<br />

We only consider stationary systems. Then, frequently, see Sect. 1.2.2<br />

equilibrium = minimal energy configuration of a system<br />

Given a partial differential operatorL, a domainΩ ⊂ R d , a boundary differential operatorB,<br />

boundary datag, and a source termf, seek a functionu : Ω ↦→ R n such that<br />

L(u) = f in Ω ,<br />

2.0<br />

p. 170<br />

Example: elastic string model of Sect. 1.2 (minimization of energy functionalJ(u), see (1.2.17))<br />

2.1<br />

p. 17


Now we study minimization problems <strong>for</strong> energy functional on spaces of functions Ω ↦→ R, where<br />

Ω ⊂ R d is a bounded (spatial) domain andd = 2,3.<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

2.1.1 Taut membrane<br />

Recall: energy functional <strong>for</strong> pinned taut string under gravitational load ĝ, see (1.4.8), in terms of<br />

displacement, see Fig. 17:<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Shape of membrane<br />

⇕<br />

Graph ofu : Ω ↦→ R<br />

“membrane” on spatial domainΩ =]0,1[ 2 ✄<br />

Remark 2.1.1 (Spatial domains).<br />

(– – – ˆ= boundary data)<br />

u(x 1<br />

,x 2<br />

)<br />

3<br />

2.5<br />

2<br />

1.5<br />

1<br />

0.5<br />

0<br />

1<br />

0.8<br />

0.6<br />

0.4<br />

x 1<br />

0.2<br />

u(x)<br />

0.4<br />

0.6<br />

0.8<br />

1<br />

0<br />

x 2<br />

0<br />

0.2<br />

Fig. 47<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

∫b<br />

∣<br />

J(u) := 2<br />

1 ̂σ(x)<br />

du ∣∣∣ 2<br />

∣dx (x) u ∈ C<br />

−ĝ(x)u(x)dx ,<br />

pw([a,b]) 1 ,<br />

u(a) = u a , u(b) = u<br />

a<br />

b .<br />

“2D generalization” of an elastic string ➣ elastic membrane.<br />

2.1<br />

p. 173<br />

2.1<br />

p. 17<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

General assumptions on spatial domainsΩ ⊂ R d :<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Taut drum membranes<br />

✄<br />

✎<br />

d = 1,2,3 ˆ= “dimension” of domain<br />

Ω<br />

Ω is bounded<br />

diam(Ω) := sup{‖x−y‖: x,y ∈ Ω} < ∞ ,<br />

Fig. 46<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Ω has piecewise smooth boundary∂Ω<br />

Fig. 48<br />

△<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Pinning conditions (boundary conditions), cf. (1.2.1), (1.4.12):<br />

fix<br />

u(x) = g(x) x ∈ ∂Ω<br />

⇕<br />

u |∂Ω = g on∂Ω .<br />

<strong>for</strong> some g ∈ C 0 (∂Ω) . (2.1.2)<br />

2.1<br />

p. 174<br />

✎ notation: ∂Ω ˆ= boundary ofΩ<br />

2.1<br />

p. 17


(2.1.2) means that the displacement of the membrane over∂Ω is provided by a prescribed continuous<br />

functiong : ∂Ω ↦→ R: the membrane is clamped into a rigid frame.<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

with u : Ω ↦→ R ˆ= displacement function, see Fig. 47,[u] = m,<br />

f : Ω ↦→ R ˆ= <strong>for</strong>ce density (pressure),[f] = Nm −2 ,<br />

σ : Ω ↦→ R + ˆ= stiffness,[σ] = J.<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Intuition:<br />

g has to be continuous, unless the membrane is to be torn!<br />

(Further discussion in Rem. 2.9.4)<br />

Displacement of taut membrane in equilibrium achieves minimal potential energy, cf. (1.2.17)<br />

u ∗ = argminJ M (u) . (2.1.4)<br />

u∈V<br />

configuration space V =<br />

{<br />

continuous functionsu ∈ C 0 (Ω),<br />

with u |∂Ω = g.<br />

Think of the membrane as a grid of taut strings. Together with Rem. 1.4.11 this justifies the following<br />

expression <strong>for</strong> its total potential energy.<br />

}<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Remark 2.1.5 (Minimal regularity of membrane displacement).<br />

Smoothness required <strong>for</strong>u,f to renderJ M (u) from (2.1.3) meaningful, cf. Sect. 1.3.2:<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Potential energy of a taut membrane (described byu ∈ C 0 (Ω)) under vertical loading:<br />

u ∈ C 1 pw(Ω) is sufficient <strong>for</strong> displacementu,<br />

σ,f ∈ C 0 pw(Ω) already allows integration.<br />

J M (u) := ∫ Ω<br />

elastic energy<br />

1<br />

2 σ(x)‖gradu‖2 −f(x)u(x)dx , (2.1.3)<br />

potential energy in <strong>for</strong>ce field<br />

Recall the definition of the gradient of a function F : Ω ⊂ R d ↦→ R,F(x) = F(x 1 ,...,x d ), see [29,<br />

Kap. 7], [18, Eq. 5.1.8]:<br />

Note:<br />

⎛ ⎞<br />

∂F<br />

∂x<br />

⎜ 1<br />

⎟<br />

gradF(x) := ⎝ . ⎠ .<br />

∂F<br />

∂x d<br />

the gradient atxis a column vector of first partial derivatives,<br />

readgradF(x) as(gradF)(x);gradF is a vector valued functionΩ ↦→ R d .<br />

Also in use (but not in this course) is the “∇-notation”:<br />

∇F(x) := gradF(x).<br />

2.1<br />

p. 177<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

2.1.2 Electrostatic fields<br />

metal body in metal box<br />

prescribed voltage drop body—box<br />

Sought: electric fieldE : Ω ↦→ R 3 inΩ ⊂ R 3<br />

(Ω ˆ= blue region ✄)<br />

✄<br />

Γ 0<br />

Γ 1<br />

metal<br />

Ω<br />

△<br />

2.1<br />

p. 17<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

U 0<br />

Fig. 49<br />

DRAFT<br />

Note that<br />

σ(x)‖gradu‖ 2 = σ(x 1 ,x 2 )<br />

∂u<br />

2<br />

∣ (x<br />

∂x 1 ,x 2 )<br />

∣ +σ(x 1 ,x 2 )<br />

∂u<br />

2<br />

∣ (x<br />

1 ∂x 1 ,x 2 )<br />

∣ 2<br />

which justifies calling the taut membrane a “two-dimensional string under tension”.<br />

,<br />

2.1<br />

p. 178<br />

2.1<br />

p. 18


From Maxwell’s equations, static case:<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Definition 2.1.11 (Uni<strong>for</strong>mly positive (definite) tensor field).<br />

An matrix-valued functionA : Ω ↦→ R n,n ,n ∈ N, is called uni<strong>for</strong>mly positive definite, if<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

E = −gradu , (2.1.6)<br />

∃α − > 0: (A(x)z)·z ≥ α − ‖z‖ 2 ∀z ∈ R n (2.1.12)<br />

where u : Ω ↦→ R ˆ= electric (scalar) potential,<br />

[u] = 1V<br />

<strong>for</strong> almost allx ∈ Ω, that is, only with the exception of a set of volume zero.<br />

Fig. 50<br />

✁ Electric potential in technical device<br />

Electromagnetic field energy: (electrostatic setting)<br />

∫<br />

∫<br />

J E (E) = 2<br />

1 (ǫ(x)E(x))·E(x)dx = 2<br />

1 (ǫ(x)gradu(x))·gradu(x)dx ,<br />

Ω<br />

Ω<br />

(2.1.7)<br />

where ǫ : Ω ↦→ R 3,3 ˆ= dielectric tensor,ǫ(x) symmetric, [ǫ] = Vm As R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

IfA(x) is symmetric, then we have the equivalence, cf. [18, Rem. 5.1.20],<br />

(2.1.12) ⇔ A(x) s.p.d. (→ [18, Def. 2.7.9]) and λ min (A(x)) ≥ α − .<br />

What is the set/spaceV of admissible electric scalar potentials ?<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

2.1<br />

p. 181<br />

Recall: in electrostatics surfaces of conducting bodies are equipotential surfaces<br />

2.1<br />

p. 18<br />

• Symmetry of the dielectic tensor can always be assumed: ifǫ(x) was not symmetric, then<br />

replacing it with 1 2 (ǫ(x)T +ǫ(x)) will yield exactly the same field energy.<br />

• In terms of partial derivatives and tensor componentsǫ(x) = ( )<br />

ǫ 3<br />

ij i,j=1<br />

we have<br />

3∑ 3∑<br />

(ǫ(x)gradu(x))·gradu(x) = ǫ ij (x) ∂u (x) ∂u (x) .<br />

∂x<br />

i=1 j=1 i ∂x j<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Γ 1<br />

u = 0<br />

Γ 0<br />

Ω<br />

In the situation of Fig. 49:<br />

Boundary conditions<br />

u = 0 onΓ 0 ,<br />

u = U 0 onΓ 1 .<br />

(2.1.13)<br />

{<br />

V = u ∈ Cpw(Ω), 1 }<br />

u satisfies (2.1.13) .<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

u = U 0<br />

Fig. 51<br />

Fundamental property of dielectric tensor<br />

(<strong>for</strong> “normal” materials):<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

U 0<br />

to renderJ E (u) well defined, cf. Sect. 1.3.2.<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

∃0 < ǫ − ≤ ǫ + < ∞: ǫ − ‖z‖ 2 ≤ (ǫ(x)z)·z ≤ ǫ + ‖z‖ 2 ∀z ∈ R 3 , ∀x ∈ Ω . (2.1.8)<br />

Terminology: (2.1.8) :⇔ ǫ is bounded and uni<strong>for</strong>mly positive definite<br />

Below, the notationu = U will designate the boundary conditions (2.1.13).<br />

Equilibrium condition in electrostatic setting:<br />

minimal electromagnetic field energy<br />

2.1<br />

p. 182<br />

u ∗ = argminJ E (u) . (2.1.14)<br />

u∈V<br />

2.1<br />

p. 18


2.1.3 Quadratic minimization problems<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Structure of minimization problems (equilibrium problems) encountered above:<br />

∫<br />

Sect. 2.1.1 ➣ u ∗ = argmin 1<br />

2 σ(x)‖gradu(x)‖ 2 −f(x)u(x)dx , (2.1.15)<br />

u∈Cpw(Ω)<br />

1 Ω<br />

u=g on∂Ω } {{ }<br />

∫<br />

=:J M (u), see (2.1.3)<br />

1<br />

2 (ǫ(x)gradu(x))·gradu(x)dx . (2.1.16)<br />

Sect. 2.1.2 ➣ u ∗ = argmin<br />

u∈C 1 pw(Ω)<br />

u=U on∂Ω<br />

Ω<br />

} {{ }<br />

=:J E (u), see (2.1.7)<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Definition 2.1.21 (Quadratic minimization problem).<br />

A minimization problem<br />

w ∗ = argmin<br />

w∈V 0<br />

J(w)<br />

is called a quadratic minimization problem, if J is a quadratic functional on a real vector space<br />

V 0 .<br />

Hey, both (2.1.15) and (2.1.16) are no genuine quadratic minimization problems, because they are<br />

posed over affine spaces (= “vector space + offset function”, cf. (1.3.14))!<br />

“Offset function trick”, c.f. (1.3.19), resolves the mismatch: <strong>for</strong> quadratic <strong>for</strong>mJ from (2.1.18)<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Evidently, (2.1.15) and (2.1.16) share a common structure. It is the same structure we have already<br />

come across in the minimization problem (1.4.2) <strong>for</strong> the taut string model in Sect. 1.4.<br />

J(u+u 0 ) = 1 2 a(u+u 0,u+u 0 )+l(u+u 0 )+c<br />

= 2 1a(u,u)+a(u,u }<br />

0)+l(u) ++ 1 {{ } 2 a(u 0,u 0 )+l(u 0 )+c =: ˜J(u) ,<br />

} {{ }<br />

=:˜l(u) =:˜c<br />

due to the bilinearity ofaand the linearity ofl.<br />

2.1<br />

p. 185<br />

argmin J(u) = u 0 +argminJ(w+u 0 ) = u 0 +argmin ˜J(w) . (2.1.22)<br />

u∈u 0 +V 0 w∈V 0 w∈V 0<br />

2.1<br />

p. 18<br />

Definition 2.1.17 (Quadratic functional).<br />

A quadratic functional on a real vector spaceV 0 is a mappingJ : V 0 ↦→ R of the <strong>for</strong>m<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Related: Rem. 1.5.10<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

J(u) := 1 2 a(u,u)+l(u)+c , u ∈ V 0 , (2.1.18)<br />

wherea : V 0 ×V 0 ↦→ R is a symmetric bilinear <strong>for</strong>m (→ Def. 1.3.13),l : V 0 ↦→ R a linear <strong>for</strong>m,<br />

andc ∈ R.<br />

For a discussion of quadratic functionals on R n → [18, Sect. 5.1.1]<br />

Recall:<br />

A bilinear <strong>for</strong>ma : V 0 ×V 0 ↦→ R is symmetric, if<br />

a(u,v) = a(v,u) ∀u,v ∈ V 0 . (2.1.19)<br />

IfV 0 = R N (finite-dimensional case), then a quadratic functional has the general representation<br />

J(u) = u T Au+b T u+c , A = A T ∈ R N,N , b ∈ R N , c ∈ R . (2.1.20)<br />

Reminder: quadratic functionals of this <strong>for</strong>ms occur in derivation of steepest descent and conjugate<br />

gradient methods <strong>for</strong> linear systems of equations, see [18, Sect. 5.1.1].<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

2.1<br />

p. 186<br />

Both (2.1.15) and (2.1.16) involve quadratic functionals. To see this apply the “offset function trick”<br />

from (2.1.22) in this concrete case: write u = u 0 + w with an offset function u 0 that satisfies the<br />

boundary conditions andw ∈ C0,pw 1 R. Hiptm<br />

(Ω), cf. (1.3.19).<br />

In both cases: V 0 = C0,pw 1 (Ω) 2.1<br />

(2.1.15) ➥ quadratic minimization problem (→ Def. 2.1.21) with, cf. (2.1.18),<br />

DRAFT<br />

∫<br />

∫<br />

a(w,v) = σ(x)gradw(x)·gradv(x)dx , l(v) := a(u 0 ,v)− f(x)v(x)dx . (2.1.23)<br />

Ω<br />

Ω<br />

(2.1.16) ➥ quadratic minimization problem (→ Def. 2.1.21) with, cf. (2.1.18),<br />

∫<br />

a(w,v) = gradw(x) T ǫ(x)gradv(x)dx , l(v) := a(u 0 ,v) . (2.1.24)<br />

Ω<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

p. 18


Can we conclude existence and uniqueness of solutions of the minimization problems (2.1.15) and<br />

(2.1.16) ?<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Example 2.1.29 (Quadratic functionals with positive definite bilinear <strong>for</strong>m in 2D).<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Let us first tackle the issue of uniqueness:<br />

Analogy between quadratic functionals with positive<br />

definite bilinear <strong>for</strong>m and parabolas:<br />

Definition 2.1.25 (Positive definite bilinear <strong>for</strong>m).<br />

A (symmetric) bilinear <strong>for</strong>ma : V 0 ×V 0 ↦→ R on a real vector spaceV 0 is positive definite, if<br />

u ∈ V 0 \{0} ⇐⇒ a(u,u) > 0 .<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

witha > 0!<br />

J(v) = 2 1 a(v,v) − l(v)<br />

↕ ↕ ↕<br />

f(x) = 2 1ax2 + bx<br />

graph of quadratic functionalR 2 ↦→ R<br />

✄<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

For the special caseV 0 = R n any matrixA ∈ R n,n induces a bilinear <strong>for</strong>m via<br />

Fig. 52<br />

✸<br />

a(u,v) := u T Av = (Av)·u , u,v ∈ R n . (2.1.26)<br />

This connects the concept of a symmetric positive definite bilinear <strong>for</strong>m to the more familiar concept<br />

of s.p.d. matrices (→ [18, Def. 2.7.9])<br />

A s.p.d.<br />

⇔ a from (2.1.26) is symmetric, positive definite.<br />

2.1<br />

2.1<br />

p. 189<br />

p. 19<br />

✬<br />

✩<br />

Definition 2.1.27 (Energy norm). cf. [18, Def. 5.1.1]<br />

A symmetric positive definite bilinear <strong>for</strong>ma : V 0 ×V 0 ↦→ R (→ Def. 2.1.25) induces the energy<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Theorem 2.1.30 (Uniqueness of solutions of quadratic minimization problems).<br />

If the bilinear <strong>for</strong>ma : V 0 ×V 0 ↦→ R is positive definite (→ Def. 2.1.25), then any solution of<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

norm<br />

‖u‖ a := (a(u,u)) 1/2 .<br />

is unique <strong>for</strong> any linear <strong>for</strong>ml : V 0 ↦→ R.<br />

u ∗ = argmin<br />

u∈V 0<br />

J(u) , J(u) = 1 2 a(u,u)+l(u)+c ,<br />

✫<br />

✪<br />

Origin of the term “energy norm” is clear from the connection with potential energy (e.g., in membrane<br />

model and in the case of electrostatic fields, see (2.1.23), (2.1.24)), see above.<br />

Next, we have to verify the norm axioms (N1), (N2), and (N3) from Def. 1.6.3:<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Proof. As in the proof of [18, Lemma 5.1.3], straight<strong>for</strong>ward computations show<br />

J(u)−J(u ∗ ) = 1 2 ‖u−u ∗‖ 2 a .<br />

The assertion of the theorem follows from norm axiom (N1), wich holds <strong>for</strong> the energy norm.<br />

✷<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

• (N1) is immediate from Def. 2.1.25,<br />

• (N2) follows from bilinearity ofa,<br />

• (N3) is a consequence of the Cauchy-Schwarz inequality: <strong>for</strong> any symmetric positive definite<br />

bilinear <strong>for</strong>m<br />

Under the assumptions of the theorem, the quadratic functional J is convex, which is easily seen by<br />

considering the second derivative of the function<br />

ϕ(t) := J(u+tv) ⇒ ¨ϕ(t) = a(v,v) > 0 , ifv ≠ 0 .<br />

|a(u,v)| ≤ (a(u,u)) 1/2 (a(v,v)) 1/2 . (2.1.28)<br />

2.1<br />

p. 190<br />

2.1<br />

p. 19


∫<br />

? Is a(u,v) := (ǫ(x)gradu(x))·gradv(x)dx positive definite onV 0 := C0,pw 1 (Ω)?<br />

Ω<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

The function ϕ(ξ) = 1 2 ξ2 − ξ = 2 1ξ(1 − 2ξ) = 1 2 (ξ − 1)2 − 1 2 has a global minimum at ξ = 1 and<br />

ϕ(ξ)−ϕ(1) = 1 2 (ξ −1)2 .<br />

➤<br />

|η −1| > |ξ −1| ⇒ ϕ(η) > ϕ(ξ).<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

❶: Sinceǫbounded and uni<strong>for</strong>mly positive definite (→ Def. 2.1.11, (2.1.8))<br />

∫<br />

∫<br />

ǫ − ‖gradu(x)‖ 2 dx ≤ a(u,u) ≤ ǫ + ‖gradu(x)‖ 2 dx ∀u . (2.1.31)<br />

Ω<br />

Ω<br />

Hence, it is sufficient to examine the simpler bilinear <strong>for</strong>m<br />

∫<br />

d(u,v) := gradu(x)·gradv(x)dx , u,v ∈ C0,pw 1 (Ω) . (2.1.32)<br />

Ω<br />

❷: Obviously d(u,u) = 0 ⇒ gradu = 0 ⇒ u ≡ const inΩ<br />

Observe: u = 0 on∂Ω ⇒ u = 0<br />

Zero boundary conditions are essential; otherwise one could add constants to the arguments of a<br />

without changing its value.<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Assume that u ∈ V 0 is a global minimizer of J.<br />

Then<br />

w(x) := min{1,2max{u(x),0}} ,<br />

0 ≤ x ≤ 1 ,<br />

is another function ∈ C0,pw 0 ([0,1]), which satisfies<br />

u(x) ≠ 1 ⇒ |w(x)−1| < |u(x)−1|<br />

⇒ J(w) < J(u) !<br />

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1<br />

x<br />

Fig. 53<br />

Hence, whenever we think we have found a minimizer ∈ C0,pw 0 ([0,1]), the <strong>for</strong>mula provides another<br />

eligible function <strong>for</strong> which the value of the functional is even smaller!<br />

u(x)<br />

1<br />

0.8<br />

0.6<br />

0.4<br />

0.2<br />

0<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

2.1<br />

p. 193<br />

The problem in this example seems to be that we have chosen “too small” a function space, c.f.<br />

Sect. 2.2 below.<br />

2.1<br />

p. 19<br />

What about existence?<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

✸<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

In a finite dimensional setting this is not a moot point, see Fig. 52 <strong>for</strong> a “visual proof”.<br />

However, infinite dimensional spaces hold a lot of surprises and existence of solutions of quadratic<br />

minimization problems becomes a subtle issue, even if the bilinear <strong>for</strong>m is positive definite.<br />

2.2 Sobolev spaces<br />

Example 2.1.33 (Non-existence of solutions of positive definite quadratic minimization problem).<br />

We consider the quadratic functional<br />

∫ 1 ∫ 1<br />

J(u) := 1<br />

2 u 2 (x)−u(x)dx = 2<br />

1 (u(ξ)−1) 2 −1dx ,<br />

0<br />

0<br />

on the space V 0 := C0,pw 0 ([0,1])<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Mathematical theory is much concerned about proving existence of suitably defined solutions <strong>for</strong><br />

minimization problems. As demonstrated in Ex. 2.1.33 this can encounter profound problems.<br />

In this section we will learn about a class of abstract function spaces that has been devised to<br />

deal with the question of existence of solutions of quadratic minimization problems like (2.1.15) and<br />

(2.1.16). We can only catch of glimps of the considerations; thorough investigation is done in the<br />

mathemtical field of functional analysis.<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

It fits the abstract <strong>for</strong>m from Def. 2.1.17 with<br />

∫ 1<br />

∫ 1<br />

a(u,v) = u(x)v(x)dx , l(v) = v(x)dx .<br />

0<br />

0<br />

2.1<br />

p. 194<br />

2.2<br />

p. 19


Consider a quadratic minimization problem (→ Def. 2.1.21) <strong>for</strong> a quadratic functional (→ Def. 2.1.17)<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

We follow the above recipe, which suggests to choose<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

J : V 0 ↦→ R , J(u) = 1 2 a(u,u)+l(u)+c ,<br />

based on a symmetric positive definite (s.p.d.) bilinear <strong>for</strong>ma → Def. 2.1.25.<br />

∫<br />

V 0 := {v : Ω ↦→ R integrable: |v(x)| 2 dx < ∞} (2.2.4)<br />

Ω<br />

It is clear thatJ(V 0 ) is bounded from below, if<br />

∃C > 0: |l(u)| ≤ C‖u‖ a ∀u ∈ V 0 , (2.2.1)<br />

where‖·‖ a is the energy norm induced bya, see Def. 2.1.27:<br />

Remark:<br />

J(u) = 1 2 a(u,u)−l(u) ≥ 1 2 ‖u‖2 a −C‖u‖ a ≥ −1 2 C2 .<br />

In mathematical terms (2.2.1) means thatlis continuous w.r.t. ‖·‖ a<br />

Under these conditions, the quadratic minimization problem <strong>for</strong> J should have a (unique, due to<br />

Thm. 2.1.30) solution, if it is considered on a space that is “large enough”.<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Definition 2.2.5 (SpaceL 2 (Ω)).<br />

The function space defined in (2.2.4) is the space of square-integrable functions on Ω and<br />

denoted byL 2 (Ω).<br />

It is a normed space with norm<br />

( ) (∫ 1/2<br />

‖v‖ 0 := ‖v‖ L 2 (Ω) := |v(x)| dx) 2 .<br />

Ω<br />

Notation: L 2 (Ω) ← superscript “2”, because square in the definition of norm‖·‖ 0<br />

Note: obviously C 0 pw(Ω) ⊂ L 2 (Ω).<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Idea: <strong>for</strong> a quadratic minimization problem (→ Def. 2.1.21) with<br />

symmetric positive definite (s.p.d.) bilinear <strong>for</strong>ma,<br />

a linear <strong>for</strong>mlthat is continuous w.r.t. ‖·‖ a , see (2.2.1),<br />

posed over a function space follow the advice:<br />

consider it on the largest space of functions <strong>for</strong> whichastill makes sense !<br />

2.2<br />

p. 197<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Remark 2.2.6 (Boundary conditions andL 2 (Ω)).<br />

Ex. 2.1.33 vs. Ex. 2.2.2: Crying foul! (boundary conditions u(0) = u(1) = 0 in Ex. 2.1.33, but<br />

none in Ex. 2.2.2!)<br />

✸<br />

2.2<br />

p. 19<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

✗<br />

✖<br />

(and which complies with boundary conditions)<br />

Choose “V 0 := {functionsv onΩ: a(v,v) < ∞}”<br />

Example 2.2.2 (Space of square integrable functions). → Ex. 2.1.33<br />

R. Hiptmair<br />

✔<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

✕<br />

A. Chernov<br />

DRAFT<br />

Consideru ∈ C 0 ([0,1]) and try to impose boundary valuesu 0 ,u 1 ∈ R by “altering”u:<br />

⎧<br />

⎪⎨ u(x)+(1−nx)(u 0 −u(0)) , <strong>for</strong> 0 ≤ x ≤ n 1 ,<br />

ũ(x) = u(x) , <strong>for</strong> n 1 ⎪⎩<br />

< x < 1− n 1 ,<br />

u(x)−n(1− n 1 −x)(u 1−u(1)) , <strong>for</strong> 1− n 1 < x ≤ 1 .<br />

ũ(0) = u 0 , ũ(1) = u 1 , ‖ũ−u‖ 2 L 2 (]0,1[) = 3n 1 (u 0+u 1 −u(0)−u(1))→ 0 <strong>for</strong>n → ∞ .<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Quadratic functional (related toJ from Ex. 2.1.33):<br />

∫<br />

J(u) := 1<br />

2 |u(x)| 2 −u(x)dx .<br />

(<br />

u ∈ Cpw(Ω) 0 )<br />

?<br />

(2.2.3)<br />

Tiny perturbations of a function u ∈ L 2 (]0,1[) (in terms of changing its L 2 -norm) can make it<br />

attain any value atx = 0 andx = 1.<br />

Ω<br />

2.2<br />

p. 198<br />

Boundary conditions cannot be imposed inL 2 (Ω) !<br />

△<br />

2.2<br />

p. 20


Remark 2.2.7 (Quadratic minimization problems on Hilbert spaces).<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Remark 2.2.11 (Boundary conditions inH 1 0 (Ω)).<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

On the function space V 0 = L 2 (Ω) the quadratic minimization problem <strong>for</strong> the quadratic functional<br />

from (2.2.3) can be shown to possess a solution. Instrumental in the proof is the fact that L 2 (Ω) is a<br />

Hilbert space, that is, a complete normed space.<br />

Rem. 2.2.6 explained why imposing boundary conditions on functions inL 2 (Ω) does not make sense.<br />

This theory is beyond the scope of this course. For more explanations see [12, Ch. 5 and Sect. 6.2].<br />

△<br />

Now consider a quadratic minimization problem <strong>for</strong> the functional, c.f. (2.1.15),<br />

∫<br />

J(u) := 1<br />

2 ‖gradu‖ 2 −f(x)u(x)dx<br />

(u ∈ C0,pw 1 )<br />

(Ω) ?<br />

Ω<br />

(2.2.8)<br />

What is the natural function space <strong>for</strong> this minimization problem? Again, we follow the above recipe,<br />

which suggests that we choose<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

2.2<br />

p. 201<br />

Yet, in (2.2.9) zero boundary conditions are required <strong>for</strong>v !<br />

Discussion parallel to Rem. 2.2.6, but now with the norm |·| H 1 (Ω) in mind: Consider u ∈ C1 ([0,1])<br />

and try to impose boundary valuesu 0 ,u 1 ∈ R by “altering”u:<br />

⎧<br />

⎪⎨ u(x)+(1−nx)(u 0 −u(0)) , <strong>for</strong> 0 ≤ x ≤ n 1 ,<br />

ũ(x) = u(x) , <strong>for</strong> n 1 ⎪⎩<br />

< x < 1− n 1 ,<br />

u(x)−n(1− n 1 −x)(u 1−u(1)) , <strong>for</strong> 1− n 1 < x ≤ 1 .<br />

ũ(0) = u 0 , ũ(1) = u 1 , BUT |ũ−u| 2 H 1 (]0,1[) = n(u 0+u 1 −u(0)−u(1))→ ∞ <strong>for</strong>n → ∞ .<br />

En<strong>for</strong>cing boundary values atx = 0 andx = 1 cannot be done without significantly changing<br />

the “energy” of the function.<br />

△<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

2.2<br />

p. 20<br />

∫<br />

V 0 := {v : Ω ↦→ R integrable: v = 0 on∂Ω, |gradv(x)| 2 dx < ∞} (2.2.9)<br />

Ω<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

However, the solutions of the quadratic minimization problems (2.1.15), (2.1.16) are to satisfy nonzero<br />

boundary conditions. They are sought in a larger Sobolev space, which arises from H0 1 (Ω) by<br />

dispensing with the requirement “v = 0 on∂Ω”.<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Definition 2.2.10 (Sobolev spaceH 1 0 (Ω)).<br />

The space defined in (2.2.9) is the Sobolev spaceH0 1 (Ω) with norm<br />

(∫<br />

1/2<br />

|v| H 1 (Ω) := ‖gradv‖ dx) 2 .<br />

Ω<br />

Notation:<br />

H 1 0<br />

(Ω)<br />

← superscript “1”, because first derivatives occur in norm<br />

← subscript “0”, because zero on∂Ω<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Definition 2.2.12 (Sobolev spaceH 1 (Ω)).<br />

The Sobolev space<br />

∫<br />

H 1 (Ω) := {v : Ω ↦→ R integrable: |gradv(x)| 2 dx < ∞}<br />

Ω<br />

is a normed function space with norm<br />

‖v‖ 2 H 1 (Ω) := ‖v‖2 0 +|v|2 H 1 (Ω) .<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Note:<br />

☛<br />

|·| H 1 (Ω) is the energy norm (→ Def. 2.1.27) associated with the bilinear <strong>for</strong>m in the quadratic<br />

functionalJ from (2.2.8), cf. (2.1.18).<br />

See Rem. 1.6.7 <strong>for</strong> a discussion of the relevance of the energy norm.<br />

2.2<br />

p. 202<br />

H 1 (Ω) is the “maximal function space” on which both J M and J E from (2.1.15), (2.1.16)<br />

are defined.<br />

2.2<br />

p. 20


Remark 2.2.13 (|·| H 1 (Ω) -seminorm).<br />

Note that|·| H 1 (Ω) alone is no longer a norm onH1 (Ω), because <strong>for</strong> v ≡ const obviously|v| H 1 (Ω) =<br />

0, which violates (N1).<br />

△<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Proof. The proof employs a powerful technique in the theoretical treatment of function spaces: exploit<br />

density of smooth functions (which, by itself, is a deep result).<br />

It boils down to the insight:<br />

In order to establish inequalities between continuous functionals on Sobolev spaces of functions<br />

on Ω it often suffices to show the target inequality <strong>for</strong> smooth functions in C ∞ 0 (Ω) or C∞ (Ω),<br />

respectively.<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

In the introduction to this section we saw that a quadratic functional with s.p.d. bilinear <strong>for</strong>m a is<br />

bounded from below, if its linear <strong>for</strong>m l satisfies the continuity (2.2.1). Now, we discuss this <strong>for</strong> the<br />

quadratic functionalJ from (2.2.8) in lieu ofJ M andJ E .<br />

The quadratic functionalJ from (2.2.8) involves the linear <strong>for</strong>m<br />

∫<br />

l(u) := f(x)u(x)dx . (2.2.14)<br />

Ω<br />

f ˆ= load function ➣ f ∈ C 0 pw(Ω) should be admitted.<br />

Crucial question: Islfrom (2.2.14) continous onH 1 0 (Ω) ?<br />

⇕ (c.f. (2.2.1))<br />

∃C > 0: |l(u)| ≤ C|u| H 1 (Ω) ∀u ∈ H 1 0 (Ω) ? .<br />

To begin with, we use the Cauchy-Schwarz inequality (2.1.28) <strong>for</strong> itegrals, which implies<br />

⎛ ⎞<br />

∫<br />

1/2 ∫<br />

⎛ ⎞1/2<br />

∫<br />

⎜<br />

|l(u)| =<br />

f(x)u(x)dx<br />

≤ ⎝ |f(x)| 2 ⎟ ⎜<br />

dx⎠<br />

⎝ |u(x)| 2 ⎟<br />

dx⎠<br />

= ‖f‖ 0 ‖u‖<br />

}{{} 0 . (2.2.15)<br />

∣Ω<br />

∣ Ω Ω 0: |l(u)| ≤ C|u| H 1 (Ω) ∀u ∈ H 1 0 (Ω) ,<br />

✷<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

2.2<br />

p. 20<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

(2.2.1)<br />

✫<br />

✪<br />

2.2<br />

p. 206<br />

2.2<br />

p. 20


Most concrete results about Sobolev spaces boil down to relationships between their norms. The<br />

spaces themselves remain intangible, but the norms are very concrete and can be computed and<br />

manipulated as demonstrated above.<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

✬<br />

Theorem 2.2.17. Compatibility conditions<br />

<strong>for</strong> piecewise smooth functions in H 1 (Ω)]<br />

✩<br />

O<br />

Ω 1<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

✬<br />

✫<br />

Do not be afraid of Sobolev spaces!<br />

It is only the norms that matter <strong>for</strong> us, the ‘spaces” are irrelevant!<br />

Sobolev spaces = “concept of convenience”: the minimization problem seeks its own function<br />

space.<br />

✩<br />

✪<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

LetΩbe partitioned into sub-domainsΩ 1 and<br />

Ω 2 . A function that is continuously differentiable<br />

in both sub-domains and continuous up<br />

to their boundary, belongs to H 1 (Ω), if and<br />

only ifuis continuous onΩ.<br />

✫<br />

✪<br />

Ω 2<br />

Fig. 54<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Minimization problem<br />

u = argminJ(v)<br />

v:Ω↦→R<br />

“Maxmimal” function space<br />

on whichJ is defined<br />

(Sobolev space)<br />

The proof of this theorem requires the notion of weak derivatives that will not be introduced in this<br />

course.<br />

Example 2.2.18 (Piecewise linear functions (not) inH 1 0 (]0,1[)).<br />

2.2<br />

2.2<br />

p. 209<br />

p. 21<br />

Then, why do you bother me with these uncanny “Sobolev spaces” after all ?<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

We conclude from Thm. 2.2.17:<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Anyone involved in CSE must be able to understand mathematical publications on numerical methods<br />

<strong>for</strong> PDEs, Those regularly resort to the concept of Sobolev spaces to express their findings.<br />

u<br />

u<br />

The statement that a function belongs to a certain Sobolev space can be regarded as a concise<br />

way of describing quite a few of its essential properties.<br />

Let us elucidate the second point:<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

1/2<br />

u ∈ H 1 0 (]0,1[)<br />

x<br />

1<br />

1/2<br />

u∉H 1 0 (]0,1[)<br />

x<br />

1<br />

✸<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

From Thm. 2.2.17 we conclude<br />

2.2<br />

p. 210<br />

C 1 pw([a,b]) ⊂ H 1 (]a,b[) andC 1 0,pw ([a,b]) ⊂ H1 0 (]a,b[)<br />

2.2<br />

p. 21


Thm. 2.2.17 provides a simple recipe <strong>for</strong> computing the norm |u| H 1 (Ω) of a piecewise C1 -function<br />

that is continuous in all ofΩ.<br />

✬<br />

✩<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

If you are still feeling uneasy when dealing with Sobolev spaces, do not hesitate to think of the<br />

following replacements<br />

L 2 (Ω) → C 0 pw(Ω) , H 1 0 (Ω) → C1 0,pw (Ω) .<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Corollary 2.2.19 (H 1 -norm of piecewise smooth functions).<br />

Under the assumptions of Thm. 2.2.17 we have <strong>for</strong> a continuous, piecewise smooth function<br />

u ∈ C 0 (Ω)<br />

∫ ∫<br />

|u| 2 H 1 (Ω) = |u|2 H 1 (Ω 1 ) +|u|2 H 1 (Ω 2 ) = |gradu(x)| 2 dx+ |gradu(x)| 2 dx .<br />

Ω 1 Ω 2<br />

✫<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

✪<br />

2.3 Variational <strong>for</strong>mulations<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Actually, this is not new, see Sect. 1.3.2: earlier we already evaluated the elastic energy functionals<br />

(1.2.16), (1.4.2) <strong>for</strong> functions inC 1 pw([0,1]) by “piecewise differentiation” followed by integration of the<br />

resulting discontinuous function.<br />

2.3.1 Linear variational problems<br />

Example 2.2.20 (Non-differentiable function inH 1 0 (]0,1[)).<br />

d = 1,Ω =]0,1[:<br />

“Tent function” u(x) =<br />

{<br />

2x <strong>for</strong>0 < x < 1/2 ,<br />

2(1−x) <strong>for</strong> 1/2 < x < 1 .<br />

∫ 1<br />

Compute |u| 2 H 1 (Ω) = |u ′ (x)| 2 dx = 4 < ∞ .<br />

0<br />

Example <strong>for</strong> au ∈ H0 1 (]0,1[), which is not globally differentiable.<br />

Recall: we cheerfully computed the derivative of a piecewise smooth function already in Sect. 1.5.1.2<br />

when differentiating the basis functions, cf. (1.5.55). Now this “reckless” computations have found<br />

their rigorous justification.<br />

u<br />

1/2<br />

x<br />

1<br />

✸<br />

2.2<br />

p. 213<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Recall:<br />

No surprise:<br />

derivation of variational <strong>for</strong>mulation (1.4.4) from taut string minimization problem (1.4.2) in<br />

Sect. 1.4.<br />

(2.1.15) & (2.1.16) are amenable to the same approach:<br />

Calculus of variations→Sect. 1.3.1: “Directionale derivative” ofJ E :<br />

∫<br />

J E (u+tv)−J E (u) = 2<br />

1 (ǫ(x)grad(u+tv))·grad(u+tv)dx<br />

Ω ∫<br />

− 1 2 (ǫ(x)gradu)·gradudx<br />

R. Hiptm<br />

∫<br />

Ω<br />

(∗)<br />

= 2<br />

1 (ǫ(x)gradu)·gradu+2t(ǫ(x)gradu)·gradv+<br />

Ω t 2 DRAFT<br />

(ǫ(x)gradv)·gradv −(ǫ(x)gradu)·gradudx<br />

∫<br />

= t (ǫ(x)gradu)·gradvdx+O(t 2 ) <strong>for</strong> t → 0 .<br />

Ω<br />

(∗): due to the symmetry ofǫ(x): (ǫgradu)·gradv = (ǫgradv)·gradu !<br />

∫<br />

J<br />

lim E (u+tv)−J E (u)<br />

= (ǫ(x)gradu(x))·gradv(x)dx ,<br />

t→0 t<br />

Ω<br />

2.2<br />

<strong>for</strong> perturbation functions v ∈ H0 1(Ω) , see Def. 2.2.10 2.3<br />

p. 214<br />

p. 21<br />

2.3<br />

p. 21<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern


The requirement v = 0 on ∂Ω reflects the fact that we may not perturb u on the boundary, lest the<br />

prescribed boundary values be violated.<br />

As explained in Sect. 1.3.1 (“idea of calculus of variations”), this leads to the following variational<br />

problem equivalent to (2.1.16)<br />

u ∈ H 1 ∫<br />

(Ω) ,<br />

u = U on ∂Ω :<br />

For the membrane problem (2.1.15) we arrive at<br />

u ∈ H 1 ∫<br />

(Ω) ,<br />

u = g on∂Ω :<br />

Ω<br />

Ω<br />

(ǫ(x)gradu(x))·gradv(x)dx = 0 ∀v ∈ H0 1 (Ω) . (2.3.1)<br />

∫<br />

σ(x)gradu(x)·gradv(x)dx =<br />

Ω<br />

f(x)v(x) ∀v ∈ H0 1 (Ω) . (2.3.2)<br />

Both, (2.3.1) and (2.3.2) have a common structure, expressed in the following variational problem:<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

<strong>for</strong> almost allx ∈ Ω.<br />

∃0 < α − ≤ α + : α − ‖z‖ 2 ≤ (α(x)z)·z ≤ α + ‖z‖ 2 ∀z ∈ R d , (2.3.4)<br />

Rewriting (2.3.3), using offset functionu 0 withu 0 = g on∂Ω, cf. (2.1.22),<br />

∫<br />

w ∈ H0 1 (Ω): (α(x)gradw(x))·gradv(x)dx<br />

Ω<br />

∫<br />

=<br />

f(x)v(x)−(α(x)gradu 0 (x))·gradv(x)dx ∀v ∈ H0 1 (Ω) . (2.3.5)<br />

Ω<br />

➥ (2.3.5) is a linear variational problem, see Rem. 1.4.5<br />

We can lift the above discussion to an abstract level, cf. discussiion after (1.4.6):<br />

Variational <strong>for</strong>mulation of a quadratic minimization problem (→ Def. 2.1.21)<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

2.3<br />

p. 217<br />

J(u) := 1 2 a(u,u)+l(u)+c ⇒ J(u+tv) = J(u)+t(a(u,v)+l(v))+ 1 2 t2 a(v,v) ,<br />

<strong>for</strong> allu,v ∈ V 0 .<br />

2.3<br />

p. 21<br />

Variational <strong>for</strong>mulation of 2nd-order elliptic (Dirichlet) minimization problems:<br />

u ∈ H 1 ∫<br />

∫<br />

(Ω) ,<br />

u = g on ∂Ω : (α(x)gradu(x))·gradv(x)dx = f(x)v(x)dx ∀v ∈ H0 1 (Ω) .<br />

Ω<br />

Ω<br />

(2.3.3)<br />

Symmetric uni<strong>for</strong>mly positive definite material tensorα : Ω ↦→ R d,d<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

For a quadratic functional (→ Def. 2.1.21) on real vector spaceV 0<br />

J(u+tv)−J(u)<br />

lim = a(u,v)+l(v) . (2.3.6)<br />

t→0 t<br />

Linear variational problem (→ Rem. 1.4.5) arising from quadratic minimization problem <strong>for</strong> functionalJ(u)<br />

:= 1 2 a(u,u)+l(u)+c:<br />

w ∈ V 0 : a(w,v)+l(v) = 0 ∀v ∈ V 0 . (2.3.7)<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

The attribute “Dirichlet” refers to a setting, in which the functionuis prescribed on the entire boundary.<br />

Some more explanations and terminology:<br />

Ω ⊂ R d ,d = 2,3 ˆ= (spatial) domain, bounded, piecewise smooth boundary<br />

g ∈ C 0 (∂Ω) ˆ= boundary values (Dirichlet data)<br />

f ∈ C 0 pw(Ω) ˆ= loading function, source function<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Concretely, <strong>for</strong> (2.3.5):<br />

V 0 = H0 1 (Ω) and<br />

∫<br />

a(u,v) = (α(x)gradw(x))·gradv(x)dx , (2.3.8)<br />

∫<br />

l(v) = −<br />

Ω<br />

Ω<br />

f(x)v(x)+(α(x)gradu 0 (x))·gradv(x)dx . (2.3.9)<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

α : Ω ↦→ R d,d ˆ= material tensor, stiffness function, diffusion coefficient<br />

(uni<strong>for</strong>mly positive definite, bounded → Def. 2.1.11)<br />

2.3<br />

p. 218<br />

2.3<br />

p. 22


2.3.2 Stability<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Consider the particular choice (2.3.8).<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Notion of stability <strong>for</strong> a (linear) variational problem (2.3.7):<br />

How to choose the norms‖·‖ X (on solution space) and‖·‖ Y (on data space) ?<br />

Lipschitz continuity of (linear) mapping<br />

←→ Is there/what is a constantC stab > 0 such that<br />

datal ↦→ solutionw<br />

‖w‖ X ≤ C stab ‖l‖ Y , wherew solves (2.3.7), (2.3.10)<br />

with suitable/relevant norms ‖·‖ X , ‖·‖ Y ? These norms will be suggested by the modelling background.<br />

Their choice will determine existence and value ofC stab .<br />

Remark 2.3.11 (Sensitivity of linear variational problems).<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Norm on solution space: energy norm:<br />

Norm on r.h.s:<br />

‖·‖ a<br />

Mean square norm (L 2 -norm,→Def. 2.2.5) <strong>for</strong>f,<br />

H 1 -semi-norm (→ Def. 2.2.12) <strong>for</strong>u 0<br />

What will be the impact of a perturbation ofl, if we use these norms?<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Recall a notion introduced in [18, Sect. 2.5.5]:<br />

Sensitivity of a problem (<strong>for</strong> given data) gauges<br />

impact of small perturbations of the data on the result.<br />

2.3<br />

p. 221<br />

First use the Cauchy-Schwarz inequality (2.2.15) and the uni<strong>for</strong>m positivity (→ Def. 2.1.11) ofα, see<br />

(2.3.4):<br />

|l(v)| ≤ ‖f‖ 0 ‖v‖ 0 +α + ‖gradu 0 ‖ 0 ‖gradv‖ 0<br />

(<br />

1/2‖v‖H<br />

≤ ‖f‖ 2 0 +(α+ ) 2 ‖gradu 0 ‖ 2 0) 1 (Ω) ∀v ∈ H 1 (Ω) . (2.3.13)<br />

2.3<br />

p. 22<br />

Remember: “Problem” = mapping from data space to solution space, see [18, Sect. 2.5.2].<br />

Here, we define the “problem” as the mapping<br />

{<br />

{linear <strong>for</strong>ms onV0 } ↦→ V 0<br />

l ↦→ w ∈ V 0 : a(w,v) = −l(v) ∀v ∈ V 0 .<br />

(2.3.12)<br />

Undesirable: “sensitive dependence of solution on data”, that is small (in the norm of the data space)<br />

perturbations ofltranslate into huge (in the norm of the solution space) or even “infinite” perturbations<br />

of the solution. In this case of an “ill-posed problem” inevitable data errors (e.g., due to non-exact<br />

measurements) will thwart any attempt to compute an “accurate” (in the norm of the solution space)<br />

solution.<br />

Desirable:<br />

Note:<br />

Lipschitz continuity of problem map with small Lipschitz constant (well-posed problem).<br />

the problem map (2.3.12) is linear and its Lipschitz constant is given by the smallest value<br />

<strong>for</strong>C stab in (2.3.10).<br />

△<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

2.3<br />

p. 222<br />

Next, we appeal to the lower estimate in (2.3.4) and the first Poincaré-Friedrichs inequality of<br />

Thm. 2.2.16:<br />

Combine (2.3.13) and (2.3.14),<br />

‖v‖ H 1 (Ω) ≤ √<br />

1+diam 2 (Ω)|v| H 1 (Ω) ≤ √<br />

1+diam 2 (Ω)<br />

α − ‖v‖ a . (2.3.14)<br />

(<br />

|l(v)| ≤<br />

) 1/2<br />

√<br />

1+diam 2 (Ω)<br />

α −<br />

‖f‖ 2 0 +(α+ ) 2 |u 0 | 2 H 1 (Ω)<br />

} {{ }<br />

=:K(f,u 0 )<br />

This enters the estimate <strong>for</strong> the perturbation of the solution:<br />

‖v‖ a .<br />

a(w,v) = −l(v) ∀v ∈ V 0 ,<br />

a(w+δw,v) = −(l+δl)(v) ∀v ∈ V 0 .<br />

a bilinear<br />

=⇒ a(δw,v) = −δl(v) ∀v ∈ V 0 ,<br />

(2.3.10)<br />

=⇒ ‖δw‖ a = √ a(δw,δw) = √ |δl(δw)| ≤ (K(δf,δu 0 )‖δw‖ a ) 1/2 ,<br />

=⇒ ‖δw‖ a ≤ K(δf,δu 0 ) .<br />

As in Rem. 1.6.7 <strong>for</strong> associated quadratic energy functionalJ:<br />

|J(w +δw)−J(w)| = 1 2 |a(2w+δw,δw)| ≤ 1 2 ‖2w +δw‖ a ‖δw‖ a .<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

R. Hiptm<br />

DRAFT<br />

(2.3.15)<br />

2.3<br />

p. 22


☛<br />

Perturbation estimates in energy norm directly translate into perturbation<br />

Remark 2.3.16 (Needle loading).<br />

estimates <strong>for</strong> the equilibrium energy!<br />

Now we inspect a stricking manifestation of instability <strong>for</strong> a 2nd-order elliptic variational problem<br />

caused by a right hand side functional that fails to satisfy (2.2.1).<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Also recall integration in polar coordinates, see [29, Bsp. 8.5.3]:<br />

Using these <strong>for</strong>mulas we try to compute|v| H 1 (Ω) ,<br />

Ω<br />

1/2 2π<br />

∫ ∫ ∫<br />

v(x)dx = v(r,ϕ)rdϕdr . (2.3.20)<br />

0<br />

0<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Consider the taut membrane model, see Sect. 2.1.1 <strong>for</strong> details, (2.1.15) <strong>for</strong> the related minimization<br />

problem, and (2.3.2) <strong>for</strong> the associated variational equation.<br />

Let us assume that a needle is poked at the membrane: loading by a <strong>for</strong>cef “concentrated in a point<br />

y”, often denoted byf = δ y ,y ∈ Ω, whereδ is the so-caled Dirac delta function (delta distribution).<br />

In the variational <strong>for</strong>mulation this can be taken into account as follows (u |∂Ω = 0,σ ≡ 1 is assumed):<br />

∫<br />

u ∈ H0 1 (Ω): gradu(x)·gradv(x)dx = v(y)<br />

}<br />

Ω<br />

}{{}<br />

{{ }<br />

=:l(v)<br />

=:a(u,v)<br />

∀v ∈ H 1 0 (Ω) .<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

(2.3.17)<br />

2.3<br />

p. 225<br />

1/2 2π<br />

∫ ∫ ∫<br />

‖gradv(x)‖ 2 dx =<br />

∥ − 1<br />

logrr e 2 ∫<br />

r<br />

∥ rdϕdr = 2π<br />

Ω<br />

0 0<br />

0<br />

= [−1/logr] 1/[2]<br />

0 = 1<br />

log2 < ∞ ,<br />

1/2<br />

1<br />

log 2 r · 1<br />

r dr<br />

because the improper integral exists. This means thatv has “finite elastic energy” , that isv ∈ H 1 (Ω),<br />

see Def. 2.2.12.<br />

On the other hand, v(0) = ∞ !<br />

H 1 (Ω) contains unbounded functions !<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

2.3<br />

p. 22<br />

Recall the discussion of Sect. 2.2: is the linear functional l on the right hand side continuous w.r.t.<br />

theH0 1 (Ω)·-norm (= energy norm, see Def. 2.1.27) in the sense of (2.2.1)?<br />

Consider the functionv(x) = log|log‖x‖|,x ≠ 0, onΩ = {x ∈ R 2 : ‖x‖ < 1 2 }.<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

✬<br />

Corollary 2.3.21 (Point evaluation onH 1 (Ω)).<br />

The point evaluationv ↦→ v(y),y ∈ Ω is not a continuous linear <strong>for</strong>m onH 1 (Ω).<br />

✫<br />

✩<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

✪<br />

First, we express this function in polar coordinates<br />

(r,ϕ)<br />

x 1 = rcosϕ , x 2 = rsinϕ v(r,ϕ) = log|logr| .<br />

(2.3.18)<br />

Then we recall the expression <strong>for</strong> the gradient in<br />

polar coordinates<br />

gradv(r,ϕ) = ∂v<br />

∂r (r,ϕ)e r + 1 ∂v<br />

r∂ϕ (r,ϕ)e ϕ ,<br />

(2.3.19)<br />

x 2<br />

ϕ<br />

r<br />

e ϕ<br />

x 1<br />

e r<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

This is the mathematics behind the observation<br />

that a needle can easily prick a taut membrane:<br />

a point load leads to configurations with “infinite<br />

elastic energy”.<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

wheree r ande ϕ are orthogonal unit vectors in the<br />

polar coordinate directions.<br />

Fig. 55<br />

2.3<br />

p. 226<br />

Another implication of Cor. 2.3.21:<br />

2.3<br />

p. 22


The quadratic functionalJ(u) := ∫ ‖gradu‖ 2 dx−u(y),y ∈ Ω<br />

Ω<br />

is not bounded from below onH0 1(Ω)!<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

There is a product rule in higher dimensions, see [29, Sect. 7.2]<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Thus, it is clear that the attempt to minimize J will run into difficulties.<br />

functional underlying the variational problem (2.3.17).<br />

Yet, this is the quadratic<br />

✬<br />

Lemma 2.4.3 (General product rule).<br />

For allj ∈ (C 1 (Ω)) d ,v ∈ C 1 (Ω) holds<br />

✩<br />

2.4 Equilibrium models: Boundary value problems<br />

△<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

✫<br />

An important differential operator, see [29, Def. 8.8.1]:<br />

div(jv) = v divj+j·gradv . (2.4.4)<br />

divergence of aC 1 -vector fieldj = (f 1 ,...,f d ) T : Ω ↦→ R d<br />

divj(x) := ∂f 1<br />

∂x 1<br />

(x)+···+ ∂f d<br />

∂x d<br />

(x) , x ∈ Ω .<br />

R. Hiptm<br />

C. Schwa<br />

✪H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Recall the derivation of an ODE from a variational problem on a 1D domain (interval) in Sect. 1.3.3:<br />

Tool: Integration by parts (1.3.22)<br />

This section elucidates how to extend this approach to domainsΩ ⊂ R d ,d ≥ 1 (usuallyd = 2,3).<br />

Crucial issue: Integration by parts in higher dimensions ?<br />

2.4<br />

p. 229<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

A truly fundamental result from differential geometry provides a multidimensional analogue of the<br />

fundamental theorem of calculus:<br />

✬<br />

Theorem 2.4.5 (Gauss’ theorem). → [29, Sect. 8.8]<br />

With n : ∂Ω ↦→ R d denoting the exterior unit normal vectorfield on ∂Ω and dS indicating<br />

integration over a surface, we have<br />

∫ ∫<br />

divj(x)dx = j(x)·n(x)dS(x) ∀j ∈ (Cpw(Ω)) 1 d . (2.4.6)<br />

✫<br />

Ω<br />

∂Ω<br />

✩<br />

✪<br />

2.4<br />

p. 23<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Remember the origin of integration by parts: fundamental theorem of calculus [29, Satz 6.3.4]: <strong>for</strong><br />

F ∈ Cpw([a,b]),a,b 1 ∈ R,<br />

∫ b<br />

F ′ (x)dx = F(b)−F(a) , (2.4.1)<br />

a<br />

where ′ stands <strong>for</strong> differentiation w.r.tx. This <strong>for</strong>mula is combined with the product rule [29, Satz 5.2.1<br />

(ii)]<br />

F(x) = f(x)·g(x) ⇒ F ′ (x) = f ′ (x)g(x)+f(x)g ′ (x) . (2.4.2)<br />

∫ b<br />

f ′ (x)g(x)+f(x)g ′ (x)dx = f(b)g(b)−f(a)g(a) ,<br />

a<br />

which amounts to (1.3.22).<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

2.4<br />

p. 230<br />

Note: In (2.4.6) integration again allows to relax smoothness requirements, cf. Sect. 1.3.2.<br />

✬<br />

Theorem 2.4.7 (Green’s first <strong>for</strong>mula).<br />

For all vector fieldsj ∈ (Cpw(Ω)) 1 d and functionsv ∈ Cpw(Ω) 1 holds<br />

∫ ∫ ∫<br />

j·gradvdx = − divjvdx+ j·nvdS . (2.4.8)<br />

Ω Ω ∂Ω<br />

✫<br />

DRAFT<br />

✩<br />

✪<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

2.4<br />

p. 23


Note that the dependence on the integration variablexis suppressed in the <strong>for</strong>mula (2.4.8) to achieve<br />

a more compact notation. The first Green <strong>for</strong>mula could also have been written as<br />

∫<br />

∫ ∫<br />

j(x)·(gradv)(x)dx = − (divj)(x)v(x)dx+ j(x)·n(x)v(x)dS(x) . (2.4.8)<br />

Ω<br />

Ω<br />

∂Ω<br />

Proof. (of Thm. 2.4.7) Straight<strong>for</strong>ward from Lemma 2.4.3 and Thm. 2.4.5. ✷<br />

Now we apply Green’s first <strong>for</strong>mula to the variational problem (2.3.3), which covers the membrane<br />

model and electrostatics:<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Now we can invoke the multidimensional analogue of the fundamental lemma of the calculus of variations,<br />

see Lemm 1.3.23<br />

✬<br />

Lemma 2.4.10 (Fundamental lemma of calculus of variations in higher dimensions).<br />

Iff ∈ L 2 (Ω) satisfies<br />

∫<br />

f(x)v(x)dx = 0 ∀v ∈ C0 ∞ (Ω) ,<br />

Ω<br />

thenf ≡ 0 can be concluded.<br />

✫<br />

✩<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

✪H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

The role ofjin (2.4.8) is played by the vector field αgradu : Ω ↦→ R d .<br />

(2.3.3)<br />

αgradu∈C 1 pw(Ω)<br />

<strong>Partial</strong> differential equations (PDE)<br />

−div(α(x)gradu) = f inΩ .<br />

(2.4.11)<br />

∫<br />

Ω<br />

α(x)gradu(x) ·gradv(x)dx<br />

} {{ }<br />

=:j(x)<br />

∫<br />

∫<br />

= − div(α(x)gradu(x))v(x)dx+ (α(x)gradu(x))·n(x)v(x)dS(x) .<br />

Ω<br />

∂Ω<br />

2.4<br />

p. 233<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Again, <strong>for</strong> the sake of brevity, dependence gradu = gradu(x), f = f(x) is not made explicit in<br />

the PDE in (2.4.11).<br />

2.4<br />

p. 23<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

∫<br />

(2.3.3) −<br />

Ω<br />

div(α(x)gradu(x))v(x)dx<br />

∫<br />

+<br />

(α(x)gradu(x))·n(x)v(x)dS(x)<br />

∂Ω<br />

(2.4.9)<br />

} {{ }<br />

=0 , since v |∂Ω =0<br />

∫<br />

= f(x)v(x)dx ∀v ∈ C0,pw 1 (Ω) ,<br />

Ω<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Remark 2.4.12 (Laplace operator).<br />

Ifαagrees with a positive constant, by rescaling of (2.5.6) we can achieve<br />

−∆u = f inΩ . (2.4.13)<br />

∆ = div◦grad = ∂2<br />

∂x 2 + ∂2<br />

1 ∂x 2 + ∂2<br />

2 ∂x 2 = Laplace operator<br />

3<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

where we have to assume that u,αare sufficiently smooth: αgradu ∈ C 1 pw(Ω)<br />

(2.4.13) is called Poisson equation, ∆u = 0 inΩ is called Laplace equation<br />

∫<br />

Ω<br />

(div(α(x)gradu(x))+f(x)) v(x)dx = 0 ∀v ∈ C 1 0,pw (Ω) .<br />

2.4<br />

p. 234<br />

△<br />

2.4<br />

p. 23


Finally: PDE (2.4.11) + boundary conditions<br />

−div(α(x)gradu) = f inΩ , u = g on∂Ω . (2.4.14)<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

test space in variational <strong>for</strong>mulation V 0 := {u ∈ H 1 (Ω): u |Γ0 = 0}<br />

(Remember: test space comprises “admissible perturbations” of configurations, cf. Sect. 1.3.1.)<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

(2.4.14) = second-order elliptic BVP with Dirichlet boundary conditions<br />

Short name <strong>for</strong> BVPs of the type (2.4.14): “Dirichlet problem”<br />

Remark 2.4.15 (Extra smoothness requirement <strong>for</strong> PDE <strong>for</strong>mulation).<br />

Same situation as in Sect. 1.3.3, cf. Assumption (1.3.21):<br />

Transition from variational equation to PDE requires<br />

extra assumptions on smoothness of solution and coefficients.<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Variational <strong>for</strong>mulation, c.f. (2.3.2)<br />

u ∈ H 1 ∫<br />

∫<br />

(Ω) ,<br />

: σ(x)gradu(x)·gradv(x)dx =<br />

u = g onΓ 0<br />

Ω<br />

Ω<br />

☞ Application of Green’s first <strong>for</strong>mula (2.4.8) to (2.4.17) leads to<br />

∫<br />

− (div(σ(x)gradu(x))+f(x)) v(x)dx<br />

Ω<br />

+<br />

∫<br />

f(x)v(x) ∀v ∈ V 0 . (2.4.17)<br />

∂Ω\Γ 0<br />

((σ(x)gradu(x))·n(x))v(x)dS(x) ∀v ∈ V 0 . (2.4.18)<br />

Note that, unlike above, the boundary integral term cannot be dropped entirely, because v ≠ 0 on<br />

∂Ω\Γ 0 .<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

△<br />

2.4<br />

p. 237<br />

Assumption (→ Rem. 2.4.15):<br />

extra smootnessu ∈ C 2 pw(Ω),σ ∈ C 1 pw(Ω)<br />

2.4<br />

p. 23<br />

Remark 2.4.16 (Membrane with free boundary values).<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

How to deal with the boundary term ?<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

(Graph description of membrane shape by u :<br />

Ω ↦→ R, see Sect. 2.1.1 )<br />

6<br />

5<br />

Idea:<br />

➊ First restrict test functionv toC ∞ 0 (Ω)<br />

➣ Boundary term vanishes !<br />

Now: membrane clamped only on a part<br />

Γ 0 ⊂ ∂Ω of its edge.<br />

– – – : prescribed bondary values here (Γ 0 )<br />

——-: “free boundary”<br />

u(x)<br />

4<br />

3<br />

2<br />

1<br />

0<br />

1<br />

0.8<br />

0.6<br />

0.4<br />

0.2<br />

0<br />

1<br />

0.8<br />

0.6<br />

0.4<br />

0.2<br />

0<br />

Fig. 56<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Then, apply Lemma 2.4.10<br />

➋ Then test with genericv ∈ V 0 , while making use of (2.4.19):<br />

∫<br />

div(σ(x)gradu(x))+f(x) = 0 inΩ . (2.4.19)<br />

∂Ω\Γ 0<br />

((σ(x)gradu(x))·n(x))v(x)dS(x) = 0 ∀v ∈ V 0 .<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Configuration space V := {u ∈ H 1 (Ω): u |Γ0 = g} → Def. 2.2.12<br />

Lemma 2.4.10 on∂Ω\Γ 0<br />

=⇒ (σ(x)gradu(x))·n(x) = 0 on∂Ω\Γ 0 . (2.4.20)<br />

When removing pinning conditions on ∂Ω \ Γ 0 the equilibrium conditions imply the (homoge-<br />

Total potential energy as in (2.1.3):<br />

neous) Neumann boundary conditions(σ(x)gradu(x))·n(x) = 0 on∂Ω\Γ 0 .<br />

J M (u) := ∫ Ω<br />

1<br />

2 σ(x)‖gradu‖2 −f(x)u(x)dx . (2.1.3)<br />

2.4<br />

p. 238<br />

2.4<br />

p. 24


Boundary value problem <strong>for</strong> membrane clamped atΓ 0 ⊂ ∂Ω<br />

u = g onΓ 0 ,<br />

−div(σ(x)gradu) = f inΩ ,<br />

(σ(x)gradu)·n = 0 on∂Ω\Γ 0 .<br />

(2.4.21)<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Heat flux = power flux: [j] = W m 2<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

(2.4.21) = Second-order elliptic BVP with Neumann boundary conditions on∂Ω\Γ 0<br />

Short name <strong>for</strong> BVPs of the type (2.4.21):<br />

“Mixed Neumann–Dirichlet problem”<br />

Vector field j : Ω :=]0,1[ 2 ↦→ R 3 ✄<br />

normal vectorn<br />

Σ<br />

1<br />

0.9<br />

0.8<br />

2.5 Diffusion models (Stationary heat conduction)<br />

△<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Total heat flux through oriented surfaceΣ ⊂ R 3<br />

∫<br />

Power P Σ = j·ndS . (2.5.1)<br />

Σ<br />

x 3<br />

0.7<br />

0.6<br />

0.5<br />

0.4<br />

0.3<br />

0.2<br />

0.1<br />

0<br />

1<br />

0.9<br />

0.8<br />

0.7<br />

0.6<br />

0.5<br />

0.4<br />

x 2<br />

0.3<br />

0.2<br />

0.1<br />

0<br />

1<br />

0.8<br />

0.6<br />

0.4<br />

0.2<br />

0<br />

x 1<br />

Fig. 57<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Now we look at a class of physical phenomena, <strong>for</strong> which models are based on two building blocks<br />

P Σ ([P Σ ] = 1W): directed total power flowing through the oriented surfaceΣper unit time. Note that<br />

the sign ofP Σ will change when flipping the normal ofΣ!<br />

1. a conservation principle (of mass, energy, etc.),<br />

2. a a potential driven flux of the conserved quantity.<br />

Mathematical modelling <strong>for</strong> these phenomena naturally involves partial differential equations in the<br />

first steps, which are supplemented with boudary conditions. Hence, second-order elliptic boundary<br />

value problems arise first, while variational <strong>for</strong>mulations are deduced from them, thus reversing the<br />

order of steps followed <strong>for</strong> equilibrium models in Sects. 2.1–2.4.<br />

2.5<br />

p. 241<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

✬<br />

✫<br />

Conservation of energy<br />

∫ ∫<br />

j·ndS = f dx <strong>for</strong> all “control volumes”V . (2.5.2)<br />

∂V V<br />

power flux through surface ofV<br />

heat production insideV<br />

f = heat source/sink ([f] = W m 3), f = f(x) andf can be discontinuous (f ∈ C0 pw(Ω))<br />

✩<br />

✪<br />

2.5<br />

p. 24<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

In order to keep the presentation concrete, the discussion will target heat conduction, about which<br />

R. Hiptmair<br />

Fundamental concept: heat flux, modelled by vector field j : Ω ↦→ R 3<br />

everybody should have a sound “intuitive grasp”.<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

Intuition: heat flows from hot zones to cold zones<br />

✎ notation: Ω ⊂ R 3 : bounded open region occupied by solid object<br />

(ˆ= Ω→computational domain)<br />

DRAFT<br />

the larger the temperature differece, the stronger the heat flow<br />

Experimental evidence supports this intuition and, <strong>for</strong> many materials, yields the following quantitative<br />

relationship:<br />

✬<br />

Fourier’s law<br />

✩<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

2.5<br />

p. 242<br />

✫<br />

j(x) = −κ(x)gradu(x) , x ∈ Ω . (2.5.3)<br />

✪<br />

2.5<br />

p. 24


Meaning of quantities:<br />

j = heat flux ([j] = 1 W m 2)<br />

u = temperature ([u] = 1K)<br />

κ = heat conductivity ([κ] = 1 W Km )<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

} {{ }<br />

Combine equations (2.5.5) & (2.5.3)<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

j = −κ(x)gradu (2.5.3) + divj = f (2.5.5)<br />

(2.5.3)⇒Heat flow from hot to cold regions linearly proportional to gradient of temperature<br />

Some facts about the heat conductivity:<br />

κ: •κ = κ(x) <strong>for</strong> non-homogeneous materials (spatially varying heat conductivity)<br />

•κcan even be discontinuous <strong>for</strong> composite materials<br />

•κmay be R 3,3 -valued (heat conductivity tensor)<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

−div(κ(x)gradu) = f inΩ . (2.5.6)<br />

Linear scalar second order elliptic PDE (<strong>for</strong> unknown temperatureu)<br />

2.6 Boundary conditions<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

The most general <strong>for</strong>m of the heat conductivity (tensor) enjoys the very same properties as the dielectric<br />

tensor introduced in Sect. 2.1.2:<br />

2.5<br />

p. 245<br />

2.6<br />

p. 24<br />

From thermodynamic principles, cf. (2.1.8):<br />

∃κ − ,κ + > 0: 0 < κ − ≤ κ(x) ≤ κ + < ∞ <strong>for</strong> almost allx ∈ Ω . (2.5.4)<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

In the examples from Sects. 2.1.1, 2.1.2 we fixed the value of the unknown function u : Ω ↦→ R on<br />

the boundary∂Ω: Dirichlet boundary conditions in (2.4.14).<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Exception: free edge of taut membrane, see Rem. 2.4.16: Neumann boundary conditions in<br />

(2.4.21).<br />

Terminology: (2.5.4) ↔ κ is bounded and uni<strong>for</strong>mly positive, see Def. 2.1.11.<br />

From 2.5.2 by Gauss’ theorem Thm. 2.4.5<br />

∫ ∫<br />

divj(x)dx = f(x)dx <strong>for</strong> all “control volumes” V ⊂ Ω .<br />

V<br />

V<br />

Now appeal to another version of the fundamental lemma of the calculus of variations, see<br />

Lemma 2.4.10, this time sporting piecewise constant test functions.<br />

local <strong>for</strong>m of energy conservation:<br />

divj = f inΩ . (2.5.5)<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

2.5<br />

p. 246<br />

In this section we resume the discussion of boundary conditions and examine them <strong>for</strong> stationary heat<br />

conduction, see previous section. This has the advantage that <strong>for</strong> this everyday physical phenomenon<br />

boundary conditions have a very clear intuitive meaning.<br />

Boundary conditions on surface/boundary∂Ω ofΩ:<br />

(i) Temperatureuis fixed:<br />

(ii) Heat fluxjthrough∂Ω is fixed:<br />

vectorfield) on∂Ω<br />

withg : ∂Ω ↦→ R prescribed<br />

u = g on∂Ω . (2.6.1)<br />

Dirichlet boundary conditions<br />

with h : ∂Ω ↦→ R prescribed (n : ∂Ω ↦→ R 3 exterior unit normal<br />

j·n = −h on ∂Ω . (2.6.2)<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

2.6<br />

p. 24


Neumann boundary conditions<br />

(iii) Heat flux through∂Ω depends on (local) temperature:<br />

Example 2.6.4 (Convective cooling (simple model)).<br />

with increasing functionΨ : R ↦→ R<br />

j·n = Ψ(u) on∂Ω (2.6.3)<br />

radiation boundary conditions<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Ω<br />

Γ R<br />

Γ N<br />

Γ D<br />

Example 2.6.7 (“Wrapped rock on a stove”).<br />

• Non-homogeneous Dirichlet boundary conditions onΓ D ⊂ ∂Ω<br />

• Homogeneous Neumann boundary condtions onΓ N ⊂ ∂Ω<br />

• Convective cooling boundary conditions onΓ R ⊂ ∂Ω<br />

Partition: ∂Ω = Γ D ∪Γ N ∪Γ R , Γ D ,Γ N ,Γ R mutually disjoint<br />

} {{ }<br />

✸<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Heat is carried away from the surface of the body by a fluid at bulk temperature u 0 . A crude model<br />

assumes that the heat flux depends linearly on the temperature difference between the surface of Ω<br />

and the bulk temperature of the fluid.<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

−div(κ(x)gradu) = f + boundary conditions ⇒ elliptic boundary value problem (BVP)<br />

★<br />

For second order elliptic boundary value problems exactly one boundary condition is needed on<br />

any part of∂Ω.<br />

✧<br />

✥<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

✦A. Chern<br />

DRAFT<br />

j·n = q(u−u 0 ) on∂Ω , where0 < q − ≤ q(x) ≤ q + < ∞ <strong>for</strong> almost allx ∈ ∂Ω .<br />

Remark 2.6.8 (Linear BVP).<br />

Observe that the solution mapping<br />

(<br />

f<br />

g)<br />

↦→ u <strong>for</strong> (2.5.6), (2.6.1) is linear.<br />

Example 2.6.5 (Radiative cooling (simple model)).<br />

✸<br />

2.6<br />

p. 249<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

This means that ifu i solves the Dirichlet problem with source functionf i and Dirichlet datag i ,i = 1,2,<br />

thenu 1 +u 2 solves (2.5.6) & (2.6.1) <strong>for</strong> sourcef 1 +f 2 and boundary valuesg 1 +g 2 .<br />

△<br />

2.6<br />

p. 25<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

A hot body emits electromagnetic radiation (blackbody emission), which drains thermal energy. The<br />

radiative energy loss is roughly proportional to the 4th power of the temperatur difference between<br />

the surface temperature of the body and the ambient temperature.<br />

2.7 Characteristics of elliptic boundary value problems<br />

Qualitative insights gained from heat conduction model:<br />

→<br />

j·n = α|u−u 0 |(u−u 0 ) 3 on∂Ω , withα > 0<br />

Non-linear boundary condition<br />

✸<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

continuity: the temperatureumust be continuous (jump inu→j = ∞).<br />

normal component ofjacross surfaces insideΩmust be continuous<br />

(jump inj·n→heat sourcef of infinite intensity).<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Terminology:<br />

Ifg = 0 orh = 0→homogeneous Dirichlet or Neumann boundary conditions<br />

interior smoothness ofu: u smooth wheref andD smooth.<br />

Remark 2.6.6 (Mixed boundary conditions).<br />

non-locality: local alterations inf,g,haffectueverywhere inΩ.<br />

Different boundary conditions can be prescribed on different parts of∂Ω<br />

(→ mixed boundary conditions, cf. Rem. 2.4.16)<br />

△<br />

2.6<br />

p. 250<br />

quasi-locality: If local changes inf,g,h confined toΩ ′ ⊂ Ω, their effects decay away fromΩ ′ .<br />

2.7<br />

p. 25


f<br />

maximum principle: (in the absence of heat sources extremal temperatures are on the boundary)<br />

✤<br />

✣<br />

iff ≡ 0, then<br />

inf u(y) ≤ u(x) ≤ sup u(y) <strong>for</strong> allx ∈ Ω<br />

y∈∂Ω y∈∂Ω<br />

} {{ }<br />

Typical features of solutions of elliptic boundary value problems<br />

Example 2.7.1 (Scalar elliptic boundary value problem in one space dimension).<br />

Poisson equation→(2.4.13) in 1D:<br />

−u ′′ = f<br />

➣ f discontinuous, piecewiseC 0 ⇒ u ∈ C 1 , piecewiseC 2 ✸<br />

✜<br />

✢<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

⎧<br />

⎨<br />

δ −2 ∥<br />

, if ∥x− ( f δ (x) =<br />

1/2) ∥ ∥2 ≤ δ ,<br />

, δ > 0 . (2.7.6)<br />

⎩0 elsewhere.<br />

u(x,0.5)<br />

1.8<br />

1.6<br />

1.4<br />

1.2<br />

1<br />

0.8<br />

0.6<br />

0.4<br />

0.2<br />

Cross−section of solution u<br />

δ = 0.400000<br />

δ = 0.200000<br />

δ = 0.100000<br />

δ = 0.050000<br />

δ = 0.025000<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Example 2.7.2 (Smoothness of solution of scalar elliptic boundary value problem).<br />

−∆u = f(x) inΩ :=]0,1[ 2 , u = 0 on∂Ω , (2.7.3)<br />

f(x) := sign(sin(2πk 1 x 1 )sin(2πk 2 x 2 )) , x ∈ Ω , k 1 ,k 2 ∈ N .<br />

Fig. 60<br />

0<br />

0 0.2 0.4 0.6 0.8 1<br />

x<br />

Fig. 61<br />

✸<br />

Approximate solution computed by means of linear Lagrangian finite elements + lumping<br />

(→ Ch. 3, details in Sect. 3.2, 3.5.4)<br />

2.7<br />

p. 253<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

2.8 Second-order elliptic variational problems<br />

2.8<br />

p. 25<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

1<br />

0.5<br />

0<br />

In Ch. 1 and Sects. 2.1–2.4 we pursued the derivation:<br />

−0.5<br />

−1<br />

1<br />

0.8<br />

0.6<br />

0.4<br />

0.6<br />

0.4<br />

0.2<br />

0.2<br />

0 0<br />

y<br />

x<br />

Source termf(x),k 1 = k 2 = 2<br />

0.8<br />

1<br />

Fig. 58<br />

Solution of (2.7.3)<br />

Fig. 59<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Minimization problem<br />

(e.g., (2.1.4), (2.1.14))<br />

Now we are proceeding in the opposite direction:<br />

PDE<br />

(e.g. (2.5.6))<br />

+<br />

➣<br />

Variational problem<br />

(e.g., (2.3.1), (2.3.2))<br />

boundary conditions<br />

(e.g., (2.6.1), (2.6.2), (2.6.3))<br />

➣<br />

➣<br />

BVP <strong>for</strong> PDE<br />

(e.g., (2.4.14), (2.4.21))<br />

variational problem<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

➣ “Smooth”udespite “rough”f !<br />

✸<br />

Example 2.7.4 (Quasi-locality of solution of scalar elliptic boundary value problem).<br />

Formal approach:<br />

−∆u = f δ (x) inΩ :=]0,1[ 2 , u = 0 on∂Ω , (2.7.5)<br />

2.7<br />

p. 254<br />

STEP 1:<br />

test PDE with smooth functions<br />

(do not test, where the solution is known, e.g., on the boundary)<br />

2.8<br />

p. 25


STEP 2:<br />

STEP 3:<br />

STEP 4:<br />

integrate over domain<br />

per<strong>for</strong>m integration by parts<br />

(e.g. by using Green’s first <strong>for</strong>mula, Thm. 2.4.7)<br />

[optional] incorporate boundary conditions into boundary terms<br />

Example 2.8.1 (Variational <strong>for</strong>mulation <strong>for</strong> heat conduction with Dirichlet boundary conditions).<br />

STEP 1 & 2:<br />

BVP: −div(κ(x)gradu) = f inΩ , u = g on∂Ω . (2.8.2)<br />

test withv ∈ C0 ∞(Ω)<br />

∫<br />

∫<br />

− div(κ(x)gradu)vdx = fvdx . (2.8.3)<br />

Ω<br />

Ω<br />

Note: v |∂Ω = 0 <strong>for</strong> test function, becauseualready fixed on∂Ω.<br />

STEP 3: use Green’s <strong>for</strong>mula from Thm. 2.4.7 on Ω ⊂ R d (multidimensional integration by parts):<br />

Apply (2.4.8) to (2.8.3) withj := κ(x)gradu:<br />

∫<br />

∫<br />

∫<br />

κ(x)gradu·gradvdx− κ(x)gradu·nvdS = fvdx ∀v ∈ C0 ∞ (Ω) .<br />

Ω<br />

∂Ω<br />

Ω<br />

} {{ }<br />

=0,because v |∂Ω =0<br />

This gives the variational <strong>for</strong>mulation after we switch to “maximal admissible function spaces”<br />

(Sobolev spaces, see Sect. 2.2, as spaces of functions with finite energy)<br />

✬<br />

Variational <strong>for</strong>m of (2.8.2): seek<br />

u ∈ H 1 ∫<br />

(Ω)<br />

u = g on∂Ω<br />

∫Ω<br />

: κ(x)gradu·gradvdx = fvdx ∀v ∈ H0 1 (Ω) .<br />

Ω<br />

✫<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

2.8<br />

p. 257<br />

R. Hiptmair<br />

✩C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

✪<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

DRAFT<br />

BVP: −div(κ(x)gradu) = f inΩ , −κ(x)gradu·n = Ψ(u) on∂Ω . (2.8.6)<br />

STEP 1 & 2: u |∂Ω not fixed ⇒ test withv ∈ C ∞ (Ω)<br />

∫<br />

∫<br />

− div(κ(x)gradu)vdx = fvdx ∀v ∈ C ∞ (Ω) .<br />

Ω<br />

Ω<br />

STEP 3 & 4: apply Green’s first <strong>for</strong>mula (2.4.8) and incorporate boundary conditions:<br />

∫<br />

∫<br />

∫<br />

κ(x)gradu·gradvdx− κ(x)gradu·n vdS = fvdx ∀v ∈ C ∞ (Ω) .<br />

Ω<br />

∂Ω} {{ } Ω<br />

=−Ψ(u) (STEP 4)<br />

✬<br />

Variational <strong>for</strong>mulation of (2.8.6): seek<br />

∫<br />

∫ ∫<br />

u ∈ H 1 (Ω): κ(x)gradu·gradvdx+ Ψ(u)vdS = fvdx ∀v ∈ H 1 (Ω) .<br />

Ω<br />

∂Ω Ω<br />

(2.8.7)<br />

✫<br />

✬<br />

Theorem 2.8.8. If κ ∈ C 1 (Ω), classical solutions u ∈ C 2 (Ω) of the boundary value problems<br />

(2.8.2) and (2.8.6) also solve the associated variational problems.<br />

✫<br />

Proof. Apply Theorem 2.4.7 as in the derivation of the weak <strong>for</strong>mulations.<br />

Example 2.8.9 (Variational <strong>for</strong>mulation <strong>for</strong> Neumann problem).<br />

2nd-order elliptic (inhomogeneous) Neumann problem<br />

BVP:<br />

−div(κ(x)gradu) = f inΩ ,<br />

κ(x)gradu·n = h(x) on∂Ω .<br />

DRAFT<br />

✩<br />

✪<br />

✸<br />

(2.8.10)<br />

✩<br />

✪<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

2.8<br />

p. 25<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

(2.8.4)<br />

✸<br />

We confront Neumann boundary conditions (2.6.2) (prescribed heat flux) on the whole boundary.<br />

Example 2.8.5 (Variational <strong>for</strong>mulation: heat conduction with general radiation boundary conditions).<br />

2.8<br />

p. 258<br />

Variational <strong>for</strong>mulation derived as in Ex. 2.8.5, withΨ(u) = −h.<br />

∫<br />

∫ ∫<br />

u ∈ H 1 (Ω): κ(x)gradu·gradvdx− hvdS = fvdx ∀v ∈ H 1 (Ω) . (2.8.11)<br />

Ω<br />

∂Ω Ω<br />

2.8<br />

p. 26


Observation: when we test (2.8.7) with v ≡ 1 − ∫ ∂Ω hdS = ∫ Ωf dx (2.8.12)<br />

This is a compatibility condition <strong>for</strong> the existence of (variational) solutions of the Neumann problem!<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Variational <strong>for</strong>mulation of Neumann problem:<br />

u ∈ H 1 ∗(Ω):<br />

∫<br />

Ω<br />

∫ ∫<br />

κ(x)gradu·gradvdx = fvdx+ hvdS ∀v ∈ H∗(Ω) 1 . (2.8.15)<br />

Ω ∂Ω<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Interpretation of (2.8.12) against the backdrop of the stationary heat conduction model:<br />

△<br />

conservation of energy → (2.5.2): Heat generated inside Ω (↔ f) must be offset by heat flux<br />

through∂Ω (→h).<br />

✸<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

2.9 Essential and natural boundary conditions<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Remark 2.8.13 (Uniqueness of solutions of Neumann problem).<br />

Synopsis:<br />

2.8<br />

p. 261<br />

☛<br />

2nd-order elliptic Dirichlet problem:<br />

−div(α(x)gradu) = f inΩ , u = g on∂Ω . (2.4.14)<br />

2.9<br />

p. 26<br />

Observation: if compatibility condition (2.8.12) holds true, then<br />

v ∈ H 1 (Ω) solves (2.8.7) ⇐⇒ v +γ solves (2.8.7) ∀γ ∈ R ,<br />

we say, “the solution is unique only up to constants”.<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

with variational <strong>for</strong>mulation<br />

u ∈ H 1 ∫<br />

∫<br />

(Ω) ,<br />

u = g on ∂Ω : (α(x)gradu(x))·gradv(x)dx =<br />

Ω<br />

Ω<br />

☛ 2nd-order elliptic Neumann problem:<br />

f(x)v(x)dx ∀v ∈ H0 1 (Ω) . (2.3.3)<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Complementary observation: a(u,v) := ∫ Ωκ(x)gradu·gradvdx is not s.p.d (→ Def. 2.1.25) on<br />

H 1 (Ω).<br />

Idea:<br />

Restore uniqueness of solutions by<br />

en<strong>for</strong>cing average temperature to be zero<br />

∫<br />

u(x)dx = 0<br />

Ω<br />

This amounts to posing the variational problem (2.8.7) over the constrained function space<br />

∫<br />

H∗(Ω) 1 := {v ∈ H 1 (Ω): v(x)dx = 0} . (2.8.14)<br />

Ω<br />

The norm onH∗(Ω) 1 is the same as onH0 1 (Ω), see Def. 2.2.12. Obviously (why ?), the norm property<br />

(N1) is satisfied. These arguments also show thatais s.p.d (→ Def. 2.1.25) onH∗(Ω), 1 cf. Thm. 2.9.6.<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

2.8<br />

p. 262<br />

−div(α(x)gradu) = f inΩ , (α(x)gradu)·n = −h on∂Ω . (2.9.1)<br />

with variational <strong>for</strong>mulation<br />

∫<br />

∫<br />

u ∈ H∗(Ω):<br />

1 α(x)gradu·gradvdx =<br />

Ω<br />

Ω<br />

☛ 2nd-order elliptic mixed Neumann-Dirichlet problem, see Rem. 2.4.16:<br />

−div(α(x)gradu) = f inΩ ,<br />

with variational <strong>for</strong>mulation<br />

u ∈ H 1 ∫<br />

∫<br />

(Ω) ,<br />

: (α(x)gradu(x))·gradv(x)dx =<br />

u = g on Γ 0<br />

Ω<br />

Ω<br />

<strong>for</strong> allv ∈ H 1 (Ω) withv |Γ0 = 0.<br />

∫<br />

fvdx+ hvdS ∀v ∈ H∗(Ω) 1 . (2.8.15)<br />

∂Ω<br />

u =g onΓ 0 ⊂ ∂Ω ,<br />

(α(x)gradu)·n = −h on∂Ω\Γ 0 .<br />

(2.9.2)<br />

∫<br />

f(x)v(x)dx+ hvdS (2.9.3)<br />

∂Ω\Γ 0<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

2.9<br />

p. 26


In the variational <strong>for</strong>mulations of 2nd-order elliptic BVPs of Sect. 2.8:<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Remark 2.9.5 (Admissible Neumann data).<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Dirichlet boundary conditions are directly imposed on trial space and (in homogeneous <strong>for</strong>m)<br />

on test space.<br />

Terminology:<br />

essential boundary conditions<br />

Neumann boundary conditions are en<strong>for</strong>ced only through the variational equation.<br />

Terminology:<br />

natural boundary conditions<br />

The attribute “natural” has been coined, because Neumann boundary conditions “naturally” emerge<br />

when removing constraints on the boundary, as we have seen <strong>for</strong> the partially free membrane of<br />

Rem. 2.4.16.<br />

Remark 2.9.4 (Admissible Dirichlet data).<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

In the variational problem (2.8.15) Neumann data h : ∂Ω ↦→ R enter through the linear <strong>for</strong>m on the<br />

right hand side<br />

∫<br />

l(v) :=<br />

Ω<br />

∫<br />

f(x)v(x)dx+<br />

∂Ω<br />

h(x)v(x)dS(x) .<br />

Remember the discussion in the beginning of Sect. 2.2, also Rem. 2.3.16: we have to establish that<br />

l is continuous on H 1 ∗(Ω) defined in (2.8.14). This is sufficient, because the coefficient function κ is<br />

uni<strong>for</strong>mly positive and bounded, see (2.5.4). Thus, the enery‖·‖ a associated with the bilinear <strong>for</strong>m<br />

∫<br />

a(u,v) = κ(x)gradu·gradvdx<br />

Ω<br />

can be bounded from above and below by|·| H 1 (Ω), cf. the estimate (2.3.14).<br />

✬<br />

Theorem 2.9.6. Second Poincaré-Friedrichs inequality]<br />

IfΩ ⊂ R d ,d ∈ N, is bounded, then<br />

✩<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

2.9<br />

p. 265<br />

✫<br />

∃C = C(Ω) > 0: ‖u‖ 0 ≤ C diam(Ω)‖gradu‖ 0 ∀u ∈ H 1 ∗(Ω) .<br />

✪<br />

2.9<br />

p. 26<br />

Requirement <strong>for</strong> “Dirichlet data”g : ∂Ω ↦→ R in (2.4.14):<br />

there isu ∈ H 1 (Ω) such that<br />

u |∂Ω = g<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

✎ notation: C = C(Ω) indicates that the constantC may depend on the shape of the domain<br />

Ω.<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Analoguous to Thm. 2.2.17:<br />

★<br />

If g : ∂Ω ↦→ R is piecewise continuously differentiable (and bounded with bounded piecewise<br />

derivatives), then it can be extended to anu 0 ∈ H 1 (Ω), if and only if it is continuous on∂Ω.<br />

✧<br />

Bottom line:<br />

Dirichlet boundary values have to be continuous<br />

This is also stipulated by physical insight, e.g. in the case of the taut membrane model of Sect. 2.1.1:<br />

discontinuous displacement on∂Ω would entail ripping apart the membrane.<br />

✥<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

✦Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

△<br />

DRAFT<br />

2.9<br />

p. 266<br />

Proof. (<strong>for</strong>d = 1,Ω = [0,1] only, technically difficult in higher dimensions, see [5, Thm. 1.6.6])<br />

As in the proof of Thm. 2.2.16, we employ a density argument and assume that u is sufficiently<br />

smooth,u ∈ C 1 ([0,1]).<br />

By the fundamental theorem of calculus (2.4.1)<br />

∫x<br />

du<br />

u(x) = u(y)+ (τ)dτ , 0 ≤ x,y ≤ 1 .<br />

dx<br />

y<br />

∫1<br />

u(x) =<br />

∫1<br />

u(x)dy =<br />

∫1 ∫x<br />

u(y)dy+<br />

0 0<br />

} {{ }<br />

=0<br />

Then use the Cauchy-Schwarz inequality (2.2.15)<br />

0<br />

y<br />

du<br />

dx<br />

(τ)dτ dy .<br />

∫1 ∫x ∫1 ∫x<br />

∣<br />

u(x) 2 ≤ 1dτ dy<br />

du ∣∣∣ 2 ∫1<br />

∣<br />

∣dx (τ) dτ dy ≤<br />

du ∣∣∣ 2<br />

∣dx (τ) dτ .<br />

0 y 0 y 0<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

2.9<br />

p. 26


Integrate overΩyields the estimate<br />

∫1<br />

‖u‖ 2 0 =<br />

0<br />

∫1<br />

∣<br />

u 2 (x)dx ≤<br />

du ∣∣∣ 2<br />

∣dx (τ) dτ = |u| 2 H 1 (Ω) .<br />

0<br />

By (2.2.15), Thm. 2.9.6 implies the continuity of the first term inl.<br />

Continuity of the boundary contribution tolhinges on a trace theorem<br />

✬<br />

Theorem 2.9.7 (Multiplicative trace inequality).<br />

✫<br />

∃C = C(Ω) > 0: ‖u‖ 2 L 2 (∂Ω) ≤ C‖u‖ L 2 (Ω)·‖u‖ H 1 (Ω) ∀u ∈ H 1 (Ω) .<br />

(✷)<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

✩Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

✪<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

DRAFT<br />

∫<br />

∂Ω<br />

✗<br />

✖<br />

the 2nd Poincaré-Friedrichs inequality of Thm. 2.9.6,<br />

the multiplicative trace inequality of Thm. 2.9.7:<br />

hvdS (2.2.15)<br />

≤ ‖h‖ L 2 (∂Ω) ‖v‖ L 2 (∂Ω)<br />

Thm. 2.9.7<br />

≤ ‖h‖ L 2 (∂Ω) ‖v‖ H 1 (Ω)<br />

Thm. 2.9.6<br />

≤ ‖h‖ L 2 (∂Ω) |v| H 1 (Ω) ∀v ∈ H 1 ∗(Ω) .<br />

h ∈ L 2 (∂Ω) provides valid Neumann data <strong>for</strong> the 2nd order elliptic BVP (2.9.1).<br />

✔<br />

✕<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Proof.<br />

(<strong>for</strong>d = 1,Ω = [0,1] only, technically difficult in higher dimensions)<br />

In, particular Neumann datahcan be discontinuous.<br />

As in the proof of Thms. 2.2.16, 2.9.6, we employ a density argument and assume thatuis sufficiently<br />

smooth,u ∈ C 1 ([0,1]).<br />

2.9<br />

p. 269<br />

△<br />

2.9<br />

p. 27<br />

By the fundamental theorem of calculus (2.4.1):<br />

∫1<br />

u(1) 2 dw<br />

=<br />

dξ (x)dx , with w(ξ) := ξu2 (ξ) ,<br />

0<br />

∫1<br />

u(1) 2 =<br />

Then use the Cauchy-Schwarz inequality (2.2.15)<br />

∫1<br />

u(1) 2 ≤<br />

0<br />

∫1<br />

u 2 (x)dx+2<br />

A similar estimate holds <strong>for</strong>u(0) 2 .<br />

0<br />

0<br />

u 2 (x)+2u(x) du<br />

dx (x)xdx .<br />

∣ |x||u(x)|<br />

du ∣∣∣<br />

∣dx (x) dx ≤ ‖u‖ 2 0 +2‖u‖ du<br />

0∥dx∥ .<br />

0<br />

✷<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

3 Finite Element <strong>Methods</strong> (FEM)<br />

CORE CHAPTER<br />

Relies heavily on Sects. 2.2, 2.8, 2.9<br />

In this chapter:<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Now we can combine<br />

Problem : linear scalar second-order elliptic boundary value problem → Ch. 2<br />

Perspective : variational interpretation in Sobolev spaces → Sect. 2.8<br />

Objective : algorithm <strong>for</strong> the computation of an approximate numerical solution<br />

the Cauchy-Schwarz inequality (2.2.15) on∂Ω,<br />

2.9<br />

p. 270<br />

3.0<br />

p. 27


<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

with reaction coefficientc : Ω ↦→ R + ,c ∈ C 0 pw(Ω). Note that no compatibilty conditions is required in<br />

this case.<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Preface<br />

Sect. 1.5.1 introduced the fundamental ideas of the Galerkin discretization of variational problems,<br />

or, equivalently, of minmization problems, posed over function spaces. A key ingredient are suitably<br />

chosen finite-dimensional trial and test spaces, equipped with ordered bases.<br />

In Sect. 1.5.1.2 the abstract approach was discussed <strong>for</strong> two-point boundary value problems and<br />

the concrete case of piecewise linear trial and test spaces, built upon a partition (mesh/grid) of the<br />

interval (domain). In this context the locally supported tent functions lent themselves as natural basis<br />

functions.<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Rem. 1.5.3 still applies: all functions (coefficientα, source functionf, Dirichlet datag) may be given<br />

only in procedural <strong>for</strong>m. Recall the discussion of the consequences in Rem. 1.5.36 and Sect. 1.5.1.2<br />

3.1 Galerkin discretization<br />

Recall the concept of “discretization”, see Sect. 1.5:<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

This chapter is devoted to extending the linear finite element method in 1D to<br />

Not a moot point:<br />

any computer can only handle a finite amount of in<strong>for</strong>mation (reals)<br />

2nd-order linear variational problems on bounded spatial domainsΩin two and three dimensions,<br />

piecewise polynomial trial/test functions of higher degree.<br />

The leap fromd = 1 tod = 2 will encounter additional difficulties and many new aspects will emerge.<br />

This chapter will elaborate on them and present policies how to tackle them.<br />

3.0<br />

p. 273<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Variational boundary value<br />

problem<br />

Targetted: linear variational problem (1.4.6)<br />

DISCRETIZATION<br />

−−−−−−−−−−−−−−−→<br />

System of a finite number of<br />

equations <strong>for</strong> (real) unknowns<br />

u ∈ V 0 : a(u,v) = l(v) ∀v ∈ V 0 , (3.1.1)<br />

3.1<br />

p. 27<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Throughout, we will restrict ourselves to linear 2nd-order elliptic variational problems on spatial<br />

domainsΩ ∈ R d ,d = 2,3, with the properties listed in Rem. 2.1.1.<br />

☛ 2nd-order elliptic Dirichlet problem:<br />

u ∈ H 1 ∫<br />

∫<br />

(Ω) ,<br />

u = g on ∂Ω : (α(x)gradu(x))·gradv(x)dx =<br />

Ω<br />

Ω<br />

with continuous (→ Rem. 2.9.4) Dirichlet datag ∈ C 0 (∂Ω).<br />

f(x)v(x)dx ∀v ∈ H0 1 (Ω) , (2.3.3)<br />

☛ 2nd-order elliptic Neumann problems:<br />

∫<br />

∫ ∫<br />

u ∈ H∗(Ω):<br />

1 (α(x)gradu)·gradvdx = fvdx+ hvdS ∀v ∈ H∗(Ω) 1 , (2.8.15)<br />

Ω<br />

Ω ∂Ω<br />

with piecewwise continuous (→ Rem. 2.9.5) Neumann data h ∈ C 0 pw(∂Ω) that satisfy the<br />

compatibility condition (2.8.12).<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

V 0 ˆ= vector space (Hilbert space) (usually a Sobolev space→Sect. 2.2) with norm‖·‖ V ,<br />

a(·,·) ˆ= bilinear <strong>for</strong>m, continuous onV 0 , which means<br />

∃C > 0: |a(u,v)| ≤ C‖u‖ V ‖v‖ V ∀u,v ∈ V . (3.1.2)<br />

l ˆ= continuous linear <strong>for</strong>m in the sense of, cf. (2.2.1),<br />

∃C > 0: |l(v)| ≤ C‖v‖ V ∀v ∈ V 0 . (3.1.3)<br />

Ifais symmetric and positive definite (→ Def. 2.1.25), we may choose‖·‖ V := ‖·‖ a , “energy norm”,<br />

see Def. 2.1.27. Continuity ofaw.r.t. ‖·‖ a is clear.<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

A simpler version with homogeneous Neumann data and reaction term:<br />

∫<br />

∫<br />

u ∈ H 1 (Ω): α(x)gradu·gradv +c(x)uvdx = fvdx∀v ∈ H 1 (Ω) , (3.0.1)<br />

Ω<br />

Ω<br />

3.0<br />

p. 274<br />

3.1<br />

p. 27


Recall from Sect. 1.5.1:<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

of equations. It will turn out that under the assumptions of the theorem, the resulting system matrix<br />

will be symmetric and positive definite in the sense of [18, Def. 2.7.9].<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Idea of Galerkin discretization<br />

ReplaceV 0 in (3.1.1) with a finite dimensional subspace.<br />

(V 0,N ⊂ V 0 called Galerkin (or discrete) trial space/test space)<br />

The estimate (3.1.6) is immediate from settingv N := u N in (3.1.4)<br />

|a(u N ,u N )| = |l(u N )| ≤ C l (a(u N ,u N )) 1/2 .<br />

✷<br />

Twofold nature of symbol “N”:<br />

N = <strong>for</strong>mal index, tagging “discrete entities” (→ “finite amount of in<strong>for</strong>mation”)<br />

N = dimV N,0 ˆ= dimension of Galerkin trial/test space<br />

Discrete variational problem, cf. (1.5.7),<br />

✬<br />

u N ∈ V 0,N : a(u N ,v N ) = l(v N ) ∀v N ∈ V 0,N . (3.1.4)<br />

Galerkin solution<br />

✩<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

3.1<br />

p. 277<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

R. Hiptm<br />

Recall from Sect. 1.5.1:<br />

DRAFT<br />

2nd step of Galerkin discretization:<br />

Introduce (ordered) basisB N ofV 0,N :<br />

B N := {b 1 N ,...,bN N } ⊂ V N , V N = Span{B N } , N := dim(V N ) .<br />

Unique basis representations:<br />

u N = µ 1 b 1 N +···+µ Nb N N , µ i ∈ R<br />

v N = ν 1 b 1 N +···+ν Nb N N , ν i ∈ R : plug into (3.1.4). 3.1<br />

p. 27<br />

Theorem 3.1.5 (Existence and uniqueness of solutions of discrete variational problems).<br />

If the bilinear <strong>for</strong>m a : V 0 ×V 0 ↦→ R is symmetric and positive definite (→ Def. 2.1.25) and the<br />

linear <strong>for</strong>ml : V 0 ↦→ R is continuous in the sense of<br />

∃C l > 0: |l(u)| ≤ C l ‖u‖ a ∀u ∈ V 0 , (2.2.1)<br />

then the discrete variational problem has a unique Galerkin solution u N ∈ V 0,N that satisfies<br />

the stability estimate (→ Sect. 2.3.2)<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Of course, there are infinitely many ways to choose the basisB N . Below we will study the impact of<br />

different choices.<br />

What follows repeats the derivation of (1.5.18) and, in particular, (1.5.43).<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

✫<br />

Proof.<br />

Uniqueness ofu N is clear:<br />

‖u N ‖ a ≤ C l . (3.1.6)<br />

a(u N ,v N ) = l(v N ) ∀v N ∈ V 0,N<br />

a(w N ,v N ) = l(v N ) ∀v N ∈ V 0,N<br />

⇒ a(u N −w N ,v N ) = 0 ∀v N ∈ V N,0<br />

v N :=u N −w N ∈V 0,N<br />

=⇒ ‖u N −w N ‖ a = 0 a s.p.d.<br />

=⇒ u N −w N = 0 .<br />

The discrete linear variational problem (3.1.4) is set in the finite-dimensional space V 0,N .<br />

uniqueness of solutions is equivalent to existence of solutions (→ linear algebra).<br />

Thus,<br />

If you do not like this abstract argument, wait and see the equivalence of (3.1.4) with a linear system<br />

R. Hiptmair<br />

C. Schwab,<br />

✪H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

3.1<br />

p. 278<br />

u N ∈ V 0,N : a(u N ,v N ) = l(v N ) ∀v N ∈ V 0,N . (3.1.4)<br />

N∑ N∑<br />

µ k ν j a(b k N ,bj N ) = ∑ N ν j l(b j N ) ∀ν 1,...,ν N ∈ R ,<br />

k=1j=1<br />

j=1<br />

[ u N = µ 1 b 1 N +···+µ Nb N N ,µ i ∈ R<br />

v N = ν 1 b 1 N +···+ν Nb N N ,ν i ∈ R ]<br />

⎛<br />

⎞<br />

N∑ N∑<br />

ν j<br />

⎝ µ k a(b k N ,bj N )−l(bj N ) ⎠ = 0 ∀ν 1 ,...,ν N ∈ R ,<br />

j=1 k=1<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

3.1<br />

p. 28


✬<br />

✫<br />

N∑<br />

µ k a(b k N ,bj N ) = l(bj N ) <strong>for</strong> j = 1,...,N .<br />

k=1<br />

A⃗µ = ⃗ϕ , with<br />

A linear system of equations<br />

Linear discrete variational problem<br />

u N ∈ V 0,N : a(u N ,v N ) = l(v N ) ∀v N ∈ V 0,N<br />

(<br />

Galerkin matrix: A =<br />

Right hand side vector: ⃗ϕ =<br />

[⃗µ = (µ 1 ,...,µ N ) ⊤ ∈ R N ]<br />

(<br />

A = a(b k ) N<br />

N ,bj N ) j,k=1 ∈ RN,N ,<br />

(<br />

⃗ϕ = l(b j ) N<br />

N ) j=1 .<br />

R. Hiptmair<br />

✩C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Linear system<br />

Gradinaru<br />

A. Chernov<br />

Choosing basis B<br />

−−−−−−−−−−−−→ N<br />

of equations<br />

DRAFT<br />

✫<br />

A⃗µ = ⃗ϕ<br />

k=1 µ kb k N .<br />

a(b k ) N<br />

N ,bj N ) j,k=1 ∈ RN,N ,<br />

(<br />

l(b j ) N<br />

N ) j=1 ∈ RN ,<br />

Coefficient vector: ⃗µ = (µ 1 ,...,µ N ) ⊤ ∈ R N ,<br />

Recovery of solution: u N = ∑ N<br />

✪<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

3.1<br />

p. 281<br />

✬<br />

Lemma 3.1.9. Consider (3.1.4) and two bases ofV 0,N ,<br />

related by<br />

Proof.<br />

B N := {b 1 N ,...,bN N } , B N := {b 1 N ,...,bN N } ,<br />

b j N N = ∑<br />

s jk b k N with<br />

k=1<br />

S = (s jk) N j,k=1 ∈ KN,N regular.<br />

Galerkin matricesA,A ∈ K N,N , right hand side vectors ⃗ϕ,⃗ϕ ∈ K N ,<br />

and coefficient vectors ⃗µ,⃗µ ∈ R N , respectively, satisfy<br />

Make use of the bilinearity ofa:<br />

A = SAS T , ⃗ϕ = S⃗ϕ , ⃗µ = S −T ⃗µ . (3.1.10)<br />

A lm = a(b m N N ,bl N ) = ∑ N∑<br />

N∑<br />

s mk a(b k (<br />

N ,bj N )s ∑ N )<br />

lj = s lj A jk s mk = (SAS T ) lm ,<br />

k=1j=1<br />

k=1 j=1<br />

} {{ }<br />

(SA) lk<br />

✩<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

✪<br />

3.1<br />

p. 28<br />

(Legacy) terminology <strong>for</strong> FEM: Galerkin matrix = stiffness matrix<br />

Right hand side vector = load vector<br />

Galerkin matrix <strong>for</strong>(u,v) ↦→ ∫ Ω uvdx = mass matrix<br />

✤<br />

Corollary 3.1.7. (3.1.4) has unique solution ⇔ A nonsingular<br />

✜<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Reminder of linear algebra:<br />

nn<br />

Definition 3.1.11 (Congruent matrices).<br />

Two matricesA ∈ K N,N ,B ∈ K N,N ,N ∈ N, are called congruent, if there is a regular matrix<br />

S ∈ K N,N such thatB = SAS H .<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

✣<br />

Remark 3.1.8 (Impact of choice of basis).<br />

Choice of B N in theory does not affectu N ⇒ No impact on discretization error !<br />

✢<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

✬<br />

Lemma 3.1.12.<br />

Equivalence relation on square matrices<br />

Matrix property invariant under Property of Galerkin matrix invariant<br />

⇔<br />

congruence<br />

under change of basisB N<br />

R. Hiptm<br />

C. Schwa<br />

✩H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

But: Key properties (e.g., conditioning) of matrixAcrucially depend on basisB N !<br />

✫<br />

Matrix properties invariant under congruence:<br />

• regularity → [18, Def. 2.0.5]<br />

• symmetry<br />

• positive definiteness → [18, Def. 2.7.9]<br />

✪<br />

3.1<br />

p. 282<br />

△<br />

3.2<br />

p. 28


3.2 Case study: Triangular linear FEM in two dimensions<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

What is the 2D counterpart of mesh/gridMfrom Sect. (1.5.1.2) ?<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

TriangulationMofΩ:<br />

This section elaborates how to extend the linear finite element Galerkin discretization of Sect. 1.5.1.2<br />

to two dimensions. Familiarity with the 1D setting is essential <strong>for</strong> understanding the current section.<br />

Initial focus: well-posed 2nd-order linear variational problem posed onH 1 (Ω) (→ Def. 2.2.12)<br />

Example: Neuman problem with homogeneous Neumann data and reaction term<br />

∫<br />

∫<br />

u ∈ H 1 (Ω): α(x)gradu·gradv +c(x)uvdx = fvdx∀v ∈ H 1 (Ω) , (3.0.1)<br />

Ω<br />

Ω<br />

⇕← see Sect. 2.4<br />

−div(α(x)gradu)+c(x)u = f inΩ ,<br />

BVP:<br />

gradu·n = 0 on∂Ω .<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Ω<br />

Fig. 62<br />

(i) M = {K i } M i=1 ,M ∈ N,K i ˆ= open triangle<br />

(ii) disjoint interiors: i ≠ j ⇒K i ∩K i = ∅<br />

M⋃<br />

(iii) tiling property: K i = Ω<br />

i=1<br />

(iv) intersectionK i ∩K j ,i ≠ j,<br />

is – either∅<br />

✎ notation: ˆ= a subset of R d together with its boundary (“closure”)<br />

– or an edge of both triangles<br />

– or a vertex of both triangles<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

3.2<br />

p. 285<br />

Parlance: vertices of triangles = nodes of mesh (= setV(M))<br />

3.2<br />

p. 28<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Ω<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Assumptions on domainΩ ⊂ R 2 ,<br />

see Rem. 2.1.1:<br />

Ω<br />

Ω is a polygon<br />

polygon with 10 corners<br />

✄<br />

A mesh that does not comply with the property (iv)<br />

from above.<br />

✄<br />

By default, the domainΩis assumed to be an open<br />

set, that is,x ∈ Ω impliesx ∉ ∂Ω!<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Fig. 63<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

3.2.1 Triangulations<br />

3.2.2 Linear finite element space<br />

3.2<br />

p. 286<br />

3.2<br />

p. 28


Next goal: generalize the spline space S 0 1 (M) ⊂ H1 ([a,b]) of piecewise linear functions on a 1D<br />

gridM, see Fig. 25, that was used as Galerkin trial/test space in 1D in Sect. 1.5.1.2<br />

V 0,N = S 0 1,0 (M) := {<br />

v ∈ C 0 ([0,1]): v |[xi−1 ,x i ] linear, i = 1,...,M,v(a) = v(b) = 0 }<br />

.<br />

d = 1 d = 2<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Remark 3.2.1 (Piecewise gradient).<br />

Thm. 2.2.17<br />

⇒ S 0 1 (M) ⊂ H1 (Ω)<br />

⇒ <strong>for</strong> u N ∈ S1 0(M) the gradient gradu N can be computed on each triangle as<br />

piecewise constant function, cf. Ex. 2.2.20.<br />

(OnK ∈ M: grad(α K +β K ·x) = β K )<br />

△<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Grid/mesh cells: intervals]x i−1 ,x i [,i = 1,...,M trianglesK i ,i = 1,...,M<br />

Linear functions: x ∈ R ↦→ α+β ·x,α,β ∈ R x ∈ R 2 ↦→ α+β ·x,α ∈ R,β ∈ R 2<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

3.2.3 Nodal basis functions<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

V 0,N = S 0 1 (M) := {v ∈ C 0 (Ω): ∀K ∈ M:<br />

}<br />

v |K (x) = α K +β K ·x,<br />

α K ∈ R,β K ∈ R 2 ⊂H 1 (Ω)<br />

,x ∈ K<br />

see Thm. 2.2.17<br />

Next goal: generalization of “tent functions”, see (1.5.53).<br />

3.2<br />

p. 289<br />

Recall condition (1.5.54), which defines a tent function in the space S1 0 (M). This approach carries<br />

over to 2D.<br />

3.2<br />

p. 29<br />

Functions of the <strong>for</strong>mx ↦→ α K +β K ·x,α K ∈ R,β K ∈ R 2 are called (affine) linear.<br />

✎ notation:<br />

S 0 1 (M)continuous functions, cf. C0 (Ω)<br />

locally 1st degree polynomials<br />

scalar functions<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Idea: define (?) basis function<br />

b x N ,x ∈ V(M), by<br />

b x N (y) = {<br />

1 , ify = x ,<br />

0 , ify ∈ V(M)\{x} .<br />

(3.2.2)<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Fig. 64<br />

R.<br />

✁ continuous piecewise affine linear function ∈<br />

S1 0 (M) on a triangular meshM<br />

Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

3.2<br />

p. 290<br />

Is this possible ?<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Fig. 65<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

there is exactly one plane through three non-collinear points inR 3 . The graph of a linear<br />

v N ∈ S1 0(M) uniquely determined by{v N(x), x node ofM}!<br />

dimS1 0 (M) = ♯V(M) (V(M) = set of nodes (= vertices of triangles) ofM) 3.2<br />

Reasoning:<br />

function R 2 ↦→ R is a plane.<br />

➣<br />

On a triangle K with vertices a 1 ,a 2 ,a 3 : (affine) linear q : K ↦→ R uniquely determined by<br />

valuesq(a i ).<br />

p. 29


<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Writing V(M) = {x 1 ,...,x N }, the nodal basisB N := {b 1 N ,...,bN N } ofS0 1 (M)<br />

is defined by the conditions<br />

{<br />

b i 1 , ifi = j ,<br />

N (xj ) = i,j ∈ {1,...,N} .<br />

0 else,<br />

(3.2.3)<br />

Ω<br />

✁ “Location” of nodal basis functions:<br />

(meshM→Fig. 149)<br />

•,•→nodal basis functions ofS1 0(M)<br />

•→nodal basis functions ofS1,0 0 (M)<br />

Ordering (↔ numbering) of nodes assumed !<br />

Piecewise linear nodal basis function<br />

(“hat function”/ “tent function”)<br />

N∑<br />

u N = µ i b i N ∈ S0 1 (M)<br />

i=1<br />

1<br />

coefficient µ j = “nodal value” of u N at j-th<br />

node ofM<br />

u N (x j ) = µ j<br />

Remark 3.2.4 (Linear finite element space <strong>for</strong> homogeneous Dirichlet problem).<br />

Fig. 66<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

3.2<br />

p. 293<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Fig. 67<br />

Bottom line: the Galerkin trial/test space contained in H0 1 (Ω) is obtained by dropping all “tent functions”<br />

that do not vanish on∂Ω from the basis.<br />

3.2.4 Sparse Galerkin matrix<br />

△<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

3.2<br />

p. 29<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Recall that the Dirichlet problem with homogeneous boundary conditions u |∂Ω = 0 is posed on the<br />

Sobolev spaceH0 1 (Ω) (→ Def. 2.2.10), see (2.3.3), Ex. 2.8.1.<br />

Galerkin space <strong>for</strong> homogeneous Dirichlet b.c.:<br />

V 0,N = S 0 1,0 (M) := S0 1 (M)∩H1 0 (Ω)<br />

Notation: S 0 1,0 (M) zero on∂Ω, cf. H1 0 (Ω)<br />

Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Now: a ˆ= any (symmetric) bilinear <strong>for</strong>m occurring in a linear 2nd-order variational problem, most<br />

general <strong>for</strong>m<br />

∫<br />

a(u,v) :=<br />

Ω<br />

∫<br />

(α(x)gradu)·gradv +c(x)uvdx+<br />

∂Ω<br />

hvdS , u,v ∈ H 1 (Ω) . (3.2.5)<br />

b j N ˆ= nodal basis function assciated with vertexxj of triangulationMofΩ, see Sect. 3.2.3.<br />

Note: a symmetric ⇒ symmetric Galerkin matrix<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

S1,0 0 {b (M) = Span j }<br />

N : xj ∈ Ω (interior node !)<br />

R.<br />

dimS1,0 0 (M) = ♯{x ∈ V(M): x ∉ ∂Ω}<br />

Now we study the sparsity (→ [18, Sect. 2.6]) of the Galerkin matrix A :=<br />

R N,N ,N := dimS1 0 (M) = ♯V(M), see Sect. 3.1.<br />

(<br />

a(b j N ,bi N ) ) N<br />

i,j=1 ∈<br />

3.2<br />

p. 294<br />

The consideration are fairly parallel to those that made us understand that the Galerkin matrix <strong>for</strong> the<br />

1D case was tridiagonal, see (1.5.58).<br />

3.2<br />

p. 29


Ω<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Recall from [18, Def. 2.6.1]:<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

x j<br />

x i<br />

Ω<br />

x j x i<br />

Fig. 69<br />

Notion 3.2.7 (Sparse matrix).A ∈ K m,n ,m,n ∈ N, is sparse, if<br />

nnz(A) := #{(i,j) ∈ {1,...,m}×{1,...,n}: a ij ≠ 0} ≪ mn .<br />

Fig. 68<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Sloppy parlance: matrix sparse :⇔ “almost all” entries= 0 /“only a few percent of” entries≠ 0<br />

Galerkin discretization of a 2nd-order linear variational problems<br />

utilizing the nodal basis ofS 0 1 (M)/S0 1,0 (M)<br />

leads to sparse linear systems of equations.<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Nodesx i ,x j ∈ V(M)<br />

not connected by an edge<br />

⇔ Vol(supp(b i N )∩supp(bj N )) = 0 ⇒ (A) ij = 0 .<br />

Example 3.2.8 (Sparse Galerkin matrices).<br />

✬<br />

Lemma 3.2.6 (Sparsity of Galerkin matrix).<br />

∃C = C(topology ofΩ): ♯{(i,j) ∈ {1,...,N} 2 : (A) ij ≠ 0} ≤ 7·N +C .<br />

✫<br />

✩<br />

✪<br />

3.2<br />

p. 297<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

M = triangular mesh, V 0,N = S1,0 0 (M), homogeneous Dirichlet boundary conditions, linear 2ndorder<br />

scalar elliptic differential operator.<br />

1.5<br />

1<br />

0.5<br />

0<br />

50<br />

100<br />

150<br />

3.2<br />

p. 29<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Proof. Euler’s <strong>for</strong>mula (http://en.wikipedia.org/wiki/Euler_characteristic)<br />

0<br />

−0.5<br />

200<br />

250<br />

♯M−♯E(M)+♯V(M) = χ Ω , χ Ω = Euler characteristic ofΩ .<br />

Note thatχ Ω is a topological invariant (alternating sum of Betti numbers).<br />

By combinatorial considerations (traverse edges and count triangles):<br />

2·♯E I (M)+♯E B (M) = 3·♯M ,<br />

−1<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

−1.5<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

Fig. 70 2.5<br />

−2.5 −2 −1.5 −1 −0.5 0 0.5 1 1.5 2<br />

DRAFT<br />

Triangular meshM<br />

300<br />

350<br />

400<br />

0 50 100 150 200 250 300 350 400<br />

nz = 2670 Fig. 71<br />

Resulting sparsity pattern of Galerkin matrix<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

whereE I (M),E B (M) stand <strong>for</strong> the sets of interior and boundary edges ofM, respectively.<br />

Then use<br />

♯E I (M)+2♯E B (M) = 3(♯V(M)−χ Ω ) .<br />

Recall: visualization of sparsity pattern by means of MATLAB spy-command.<br />

N = ♯V(M) , nnz(A) ≤ N +2·♯E(M) ≤ 7·♯V(M)−6χ Ω .<br />

✷<br />

3.2<br />

p. 298<br />

✸<br />

3.2<br />

p. 30


3.2.5 Computation of Galerkin matrix<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

For sake of simplicity consider<br />

∫<br />

a(u,v) := gradu·gradvdx , u,v ∈ H0 1 (Ω) .<br />

Ω<br />

and Galerkin discretization based on<br />

• triangular mesh, see Sect. 3.2.1,<br />

• discrete trial/test space S1,0 0 (M) ⊂ H1 0<br />

{<br />

(Ω),<br />

• nodal basis B N = b j }<br />

N<br />

according to (3.2.2).<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Fig. 72<br />

Restrictionsλ 1 ,λ 2 ,λ 3 of p.w. linear nodal basis functions ofS1 0 (M) to triangleK<br />

The functionsλ 1 ,λ 2 ,λ 3 on the triangleK are also known as barycentric coordinate functions.<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

∫<br />

(A) i,j = a(b j N ,bi N ) = gradb j N ·gradbi N dx<br />

Ω<br />

Sect. 3.2.4: we need only study the cases, wherex i ,x j ∈ V(M)<br />

They provide the nonzero restrictions of tent functions to triangles, see Fig. 87.<br />

1. are connected by an edge of the triangulation,<br />

2. coincide.<br />

Idea:<br />

∫<br />

(A) ij =<br />

“Assembly”<br />

(add up cell contributions)<br />

K 1<br />

gradb j N|K 1<br />

·gradb i N|K 1<br />

dx+<br />

∫<br />

K 2<br />

gradb j N|K 2<br />

·gradb i N|K 2<br />

dx<br />

x i<br />

K 1<br />

K 2<br />

Zero in on single triangleK ∈ M:<br />

∫<br />

a K (b j N ,bi N ) := gradb j N|K ·gradbi N|K dx , xi ,x j vertices ofK . (3.2.9)<br />

K<br />

Use analytic representation <strong>for</strong>b i N|K :<br />

x j<br />

ifa1 ,a 2 ,a 3 vertices ofK, λ i := b j N|K ,ai = x j<br />

(i↔local vertex number,j ↔ global node number)<br />

3.2<br />

p. 301<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

λ 1 (x) = 1 (<br />

2)·( a 2<br />

x−a 2 −a 3 )<br />

2<br />

2|K| a 3 1 −a2 1<br />

λ 2 (x) = 1 (<br />

3)·( a 3<br />

x−a 2 −a 1 )<br />

2<br />

2|K| a 1 1 −a3 1<br />

λ 3 (x) = 1 ( )<br />

2|K|<br />

x−a 1)·( a 1<br />

2 −a 2 2<br />

a 2 1 −a1 1<br />

= − |e 1|<br />

2|K| (x−a2 )·n 1 ,<br />

= − |e 2|<br />

2|K| (x−a3 )·n 2 ,<br />

= − |e 3|<br />

2|K| (x−a1 )·n 3 .<br />

(e i = edge opposite vertexa i , see Figure <strong>for</strong> numbering<br />

scheme ✄)<br />

From the distance <strong>for</strong>mula <strong>for</strong> a point w..r.t to a line given in Hesse normal <strong>for</strong>m:<br />

a 3 = ( a 3 ) T<br />

1 ,a3 2<br />

ω 3<br />

n 1<br />

n 2<br />

n 3<br />

Fig. 73<br />

ω 1<br />

ω 2<br />

a 1 = ( a 1 ) T<br />

1 ,a1 2<br />

a 2 = ( a 2 1,a 2 2<br />

(a i −a j )·n i = dist(a i ;e i ) = h i (h i ˆ= height) and2|K| = |e i |h i ⇒ λ i (a i ) = 1.<br />

3.2<br />

p. 30<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

) T<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

3.2<br />

p. 302<br />

This shows that the λ i really provide the restrictions of p.w. linear nodal basis functions<br />

(tent functions) of S1 0 (M) to triangle K, because they are clearly (affine) linear and comply with<br />

(3.2.2).<br />

3.2<br />

p. 30


gradλ 1 = 1<br />

2|K|<br />

( a 2 −a 3 )<br />

2<br />

a 2 1 −a3 , gradλ 2 = 1<br />

1 2|K|<br />

( a 3<br />

2 −a 1 )<br />

2<br />

a 1 1 −a3 , gradλ 3 = 1<br />

1 2|K|<br />

( a 1 −a 2 )<br />

2<br />

a 2 1 −a1 .<br />

1<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

– the gradientsgradλ i are scaled byρ −1 (the barycentric coordinate functionsλ i become<br />

steeper when the triangle shrinks in size.).<br />

Both effects just offset ina K from (3.2.9) such thatA K remains invariant under scaling.<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

(∫ ) 3<br />

element (stiffness) matrixA<br />

gradλ i·gradλ j dx =<br />

K<br />

K<br />

i,j=1<br />

⎛<br />

= 1 cotω ⎞<br />

3+cotω 2 −cotω 3 −cotω 2<br />

⎝ −cotω<br />

2 3 cotω 3 +cotω 1 −cotω 1<br />

⎠ . (3.2.10)<br />

−cotω 2 −cotω 1 cotω 2 +cotω 1<br />

The local numbering and naming conventions are displayed in Fig. 110.<br />

Derivation of (3.2.10), see also [19, Lemma 3.47]: obviously, because the gradients gradλ i are<br />

constant onK,<br />

∫<br />

a(λ i ,λ j ) =<br />

K<br />

gradλ i·gradλ j dx = 1<br />

4|K| |e i||e j |n i ·n j .<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

3.2<br />

p. 305<br />

“Assembly” of(A) ij starts from the sum<br />

∫<br />

∫<br />

(A) ij = gradb j ·gradb N|K i 1 N|K dx+ 1<br />

K 1<br />

➣<br />

K 2<br />

gradb j N|K 2<br />

·gradb i N|K 2<br />

dx .<br />

(A) ij can be obtained by summing respective (∗) entries of the elements matrices of the elements<br />

adjacent to the edge connectingx i andx j<br />

(∗): watch correspondence of local and global vertex numbers !<br />

△<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

3.2<br />

p. 30<br />

Then use: n i·n j = cos(π −ω k ) = −cosω k , (i ≠ j)<br />

|K| = 1 2 |e i||e j |sinω k , (i ≠ j).<br />

3∑<br />

3∑<br />

Casei = j employs a trick: λ i = 1 ⇒ a(λ i ,λ j ) = 0.<br />

i=1 i=1<br />

Remark 3.2.11 (Scaling of entries of element matrix <strong>for</strong>−∆).<br />

(3.2.10): A K does not depend on the “size” of triangleK!<br />

(more precisely, element matrices are equal <strong>for</strong> similar triangles)<br />

This can be seen by the following reasoning:<br />

• Obviously translation and rotation ofK does not change. A K<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

ω 3<br />

K 1 ω 2<br />

⎛<br />

cotω ⎞<br />

3+cotω 2 −cotω 3 −cotω 2<br />

⎝ −cotω 3 cotω 3 +cotω 1 −cotω 1<br />

⎠<br />

−cotω 2 −cotω 1 cotω 2 +cotω 1<br />

+<br />

⎛<br />

ω 1<br />

x i<br />

α 2<br />

K 2<br />

α 1<br />

α 3<br />

cotα ⎞<br />

3+cotα 2 −cotα 3 −cotα 2<br />

⎝ −cotα 3 cotα 3 +cotα 1 −cotα 1<br />

⎠<br />

−cotα 2 −cotα 1 cotα 2 +cotα 1<br />

(A) ij by summing entries of two element matrices<br />

x j<br />

Fig. 74<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

• Scaling ofK by a factorρ > 0 has the following effect that<br />

– the area|K| is scaled byρ 2 ,<br />

3.2<br />

p. 306<br />

“Assembly” of diagonal entry (A) ii : summing corresponding diagonal entries of element matrices<br />

belonging to triangles adjacent to nodex i .<br />

3.2<br />

p. 30


➀<br />

➁<br />

➀<br />

➀<br />

⎛<br />

∗ ∗ ∗ ⎞<br />

⎝∗ ∗ ∗⎠<br />

∗ ∗ ∗<br />

⎛<br />

∗ ∗ ∗ ⎞<br />

⎝∗ ∗ ∗⎠<br />

∗ ∗ ∗<br />

⎛<br />

∗ ∗ ∗ ⎞<br />

➁<br />

➀<br />

⎝∗ ∗ ∗⎠<br />

∗ ∗ ∗<br />

⎛<br />

∗ ∗ ∗ ⎞<br />

➂ ⎝∗ ∗ ∗⎠<br />

➂ ➁ ∗ ∗ ∗<br />

➁ ➀<br />

⎛<br />

∗ ∗ ∗ ⎞<br />

⎝∗ ∗ ∗⎠<br />

∗ ∗ ∗<br />

➂ ➁<br />

x i<br />

➂<br />

➂<br />

(A) ii by summing diagonal entries of element matrices of adjacent triangles<br />

Fig. 75<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

3.2.6 Computation of right hand side vector<br />

We consider the linear <strong>for</strong>m (right hand side of linear variational problem), see (2.3.3), (3.0.1):<br />

∫<br />

l(v) := f(x)v(x)dx , v ∈ H 1 (Ω) , f ∈ L 2 (Ω) .<br />

Recall <strong>for</strong>mula <strong>for</strong> right hand side vector<br />

(⃗ϕ) j = l(b j N ) = ∫<br />

Ω<br />

Ω<br />

f(x)b j N (x)dx , j = 1,...,N .<br />

(3.2.15)<br />

△<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Remark 3.2.12 (Assembly algorithm <strong>for</strong> linear Lagrangian finite elements).<br />

Assume: numbering of nodal basis functions ↔ numbering of mesh vertices∈ V(M)<br />

numbering of triangles (cells) of meshM = {K 1 ,...,K M },M := ♯M<br />

Data structure: idx ∈ N ♯M,3 : local→global index mapping array<br />

idx(k,l) = global number of vertexl ofk-th cell<br />

x idx(k,l) = a l when a 1 ,a 2 ,a 3 are the vertices ofK k .<br />

Code 3.2.14: Assembly of finite element Galerkin matrix <strong>for</strong> linear finite elementsS 0 1 (M)<br />

1 A = zeros(N,N); % N = ♯V(M)<br />

2 f o r i=1:M % M = ♯M<br />

3 Ak = getElementMatrix(i); % Compute 3×3 element matrix, see (3.2.10)<br />

4 A(idx(i,:),idx(i,:)) = A(idx(i,:),idx(i,:)) + Ak;<br />

5 end<br />

(3.2.13)<br />

Note: ☞ Homogeneous Dirichlet boundary conditions not taken into account in Code 3.2.13<br />

☞ Regard Code 3.2.13 as “MATLAB pseudo-code”: in actual implementation A must be<br />

initialized as sparse matrix, see Rem. 3.5.18.<br />

Computational ef<strong>for</strong>t<br />

= O(♯M)<br />

3.2<br />

p. 309<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

3.2<br />

p. 310<br />

Idea: “Assembly”<br />

K 5<br />

N ∑j<br />

∫<br />

(⃗ϕ) j = f(x) b j (x)dx , N|K l<br />

l=1K l<br />

where K 1 ,...,K Nj ˆ= triangles<br />

adjacent to nodex j .<br />

(Integration confined tosupp(b j N )!) K 1<br />

K 2<br />

K 4<br />

K 3<br />

R. Hiptm<br />

use of numerical quadrature <strong>for</strong> approximate evaluation ofl K (b j N ), cf. (1.5.59). Mandatory:<br />

Zero in on single triangleK ∈ M:<br />

∫<br />

l K (b j N ) := f(x) b j N|K (x)dx , xj vertex ofK . (3.2.16)<br />

DRAFT<br />

K<br />

Rem. 1.5.3: f : Ω ↦→ R given in procedural <strong>for</strong>m<br />

function y = f(x)<br />

x j<br />

Fig. 76<br />

3.2<br />

p. 31<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

3.2<br />

p. 31


f<br />

1D setting of Sect. 1.5.1.2: use of composite quadrature rules based on low Gauss/Newton-Cotes<br />

quadrature <strong>for</strong>mulas on the cells[x j−1 ,x j ] of the grid, e.g. composite trapezoidal rule (1.5.59).<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Note: with index arrayidx from Rem. 3.2.12: idx(l,i(l,j)) = j<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

What is the 2D counterpart of the composite trapezoidal rule ?<br />

Recall:<br />

trapezoidal rule [18, Eq. 10.2.7] integrates linear<br />

interpolant of integrand based on endpoint values<br />

3<br />

2.5<br />

000000000000000<br />

111111111111111<br />

000000000000000<br />

111111111111111<br />

000000000000000<br />

111111111111111<br />

2<br />

000000000000000<br />

111111111111111<br />

000000000000000<br />

111111111111111<br />

000000000000000<br />

111111111111111<br />

000000000000000<br />

111111111111111<br />

1.5<br />

000000000000000<br />

111111111111111<br />

000000000000000<br />

111111111111111<br />

1<br />

X<br />

000000000000000<br />

000000000000000<br />

000000000000000<br />

111111111111111<br />

111111111111111<br />

111111111111111<br />

000000000000000<br />

111111111111111<br />

000000000000000<br />

111111111111111<br />

000000000000000<br />

111111111111111<br />

0.5<br />

000000000000000<br />

111111111111111<br />

000000000000000<br />

111111111111111<br />

000000000000000<br />

111111111111111<br />

0<br />

000000000000000<br />

111111111111111<br />

0 0.5 1000000000000000<br />

111111111111111<br />

1.5 2 2.5 3 3.5 4<br />

t<br />

Fig. 77<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

➁<br />

➀<br />

➀<br />

➀<br />

⎛<br />

∗ ⎞<br />

⎝∗⎠<br />

∗<br />

⎛<br />

∗ ⎞<br />

⎝∗⎠<br />

∗<br />

⎛<br />

∗ ⎞<br />

⎝∗⎠<br />

∗<br />

➂<br />

➂ ➁<br />

➁ ➀<br />

⎛<br />

∗ ⎞<br />

⎝∗⎠<br />

∗<br />

➁<br />

⎛<br />

∗ ⎞<br />

⎝∗⎠<br />

∗<br />

➀<br />

➂<br />

➂<br />

x i<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

➂<br />

➁<br />

Fig. 78<br />

Idea:<br />

2D trapezoidal rule<br />

<strong>for</strong> triangleK with verticesa 1 ,a 2 ,a 3<br />

∫<br />

K<br />

f(x)dx ≈ |K|<br />

3 (f(a1 )+f(a 2 )+f(a 3 )) . (3.2.17)<br />

ˆ= integration of linear interpolant ∑ 3<br />

i=1 f(a i )λ i off.<br />

⎛<br />

(<br />

element (load) vector: ⃗ϕ K := l K (b j(i) ) 3<br />

N ) i=1 = |K| f(a 1 ⎞<br />

)<br />

⎜<br />

⎝f(a 2 ⎟<br />

) ⎠ ,<br />

3<br />

f(a 3 )<br />

wherex j(i) = a i ,i = 1,2,3 (global node number↔local vertex number).<br />

3.2<br />

p. 313<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Remark 3.2.19 (Assembly of right hand side vector <strong>for</strong> linear finite elements). → Rem. 3.2.12<br />

Code 3.2.20: Assembly of right hand side vector <strong>for</strong> linear finite elements, see (3.2.18)<br />

1 phi = zeros(N,1); % N = ♯V(M)<br />

2 f o r i=1:M % M = ♯M<br />

3 phiK = getElementVector(i); % Compute element (load) vector ∈ R 3<br />

4 phi(idx(i,:)) = phi(idx(i,:)) + phiK; % idx according to (3.2.13)<br />

5 end<br />

3.3 Building blocks of general FEM<br />

△<br />

3.2<br />

p. 31<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

As above in Fig. 75: “Assembly” of (⃗ϕ) j by summing up contributions from element vectors of triangles<br />

adjacent tox j .<br />

N j<br />

∑<br />

(⃗ϕ) j = l Kl (b j ) = N|K l<br />

l=1<br />

N j<br />

∑<br />

(⃗ϕ K ) i(l,j) = f(x j )· 13<br />

l=1<br />

N j ∑<br />

l=1<br />

wherei(l,j) is the local vertex index of the nodex j (global indexj) in the triangleK l .<br />

|K l | , (3.2.18)<br />

3.2<br />

p. 314<br />

The previous section explored the details of a simple finite element discretization of 2nd-order elliptic<br />

variational problems. Yet, it already introduced key features and components that distinguish the<br />

finite element approach to the discretization of linear boundary value problems <strong>for</strong> partial differential<br />

equations:<br />

3.3<br />

p. 31


a focus on the variational <strong>for</strong>mulation of a boundary value problem→Sect. 2.8,<br />

a partitioning of the computational domainΩby means of a meshM(→ Sect. 3.2.1)<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Types of meshes:<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

the use of Galerin trial and test spaces based on piecewise polynomials w.r.t. M (→ Sect. 3.2.2),<br />

the use of locally supported basis functions <strong>for</strong> the assembly of the resulting linear system of<br />

equations (→ Sect. 3.2.3).<br />

In this section a more abstract point of view is adopted and the components of a finite element method<br />

<strong>for</strong> scalar 2nd-order elliptic boundary value problems will be discussed in greater generality. However,<br />

prior perusal of Sect. 3.2 is strongly recommended.<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

Triangular mesh in 2D<br />

Fig. 79<br />

Quadrilateral mesh in 2D<br />

✁ 2D hybrid mesh comprising<br />

Fig. 80<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

• triangles<br />

DRAFT<br />

3.3.1 Meshes<br />

First main ingredient of FEM: triangulation/mesh ofΩ → Sect. 3.2.1<br />

Fig. 81<br />

Tetrahedral meshes in 3D (created with NETGEN):<br />

• quadrilaterals<br />

• curvilinear cells (at∂Ω)<br />

3.3<br />

3.3<br />

p. 317<br />

p. 31<br />

Definition 3.3.1. A mesh (or triangulation) of Ω ⊂ R d is a finite collection{K i } M i=1 , M ∈ N, of<br />

open non-degenerate (curvilinear) polygons (d = 2)/polyhedra (d = 3) such that<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

(A) Ω = ⋃ {K i , i = 1,...,M},<br />

(B) K i ∩K j = ∅ ⇔ i ≠ j,<br />

(C) <strong>for</strong> all i,j ∈ {1,...,M}, i ≠ j, the intersectionK i ∩K j is either empty or a vertex, edge,<br />

or face of bothK i andK j .<br />

“vertex”, ”edge”, ”face” of polygon/polyhedron: → geometric intuition<br />

Terminology: Given meshM := {K i } M i=1 : K i called cell or element.<br />

Vertices of a mesh→nodes (setV(M))<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Tensor product mesh = grid<br />

in 2D: a = x 0 < x 1 < ... < x n = b ,<br />

✄<br />

d<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

c = y 0 < y 1 < ... < y m = d .<br />

3.3<br />

p. 318<br />

M = {]x i−1 ,x i [×]y j−1 ,y j [: (3.3.2)<br />

1 ≤ i ≤ n,1 ≤ j ≤ m} . c<br />

☞ Restricted to tensor product domains a b<br />

Fig. 82<br />

3.3<br />

p. 32


If (C) does not hold<br />

Triangular non-con<strong>for</strong>ming mesh<br />

(with hanging nodes)<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Special case:<br />

⎧<br />

|α| = α 1 +α 2 +···+α d . (3.3.5)<br />

⎫<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

K i ∩ K j is only part of an edge/face <strong>for</strong> at most<br />

one of the adjacent cells.<br />

(However, con<strong>for</strong>ming if degenerate quadrilaterals admitted)<br />

Fig. 83<br />

Example:<br />

⎪⎨<br />

d = 2: P p (R 2 ) =<br />

⎪⎩<br />

∑<br />

α 1 ,α 2 ≥0<br />

α 1 +α 2 ≤p<br />

c α1 ,α 2<br />

x α 1<br />

1 xα 2<br />

⎪⎬<br />

2 , c α 1 ,α 2<br />

∈ R .<br />

⎪⎭<br />

P 2 (R 2 ) = Span<br />

{1,x 1 ,x 2 ,x 2 }<br />

1 ,x2 2 ,x 1x 2<br />

Terminology: Simplicial mesh =<br />

triangular mesh in 2D<br />

tetrahedral mesh in 3D<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

✬<br />

Lemma 3.3.6 (Dimension of spaces of( polynomials). )<br />

dimP p (R d d+p<br />

) =<br />

<strong>for</strong> allp ∈ N<br />

p 0 ,d ∈ N<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

✩Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

✫<br />

✪<br />

3.3.2 Polynomials<br />

Proof. Distributep“powers” to thedindependent variables or discard them✄d+1 bins.<br />

3.3<br />

p. 321<br />

Combinatorial ( ) model: number of different linear arrangements ofpidentical items anddseparators<br />

d+p<br />

= . ✷<br />

p<br />

3.3<br />

p. 32<br />

Second main ingredient of FEM:<br />

In FEM:<br />

Galerkin trial/test space comprise locally polynomial functions onΩ<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Leading order dimP p (R d ) = O(p d )<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Clear: polynomials of degree≤ p,p ∈ N 0 , in 1D (univariate polyomials), see (1.5.19)<br />

P p (R) := {x ↦→ c 0 +c 1 x+c 2 x 2 +...c p x p } .<br />

In higher dimensions this concept allows various generalizations, one given in the following definition,<br />

one given in Def. 3.3.7.<br />

Definition 3.3.3 (Multivariate polynomials).<br />

Space of multivariate (d-variate) polynomials of (total) degreep ∈ N 0 :<br />

P p (R d ) := {x ∈ R d ↦→ ∑ α∈N d 0 ,|α|≤pc αx α , c α ∈ R} .<br />

Def. 3.3.3 relies on multi-index notation:<br />

α = (α 1 ,...,α d ): x α := x α 1<br />

1 ·····xα d<br />

d ,<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

✬<br />

✫<br />

(3.3.4)<br />

3.3<br />

p. 322<br />

Definition 3.3.7 (Tensor product polynomials).<br />

Space of tensor product polynomials of degreep ∈ N in each coordinate direction<br />

Example:<br />

Q p (R d ) := {x ↦→ p 1 (x 1 )·····p d (x d ), p i ∈ P p (R),i = 1,...,d} .<br />

Q 2 (R 2 {<br />

) = Span 1,x 1 ,x 2 ,x 1 x 2 ,x 2 1 ,x2 1 x 2,x 2 1 x2 2 ,x 1x 2 }<br />

2 ,x2 2<br />

Lemma 3.3.8 (Dimension of spaces of tensor product polynomials).<br />

dimQ p (R d ) = (p+1) d <strong>for</strong> all p ∈ N 0 ,d ∈ N<br />

✩<br />

✪<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

3.3<br />

p. 32


Terminology:<br />

P p (R d )/Q p (R d ) = complete spaces of polynomials/tensor product polynomials<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

3.3.3 Basis functions<br />

Fig. 84<br />

Fig. 85<br />

Fig. 86<br />

Third main ingredient of FEM:<br />

locally supported basis functions<br />

(see Sect. 3.1 <strong>for</strong> role of bases in Galerkin discretization)<br />

Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

Support of node-associated<br />

basis function, cf. Fig. 87<br />

Support of edge-associated<br />

basis function<br />

Support of cell-associated basis<br />

function<br />

✸<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

DRAFT<br />

Basis functionsb 1 N ,...,bN N <strong>for</strong> a finite element trial/test spaceV 0,N built on a meshMsatisfy:<br />

(a) B N := {b 1 N ,...,bN N } is basis ofV 0,N ➣ N = dimV 0,N ,<br />

Requirement (c) implies that<br />

(b) eachb i N<br />

is associated with a single cell/edge/face/vertex ofM,<br />

global finite element basis functions are locally supported.<br />

R.<br />

(c) supp(b i N ) = ⋃ {K: K ∈ M,p ⊂ K}, ifb i N<br />

associated with cell/edge/face/vertexp.<br />

3.3<br />

p. 325<br />

What is the rationale <strong>for</strong> this requirement ?<br />

3.3<br />

p. 32<br />

Finite element terminology: b i N<br />

= global shape functions/global basis functions<br />

MeshM+global shape functions ➨ complete description of finite element space<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Consider a generic bilinear <strong>for</strong>m a arising from a linear scalar 2nd-order elliptic BVP, see (3.2.5): it<br />

involves integration over Ω/∂Ω of products of (derivatives of) basis functions. Thus the integrand <strong>for</strong><br />

a(b j N ,bi N ) vanishes outside the overlap of the supports ofbj N andbi N .<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Example 3.3.9 (Supports of global shape functions in 1D). → Sect. 1.5.1.2<br />

Ω =]a,b[ ˆ= interval<br />

Equidistant mesh<br />

M := {]x j−1 ,x j [, j = 1,...,M} ,<br />

x j := a+hj,h := (b−a)/M,M ∈ N.<br />

Support (→ Def. 1.5.57) of global shape function<br />

associated withx 7<br />

Example 3.3.10 (Supports of global shape functions on triangular mesh).<br />

0 x 1 x 2 x 3 x 4 x 5 x 6 x 7 x 8 x 9 x 10 x 11 x 12 x 13 x 14<br />

✸<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

✗<br />

✖<br />

Galerkin matrixA ∈ R N,N with (A) ij := a(b j N ,bi N<br />

), i,j = 1,...,N satisfies<br />

a ij ≠ 0<br />

only if<br />

b i N andbj N<br />

associated with<br />

vertices/faces/edges(cells) adjacent to common<br />

cell<br />

Finite element stiffness matrices are sparse (→ Notion 3.2.7)<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

✔A. Chern<br />

✕<br />

DRAFT<br />

Global shape functions<br />

Restriction to element<br />

−−−−−−−−−−−−−→ local shape functions (3.3.11)<br />

3.3<br />

p. 326<br />

3.3<br />

p. 32


Definition 3.3.12 (Local shape functions).<br />

Given finite element function space on meshMwith global shape functionsb i N ,i = 1,...,N:<br />

{b j N|K , K ⊂ supp(bj N )} = set of local shape functions onK ∈ M .<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Taken <strong>for</strong> granted: finite element meshMaccording to Def. 3.3.1.<br />

Goal:<br />

construction of finite element spaces and global shape functions of higher polynomials degrees.<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Local shape functions b 1 K ,...,bQ K<br />

, Q = Q(K) ∈ N also associated with vertices/edges/-<br />

faces/interior ofK<br />

Example 3.3.13 (Local shape functions <strong>for</strong>S1 0 (M) in 2D). → Sect. 3.2.3<br />

Global basis function <strong>for</strong>S 0 1 (M)<br />

On “unit triangle”K with vertices<br />

( (<br />

0 1<br />

0)<br />

0)<br />

a 1 =<br />

, a 2 =<br />

Local shape functions:<br />

, a 3 =<br />

(<br />

0<br />

1)<br />

✄<br />

b 1 K (x) = 1−x 1−x 2 ,<br />

b 2 K (x) = x 1 ,<br />

b 3 K (x) = x 2 .<br />

1<br />

Fig. 87<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

3.3<br />

p. 329<br />

Lagrangian finite element spaces provide spacesV 0,N ofM-piecewise polynomials that fulfill<br />

Notation:<br />

(Lagrangian FE spaces)<br />

V N,0 ⊂ C 0 (Ω)<br />

3.4.1 Simplicial Lagrangian FEM<br />

Thm. 2.2.17<br />

=⇒ V N,0 ⊂ H 1 (Ω) .<br />

S 0 p(M) continuous functions, cf. C0 (Ω)<br />

locally polynomials of degreep,e.g. P p (R d )<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

3.4<br />

p. 33<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

M: Simplicial mesh, consisting of triangles in 2D, tetrahedra in 3D.<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Now we generalizeS 0 1 (M)/S0 1,0 (M) from Sect. 3.2 to higher polynomial degreep ∈ N 0.<br />

These are the barycentric coordinate functionsλ 1 ,λ 2 ,λ 3 introduced in Sect. 3.2.5<br />

Fig. 88<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

Definition 3.4.1 (Simplicial Lagrangian finite element spaces).<br />

Space ofp-th degree Lagrangian finite element functions on simplicial meshM<br />

S 0 p(M) := {v ∈ C 0 (Ω): v |K ∈ P p (K) ∀K ∈ M} .<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

DRAFT<br />

3.4 Lagrangian FEM<br />

✸<br />

3.4<br />

p. 330<br />

Def. 3.4.1 merely describes the space of trial/test functions used in a Lagrangian finite element<br />

method on a Simplicial mesh. A crucial ingredient is still missing (→ Sect. 3.3.3): the global shape<br />

functions still need to be specified. This is done by generalizing (3.2.2) based on sets of special<br />

interpolation nodes.<br />

Example 3.4.2 (Triangular quadratic Lagrangian finite elements).<br />

3.4<br />

p. 33


interpolation nodes<br />

N := V(M)∪{midpoints of edges} ,<br />

N = {p 1 ,...,p N } .<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Selected local shape functions:<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Nodal basis functions b j N<br />

, j = 1,...,N defined<br />

by, cf. (3.2.2)<br />

Fig. 91<br />

b j N (p i) =<br />

{<br />

1 , ifi = j ,<br />

0 else.<br />

(3.4.3)<br />

A “definition” like (3.4.3) is cheap, but it may be pointless, in case no such functions b j N<br />

exist. To<br />

establish their existence, we first study the case of a single triangleK.<br />

We have to show that there is a basis ofP 2 (R 2 ) that satisfies (3.4.3) in the case of a mesh consisting<br />

of a single triangleM = {K}.<br />

Fig. 89<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

So far we have seen that local shape functions can be found that satisfy (3.4.3).<br />

Issue: can the local shape functions from (3.4.4) be “stiched together” across interelement edges<br />

such that they yield a continuous gobal basis function? (Remember that Thm. 2.2.17 demands<br />

global continuity in order to obtain a subspace ofH 1 (Ω).)<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

A first simple consistency check: does the number of interpolation nodes ♯N <strong>for</strong> M = {K} agree<br />

withdimP 2 (R 2 ) = 6? Yes, it does!<br />

Local shape functions (barycentric coordinate representation)<br />

b 1 K = (2λ 1 −1)λ 1 ,<br />

b 2 K = (2λ 2 −1)λ 2 ,<br />

b 3 K = (2λ 3 −1)λ 3 ,<br />

b 4 K = 4λ 1λ 2 ,<br />

b 5 K = 4λ 2λ 3 ,<br />

b 6 K = 4λ 1λ 3 .<br />

(3.4.4)<br />

To see the validity of the <strong>for</strong>mulas (3.4.4), note that<br />

➀<br />

➄<br />

K<br />

➃<br />

➂<br />

➅<br />

➁<br />

Fig. 90<br />

3.4<br />

p. 333<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Fig. 92<br />

The restriction of a quadratic polynomial to an edge is an univariate<br />

quadratic polynomial.<br />

Fixing its value in three points, the midpoint of the edge and<br />

the endpoints, uniquely fixes this polynomial.<br />

The local shape functions associated with the same<br />

interpolation node “from left and right” agree on the edge.<br />

➣ continuity !<br />

3.4<br />

p. 33<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

•λ i (a i ) = 1 andλ i (a j ) = 0, ifi ≠ j, wherea 1 ,a 2 ,a 3 are the vertices of the triangleK,<br />

•λ 1 (m 12 ) = λ 1 (m 13 ) = 1 2 , wheremij = 1 2 (ai +a j ) denotes the midpoint of the edge connecting<br />

a i anda j ,<br />

• each barycentric coordinate functionλ i is affine linear such thatλ i λ j ∈ P 2 (R 2 ).<br />

3.4<br />

p. 334<br />

Fig. 93<br />

Fig. 94<br />

3.4<br />

p. 33


✁ Global basis function <strong>for</strong> S2 0 (M) associated<br />

with a vertex<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Now we consider tensor product meshes (grids), see (3.3.2), Fig. 82, <strong>for</strong> a 2D example.<br />

Example 3.4.6 (Bilinear Lagrangian finite elements).<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Fig. 95<br />

(3.4.3): this function attaints value = 1 at a vertex<br />

(•) and vanishes at the midpoints (•) of the edges<br />

Example 3.4.5 (Interpolation nodes <strong>for</strong> cubic and quartic Lagrangian FE in 2D).<br />

of adjacent triangles, as well as at any other vertex.<br />

✸<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Sought: generalization of 1D piecewise linear finite element functions from Sect. 1.5.1.2, see Fig. 25,<br />

to 2D tensor product gridM.<br />

Tensor product structure ofM ➤<br />

tensor product construction of FE space<br />

This is best elucidated by a tensor product construction of basis functions:<br />

b j N,x (x) : 1D tent function onM x = {[x j−1 ,x j ], j = 1,...,n}<br />

b l N,y (y) : 1D tent function onM y = {[y j−1 ,y j ], j = 1,...,n}<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

2D tensor product “tent function” associated with nodep:<br />

3.4<br />

p. 337<br />

b p N (x) = bj N,x (x 1)·b l N,y (x 2) , where p = (x j ,y l ) T . (3.4.7)<br />

3.4<br />

p. 33<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

1.2<br />

1<br />

1.2<br />

1<br />

1.2<br />

1<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

0.8<br />

0.8<br />

0.8<br />

0.6<br />

0.6<br />

0.6<br />

0.4<br />

0.2<br />

0<br />

−0.2<br />

2.5<br />

2<br />

1.5<br />

1<br />

0.5<br />

0.5<br />

0<br />

0<br />

−0.5 −0.5<br />

b j N,x (x)<br />

1<br />

1.5<br />

2<br />

⊕<br />

0.4<br />

0.2<br />

0<br />

−0.2<br />

2.5<br />

2.5<br />

2<br />

1.5<br />

1<br />

0.5<br />

0.4<br />

0.2<br />

= 0<br />

−0.2<br />

2.5<br />

2.5<br />

2<br />

1.5<br />

1<br />

0.5<br />

0<br />

0<br />

−0.5 −0.5<br />

b l N,y (y)<br />

2<br />

1.5<br />

1<br />

0.5<br />

0.5<br />

0<br />

0<br />

−0.5 −0.5<br />

b p N (x)<br />

1<br />

2.5<br />

2<br />

1.5<br />

Fig. 98<br />

Fig. 96<br />

(local) interpolation nodes <strong>for</strong>S 0 3 (M) Fig. 97<br />

(local) interpolation nodes <strong>for</strong>S 0 4 (M)<br />

✸<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

✁ 2D tensor product tent function<br />

No pyramid !<br />

Basis functions associated (→ Sect. 3.3.3,<br />

condition (c)) with nodes ofM,<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

3.4.2 Tensor-product Lagrangian FEM<br />

3.4<br />

p. 338<br />

Fig. 99<br />

3.4<br />

p. 34


Tensor product construction ➤ bilinear local shape functions, e.g. onK =]0,1[ 2<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

The following is a natural generalization of (3.4.9) to higher degree local tensor product polynomials,<br />

see Def. 3.3.7:<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

b 1 K (x) = (1−x 1)(1−x 2 ) ,<br />

b 2 K (x) = x 1(1−x 2 ) ,<br />

b 3 K (x) = x 1x 2 ,<br />

b 4 K (x) = (1−x 1)x 2 .<br />

(3.4.8)<br />

➃<br />

➀<br />

K<br />

x 2<br />

Fig. 100<br />

➂<br />

➁<br />

x 1<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Definition 3.4.10 (Tensor product Langrangian finite element spaces).<br />

Space ofp-th degree Lagrangian finite element functions on tensor product meshM<br />

Terminology:<br />

S 0 p(M) := {v ∈ C 0 (Ω): v |K ∈ Q p (K) ∀K ∈ M} .<br />

S1 0 (M) = multilinear finite elements (p = 1,d = 2 = bilinear finite elements)<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Remaining issue:<br />

definition of global basis functions (global shape functions)<br />

Policy: use of interpolation nodes as in Sect. 3.4.1, see Ex. 3.4.2.<br />

3.4<br />

p. 341<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Example 3.4.11 (Quadratic tensor product Lagrangian finite elements).<br />

Consider casep = 2,d = 2 of Def. 3.4.10:<br />

Interpolation nodes <strong>for</strong>S2 0(M)<br />

N = V(M)∪{midpoints of edges} .<br />

d<br />

3.4<br />

p. 34<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Fig. 101<br />

Note: number of interpolation nodes belonging to<br />

one cell is<br />

Bilinear local shape functions on unit squareK<br />

{<br />

Span b 1 }<br />

K ,b2 K ,b3 K ,b4 K = Q 1 (R 2 ) .<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

9 = dimQ 2 (R 2 ) .<br />

c<br />

a<br />

Fig.<br />

b<br />

102<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

Bilinear Lagrangian finite element space on 2D tensor product meshM:<br />

DRAFT<br />

Global basis functions defined analoguously to (3.4.3).<br />

DRAFT<br />

S 0 1 (M) := {v ∈ C0 (Ω): v |K ∈ Q 1 (R 2 ) ∀K ∈ M} . (3.4.9)<br />

✸<br />

✸<br />

3.4<br />

p. 342<br />

Choice of interpolation nodes <strong>for</strong> tensor product Lagrangian finite elements:<br />

3.4<br />

p. 34


<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

2. Does the space from (3.4.15) allow <strong>for</strong> locally supported basis functions associated with nodes of<br />

the mesh?<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

p = 1 p = 2<br />

Remark 3.4.12 (Imposing homogeneous Dirichlet boundary conditions).<br />

p = 3<br />

Fig. 103<br />

We wil give a positive answer to both question by constructing the basis functions:<br />

Define global shape functionsb j N<br />

according to (3.2.3)<br />

What is a global basis <strong>for</strong>Sp(M)∩H 0 0 1 (Ω), whereMis either a simplicial mesh or a tensor product<br />

mesh?<br />

We proceed analoguous to Rem. 3.2.4:<br />

interpolation nodesp j ,j = 1,...,N, see (3.4.3).<br />

recall that global basis functions are defined via<br />

Sp,0 0 (M) := S0 p(M)∩H0 {b 1(Ω) = Span j }<br />

N : pj ∈ Ω (interior node)<br />

. (3.4.13)<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

This makes sense, because<br />

linear/bi-linear functions onK are uniquely determined by their values in the vertices,<br />

the restrictions to an edge of K of the local linear and bi-linear shape functions are both linear<br />

univariate functions, see Figs. 72, 101.<br />

Fixing vertex values <strong>for</strong> v N ∈ S1 0 (M) uniquely determines v on all edges of M already, thus,<br />

ensuring global continuity, which is necessary due to Thm. 2.2.17.<br />

△<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Remark 3.4.14 ((Bi)-linear Lagrangian finite elements on hybrid meshes).<br />

△<br />

3.4<br />

p. 345<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Exercise 3.4.1. Consider a tensor product meshMofΩ :=]0,1[ 2 and the space<br />

{<br />

V 0,N := v ∈ H0 1 (Ω): v |K ∈ P 1(R 2 }<br />

)∀K ∈ M .<br />

What is the dimension of this space?<br />

3.4<br />

p. 34<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

M: 2D hybrid mesh comprising triangles & rectangles<br />

✄<br />

Two issues arise:<br />

Idea:<br />

use<br />

linear functions (→ Def. 3.3.3,<br />

p = 1) on triangular cells,<br />

bi-linear functions (→<br />

Def. 3.4.10, p = 1) on rectangles.<br />

S 0 1 (M) = {v ∈ H 1 (Ω): v |K ∈<br />

{<br />

P1 (R 2 ) , ifK ∈ M is triangle,<br />

Q 1 (R 2 ) , ifK ∈ M is rectangle<br />

}<br />

Fig. 104<br />

. (3.4.15)<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Remark 3.4.16 (Lagrangian finite elements on hybrid<br />

meshes).<br />

☞<br />

M: 2D hybrid mesh comprising triangles & rectangles<br />

Matching interpolation nodes on edges of triangles<br />

and rectangles<br />

Glueing of local shape functions on triangles<br />

and rectangles possible<br />

gobal interpolation nodes <strong>for</strong>p = 2✄<br />

△<br />

Fig. 105<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

1. Does the prescription (3.4.15) yield a large enough space? (Note that v ∈ H 1 (Ω) ⇒ S 0 1 (M) ⊂<br />

C 0 (Ω), see Thm. 2.2.17, but continuity might en<strong>for</strong>ce too many constraints.)<br />

3.4<br />

p. 346<br />

3.5<br />

p. 34


3.5 Implementation of FEM<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

File <strong>for</strong>mat <strong>for</strong> storing triangular mesh (of polygonal domain):<br />

# Two-dimensional simplicial mesh<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

1 ξ 1 η 1 # Coordinates of first node<br />

This section discusses algorithmic details of Galerkin finite element discretization of 2nd-order elliptic<br />

variational problems <strong>for</strong> spatial dimension d = 2,3 on bounded polygonal/polyhedral domains Ω ⊂<br />

R d .<br />

The presentation matches the LehrFEM finite element MATLAB library, parts of which will be made<br />

available <strong>for</strong> participants of the course. A detailed documentation is available from [6].<br />

The guiding principle behind the implementation of finite element codes is<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

2 ξ 2 η 2 # Coordinates of second node<br />

.<br />

N ξ N η N<br />

# Coordinates of N-th node<br />

1 n 1 1 n 1 2 n 1 3 X 1 # Indices of nodes of first triangle<br />

2 n 2 1 n 2 2 n 2 3 X 2 # Indices of nodes of second triangle<br />

.<br />

M n M 1 n M 2 n M 3 X M # Indices of nodes of M-th triangle<br />

X i ,i = 1,...,M → extra in<strong>for</strong>mation (e.g. material properties in triangle#i).<br />

(3.5.2)<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

✓<br />

✒<br />

to rely on local computations as much as possible!<br />

✏<br />

✑<br />

This is made possible by the local supports of the global basis functions, see Sect. 3.3.3, Ex. 3.3.10.<br />

3.5<br />

3.5<br />

p. 349<br />

p. 35<br />

3.5.1 Mesh file <strong>for</strong>mat<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Optional:<br />

additional in<strong>for</strong>mation about edges (on∂Ω):<br />

K ∈ N # Number of edges on ∂Ω<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Data flow in (most) finite element software packages:<br />

n 1 1 n1 2 Y 1<br />

# Indices of endpoints of first edge<br />

n 2 1 n2 2 Y 2<br />

# Indices of endpoints of second edge<br />

(3.5.3)<br />

CAD data<br />

Parameters<br />

.<br />

n K 1 nK 2<br />

Y K # Indices of endpoints of K-th edge<br />

Mesh generator<br />

Finite element solver<br />

(computational kernel)<br />

Post-processor<br />

(e.g. visualization)<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

Y k ,k = 1,...,K → extra in<strong>for</strong>mation<br />

Example 3.5.4 (Mesh file <strong>for</strong>mat <strong>for</strong> MATLAB code “LehrFEM”).<br />

✸<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Vertex coordinate file:<br />

Cell in<strong>for</strong>mation file:<br />

DRAFT<br />

Here “ ” designates passing of in<strong>for</strong>mation, which is usually done by writing and reading files to<br />

and from hard disk. This requires particular file <strong>for</strong>mats.<br />

Example 3.5.1 (Triangular mesh: file <strong>for</strong>mat).<br />

% List of vertices<br />

1 +0.000000e+00 -1.000000e+00<br />

2 +1.000000e+00 +0.000000e+00<br />

3 +0.000000e+00 +1.000000e+00<br />

4 -1.000000e+00 +0.000000e+00<br />

5 +0.000000e+00 +0.000000e+00<br />

% List of elements<br />

1 1 2 5<br />

2 2 3 5<br />

3 3 4 5<br />

4 4 1 5<br />

3.5<br />

3.5<br />

p. 350<br />

p. 35


Loading a mesh<br />

m = load_Mesh(’Coord_Circ.dat’,...<br />

’Elem_Circ.dat’);<br />

plot_Mesh(m,’apts’);<br />

Option flags:<br />

’a’: with axes<br />

’p’: vertex labels on<br />

’t’: cell labels on<br />

’s’: caption/title on<br />

For details see [6, Sect. 1.3.1], [6, Sect. 1.3.2].<br />

1<br />

0.8<br />

0.6<br />

0.4<br />

0.2<br />

0<br />

−0.2<br />

−0.4<br />

−0.6<br />

−0.8<br />

−1<br />

4 5<br />

3<br />

4<br />

2D triangular mesh<br />

3<br />

1<br />

−1 −0.5 0 0.5 1<br />

# Vertices : 5, # Elements : 4, # Edges : 8<br />

Fig. 106<br />

✸<br />

2<br />

1<br />

2<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

MATLAB-CODE: mesh generation <strong>for</strong> circular domain<br />

BBOX = [-1 -1; 1 1];<br />

H0 = 0.1;<br />

DHD = @(x) sqrt(x(:,1).^2+x(:,2).^2)-1;<br />

HHANDLE = @(x) ones(size(x,1),1);<br />

Mesh = init_Mesh(BBOX,H0,DHD,...<br />

HHANDLE,[],1);<br />

save_Mesh(Mesh,’Coordinates.dat’,...<br />

’Elements.dat’);<br />

3.5.2 Mesh data structures [6, Sect. 1.1]<br />

Bounding box<br />

Largest reasonable edge length<br />

Signed distance functionϕ(x):<br />

(distance from ∂Ω, ϕ(x) < 0 ⇔<br />

x ∈ Ω)<br />

Element size function<br />

(determines local edge length)<br />

✸<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

3.5<br />

p. 353<br />

Issue:<br />

internal representation of mesh (→ Def. 3.3.1) in computer code<br />

3.5<br />

p. 35<br />

How to create a mesh ?<br />

→<br />

Mesh generation (beyond scope of this course)<br />

→ http://www.andrew.cmu.edu/user/sowen/mesh.html<br />

Free software: • DistMesh (MATLAB, used in “LehrFEM”, see [6, Sect. 1.2])<br />

• NETGEN (industrial strength open source mesh generator)<br />

• Triangle (easy to use 2D mesh generator)<br />

• TETGEN (Tetrahedral mesh generation)<br />

Example 3.5.5 (Mesh generation in LehrFEM).<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

mesh data structure must provide:<br />

1. offer unique identification of cells/(faces)/(edges)/vertices<br />

2. represent mesh topology (= incidence relationships of cells/faces/edges/vertices)<br />

3. describe mesh geometry (= location/shape of cells/faces/edges/vertices)<br />

4. allow sequential access to edges/faces of a cell<br />

(→ traversal of local shape functions/degrees of freedom)<br />

5. make possible traversal of cells of the mesh (→ global numbering)<br />

Focus: array oriented data layout (→ MATLAB, FORTRAN)<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Algorithm & details → [24], more explanations in [6, Sect. 1.2].<br />

Notation:<br />

M = mesh (set of elements),V(M) = set of nodes (vertices) inM,E(M) = set of edges inM<br />

Case: d-dimensional simplicial triangulationM, minimal data structure (cf. Sect. 3.5.1)<br />

3.5<br />

p. 354<br />

→ Coordinates of verticesV(M) : ♯V(M)×d-array Coordinates of reals<br />

→ Vertex indices <strong>for</strong> cells: ♯M×(d+1)-array Elements of integers.<br />

3.5<br />

p. 35


(−1,1)<br />

1<br />

1<br />

2<br />

5<br />

3<br />

(−1,−1)<br />

2<br />

6<br />

4<br />

9<br />

5<br />

3<br />

7<br />

8<br />

4<br />

(1,1)<br />

8<br />

7<br />

6<br />

(1,−1)<br />

Fig. 107<br />

Example 3.5.6 (Arrays storing 2D triangular mesh).<br />

i Coordinates<br />

1 -1 1<br />

2 -1 0<br />

3 -1 -1<br />

4 0 -1<br />

5 0 0<br />

6 1 -1<br />

7 1 0<br />

8 1 1<br />

9 0 1<br />

Array Coordinates<br />

K j Vertex indices<br />

1 1 2 9<br />

2 2 5 9<br />

3 5 8 9<br />

4 5 7 8<br />

5 3 4 2<br />

6 4 5 2<br />

7 4 7 5<br />

8 4 6 7<br />

Array Elements<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

mesh =<br />

Coordinates: [5x2 double]<br />

Elements: [4x3 double]<br />

Edges: [8x2 double]<br />

Vert2Edge: [5x5 double]<br />

Edge2Elem: [8x2 double]<br />

EdgeLoc: [8x2 double]<br />

Notation:<br />

How to number↔order<br />

E(M) ˆ= edges of 2D mesh<br />

vertex coordinates, see Ex. 3.5.4<br />

vertex indices of triangles, see Ex. 3.5.4<br />

indices of endpoints in Coordinates array<br />

♯V(M)×♯V(M) sparse integer matrix:<br />

entry(i,j) = edge index, if≠ 0<br />

♯E(M)×2 integer array:<br />

indices of adjacent cells in Elements array<br />

♯E(M)×2 integer array: local indices of edges w.r.t. adjacent cells<br />

local shape functions<br />

global shape functions<br />

?<br />

✸<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Already offers complete description of the mesh topology and geometry !<br />

This in<strong>for</strong>mation is enough <strong>for</strong> efficient assembly of finite element Galerkin matrices/right hand side<br />

vectors <strong>for</strong> (bi-)linear Lagrangian finite elements, see Rem. 3.2.12, 3.2.19.<br />

Note: Global shape functions associated with edges/faces ➣ extra in<strong>for</strong>mation required !<br />

Optional extra in<strong>for</strong>mation:<br />

3.5<br />

p. 357<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

✬<br />

Elements, Edges arrays ➣ ordering of vertices of cells/endpoints of edges<br />

Arrays (of vertices,cells,edges) ➣ array indices ➣ numbering of global shape functions<br />

✫<br />

Remark 3.5.8. Second option: C++/JAVA-style object oriented data layout<br />

Nodes, cells ofM ←→ dynamically allocated objects (instances of classes Node, Cell)<br />

✩<br />

✪<br />

3.5<br />

p. 35<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

→ Edge connecting vertices: ♯V(M)×♯V(M) symmetric sparse integer matrixI E<br />

{<br />

0 , if vertex♯inot linked to♯j<br />

(I E ) ij :=<br />

e ij , if edge connecting♯iand♯j<br />

heree ij is the unique edge number∈ {1,2.....♯E(M)}<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

class Node {<br />

private:<br />

double x,y;<br />

ID id;<br />

public:<br />

Node(double x,double y,ID id=0);<br />

Point getCoords(void) const;<br />

ID getId(void) const;<br />

};<br />

class Cell {<br />

private:<br />

const vector vertices;<br />

ID id;<br />

public:<br />

Cell(const vector &vertices,ID id=0);<br />

int NoNodes(void) const;<br />

const Node &getNode(int) const;<br />

ID getId(void) const;<br />

};<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

→ End points of the edges: ♯E(M)×2 array of integer (= vertex indices of end points).<br />

→ Cell adjacent to edges: ♯E(M)×2 array of integers (=cell indices)<br />

(one cell index =0 if edge is on∂Ω)<br />

Example 3.5.7 (Extended MATLAB mesh data structure). → [6, Sect. 1.1]<br />

mesh = add_Edge2Elem(add_Edges(init_Mesh(BBOX,H0,DHD,HHANDLE,[],1)))<br />

(init_Mesh → Ex. 3.5.5)<br />

DRAFT<br />

3.5<br />

p. 358<br />

class BdFace {<br />

private:<br />

const vector vertices;<br />

BdCond bdcond;<br />

public:<br />

BdFace(const vector &vertices);<br />

int NoNodes(void) const;<br />

const Node &getNode(int) const;<br />

BdCond getBdCond(void) const;<br />

};<br />

class Mesh {<br />

private:<br />

list nodes;<br />

list cells;<br />

list bdfaces;<br />

public:<br />

Mesh(istream &file);<br />

virtual Mesh(void);<br />

const list &Nodes(void) const;<br />

const list &Cells(void) const;<br />

const list &BdFaces(void) const;<br />

};<br />

DRAFT<br />

3.5<br />

p. 36


ID getId()→provides unique identifier <strong>for</strong> each node/cell.<br />

Distinguish: − local objects (→ classes Node, Cell, BdFace)<br />

− global objects (“mesh management” class Mesh, see below)<br />

3.5.3 Assembly [6, Sect. 5]<br />

△<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Example: bilinear <strong>for</strong>ms/linear <strong>for</strong>ms arising from 2nd-order elliptic BVPs, e.g, (2.9.1), (2.9.2),<br />

(2.9.3), can be localized in straight<strong>for</strong>ward fashion by restricting integration to mesh<br />

cells (→ Rem. 3.2.1): <strong>for</strong>u,v ∈ H 1 (Ω)<br />

∫<br />

a(u,v) := α(x)gradu·gradvdx = ∑ ∫<br />

α(x)gradu·gradvdx , (3.5.10)<br />

Ω<br />

K∈M<br />

K<br />

} {{ }<br />

=:a K (u |K ,v |K )<br />

∫<br />

l(v) := fvdx = ∑<br />

Ω<br />

K∈M<br />

∫<br />

fvdx . (3.5.11)<br />

K<br />

} {{ }<br />

=:l K (v |K )<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

“Assembly” = term used <strong>for</strong> computing entries of stiffness matrix/right hand side vector (load vector)<br />

in a finite element context.<br />

From the dictionary: “Assemble” = to fit together all the separate parts of sth.<br />

3.5<br />

p. 361<br />

Start with discussion <strong>for</strong> linear finite elements. Jumping right to quadratic finite elements has not<br />

worked out well.<br />

✗<br />

✔<br />

Recall (3.3.11): Restrictions of global shape functions to cells = local shape functions<br />

✖<br />

✕<br />

3.5<br />

p. 36<br />

Aspects of assembly <strong>for</strong> linear Lagrangian finite elements (V 0,N = S1,0 0 (M)) were discussed in<br />

Sects. 3.2.5, 3.2.6. (Refresh yourself on these sections in case you cannot remember the main ideas<br />

behind building the Galerkin matrix and right hand side vector.)<br />

We consider a discrete variational problem (V 0,N = FE space,dimV 0,N = N ∈ N, see (3.1.4))<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Definition 3.5.12 (Element (stiffness) matrix and element (load) vector).<br />

Given local shape functions{b 1 K ,...,bQ K },Q ∈ N, we call<br />

(<br />

element (stiffness) matrix A K :=: a K (b j ) Q<br />

K ,bi K ) i,j=1 ∈ RQ,Q ,<br />

(<br />

element (load) vector ⃗ϕ K := l K (b i ) Q<br />

K ) i=1 ∈ RQ .<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

u N ∈ V 0,N : a(u N ,v N ) = l(v N ) ∀v N ∈ V 0,N . (3.1.4)<br />

To be computed (see also Sect. 3.2.5, Sect. 3.2.6):<br />

(<br />

• Galerkin matrix (stiffness matrix): A = a(b j ) N<br />

N ,bi N ) i,j=1 ∈ RN,N<br />

(<br />

• r.h.s. vector (load vector): ⃗ϕ := l(b i ) N<br />

N ) i=1 ∈ RN<br />

} {{ }<br />

both can be written in terms of local cell contributions, since usually<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

R. Hiptm<br />

Note: Here Q, the number of local shape functions on element K ∈ M, is independent of K.<br />

In general, we could also have Q = Q K when we blend several element types in one mesh, see<br />

DRAFT<br />

Rem. 3.4.14.<br />

Type of FE space<br />

Q<br />

degreepLagrangian FE on triangular mesh dimP p (R 2 ) = 2 1(p+1)(p+2)<br />

degreepLagrangian FE on tetrahedral mesh dimP p (R 3 ) = 1 6 (p+1)(p+2)(p+3)<br />

degreepLagrangian FE on tensor product mesh in 2D dimQ p (R 2 ) = (p+1) 2<br />

a(u,v) = ∑<br />

a K (u |K ,v |K ) , l(v) = ∑<br />

l K (v |K ) . (3.5.9)<br />

K∈M<br />

K∈M<br />

3.5<br />

p. 362<br />

3.5<br />

p. 36


Again scrutinize Figs. 74, 75 and the accompanying remarks in Sect. 3.2.5. We learn that in the<br />

special setting of this section<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

➣<br />

By (3.5.15), the indicesl(i) encode the T-matrix according to<br />

(T K ) l(i),i = 1 , i = 1,...,N ,<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

the entries of the finite element Galerkin matrix can be obtained by summing corresponding<br />

entries of some element matrices,<br />

this corresponding entry of an element matrices is determined by the unique association<br />

of a local basis function to a global basis function.<br />

These insights are <strong>for</strong>malized in the next theorem.<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

where all other entries ofT K are understood to vanish.<br />

⇒ (A) ij =<br />

∑<br />

K∈M,supp(b j N )∩K≠∅, l=1 n=1<br />

supp(b i N )∩K≠∅<br />

Q ∑<br />

Q∑<br />

(T K ) li (A K ) ln (T K ) nj . ✷<br />

Example 3.5.16 (Assembly <strong>for</strong> linear Lagrangian finite elements on triangular mesh).<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

✬<br />

Theorem 3.5.13. The stiffness matrix and load vector can be obtained from their cell counterparts<br />

by<br />

✫<br />

A = ∑ K<br />

T ⊤ K A KT K , ⃗ϕ = ∑ K<br />

with the index mapping matrices (“T-matrices”)<br />

{<br />

j 1 , if (b<br />

(T K ) ij := N ) |K = bi K ,<br />

0 , otherwise.<br />

T ⊤ K ⃗ϕ K , (3.5.14)<br />

T K ∈ R Q,N , defined by<br />

Note: Every T-matrix has exactly one non-vanishing entry per row.<br />

1 ≤ i ≤ Q,1 ≤ j ≤ N . (3.5.15)<br />

✩<br />

3.5<br />

p. 365<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

✪R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Using the local/global numbering indicated beside<br />

⎛<br />

0 1 0 0 0 0 0 0 0 0 0 0 ⎞<br />

→ T K ∗ = ⎝0 0 0 0 0 0 1 0 0 0 0 0⎠<br />

0 0 0 0 0 0 0 0 1 0 0 0<br />

11<br />

10<br />

8<br />

9<br />

3<br />

2 7<br />

6<br />

12 K ∗<br />

1<br />

5<br />

1 2<br />

4<br />

3<br />

Fig. 108<br />

✸<br />

3.5<br />

p. 36<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Proof. (of Thm. 3.5.13)<br />

(A) ij = a(b j N ,bi N ) = ∑<br />

a K (b j N|K ,bi N|K ) = ∑<br />

a K (b l(j)<br />

K∈M K∈M,supp(b j N )∩K≠∅,<br />

supp(b i N )∩K≠∅<br />

K ,bl(i) K ) = ∑<br />

(A K ) l(i),l(j) .<br />

K∈M,supp(b j N )∩K≠∅,<br />

supp(b i N )∩K≠∅<br />

l(i) ∈ {1,...,Q},1 ≤ i ≤ N ˆ= index of the local shape function corresponding to the global shape<br />

functionb i N onK.<br />

3.5<br />

p. 366<br />

★<br />

✧<br />

Cell oriented assembly ↔ (3.5.14)↔A = ∑ K<br />

T ⊤ K A KT K<br />

⎧<br />

A = ∑ ⎨<br />

T ⊤ K A KT K :=<br />

K ⎩<br />

enddo<br />

✥<br />

✦<br />

⇕<br />

<strong>for</strong>eachK ∈ M do<br />

local operations onK (→A K ) andA = A+T ⊤ K A KT K<br />

⎫<br />

⎬<br />

⎭<br />

3.5<br />

p. 36


Notion: local operations ˆ= required only data from fixed “neighbourhood” ofK<br />

computational ef<strong>for</strong>t “O(1)”: independent of♯M<br />

Computational cost(Assembly of Galerkin matrixA)= O(♯M)<br />

Cell oriented assembly in LehrFEM [6, Sect. 5.1]<br />

function A = assemble(Mesh)<br />

<strong>for</strong> k = Mesh.Elements’<br />

idx = ❶<br />

Aloc = ❷<br />

A(idx,idx) = A(idx,idx)+Aloc;<br />

end<br />

❶ row vector of index numbers of<br />

global shape functions b i 1<br />

N ,...,b i Q<br />

N ∈ V N<br />

corresponding to local shape functions<br />

b 1 K ,...,bQ K : idx= (i 1 ,...,i Q )<br />

(encodes index mapping matrixT K )<br />

❷ Q×Q element stiffness matrix<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

3.5<br />

p. 369<br />

MATLAB-CODE: assembly <strong>for</strong> quadratic Lagrangian FE<br />

function A = assemMat_QFE(Mesh,EHa 1 ndle,varargin)<br />

nV = size(Mesh.Coordinates,1);<br />

nE = size(Mesh.Elements,1)<br />

I 2 = zeros(36*nE,1); J = I; a = I; offset = 0;<br />

<strong>for</strong> k =1:nE<br />

vidx = Mesh.Elements(k,:)<br />

idx 3 = [vidx,...<br />

Mesh.Vert2Edge(vidx(1),vidx(2))+nV,...<br />

Mesh.Vert2Edge(vidx(2),vidx(3))+nV,...<br />

Mesh.Vert2Edge(vidx(3),vidx(1))+nV];<br />

Aloc 4 = transpose(EHandle(Mesh.Coordinates(vidx,:),...<br />

Mesh. 5 ElemFlag(k),varargin{:}));<br />

Qsq = prod(size(Aloc)); range = offset + 1:Qsq;<br />

t = idx(ones(length(idx),1),:)’; I(range) = t(:);<br />

t = idx(ones(1,length(idx)),:); J(range) = t(:);<br />

a(range) = Aloc(:);<br />

offset = offset + Qsq;<br />

end<br />

A 6 = sparse(I,J,a);<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

3.5<br />

p. 37<br />

For Lagrangian FEM of fixed degreep (→ Sect. 3.4):<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

1: EHandle (function handle)→provides element stiffness matrixA K ∈ R 6,6<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

the total computational ef<strong>for</strong>t is of the orderO(♯M) = O(N),N := dimS 0 p(M).<br />

2: I,J,a ˆ= linear arrays storing(i,j,(A) ij ) <strong>for</strong> stiffness matrixA.<br />

Initialized with 0 <strong>for</strong> the sake of efficiency→Ex. 3.5.18<br />

Example 3.5.17 (Assembly <strong>for</strong> quadratic Lagrangian FE in MATLAB code).<br />

3: idx ˆ= index mapping vector, see ❶ above<br />

Setting: FE spaceS 0 2 (M) on triangular meshMof polygonΩ ⊂ R2 , see Ex. 3.4.2<br />

Recall: 6 local shape functions: 3 vertex-associated, 3 edge-associated → (3.4.4)<br />

Convention:<br />

vertex-associated global shape functions→ b 1 N ,...,b♯V(M) N<br />

edge-associated global shape functions→ b ♯V(M)+1<br />

N ,...,b ♯V(M)+♯E(M)<br />

N<br />

3<br />

Local numbering<br />

→<br />

1<br />

6<br />

K<br />

4<br />

5<br />

2<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

3.5<br />

p. 370<br />

4: Aloc =A K ∈ R 6,6 (element stiffness matrix→Def. 3.5.12)<br />

5: Mesh.ElemFlag(k) marks groups of elements (e.g. to select local coefficient functionα(x)<br />

in (2.8.4))<br />

6: Build sparse MATLAB-matrix (→ Def. 3.2.7) from index-entry arrays, see manual entry <strong>for</strong> MAT-<br />

LAB function sparse and [18, Sect. 2.6.2].<br />

✸<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

3.5<br />

p. 37


Remark 3.5.18 (Efficient implementation of assembly). → [18, Sect. 2.6.2]<br />

tic-toc-timing (min of 4v runs), MATLAB V7, Intel Pentium 4 Mobile CPU 1.80GHz, Linux<br />

Computation of element stiffness matrices skipped !<br />

• Sparse assembly:<br />

A(idx,idx) = A(idx,idx) + Aloc;<br />

• Array assembly I: “growing arrays”<br />

I = []; J = []; a = [];<br />

...<br />

t = idx(:,ones(length(idx),1))’;<br />

I = [I;t(:)];<br />

t = idx(:,ones(1,length(idx)));<br />

J = [J;t(:)];<br />

a = [a; Aloc(:)];<br />

• Array assembly III<br />

→ see code fragment above<br />

Time [s]<br />

Timing <strong>for</strong> different assembly routines<br />

10 2<br />

10 1<br />

10 0<br />

10 −1<br />

10 −2<br />

Sparse assembly<br />

Array assembly, type 1<br />

Array assembly, type 2<br />

Array assembly, type 3<br />

10 −3<br />

10 1 10 2 10 3 4<br />

# Dofs<br />

Fig. 109<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

whereλ i are the affine linear barycentric coordinate functions (linear shape functions), see Fig. 72.<br />

For the barycentric coordinate representation of the quadratic local shape functions see (3.4.4), <strong>for</strong> a<br />

justification of (3.5.19) consult Rem. 3.6.9.<br />

⇒ gradb i K =<br />

∑ (<br />

κ α<br />

α∈N 3 0 ,|α|≤p<br />

To evaluate<br />

∫<br />

K<br />

α 1 λ α 1−1<br />

1 λ α 2<br />

2 λα 3<br />

3 gradλ 1 +α 2 λ α 1<br />

1 λα 2−1<br />

2 λ α 3<br />

3 gradλ 2+<br />

α 3 λ α 1<br />

1 λα 2<br />

2 λα 3−1<br />

3 gradλ 3<br />

)<br />

.<br />

(3.5.20)<br />

λ β 1<br />

1 λβ 2<br />

2 λβ 3<br />

3 gradλ i·gradλ j dx , i,j ∈ {1,2,3}, β k ∈ N . (3.5.21)<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

More detailed discussion→[31] and [18, Sect. 2.6.2].<br />

3.5.4 Local computations and quadrature<br />

We have seen that the (global) Galerkin matrix and right hand side vector are conveniently generated<br />

by “assembling” entries of element (stiffness) matrices and element (load) vectors.<br />

Now we study the computation of these local quantities, see also Sect. 3.2.5, 3.2.6.<br />

First option:<br />

analytic evaluations<br />

△<br />

3.5<br />

p. 373<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Ifa 1 ,a 2 ,a 3 vertices ofK (counterclockwise ordering):<br />

λ 1 (x) = 1 ( a 2<br />

))<br />

x−(<br />

1 a 2<br />

·(<br />

2 −a 3 )<br />

2|K| a 2 2<br />

2 a 3 1 −a2 ,<br />

1<br />

λ 2 (x) = 1 ( a 3<br />

))<br />

x−(<br />

1 a 3<br />

·(<br />

2 −a 1 )<br />

2|K| a 3 2<br />

2 a 1 1 −a3 ,<br />

1<br />

λ 3 (x) = 1 ( a 1<br />

))<br />

x−( a 1<br />

·( −a 2 )<br />

2|K| a 1 2<br />

2 a 2 1 −a1 .<br />

1<br />

a 3 = ( a 3 1,a 3 ) T<br />

2<br />

ω 3<br />

n 1<br />

n 2<br />

n 3<br />

Fig. 110<br />

ω 1<br />

ω 2<br />

a 1 = ( a 1 1,a 1 2) T<br />

a 2 = ( a 2 1 ,a2 2<br />

) T<br />

3.5<br />

p. 37<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

We discuss bilinear <strong>for</strong>m related to−∆, triangular Lagrangian finite elements of degreep, Sect. 3.4.1,<br />

Def. 3.4.1:<br />

∫<br />

K triangle: a K (u,v) := gradu·gradvdx element stiffness matrix .<br />

K<br />

Use barycentric coordinate representations of local shape functions, in 2D<br />

b i K =<br />

∑<br />

κ α λ α 1<br />

1 λα 2<br />

2 λα 3<br />

3 , κ α ∈ R , (3.5.19)<br />

α∈N 3 0 ,|α|≤p<br />

3.5<br />

p. 374<br />

gradλ 1 = 1<br />

2|K|<br />

( a 2<br />

2 −a 3 )<br />

2<br />

a 3 1 −a2 , gradλ 2 = 1<br />

1 2|K|<br />

( a 3<br />

2 −a 1 )<br />

2<br />

a 1 1 −a3 , gradλ 3 = 1<br />

1 2|K|<br />

( a 1 −a 2 )<br />

2<br />

a 2 1 −a1 .<br />

1<br />

(3.5.22)<br />

3.5<br />

p. 37


✬<br />

Lemma 3.5.23 (Integration of powers of barycentric coordinate functions).<br />

For any non-degenerated-simplexK andα j ∈ N,j = 1,...,d+1,<br />

∫<br />

λ α 1<br />

1 ·····λα d+1<br />

d+1 dx = d!|K| α 1 !α 2 !·····α d+1 !<br />

K<br />

(α 1 +α 2 +···+α d+1 +d)!<br />

✫<br />

∀α ∈ N d+1<br />

0 . (3.5.24)<br />

✩<br />

✪<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Local quadrature <strong>for</strong>mula, cf. (3.2.17)<br />

Terminology:<br />

∫<br />

f(x)dx ≈ ∑ P∑<br />

|K| ωl K f(ζ K l ) , ζ K l ∈ K, ωl K ∈ R , P ∈ N . (3.5.25)<br />

Ω<br />

K∈M l=1<br />

ω K l → weights , ζ K l → quadrature nodes<br />

(3.5.25) =P -point local quadrature rule<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Proof <strong>for</strong>d = 2<br />

Step #1: trans<strong>for</strong>mationK → “unit triangle” ̂K := convex{ (00 ) ,<br />

( 10 ) ,<br />

( 01 ) } ,<br />

⇒<br />

∫<br />

K<br />

∫1<br />

λ β 1<br />

1 λβ 2<br />

2 λβ 3<br />

3 dx = 2|K|<br />

(∗)<br />

= 2|K|<br />

0<br />

∫1<br />

0<br />

∫1<br />

= 2|K|<br />

0<br />

1−ξ ∫ 1<br />

ξ β 1<br />

1 ξβ 2<br />

2 (1−ξ 1−ξ 2 ) β 3 dξ 2 dξ 1<br />

0<br />

∫1<br />

ξ β 1<br />

1 (1−ξ 1 ) β 2+β 3 +1 s β 2(1−s) β 3dsdξ 1<br />

0<br />

ξ β 1<br />

1 (1−ξ 1) β 2+β 3 +1 dξ1·B(β 2 +1,β 3 +1)<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

3.5<br />

p. 377<br />

Mandatory • <strong>for</strong> computation of load vector (f complicated/only available in procedural <strong>for</strong>m,<br />

Rem. 1.5.3,)<br />

• <strong>for</strong> computation of stiffness matrix, ifα = α(x) does not permit analytic integration.<br />

Example <strong>for</strong> local quadrature rule: 2D trapezoidal rule from (3.2.17)<br />

Guideline [18, Sect. 10.2]:<br />

only quadrature rules with positive weights are numerically stable.<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

3.5<br />

p. 37<br />

(∗) ˆ= substitutions(1−ξ 1 ) = ξ 2 ,<br />

∫1<br />

B(α,β) :=<br />

= 2|K| B(β 1 +1,β 2 +β 3 +2)·B(β 2 +1,β 3 +1) ,<br />

0<br />

B(·,·) ˆ= Euler’s beta function<br />

t α−1 (1−t) β−1 dt , 0 < α,β < ∞ .<br />

UsingΓ(α+β)B(α,β) = Γ(α)Γ(β),Γ ˆ= Gamma function,Γ(n) = (n−1)!,<br />

∫<br />

⇒ λ β 1<br />

1 λβ 2<br />

2 λβ 3<br />

3 dx = 2|K|· Γ(β 1+1)Γ(β 2 +1)Γ(β 3 +1)<br />

K<br />

Γ(β 1 +β 2 +β 3 +3)<br />

Remark. Alternative: symbolic computing (MAPLE, Mathematica) <strong>for</strong> local computations<br />

Second option:<br />

cell-based quadrature<br />

At this point turn the pages back to (1.5.61) and remember the use of numerical quadrature <strong>for</strong><br />

computing the Galerkin matrix <strong>for</strong> the linear finite element method in 1D.<br />

✷ .<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

How to gauge the quality of parametric local quadrature rules ? → [18, Sect. 10.3]<br />

✬<br />

Quality of a parametric local quadrature rule on K ∼ maximal degree of polynomials (multivariate<br />

→ Def. 3.3.3, or tensor product → Def. 3.3.7) on K integrated exactly by the corresponding<br />

quadrature rule onK.<br />

✫<br />

Parlance:<br />

Quadrature rule exact <strong>for</strong>P p (R d ) ⇒<br />

quadrature rule of orderp+1<br />

degree of exactnessp<br />

How are quadrature rules specified <strong>for</strong> the many different cells of a finite element mesh ?<br />

Remark 3.5.26 (Affine trans<strong>for</strong>mation of triangles).<br />

✩<br />

✪<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Reminder: numerical quadrature mandatory in the presence of coefficients/source terms in procedural<br />

<strong>for</strong>m → Rem. 1.5.3.<br />

3.5<br />

p. 378<br />

3.5<br />

p. 38


Definition 3.5.27 (Affine (linear) trans<strong>for</strong>mation).<br />

MappingΦ : R d ↦→ R d is affine (linear), ifΦ(x) = Fx+τ with someF ∈ R d,d ,τ ∈ R d .<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Remark 3.5.30 (Trans<strong>for</strong>mation of local quadrature rules on triangles).<br />

△<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

{( ( (<br />

✎ notation: ‘unit triangle” ̂K 0 1 0<br />

:= convex , ,<br />

0)<br />

0)<br />

1)}<br />

✬<br />

✩<br />

Φ K (̂x) := F K̂x + τ K ˆ= affine trans<strong>for</strong>mation (→ Def. 3.5.27) mapping ̂K to triangle K, see<br />

Lemma 3.5.28.<br />

Lemma 3.5.28 (Affine trans<strong>for</strong>mation of triangles).<br />

For any non-degenerate triangleK ⊂ R 2 (|K| > 0) there is a unique affine trans<strong>for</strong>mationΦ K ,<br />

Φ K (̂x) = F K̂x+τ K (→ Def. 3.5.27), withK = Φ(̂K).<br />

✫<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

✪<br />

By trans<strong>for</strong>mation <strong>for</strong>mula <strong>for</strong> integrals [29, Satz 8.5.2]<br />

∫ ∫<br />

f(x)dx =<br />

K<br />

f(Φ K (̂x))|detF K |d̂x . (3.5.31)<br />

̂K<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

P -point quadrature <strong>for</strong>mula on ̂K<br />

P -point quadrature <strong>for</strong>mula onK<br />

( 01 )<br />

̂K<br />

Φ K (̂x) =<br />

( ) 1 2<br />

̂x<br />

3 4<br />

( 24 )<br />

K<br />

( 13 )<br />

3.5<br />

p. 381<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

➣<br />

∫<br />

f(̂x)d̂x ≈ |̂K|<br />

̂K<br />

P∑<br />

̂ω l f(̂ζ l )<br />

l=1<br />

∫<br />

f(x)dx ≈ ∑ P∑<br />

|K| ωl K f(ζ K l )<br />

Ω<br />

K∈M l=1<br />

with ωl K = ̂ω l , ζ K l = Φ K (̂ζ l ) .<br />

Only quadrature <strong>for</strong>mula (3.5.25) on unit triangle ̂K needs to be specified!<br />

(The same applies to tetrahedra, where affine mappings <strong>for</strong>d = 3 are used.)<br />

Since the spaceP p (R d ) is invariant under affine mappings,<br />

(3.5.32)<br />

3.5<br />

p. 38<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

q ∈ P p (R d ) ⇒ ̂x ↦→ q(Φ(̂x)) ∈ P p (R d ) <strong>for</strong> any affine trans<strong>for</strong>mationΦ , (3.5.33)<br />

( 00 ) ( 10 )<br />

Formula:<br />

{( ) ( ) ( )}<br />

a 1<br />

K = convex 1 a 2<br />

a 1 , 1 a 3<br />

2 a 2 , 1<br />

2 a 3 2<br />

Note that |K| = 1 2 |detF K| .<br />

( 00 )<br />

⎛<br />

Fig. 111<br />

⇒ Φ K (̂x) = ⎝ a2 1 −a1 1 a3 1 −a1 1 ⎠̂x+ ⎝ a1 1<br />

⎠<br />

a 2 2 −a1 2 a3 2 −a1 2 a 1 .<br />

2<br />

(3.5.29)<br />

⎞<br />

⎛<br />

⎞<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

3.5<br />

p. 382<br />

the orders of the quadrature rules on the left and right hand side of (3.5.31) agree.<br />

Example 3.5.34 (Useful quadrature rules on triangles). → [6, Sect. 3.3.2]<br />

Specification of quadrature rule <strong>for</strong> “unit triangle” ̂K := convex{ (00 ) ,<br />

( 10 ) ,<br />

( 01 ) } .<br />

Quadrature rules described by pairs(̂ω 1 ,̂ζ 1 ),...,(̂ω P ,̂ζ P ),P ∈ N.<br />

△<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

3.5<br />

p. 38


Quadrature rule of order 2 (exact <strong>for</strong>P 1 ( ̂K))<br />

{( ( ( ( ( (<br />

1 0 1 0 1 1<br />

3 0))<br />

, 3 1))<br />

, 3 0))}<br />

,<br />

,<br />

,<br />

. (3.5.35)<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Quadrature rule P1O2 Quadrature rule P3O3 Quadrature rule P6O4 Quadrature rule P7O6<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Quadrature rule of order 3 (exact <strong>for</strong>P 2 ( ̂K))<br />

{( ( )) ( ( )) ( ( ))}<br />

1<br />

3 , 1/2 1 0 1<br />

,<br />

0 3 , ,<br />

1/2 3 , 1/2<br />

. (3.5.36)<br />

1/2<br />

One-point quadrature rule of order 2 (exact <strong>for</strong>P 1 (̂K))<br />

{( ( ))}<br />

1/3<br />

1, . (3.5.37)<br />

1/3<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Example 3.5.40 (Local quadrature rules on quadrilaterals).<br />

IfK quadrilateral ⇒ ̂K := convex{ (00 ) ,<br />

( 10 ) ,<br />

( 01 ) ,<br />

( 11 ) } (unit square).<br />

△<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Quadrature rule of order 6 (exact <strong>for</strong>P 5 ( ̂K))<br />

{( ( )) ( √ (<br />

9<br />

40 , 1/3 155+ 15 6+ √ )) ( √ (<br />

15/21 155+ 15<br />

, ,<br />

1/3 1200 6+ √ 9−2 √ ))<br />

15/21<br />

, ,<br />

15/21 1200 6+ √ ,<br />

15/21<br />

( √ (<br />

155+ 15 6+ √ )) ( √ (<br />

15/21 155− 15<br />

,<br />

1200 9−2 √ 6− √ ))<br />

15/21<br />

, ,<br />

15/21 1200 9+2 √ ,<br />

15/21<br />

( √ (<br />

155− 15 9+2 √ )) ( √ (<br />

15/21 155− 15 6− √ ))}<br />

15/21<br />

In [10]: quadrature rules up to orderp = 21 with P ≤ 1/6p(p+1)+5<br />

Remark 3.5.39 (<strong>Numerical</strong> quadrature in LehrFEM). → [6, Sect. 3]<br />

Routines returnP -point quadrature <strong>for</strong>mulas <strong>for</strong><br />

⎧ (00 ) (<br />

⎨unit triangle convex{<br />

,<br />

10 ) ( , 01 ) } <strong>for</strong> triangular cell,<br />

̂K =<br />

(00 ) (<br />

⎩unit square convex{<br />

,<br />

10 ) ( , 11 ) ( , 01 ) } <strong>for</strong> rectangular cell,<br />

in MATLAB structure QuadRule with fields<br />

QuadRule.w: weights ̂ω l of quadrature rule on ̂K,<br />

QuadRule.x: coordinates of nodes ̂ζ l ∈ ̂K of quadrature rule on ̂K<br />

(3.5.38)<br />

✸<br />

3.5<br />

p. 385<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

On ̂K:<br />

tensor product construction:<br />

If{(ω 1 ,ζ 1 ),...,(ω P ,ζ P )},P ∈ N, quadrature rule on the interval]0,1[, exact <strong>for</strong>P p ]0,1[, then<br />

{<br />

(ω1 2,( ζ 1<br />

)<br />

ζ ) ··· (ω1 ω 1 P , ( ζ 1<br />

)<br />

ζ )<br />

P<br />

.<br />

.<br />

(ω 1 ω P , ( ζ ) P<br />

ζ1<br />

) ··· (ω 2<br />

P , ( ζ ) } P<br />

ζP<br />

)<br />

provides a quadrature rule on the unit square ̂K, exact <strong>for</strong>Q p ( ̂K).<br />

Quadrature rules on]0,1[ (→ [18, Ch. 10]):<br />

• classical Newton-Cotes <strong>for</strong>mulas (equidistant<br />

quadrature nodes).<br />

• Gauss-Legendre quadrature rules, exact <strong>for</strong><br />

P 2P (]0,1[) using onlyP nodes.<br />

• Gauss-Lobatto quadrature rules: P nodes including{0,1},<br />

exact <strong>for</strong>P 2P−1 (]0,1[).<br />

Number P of quadrature nodes<br />

20<br />

18<br />

16<br />

14<br />

12<br />

10<br />

8<br />

6<br />

4<br />

Gauss−Legendre nodes in [−1,1]<br />

2<br />

−1 −0.5 0 0.5 1<br />

t<br />

Fig. 112<br />

✸<br />

3.5<br />

p. 38<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

For triangles: QuadRule = PnOq(), ˆ= n-point quadrature of orderq<br />

Location of quadrature nodes ̂ζ l in unit triangle ̂K:<br />

3.5<br />

p. 386<br />

3.5<br />

p. 38


3.5.5 Incorporation of essential boundary conditions<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Recall variational <strong>for</strong>mulation of non-homogeneous Dirichlet boundary value problem from Ex. 2.8.1:<br />

u ∈ H 1 (Ω)<br />

u = g on∂Ω : ∫Ω<br />

with (admissible→Rem. 2.9.4) Dirichlet data<br />

∫<br />

κ(x)gradu·gradvdx = fvdx ∀v ∈ H0 1 (Ω) . (2.8.4)<br />

Ω<br />

⇓<br />

−div(κ(x)gradu) = f inΩ , u = g on∂Ω ,<br />

g ∈ C 0 (∂Ω).<br />

Recall from Sect. 2.9: Dirichlet b.c. = essential boundary conditions<br />

(built into trial space)<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Ω<br />

Fig. 113<br />

Example 3.5.43 (offset functions <strong>for</strong> linear Lagrangian FE).<br />

✁ Maximal support ofu 0 on triangular mesh.<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Remember offset function technique, see (1.3.19) and Sect. 2.1.3:<br />

∫<br />

w ∈ H0 1 (Ω): κ(x)gradw·gradvdx<br />

(2.8.4) ⇔ u = u 0 +w , ∫ Ω<br />

= −κ(x)gradu 0·gradv +fvdx ∀v ∈ H 1 (3.5.41)<br />

0 (Ω) , Ω<br />

3.5<br />

p. 389<br />

3.5<br />

p. 39<br />

where<br />

u 0 = g on∂Ω<br />

Adapt this to finite element Galerkin discretization by generalizing the 1D example Rem. 1.5.64 to<br />

d = 2,3:<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

For Dirichlet datag ∈ C 0 (∂Ω)<br />

∑<br />

u 0 = g(x)b x N (3.5.44)<br />

x∈V(M)∩∂Ω<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Remember:<br />

Rem. 3.4.12.<br />

we already know finite element subspaces V 0,N := Sp,0 0 (M) ⊂ H1 0 (Ω), see<br />

Idea from Rem. 1.5.64:<br />

use offset functionu 0 ∈ V N := S 0 p(M)<br />

locally supported near the boundary:<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

b x N ˆ= tent function associated with node x ∈<br />

V(M), cf. Sect. 3.2.3. (3.5.44) generalizes<br />

(1.5.65) to 2D.<br />

Fig. 114<br />

✸<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

supp(u 0 ) ⊂ ⋃ {K ∈ M: K ∩∂Ω ≠ ∅} . (3.5.42)<br />

Remark 3.5.45 (Approximate Dirichlet boundary conditions).<br />

Be aware that <strong>for</strong> the choice (3.5.44)<br />

3.5<br />

p. 390<br />

u 0 ≠ g on∂Ω .<br />

Rather, u 0 is a piecewise linear interpolant of the Dirichlet data g ∈ C 0 (∂Ω). There<strong>for</strong>e, another<br />

approximation comes into play when en<strong>for</strong>cing Dirichlet boundary conditions by means of piecewise<br />

3.5<br />

p. 39


polynomial offset functions.<br />

Example 3.5.46 (Implementation of non-homogeneous Dirichlet b.c. <strong>for</strong> linear FE).<br />

Consider (2.8.4) and assume the following ordering of the nodal basis functions, see Fig. 67<br />

△<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

from the discretization ofaon the (larger) FE spaceS1 0(M):<br />

( )( ) ( )<br />

A0 A 0∂ ⃗µ0 ⃗ϕ<br />

A T 0∂ A = . (3.5.49)<br />

∂∂ ⃗µ ∂ ⃗ϕ ∂<br />

Here, ⃗µ 0 ˆ= coefficients <strong>for</strong> interior basis functionsb 1 N ,...,bN N<br />

⃗µ ∂ ˆ= coefficient <strong>for</strong> basis functions b N+1<br />

N ,...,bM N<br />

<strong>for</strong> basis functions associated with nodex<br />

∈ ∂Ω.<br />

➋ We realize that the coefficient vector of (3.5.49) is that of a FE approximation ofu<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

B 0 := {b 1 N ,...,bN N } ˆ= nodal basis ofS0 1,0 (M),<br />

(tent functions associated with interior nodes)<br />

B := B 0 ∪{b N+1<br />

N ,...,bM N } ˆ= nodal basis ofS0 1 (M)<br />

(extra basis functions associated with nodes∈ ∂Ω).<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

⃗µ ∂ known = values ofg at boundary nodes: ⃗µ ∂ = ⃗γ<br />

➌ Moving known quantities in (3.5.49) to the right hand side yields (3.5.48).<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Note:<br />

M = ♯V(M),N = ♯{x ∈ V(M), x ∉ ∂Ω} (no. of interior nodes)<br />

Example 3.5.50 (Non-homogeneous Dirichlet boundary conditions in LehrFEM).<br />

✸<br />

A 0 ∈ R N,N ˆ= Galerkin matrix <strong>for</strong> discrete trial/test spaceS 0 1,0 (M),<br />

A ∈ R M,M ˆ= Galerkin matrix <strong>for</strong> discrete trial/test spaceS 0 1 (M).<br />

( ) A0 A<br />

A = 0∂<br />

A T 0∂ A , A 0∂ ∈ R N,M−N , A ∂∂ ∈ R M−N,M−N . (3.5.47)<br />

∂∂<br />

Ifu 0 ∈ S1 0 (M) is chosen according to (3.5.44), then<br />

{<br />

u 0 ∈ Span b N+1 }<br />

N ,...,bM N<br />

M∑<br />

⇔ u 0 = γ j−N b j N ,<br />

j=N+1<br />

which means that the coefficient vector ⃗ν of the finite element approximation w N ∈ S1,0 0 (M) of<br />

w ∈ H0 1 (Ω) from (3.5.41) solves the linear system of equations<br />

➣<br />

A 0 ⃗ν = ⃗ϕ−A 0∂ ⃗γ . (3.5.48)<br />

Non-homogeneous Dirichlet boundary data are taken into account through a modified right<br />

hand side vector.<br />

Alternative consideration leading to (3.5.48):<br />

➊ First ignore essential boundary conditions and assemble the linear system of equations arising<br />

3.5<br />

p. 393<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

3.5<br />

p. 394<br />

Code 3.5.51: Solving 2nd-order Dirichlet BVP with linear FE in LehrFEM<br />

1 % Initialize constants anf functions<br />

2 NREFS = 5; % Number of red refinement steps<br />

3 F_HANDLE = @f_LShap; % Right hand side source term<br />

4 GD_HANDLE = @g_D_LShap; % Dirichlet boundary data<br />

5 % Load mesh<br />

6 Mesh = load_Mesh(’meshvert.dat’,’meshel.dat’);<br />

7 Mesh.ElemFlag = ones( s i z e(Mesh.Elements,1),1);<br />

8 Mesh = add_Edges(Mesh);<br />

9 Loc = get_BdEdges(Mesh);<br />

10 Mesh.BdFlags = zeros( s i z e(Mesh.Edges,1),1);<br />

11 Mesh.BdFlags(Loc) = 1;<br />

12<br />

13 % Assemble stiffness matrix and load vector <strong>for</strong> linear Lagrangian FE<br />

14 A = assemMat_LFE(Mesh,@STIMA_Lapl_LFE);<br />

15 phi = assemLoad_LFE(Mesh,P7O6(),F_HANDLE,0,1,2);<br />

16 p<br />

17 % Incorporate Dirichlet boundary data <strong>for</strong> vertices adjacent to edges<br />

18 % with carryingflag 1. U contains nodal values <strong>for</strong> Dirichlet<br />

19 % boundary data, FreeDofs contains numbers of interior nodes.<br />

20 % See Ex. 3.5.46 <strong>for</strong> further explanations.<br />

21 [U,FreeDofs] = assemDir_LFE(Mesh,-7,GD_HANDLE);<br />

22 L = L - A*U; %<br />

23<br />

24 % Solve the linear system<br />

25 U(FreeDofs) = A(FreeDofs,FreeDofs)\L(FreeDofs);<br />

26<br />

27 % Plot solution<br />

28 plot_LFE(U,Mesh); c o l o r b a r;<br />

3.5<br />

p. 39<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

3.5<br />

p. 39


29 plotLine_LFE(U,Mesh,[0 0] ,[1 1]);<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Line 22: see (3.5.48)<br />

Remark 3.6.1 (Pullback of functions).<br />

3.6 Parametric finite elements<br />

✸<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

In a natural way, a trans<strong>for</strong>mation of domains induces a trans<strong>for</strong>mation of the functions defined on<br />

them:<br />

Definition 3.6.2 (Pullback).<br />

Given domainsΩ,̂Ω ⊂ R d and a bijective mapping Φ : ̂Ω ↦→ Ω, the pullbackΦ ∗ u : ̂Ω ↦→ R of<br />

a functionu : Ω ↦→ R is a function on ̂Ω defined by<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

(Φ ∗ u)(̂x) := u(Φ(̂x)) , ̂x ∈ ̂Ω .<br />

CORE SECTION<br />

Parametric mapping techniques essential <strong>for</strong> understanding the local assembly functions of the MAT-<br />

LAB finite element library.<br />

3.6<br />

p. 397<br />

Implicitly, we used the pullback of integrands when defining quadrature rules through trans<strong>for</strong>mation,<br />

see (3.5.31).<br />

3.6<br />

p. 39<br />

?<br />

? ? ?<br />

?<br />

?<br />

?<br />

?<br />

Fig. 115<br />

✁ 2D hybrid mesh M with (curvilinear) triangles<br />

and quadrilaterals<br />

How to buildS 0 1 (M)?<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Obviously, the pullbackΦ ∗ induces a linear mapping between spaces of functions on Ω and ̂Ω,<br />

respectively.<br />

Φ ∗ u defined here<br />

Φ<br />

u defined here<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

3.6.1 Affine equivalence<br />

Ω<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Recall Lemma 3.5.28: affine trans<strong>for</strong>mation of triangles (3.5.29)<br />

All cells of a triangular mesh are affine images of “unit triangle” ̂K<br />

“Unit triangle”: ̂K<br />

〈 (00 ) (<br />

= , 10 ) ( , 01 ) 〉 ̂x 2<br />

a 3<br />

1 Φ<br />

{<br />

K (̂x) = F K̂x+τ K<br />

ForK = convex a 1 ,a 2 ,a 3} :<br />

a 1<br />

( a 2<br />

F K = 1 −a 1 )<br />

1 a3 1 −a1 1<br />

a 2 2 −a1 2 a3 2 −a1 , τ K = a 1 .<br />

2<br />

̂K<br />

K<br />

3.6<br />

p. 398<br />

̂Ω<br />

In the context of numerical quadrature we made the observation, cf. (3.5.33):<br />

Φ ∗<br />

Fig. 117<br />

△<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

3.6<br />

p. 40


✬<br />

Lemma 3.6.3 (Preservation of polynomials under affine pullback).<br />

IfΦ : R d ↦→ R d is an affine (linear) trans<strong>for</strong>mation (→ Def. 3.5.27), then<br />

✫<br />

Φ ∗ (P p (R d )) = P p (R d ) and Φ ∗ (Q p (R d )) = Q p (R d ) .<br />

✩<br />

✪<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Proof. (of (3.6.4)) Recall the definition of global shape functions and also local shape functions <strong>for</strong><br />

S 0 p(M),p ∈ N, by means of the conditions (3.4.3) at interpolation nodes, see Ex. 3.4.2 <strong>for</strong>p = 2. ✷<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

In fact, Lemma 3.5.28 reveals another reason <strong>for</strong> the preference <strong>for</strong> polynomials in building discrete<br />

Galerkin spaces.<br />

Proof. (of Lemma 3.5.28)<br />

Since the pullback is linear, we only need to study its action on the (monomial) basis x ↦→ x α ,<br />

α ∈ N d 0 ofP p(R d ), see Def. 3.3.3 and the explanations on multi-index notation (3.3.4).<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Note: we already used the definition of basis functions through basis functions on the “reference cell”<br />

[0,1] and affine pullback in 1D, see Rem. 1.5.33<br />

Now write<br />

p i K ˆ= (local) interpolation nodes on triangleK,<br />

̂p i ˆ= (local) interpolation nodes on unit triangle ̂K.<br />

Observe: Assuming a matching numbering p i K = Φ K(̂p i ). where Φ K : ̂K ↦→ K is the unique<br />

affine trans<strong>for</strong>mation mapping ̂K ontoK, see (3.5.29).<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

̂x 2<br />

a 1 a 2<br />

Then resort to induction w.r.t. degreep.<br />

Φ ∗ K (xα ) = Φ ∗ K (x 1)·Φ ∗ K ( xα′ }{{}<br />

∈P p−1 (R d )<br />

d∑<br />

) = ( (F) 1l̂x l +τ 1 )<br />

l=1<br />

} {{ }<br />

∈P 1 (R d )<br />

·Φ ∗ K (xα′ ) ∈ P p (R d ) ,<br />

} {{ }<br />

∈P p−1 (R d )<br />

3.6<br />

p. 401<br />

This is clear <strong>for</strong> p = 2, because affine trans<strong>for</strong>mations<br />

take midpoints of edges to midpoints<br />

of edges. The same applies to the interpolation<br />

nodes <strong>for</strong> higher degree Lagrangian finite elements<br />

defined in Ex. 3.4.5.<br />

1<br />

̂K<br />

Φ K̂x 1<br />

1<br />

K<br />

a 3<br />

Fig. 118<br />

3.6<br />

p. 40<br />

with α ′ := (α 1 − 1,α 2 ,...,α d ), where we assumed α 1 > 0. Here, we have used the induction<br />

hypothesis to concludeΦ ∗ K (xα′ )inP p−1 (R d ).<br />

✷<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

The local shape functions b i K ∈ P p(R d ), ̂b i ∈ P p (R d ), i = 1,...,Q, are uniquely defined by the<br />

interpolation conditions<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

b i K (pj K ) = δ ij , ̂b i (̂p j ) = δ ij . (3.6.5)<br />

A simple observation:<br />

ConsiderS 0 1 (M), triangleK ∈ M, unit triangle ̂K, affine mappingΦ K : ̂K ↦→ K<br />

Together with p i K = Φ K(̂p i ) this shows that Φ ∗ K bi K<br />

satisfies the interpolation conditions (3.6.5) on<br />

̂K and, thus, has to agree witĥb i .<br />

✷<br />

• b 1 K ,b2 K ,b3 K<br />

(standard) local shape functions onK,<br />

• ̂b 1 ,̂b 2 ,̂b 3 (standard) local shape functions on ̂K,<br />

→ Ex. 3.3.13<br />

̂b i = Φ ∗ K bi K ⇔ ̂b i (̂x) = b i K (x) , x = Φ K(̂x) (3.6.4)<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Terminology:<br />

finite element spaces satisfying (3.6.4) are called affine equivalent<br />

Remark 3.6.6 (Evaluation of local shape functions at quadrature points).<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Of course, we assume thatΦ K respects the local numbering of the vertices of ̂K andK.<br />

We consider Lagrangian finite element spaces on a simplicial meshM.<br />

The proof of (3.6.4) is straight<strong>for</strong>ward: both Φ ∗ K bi K (by Lemma 3.6.3) and̂b i are (affine) linear functions<br />

that attain the same values at the vertices of ̂K. Hence, they have to agree.<br />

Recall from Sect. 3.5.4:<br />

definition (3.5.32) of local quadrature <strong>for</strong>mulas via “unit simplex”.<br />

In particular: quadrature nodes onK: ζ K l = Φ K (̂ζ l )<br />

Note:<br />

(3.6.4) holds true <strong>for</strong> all simplicial Lagrangian finite element spaces<br />

3.6<br />

p. 402<br />

b i K (ζK Def. 3.6.2<br />

l ) = Φ ∗ K (bi K )(̂ζ l ) (3.6.4)<br />

= ̂b i (̂ζ l ) independent ofK ! . (3.6.7)<br />

3.6<br />

p. 40


∫<br />

F(b i P K ,bj K )dx ≈ |K| ∑<br />

ω l F(̂b i (ζ l ),̂b j (ζ l )) , (3.6.8)<br />

K<br />

<strong>for</strong> any functionF : R 2 ↦→ R.<br />

➣<br />

Precomputêb i (ζ l ),i = 1,...,Q,l = 1,...,P and store the values in a table!<br />

l=1<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

This is very interesting, because<br />

the values ∂̂b i<br />

∂̂x 1<br />

(̂ζ l ) can be precomputed,<br />

simple expressions <strong>for</strong>gradλ i·gradλ j are available, see Sect. 3.2.5.<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

△<br />

△<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

3.6.2 Example: Quadrilaterial Lagrangian finite elements<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Remark 3.6.9 (Barycentric representation of local shape functions).<br />

We consider Lagrangian finite element spaces on a simplicial meshM.<br />

(3.4.4): <strong>for</strong>mulas <strong>for</strong> local shape functions <strong>for</strong> S2 0 (M) (d = 2) in terms of<br />

barycentric coordinate functions λ i , i = 1,2,3. Is this coincidence? NO! Does (3.5.19) hold<br />

<strong>for</strong> any (simplicial) Lagrangian finite element space?<br />

YES!<br />

where<br />

b i (3.6.4)<br />

K (x) = (Φ −1<br />

K )∗(̂x ↦→̂b i )<br />

(̂x 1 ,̂x 2 )<br />

,<br />

=̂b i ((Φ −1<br />

K )∗ (̂λ 2 )(x),(Φ −1<br />

K )∗ (̂λ 3 )(x)) =̂b i (λ 2 (x),λ 3 (x))<br />

λ 2 (̂x) = ̂x 1 ,λ 3 (̂x) = ̂x 2 ,λ 1 (̂x) = 1− ̂x 1 − ̂x 2 ˆ= barycentric coordinate functions on ̂K,<br />

see Ex. 3.3.13,<br />

λ i ˆ= barycentric coordinate functions on triangleK, see Fig. 72,<br />

Φ K ˆ= affine trans<strong>for</strong>mation (→ Def. 3.5.27),Φ K (̂K) = K, see (3.5.29).<br />

3.6<br />

p. 405<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

So far, see Sect. 3.3.3 and (3.3.11), we have adopted the perspective<br />

global shape functions<br />

Now we reverse this construction<br />

local shape functions<br />

Restriction to element<br />

−−−−−−−−−−−−−→<br />

local shape functions<br />

“glueing”<br />

−−−−−→ global shape functions (3.6.10)<br />

In fact, when building the global basis functions <strong>for</strong> quadratic Lagrangian finite elements we already<br />

proceeded this way, see Ex. 3.4.2. Fig. 94 lucidly conveys what is meant by “glueing”.<br />

Be aware that the possibility to achieve a continuous global basis function by glueing together local<br />

shape function on adjacent cells, entails a judicious choice of the local shape functions.<br />

This section will demonstrate how the policy (3.6.10) together with the <strong>for</strong>mula (3.6.4) will enable us<br />

to extend Lagrangian finite element beyond the meshes discussed in Sect. 3.4.<br />

3.6<br />

p. 40<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

➣<br />

By the chain rule:<br />

gradb i ∂̂b i<br />

K (x) = (̂x)gradλ<br />

∂̂x 2 + ∂̂b i<br />

(̂x)gradλ<br />

1 ∂̂x 3 , x = Φ K (̂x) .<br />

2<br />

This <strong>for</strong>mula is convenient, becausegradλ i ≡ const, see (3.5.22).<br />

This facilitates the computation of element (stiffness) matrices <strong>for</strong> 2nd-order elliptic problems in variational<br />

<strong>for</strong>m: when using a quadrature <strong>for</strong>mula according to (3.5.32)<br />

∫<br />

(α(x)gradb i K )·gradbj K dx<br />

K<br />

P K∑<br />

≈ |K|<br />

l=1<br />

⎛⎛<br />

⎞<br />

∂̂b i<br />

⎜<br />

ω l ⎝⎝∂̂x (̂ζ<br />

1 l )<br />

⎠T ( ) ⎛ ⎞⎞<br />

∂̂b gradλ1 ·gradλ 1 gradλ 1 ·gradλ j<br />

2 ⎝∂̂x (̂ζ<br />

1 l )<br />

⎠⎟<br />

∂̂b i<br />

∂̂x (̂ζ l ) gradλ 1 ·gradλ 2 gradλ 2 ·gradλ 2 ∂̂b j<br />

∂̂x (̂ζ ⎠<br />

l )<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

3.6<br />

p. 406<br />

✁ quadrilateral meshMin 2D<br />

What is “S 0 1 (M)”?<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

3.6<br />

p. 40


Clear: If K is a rectangle, ̂K the unit square, then there is a unique affine trans<strong>for</strong>mation Φ K (→<br />

Def. 3.5.27) withK = Φ K ( ̂K).<br />

In this case (3.6.4) holds <strong>for</strong> the local shape functions of bilinear Lagrangian finite elements from<br />

Ex. 3.4.6 (and all tensor product Lagrangian finite elements introduced in Sect. 3.4.2)<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

⇓<br />

( )<br />

α1 +β<br />

Φ K (̂x) = 1̂x 1 +γ 1̂x 2 +δ 1̂x 1̂x 2 , α<br />

α 2 +β 2̂x 1 +γ 2̂x 2 +δ i ,β i ,γ i ,δ i ∈ R .<br />

2̂x 1̂x 2<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Idea:<br />

local shape functions<br />

“glueing”<br />

−−−−−→<br />

Build local shape functions by “inverse pullback”<br />

global shape functions<br />

b i K = (Φ−1 K )∗̂b i , (3.6.11)<br />

where<br />

{̂b i} Q ˆ= set of shape functions on reference element ̂K.<br />

i=1<br />

➣ What isΦ K <strong>for</strong> a general quadrilateral ?<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

The mapping property Φ K (â i ) = a i is evident. In order to see Φ K ( ̂K) = K ( ̂K ˆ= unit square) <strong>for</strong><br />

(3.6.12), verify thatΦ K maps all parallels to the coordinate axes to straight lines.<br />

Moreover, a simple computation establishes:<br />

If ̂K is the unit square,Φ K : ̂K ↦→ K a bilinear trans<strong>for</strong>mation, and̂b i the bilinear local shape<br />

functions (3.4.8) on ̂K,<br />

then(Φ −1<br />

K )∗̂b i are linear on the edges ofK.<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

3.6<br />

p. 409<br />

“Glueing” of local shape functions possible<br />

3.6<br />

p. 41<br />

̂x<br />

unit square 2<br />

â 4 â 3<br />

parallelogram<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Explanation:<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

â 1 â 2<br />

Affine<br />

mapping<br />

̂x 1<br />

Φ K<br />

Fig. 119<br />

Affine trans<strong>for</strong>mations fail to produce<br />

general quadrilaterals from a square.<br />

They only give parallelograms.<br />

̂x<br />

unit square 2<br />

a 4 quadrilateral<br />

â 4 â 3<br />

a 3<br />

a 1 a 2<br />

Φ K<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

y<br />

˜K<br />

K<br />

e<br />

j<br />

i<br />

x<br />

Fig. 121<br />

➊ Pick a vertex x ∈ V(M) and consider an adjacent<br />

quadrilateralK, on which there is a local<br />

shape functionb i K such thatbi K (x) = 1 andbi K<br />

vanishes on all other vertices of K. This local<br />

shape function is obtained by inverse pullback<br />

of thêb i associated withΦ −1<br />

K (x).<br />

➋ The same construction can be carried out <strong>for</strong><br />

another quadrilateral ˜K that shares the vertex<br />

x and an edge e with K. On that quadrilateral<br />

we find the local shape functionb j˜K<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

It takes bilinear trans<strong>for</strong>mations to obtain<br />

a generic quadrilateral from the unit<br />

square.<br />

â 1 â 2<br />

̂x 1<br />

bilinear<br />

mapping<br />

Fig. 120<br />

➌ Both b i K|e<br />

and are linear and attain the same values, that is 0 and 1 at the endpointsxand<br />

bj˜K|e<br />

y ofe, respectively.<br />

Bilinear trans<strong>for</strong>mation of unit square to quadrilateral with verticesa i ,i = 1,2,3,4:<br />

Φ K (̂x) = (1− ̂x 1 )(1− ̂x 2 )a 1 + ̂x 1 (1− ̂x 2 )a 2 + ̂x 1̂x 2 a 3 +(1− ̂x 1 )̂x 2 a 4 . (3.6.12)<br />

3.6<br />

p. 410<br />

b i K|e = bj˜K|e<br />

Continuity of global shape function (defined by interpolation conditions at nodes)<br />

3.6<br />

p. 41


Remark 3.6.13 (Non-polynomial “bilinear” local shape functions).<br />

Note that the components ofΦ −1<br />

K are not polynomial even ifΦ K is a bilinear trans<strong>for</strong>mation (3.6.12).<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Definition 3.6.14 (Parametric finite elements).<br />

A finite element space on a mesh M is called parametric, if there exists a reference element<br />

̂K,Q ∈ N, and functionŝb i ∈ C 0 (̂K),i = 1,...,Q, such that<br />

∀K ∈ M: ∃ bijectionΦ K : ̂K ↦→ K: ̂b i = Φ ∗ K bi K , i = 1,...,Q ,<br />

where{b 1 K ,...,bQ K } = set of local shape functions onK.<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

✬<br />

The local shape functionsb i K defined by (3.6.11), whereΦ K is a bilinear trans<strong>for</strong>mation and̂b i<br />

are the bilinear local shape functions on the unit square, are not polynomial in general.<br />

✫<br />

Visualization of local shape functions on trapezoidal cellK := convex{ (00 ) ,<br />

( 30 ) ,<br />

( 21 ) ,<br />

( 11 ) } :<br />

✩<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

✪Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

3.6<br />

p. 413<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

R. Hiptm<br />

This definition takes the possibility of “glueing” <strong>for</strong> granted: the concept of a local shape function, see<br />

(3.3.11), implies the existence of a global shape function with the right continuity properties.<br />

DRAFT<br />

How to implement parametric finite elements ?<br />

We consider a generic elliptic 2nd-order variational Dirichlet problem<br />

u ∈ H 1 ∫<br />

∫<br />

(Ω) ,<br />

u = g on ∂Ω : (α(x)gradu(x))·gradv(x)dx = f(x)v(x)dx ∀v ∈ H0 1 (Ω) . (2.3.3) 3.6<br />

Ω<br />

Ω<br />

p. 41<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Issue: computation of element (stiffness) matrices and element (load) vectors (→ Def. 3.5.12).<br />

Challenge:<br />

local shape functionsb 1 K ,...,bQ K ,K ∈ M, only known implicitly<br />

b i K = (Φ−1 K )∗̂b i<br />

➣ Known: trans<strong>for</strong>mationΦ : ̂K ↦→ K, ̂K reference element, functionŝb 1 ,...,̂b Q<br />

̂b i = Φ ∗ b i K , i = 1,...,Q (→ pullback, Def. 3.6.2)<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

△<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Idea:<br />

Use trans<strong>for</strong>mation to ̂K to compute element stiffness matrix A K ,<br />

element load vector ⃗ϕ K :<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

3.6.3 Trans<strong>for</strong>mation techniques<br />

✗<br />

✖<br />

“Bilinear” Lagrangian finite elements = a specimen of parametric finite elements<br />

✔<br />

✕<br />

3.6<br />

p. 414<br />

∫<br />

(A K ) ij =<br />

∫K<br />

=<br />

̂K<br />

α(x)gradb j K (x)·gradbj K (x)dx<br />

(Φ ∗ α)(̂x)(Φ ∗ (gradb j K<br />

} {{ }<br />

) )(̂x)·(Φ ∗ (gradb i K ) )(̂x)|detDΦ(̂x)|d̂x ,<br />

} {{ }<br />

= ? = ?<br />

∫ ∫<br />

(⃗ϕ K ) i = f(x)b i K (x)dx = (Φ ∗ K<br />

K<br />

̂K<br />

f)(̂x)̂b i (̂x)|detDΦ(̂x)|d̂x ,<br />

3.6<br />

p. 41


y trans<strong>for</strong>mation <strong>for</strong>mula (<strong>for</strong> multidimensional integrals, see also (3.5.31)):<br />

∫ ∫<br />

f(x)dx =<br />

K<br />

f(̂x)|detDΦ(̂x)|d̂x <strong>for</strong> f : K ↦→ R , (3.6.15)<br />

̂K<br />

All integrals have been trans<strong>for</strong>med to the reference element ̂K, where we apply a<br />

quadrature <strong>for</strong>mula (3.5.32).<br />

Needed: values of determinant of Jacobi matrixDΦ at quadrature nodes ̂ζ l .<br />

Also needed: gradientsΦ ∗ (gradb i K ) at quadrature nodes ̂ζ l !?<br />

(Seems to be a problem asb i K<br />

may be elusive, cf. Rem. 3.6.13!)<br />

✬<br />

Lemma 3.6.16 (Trans<strong>for</strong>mation <strong>for</strong>mula <strong>for</strong> gradients).<br />

For differentiableu : K ↦→ R and any diffeomorphismΦ : ̂K ↦→ K we have<br />

✫<br />

Proof :<br />

(grad̂x (Φ ∗ u))(̂x) = (DΦ(̂x)) T (grad x u)(Φ(̂x))<br />

} {{ }<br />

=Φ ∗ (gradu)(x)<br />

use chain rule <strong>for</strong> components of the gradient<br />

∀̂x ∈ ̂K . (3.6.17)<br />

∂Φ ∗ u<br />

(̂x) = ∂ d∑ ∂u<br />

u(Φ(̂x)) = (Φ(̂x)) ∂Φ j<br />

(̂x) .<br />

∂̂x i ∂̂x i ∂x<br />

j=1 j ∂̂x i<br />

⎛<br />

∂Φ ∗ ⎞<br />

⎛ ⎞<br />

u<br />

∂̂x<br />

(̂x)<br />

∂u<br />

1 ⎜<br />

⎝<br />

. ⎟<br />

∂Φ ∗ ⎠ = (grad̂x Φ∗ u)(̂x) = DΦ(̂x) T ∂x (Φ(̂x))<br />

⎜ 1<br />

⎟<br />

⎝ . ⎠ = DΦ(̂x) T (grad x u)(Φ(̂x)) .<br />

u<br />

∂u<br />

∂̂x<br />

(̂x)<br />

d ∂x (Φ(̂x))<br />

d<br />

Here,DΦ(̂x) ∈ R d,d is the Jacobian ofΦat ̂x ∈ ̂K, see [29, Bem. 7.6.1].<br />

Using Lemma 3.6.16 we arrive at:<br />

∫<br />

(A K ) ij = (α(Φ(̂x))(DΦ) −T grad̂b i )·((DΦ) −T grad̂b j )|detDΦ|d̂x . (3.6.18)<br />

̂K<br />

Note that the argument ̂x is suppressed <strong>for</strong> some terms in the integrand.<br />

✩DRAFT<br />

✪<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

3.6<br />

p. 417<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Example 3.6.19 (Trans<strong>for</strong>mation techniques <strong>for</strong> bilinear trans<strong>for</strong>mations).<br />

( )<br />

α1 +β<br />

Φ(̂x) = 1̂x 1 +γ 1̂x 2 +δ 1̂x 1̂x 2 , α<br />

α 2 +β 2̂x 1 +γ 2̂x 2 +δ i ,β i ,γ i ,δ i ∈ R ,<br />

( 2̂x 1̂x 2<br />

)<br />

β1 +δ<br />

⇒ DΦ(̂x) = 1̂x 2 γ 1 +δ 1̂x 1 ,<br />

β 2 +δ 2̂x 2 γ 2 +δ 2̂x 1<br />

⇒ det(DΦ(̂x)) = β 1 γ 2 −β 2 γ 1 +(β 1 δ 2 −β 2 δ 1 )̂x 1 +(δ 1 γ 2 −δ 2 γ 1 )̂x 2 .<br />

BothDΦ(̂x) anddet(DΦ(̂x)) are (componentwise) linear inx.<br />

If Φ = Φ K <strong>for</strong> a generic quadrilateralK as in (3.6.12), then the coefficientsα i ,β i ,γ 1 ,δ i depend on<br />

the shape ofK in a straight<strong>for</strong>ward fashion:<br />

( ) ( ) ( )<br />

α1<br />

= a<br />

α 1 β1<br />

, = a 2 β 2 −a 1 γ1<br />

, = a 2 γ 4 −a 1 , 2<br />

3.6.4 Boundary approximation<br />

Intuition:<br />

(<br />

δ1<br />

δ 2<br />

)<br />

= a 3 −a 2 −a 4 +a 1 .<br />

Approximating a (smooth) curved boundary∂Ω by a polygon/polyhedron will introduce a<br />

(sort of) discretization error.<br />

Parametric finite elment constructions provide a tool <strong>for</strong> avoiding polygonal/polyhedral approximation<br />

of boundaries.<br />

Here we discuss this <strong>for</strong> a very simple case of triangular meshes in 2D (more details → [5,<br />

Sect, 10.2]).<br />

✸<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

3.6<br />

p. 41<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

✎ notation: M −T :=<br />

(M −1) T =<br />

(M T) −1<br />

3.6<br />

p. 418<br />

3.6<br />

p. 42


Idea: Piecewise polynomial approximation of<br />

boundary (boundary fitting)<br />

(∂Ω locally considered as function over<br />

straight edge of an element)<br />

a 2<br />

˜K<br />

E Γ<br />

n<br />

δ<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

OPTIONAL SECTION<br />

Contents of this section will not be needed later on.<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Example: Piecewise quadratic boundary<br />

approximation<br />

(Part of∂Ω betweena 1 anda 2<br />

approximated by parabola)<br />

a 3<br />

∂Ω<br />

a 1<br />

Fig. 122<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

So far we have discussed the finite elements <strong>for</strong> linear second-order variational boundary value problems<br />

only.<br />

However, as we have learned in Ex. 1.5.66, in 1D the Galerkin approach based on linear finite elements<br />

was perfectly capable of dealing with non-linear two-point boundary value problems. Indeed<br />

the abstract discussion of the Galerkin approach in Sect. 1.5.1 was aimed at general and possibly<br />

non-linear variational problems, see (1.5.7), (1.5.18).<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Mapping ˜K → “curved element”K:<br />

˜Φ K (˜x) := ˜x+4δλ 1 (˜x)λ 2 (˜x)n . (3.6.20)<br />

(λ i barycentric coordinate functions on ˜K,nnormal toE Γ , see Fig. 122)<br />

Note: Essential: δ sufficiently small =⇒ Φ bijective<br />

The complete trans<strong>for</strong>mation Φ K : ̂K ↦→ K is obtained by joining an affine trans<strong>for</strong>mation (→<br />

Def. 3.5.27)Φ a K : ̂K ↦→ ˜K,Φ a K (̂x) := F K̂x+τ K, and ˜Φ K :<br />

Φ K = ˜Φ K ◦Φ a K .<br />

3.6<br />

p. 421<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

It goes without saying that the abstract (and <strong>for</strong>mal) discussion of Sect. 1.5.1 remains true <strong>for</strong> nonlinear<br />

second-order boundary value problems in variational <strong>for</strong>m.<br />

Difficult: Characterization of “spaces of functions with finite energy” (→ Sobolev spaces, Sect. 2.2)<br />

(Relief!)<br />

<strong>for</strong> non-linear variational problems.<br />

Recall (→ Rem. 1.3.12):<br />

In this course we do not worry that much about function spaces.<br />

Non-linear variational problem<br />

u ∈ V: a(u;v) = l(v) ∀v ∈ V 0 , (1.3.14)<br />

3.7<br />

p. 42<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

For parabolic boundary fitting:<br />

D˜Φ K = I+4δn·grad(λ 1 λ 2 ) ⊤ ∈ R 2,2 , det(D˜Φ K ) = 1+4δn·grad(λ 1 λ 2 ) .<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

V 0 ˆ= test space, (real) vector space (usually a function space, “Sobolev-type” space→Sect. 2.2)<br />

V ˆ= trial space, affine space: usuallyV = u 0 +V 0 , with offset functionu 0 ∈ V ,<br />

f ˆ= a linear mappingV 0 ↦→ R, a linear <strong>for</strong>m,<br />

a ˆ= a mappingV ×V 0 ↦→ R, linear in the second argument, that is<br />

a(u;αv +βw) = αa(u;v)+βa(u;w) ∀u ∈ V , v,w ∈ V 0 , α,β ∈ R . (3.7.1)<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

3.7 Linearization<br />

3.7<br />

p. 422<br />

Example 3.7.2 (Heat conduction with radiation boundary conditons).<br />

3.7<br />

p. 42


➣ 2nd-order elliptic boundary value problem, cf. (2.5.6) & (2.6.3)<br />

−div(κ(x)gradu) = f inΩ ,<br />

κ(x)gradu·n(x)+Ψ(u) = 0 on∂Ω .<br />

Variational <strong>for</strong>mulation from Ex. 2.8.5<br />

∫<br />

∫ ∫<br />

u ∈ H 1 (Ω): κ(x)gradu·gradvdx+ Ψ(u)vdS = fvdx ∀v ∈ H 1 (Ω) . (2.8.7)<br />

Ω<br />

∂Ω Ω<br />

IfΨ : R ↦→ R is not an affine linear function, then (2.8.7) represents a non-linear variational problem<br />

(1.3.14) with<br />

trial/test spaceV = V 0 = H 1 (Ω) (→ Def. 2.2.12),<br />

∫<br />

right hand side linear <strong>for</strong>ml(v) := fvdx,<br />

∫<br />

Ω<br />

∫<br />

a(u;v) := κ(x)gradu·gradvdx+ Ψ(u)vdS.<br />

Ω<br />

∂Ω<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Idea:<br />

Given ⃗ ξ (k) ∈ D ➣<br />

Idea:<br />

Newton iteration:<br />

local linearization:<br />

⃗ ξ (k+1) as zero of affine linear model function<br />

F( ⃗ ξ) ≈ ˜F( ⃗ ξ) := F( ⃗ ξ (k) )+DF( ⃗ ξ (k) )( ⃗ ξ − ⃗ ξ (k) ) .<br />

⃗ ξ (k+1) := ⃗ ξ (k) −DF( ⃗ ξ (k) ) −1 F( ⃗ ξ (k) ) , [ ifDF( ⃗ ξ (k) ) regular ] (3.7.3)<br />

Givenu (k) ∈ V ➣<br />

u (k+1) from<br />

← apply idea to (1.3.14)<br />

local linearization:<br />

w ∈ V 0 : a(u (k) ;v)+D u a(u (k) ;v)w = l(v) ∀v ∈ V 0 ,<br />

u (k+1) := u (k) +w .<br />

(3.7.4)<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Note that the non-linearity enters only through the boundary term.<br />

✸<br />

The meaning ofDF( ⃗ ξ (k) ) in (3.7.3) is clear: it stands <strong>for</strong> the Jacobian ofF evaluated at ⃗ ξ (k)<br />

3.7<br />

p. 425<br />

But what is the meaning ofD u a(u (k) ;v)w in (3.7.4)?<br />

3.7<br />

p. 42<br />

Pursuing the policy of Galerkin discretization (choice of discrete spaces and corresponding bases,<br />

→ Sect. 1.5.1) we can convert (1.3.14) into a non-linear system of equations<br />

N∑<br />

a(u 0 + µ j b j N ;bk N ) = f(bk N ) ∀k = 1,...,N . (1.5.18)<br />

j=1<br />

If the left hand side depends smoothly on the unkowns (the corefficients µ j of ⃗µ), then the classical<br />

Newton method (→ [18, Sect. 4.4]) to solve it iteratively.<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Remember the “definition” of the Jacobian (<strong>for</strong> sufficiently smoothF )<br />

➣<br />

try the “definition”<br />

DF( ⃗ F(<br />

ξ)⃗µ = lim<br />

⃗ ξ +t⃗µ)−F( ⃗ ξ)<br />

, ⃗ ξ ∈ D, ⃗µ ∈ R N . (3.7.5)<br />

t→0 t<br />

D u a(u (k) a(u+tw;v)−a(u;v)<br />

;v)w = lim , u (k) ∈ V , v,w ∈ V t→0 t<br />

0 . (3.7.6)<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Here, we focus on a different approach that reverses the order of the steps:<br />

1. Linearization of problem (“Newton in function space”),<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

If(u,v) ↦→ a(u;v) depends smoothly onu, then<br />

(v,w) ↦→ D u a(u (k) ;v)w is a bilinear <strong>for</strong>mV 0 ×V 0 ↦→ R.<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

2. Galerkin discretization of linearized problems.<br />

“Newton in function space”:<br />

Example 3.7.7 (Derivative of non-linearu ↦→ a(u;·)).<br />

Recall idea of Newton’s method [18, Sect. 4.4] <strong>for</strong> the iterative solution of F(x) = 0, F : D ⊂<br />

R N ↦→ R N smooth:<br />

3.7<br />

p. 426<br />

Apply <strong>for</strong>mula (3.7.6) to the non-linear boundary term in (2.8.7), that is, here<br />

∫<br />

a(u;v) := Ψ(u)vdS , u,v ∈ H 1 (Ω) .<br />

∂Ω<br />

3.7<br />

p. 42


∫<br />

a(u+tw;v)−a(u;v) = (Ψ(u+tw)−Ψ(u))vdS , u,v ∈ H 1 (Ω) .<br />

∂Ω<br />

Assume Ψ : R ↦→ R is smooth with derivative Ψ ′ and employ Taylor expansion <strong>for</strong> fixed w ∈ H 1 (Ω)<br />

andt → 0<br />

∫<br />

a(u+tw;v)−a(u;v) = tΨ ′ (u)wvdS +O(t 2 ) .<br />

∂Ω ∫<br />

D u a(u (k) a(u+tw;v)−a(u;v)<br />

;v)w = lim = Ψ ′ (u)wvdS .<br />

t→0 t ∂Ω<br />

= a bilinear <strong>for</strong>m inv,w onH 1 (Ω)×H 1 (Ω)!<br />

This example also demonstrates how to actually computeD u a(u (k) ;v)w!<br />

✸<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Any of the Lagrangian finite element spaces introduced in Sect. 3.4 will supply validV N /V 0,N . Offset<br />

functions can be chosen according to the recipes from Sect. 3.5.5.<br />

Important aspect: termination of iteration, see [18, Thm. 4.4.3].<br />

Option:<br />

termination based on relative size of Newton update, withw,u (k+1)<br />

N<br />

from (3.7.8)<br />

∥<br />

STOP, if ‖w‖ ≤ τ ∥u (k+1)<br />

N ∥ , (3.7.9)<br />

where‖·‖ is a relevant norm (e.g., energy norm) onV (k+1)<br />

N<br />

andτ > 0 a prescribed relative tolerance.<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Idea: Galerkin discretization of the linear variational problem from (3.7.4)<br />

w ∈ V 0 : c(w,v) = g(v) ∀v ∈ V 0 ,<br />

c(w,v) = D u a(u (k) ;v)w , g(v) := l(v)−a(u (k) ;v) .<br />

3.7<br />

p. 429<br />

3.7<br />

p. 43<br />

Newton-Galerkin iteration <strong>for</strong> (1.3.14)<br />

Givenu (k)<br />

N ∈ V (k)<br />

N ➣ u (k+1)<br />

N<br />

∈ V (k+1)<br />

N<br />

from<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

4<br />

Finite Differences (FD) and Finite<br />

Volume <strong>Methods</strong> (FV)<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

w N ∈ V (k+1)<br />

0,N : D ua(u (k)<br />

N ;v N)w N = l(v N )−a(u (k)<br />

N ;v N) ∀v N ∈ V (k+1)<br />

0,N ,<br />

u (k+1)<br />

N<br />

:= P (k+1)<br />

N u (k)<br />

(3.7.8)<br />

N +w .<br />

Newton update<br />

Note: different Galerkin trial/test spacesV (k)<br />

N ,V(k) 0,N<br />

may be used in different steps of the iteration!<br />

(It may enhance efficiency to use Galerkin trial/test spaces of a rather small dimension in the beginning<br />

and switch to larger when the iteration is about to converge.)<br />

Warning! IfV (k)<br />

N ≠ V (k+1)<br />

N<br />

➣<br />

Linear projection operatorP (k+1)<br />

N<br />

you cannot simply addu (k)<br />

N andw<br />

: V (k)<br />

N<br />

(k+1)<br />

↦→ V N<br />

required in (3.7.8)<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

3.7<br />

p. 430<br />

CORE CHAPTER<br />

Now we examine two approaches to the discretization of scalar linear 2nd-order elliptic BVPs that<br />

offer an alternative to finite element Galerkin methods discussed in Ch. 3.<br />

What these methods have in common with (low degree) Lagrangian finite element methods is<br />

that they rely on meshes (→ Sect. 3.3.1) tiling the computational domainΩ,<br />

they lead to sparse linear systems of equations.<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

4.0<br />

p. 43


Remark 4.0.1 (Collocation approach on “complicated” domains).<br />

Sect. 1.5.2.2 taught us spline collocation methods. A crucial insight was that collocation methods<br />

(see beginning of Sect. 1.5.2 <strong>for</strong> a presentation of the idea), which target the boundary value problem<br />

in ODE/PDE <strong>for</strong>m, have to employ discrete trial spaces comprised of continuously differentiable<br />

functions, see Rem. 1.5.82.<br />

It is very difficult to contruct spaces of piecewise polynomial C 1 -functions on non-tensor product<br />

domains <strong>for</strong>d = 2,3 and find suitable collocation nodes, cf. (1.5.78).<br />

There<strong>for</strong>e we skip the discussion of collocation methods <strong>for</strong> 2nd-order elliptic BVPs on Ω ⊂ R d ,<br />

d = 2,3.<br />

△<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

2D model problem:<br />

Homogeneous Dirichlet BVP <strong>for</strong> Laplacian:<br />

−∆u = − ∂2 u<br />

∂x 2 − ∂2 u<br />

1 ∂x 2 = f inΩ :=]0,1[ 2 ,<br />

2<br />

u = 0 on∂Ω .<br />

Discretization based on<br />

M = (triangular) tensor-product grid<br />

(meshwidthh = (1+N) −1 ,N ∈ N)<br />

lexikographic (line-by-line) ordering of nodes ofM<br />

✄<br />

➊<br />

N(N−1)+1<br />

N+1<br />

1<br />

N−1<br />

N*N<br />

N+2 N+3 2N<br />

2 3<br />

N<br />

Fig. 123<br />

finite difference approach to−∆: approximation of derivatives by symmetric difference quotients<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

4.1 Finite differences<br />

A finite difference scheme <strong>for</strong> a 2-point boundary value problem was presented in Sect. 1.5.3, which<br />

you are advised to browse again. Its gist was<br />

4.1<br />

p. 433<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

This is nothing new: we did this in (1.5.97).<br />

∂ 2<br />

∂x 2 1<br />

∂ 2<br />

∂x 2 2<br />

u(ξ −h,η)−2u(ξ,η)+u(ξ +h,η)<br />

u ≈<br />

h<br />

|x=(ξ,η)<br />

2 ,<br />

u ≈<br />

|x=(ξ,η)<br />

u(ξ,η −h)−2u(ξ,η)+u(ξ,η +h)<br />

h 2 .<br />

−∆u |x=(ξ,η) ≈ 1 h 2 ( 4u(ξ,η)−u(ξ −h,η)−u(ξ +h,η)−u(ξ,η −h)−u(ξ,η +h)<br />

) .<br />

4.1<br />

p. 43<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

to replace the derivatives in the differential equation with difference quotients connecting approximate<br />

values of the solutions at the nodes of a grid/mesh.<br />

Recall: Finite differences target the “ODE/PDE-<strong>for</strong>mulation” of the boundary value problem.<br />

Our goal: extension to higher dimensions<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Use this approximation at grid point p = (ih,jh). This will connect the five point values u(ih,jh),<br />

u((i−1)h,jh),u((i+1)h,jh),u(ih,(j −1)h),u(ih,(j +1)h).<br />

Approximationsµ i,j to the point values u(ih,jh)<br />

will be the unknowns of the finite difference method.<br />

Centering the above difference quotients at grid points yields linear relationships between the unknowns:<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

4.1<br />

p. 434<br />

4.1<br />

p. 43


1<br />

h 2 ( 4u(ih,jh)−u(ih−h,jh)−u(ih+h,jh)−u(ih,jh−h)−u(ih,jh+h)<br />

) = f(ih,jh) ,<br />

1<br />

h 2 (<br />

4µi,j −µ i−1,j −µ i+1,j −µ i,j−1 −µ i,j+1<br />

) = f(ih,jh) . (4.1.1)<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Already in Sect. 1.5.3 we saw that the linear system of equations popping out of the finite difference<br />

discretization of the linear two-point BVP (1.5.81) was the same as that obtained via the linear finite<br />

Galerkin approach on the same mesh.<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Also this is familiar from the discussion in 1D. Yet, in 1D the association of the point values and of<br />

components of the vector ⃗µ of unknowns was straight<strong>for</strong>ward and suggested by the linear ordering<br />

of the nodes of the grid. In 2D we have much more freedom.<br />

One option on tensor-product grids is the line-by-line ordering (lexikographic ordering) depicted in<br />

Fig. 123. This allows a simple indexing scheme:<br />

u(p) ↔ µ i,j ↔ µ (j−1)N+i<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

In two dimensions we will also come to this conclusion! So, let us derive the Galerkin matrix and<br />

right hand side vector <strong>for</strong> the 2D model problem on the tensor product mesh depicted in Fig. 123. To<br />

begin with we convert it into a triangular meshMby splitting each square into two equal triangles by<br />

inserting a diagonal (green lines in Fig. 123). On this mesh we use linear Lagrangian finite elements<br />

as in Sect. 3.2.<br />

Then we repeat the considerations of Sect. 3.2.<br />

➋<br />

Linear Lagrangian finite element Galerkin discretization→Sect. 3.2: V 0,N = S 0 1,0 (M)<br />

(global shape functions ˆ= “tent functions”,→Fig. 87)<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

−µ (j−2)N+i −µ (j−1)N+i−1 +4µ (j−1)N+i −µ (j−1)N+i+1 −µ jN+i<br />

h 2<br />

= f(ih,jh)<br />

} {{ }<br />

=ϕ (j−1)N+i<br />

. (4.1.2)<br />

➤ linear system ofN 2 equationsA⃗µ = ⃗ϕ withN 2 ×N 2 block-tridiagonal Poisson matrix<br />

⎛<br />

⎞ ⎛<br />

⎞<br />

T −I 0 ··· ··· 0 4 −1 0 0<br />

A := 1 −I T −I .<br />

−1 4 −1 .<br />

h 2 0 −I T −I .<br />

⎜ . . .. ... . .. 0<br />

, T :=<br />

0 −1 4 −1 .<br />

⎟ ⎜ . . .. ... ...<br />

∈ R N,N (4.1.3)<br />

⎟<br />

⎝ . −I T −I⎠<br />

⎝ . −1 4 −1⎠<br />

0 ··· ··· 0 −I T 0 ··· ··· 0 −1 4<br />

⎛<br />

A =<br />

⎜<br />

⎝<br />

0<br />

0<br />

⎞<br />

⎟<br />

⎠<br />

✁ band structure of Poisson matrix<br />

The MATLAB command<br />

A = gallery(’poisson’,n)<br />

creates a sparsen 2 ×n 2 Poisson matrix.<br />

4.1<br />

p. 437<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

4.1<br />

p. 438<br />

h<br />

a 3<br />

K<br />

a 1 a 2<br />

h<br />

Element stiffness matrix from (3.2.10):<br />

⎛ ⎞<br />

2 −1 −1<br />

A K = 1 ⎝<br />

2 −1 1 0 ⎠ .<br />

−1 0 1<br />

(← numbering of local shape functions)<br />

Element load vector: use three-point quadrature <strong>for</strong>mula (3.5.35)<br />

⎛<br />

f(a 1 ⎞<br />

)<br />

⃗ϕ K = 6 1h2 ⎜<br />

⎝f(a 2 ⎟<br />

) ⎠ .<br />

f(a 3 )<br />

4.1<br />

p. 43<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

4.1<br />

p. 44


➂ ➂ K 5<br />

K 6 K 4<br />

➀<br />

➀<br />

➁ ➀<br />

p<br />

➂<br />

➁ ➂<br />

➂<br />

K 1 K 3<br />

K 2<br />

➀<br />

➀<br />

➁<br />

➀<br />

➁<br />

➂<br />

➁<br />

➁<br />

Local assembly:<br />

← green: local vertex numbers<br />

Contributions to load vector component<br />

associated with nodep:<br />

FromK 1 : (⃗ϕ K1 ) 2<br />

FromK 2 : (⃗ϕ K2 ) 3<br />

FromK 3 : (⃗ϕ K3 ) 3<br />

FromK 4 : (⃗ϕ K4 ) 1<br />

FromK 5 : (⃗ϕ K5 ) 1<br />

FromK 6 : (⃗ϕ K6 ) 2<br />

⃗ϕ p = h 2 f(p) .<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

➂<br />

⎛<br />

⎝ 1 −1 0<br />

⎞<br />

−1 2 −1⎠<br />

0 −1 1<br />

➀<br />

➁<br />

−1<br />

➁<br />

⎛<br />

⎝ 1 0 ⎞ ➂<br />

0 1 −1⎠<br />

−1 −1 2<br />

⎛<br />

⎝ 1 −1 0<br />

⎞<br />

−1 2 −1⎠<br />

0 −1 1<br />

➂<br />

➁<br />

➂<br />

➂<br />

⎛<br />

⎝ 1 0 ⎞<br />

0 1 −1⎠<br />

−1 −1 2<br />

−1<br />

➀<br />

➀<br />

4 −1<br />

−1<br />

➂<br />

⎛<br />

⎝ 1 0 ⎞<br />

0 1 −1⎠<br />

−1 −1 2<br />

⎛<br />

⎝ 1 −1 0<br />

⎞<br />

−1 2 −1⎠<br />

0 −1 1<br />

➁<br />

➁<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Assembly of finite element Galerkin matrix from element (stiffness) matrices (→ Sect. 3.5.3):<br />

➀<br />

➀<br />

➁<br />

➀<br />

4.1<br />

p. 441<br />

Fig. 125<br />

4.1<br />

p. 44<br />

➂<br />

➀<br />

1<br />

2<br />

➀<br />

➀<br />

1<br />

2<br />

⎛<br />

⎝ 1 0 ⎞<br />

0 1 −1⎠<br />

−1 −1 2<br />

1<br />

2<br />

⎛<br />

⎝ 1 −1 0<br />

⎞<br />

−1 2 −1⎠<br />

0 −1 1<br />

1<br />

2<br />

⎛<br />

⎝ 1 −1 0<br />

⎞<br />

−1 2 −1⎠<br />

0 −1 1<br />

➀<br />

➁<br />

➁<br />

➂<br />

➂<br />

➁<br />

➂<br />

➂<br />

➀<br />

⎛<br />

⎝ 1 0 ⎞<br />

0 1 −1⎠<br />

−1 −1 2<br />

1<br />

2<br />

➀<br />

1<br />

2<br />

⎛<br />

⎝ 1 0 ⎞<br />

0 1 −1⎠<br />

−1 −1 2<br />

➁<br />

➂<br />

⎛<br />

⎝ 1 −1 0<br />

⎞<br />

−1 2 −1⎠<br />

0 −1 1<br />

➁<br />

➁<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

4.1<br />

p. 442<br />

Factor 1/2 is missing in Figure 125<br />

➤ N 2 ×N 2 linear system of equationsh 2 A⃗µ = h 2 ⃗ϕ,A ˆ= Poisson matrix (4.1.3)<br />

✬<br />

✫<br />

Discussion:<br />

(Most) finite difference schemes<br />

↔<br />

finite element Galerkin schemes<br />

with numerical quadrature<br />

on structured meshes<br />

finite differences vs. finite element Galerkin methods<br />

(here focused on 2nd-order linear scalar problems)<br />

Finite element methods can be used on general triangulations and structured (tensor-product)<br />

meshes alike, which delivers superior flexibility in terms of geometry resolution (advantage FEM).<br />

The correct treatment of all kinds of boundary conditions (→ Sect. 2.6). naturally emerges from<br />

the variational <strong>for</strong>mulations in the finite element method (advantage FEM).<br />

✩<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

✪C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

4.1<br />

p. 44


Finite element methods have built-in “safety rails” because there are clear criteria <strong>for</strong> choosing<br />

viable finite element spaces and once this is done, there is no freedom left to go astray (advantage<br />

FEM).<br />

Finite element methods are harder to understand (advantage FD, but only with students who have<br />

not attended this course!)<br />

Then, why are “finite difference methods” ubiquitous in scientific and engineering simulations ?<br />

When people talk “finite differences” they have in mind structured meshes (translation invariant, tensor<br />

product structure) and use the term as synonym <strong>for</strong> “discretization on structured meshes”. The<br />

popularity of structured meshes is justified:<br />

• structured meshes allow regular data layout and vectorization, which boost the per<strong>for</strong>mance of<br />

algorithms on high per<strong>for</strong>mance computing hardware.<br />

→ course “Parallel Computing <strong>for</strong> Scientific Simulations”<br />

• translation invariant PDE operators give rise to simple Galerkin matrices that need not be assembled<br />

and stored (recall the 5-point-stencil <strong>for</strong> −∆) and support very efficient matrix×vector<br />

operations.<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

C j<br />

First ingredient:<br />

C k<br />

Γ ik<br />

n ik<br />

p k<br />

p j<br />

.<br />

C i<br />

p i<br />

Fig. 126<br />

(finitely many) control volumes<br />

Concrete choice:<br />

Control volumes =<br />

(polygonal) cells of a mesh ˜M = {C i } i<br />

covering computational domainΩ.<br />

Associate<br />

Meaning:<br />

cellC i ↔ nodal valueµ i<br />

µ i ≈ u(p i ),p i = “center” ofC i<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

✓<br />

✒<br />

Use structured meshes whenever possible!<br />

4.2 Finite volume methods (FVM)<br />

✏<br />

✑<br />

4.2<br />

p. 445<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

The conservation law (2.5.2) had to be linked to the flux law (2.5.3) in order to give rise to a 2nd-order<br />

scalar PDE see (2.5.5)–(2.5.6).<br />

Correspondingly, “heat conservation in control volumes” has to be supplemented by a rule that furnishes<br />

the heat flux between two adjacent control volumes.<br />

4.2<br />

p. 44<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

4.2.1 Gist of FVM<br />

Second ingredient:<br />

local numerical fluxes<br />

For two adjacent cellsC k ,C i with common edgeΓ ik := C i ∩C k .<br />

Focus:<br />

linear scalar 2nd-order elliptic boundary value problem in 2D (→ Sect. 2.5), homogeneous<br />

Dirichlet boundary conditions (→ Sect. 2.6), uni<strong>for</strong>mly positive scalar heat conductivityκ =<br />

κ(x)<br />

−div(κ(x)gradu) = f inΩ , u = 0 on∂Ω .<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

<strong>Numerical</strong> flux J ik = Ψ(µ i ,µ k ) ≈ ∫ Γ j·n ik ik dS<br />

(Ψ = numerical flux function, j = (heat) flux, see (2.5.1),n ik ˆ= edge normal. )<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Finite volume methods <strong>for</strong> 2nd-order elliptic BVP are inspired by the conservation principle (2.5.2).<br />

∫ ∫<br />

j·ndS = f dx <strong>for</strong> all “control volumes”V . (2.5.2)<br />

∂V V<br />

Physics requires that this holds <strong>for</strong> all (infinitely many) “control volumes”V ⊂ Ω.<br />

Idea:<br />

consider balance law on (fintely many !) control volumesC i<br />

∫ ∫<br />

j·n i dS = f dx ⇒ ∑ ∫<br />

J ik = f dx .<br />

∂C i C i k∈U<br />

C i i<br />

Since discretization has to lead to a finite number of equations, the idea is to demand that (2.5.2)<br />

holds <strong>for</strong> only a finite number of special control volumes.<br />

4.2<br />

p. 446<br />

✎ notation: U i := {j: C i and C j share edge,C j ∈ ˜M}, p i = node associated with control<br />

volumeC i .<br />

4.2<br />

p. 44


System of equations (˜M := ♯ ˜M equations, unknownsµ i ):<br />

∑<br />

∫<br />

Ψ(µ i ,µ k ) = f dx ∀i = 1,..., ˜M . (4.2.1)<br />

k∈U<br />

C i i<br />

Further approximation: 1-point quadrature <strong>for</strong> approximate evaluation of integral overC i ,<br />

∑<br />

k∈U i<br />

Ψ(µ i ,µ k ) = |C i |f(p i )dx ∀i = 1,..., ˜M . (4.2.2)<br />

Note: homogeneous Dirichlet problem ➢ only “interior” control volumes in (4.2.2)<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Construction of Voronoi dual cells:<br />

edges→perpendicular bisectors<br />

nodes→circumcenters of triangles<br />

straight<strong>for</strong>ward generalization to 3D<br />

Remark 4.2.4 (Geometric obstruction to Voronoi dual meshes).<br />

C i<br />

p i<br />

Fig. 128<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

4.2.2 Dual meshes<br />

Dual meshes are a commonly used technique <strong>for</strong> the construction of control volumes <strong>for</strong> FVM, based<br />

on conventional FE triangulationMofΩ(→ Sect. 3.3.1).<br />

4.2<br />

p. 449<br />

4.2<br />

p. 45<br />

Focus:<br />

dual mesh <strong>for</strong> triangular meshMin 2D,Ωpolygon<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

ω<br />

.<br />

⇐ Obtuse angleω:<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Popular choice:<br />

Voronoi dual mesh<br />

. .<br />

➢ circumcenter∉triangle<br />

⇏ ➢ C i ∩C j ≠ ∅ nodesi,j connected<br />

by edge<br />

V(M) = {p 1 ,...,p M } = nodes ofM<br />

Define Voronoi cells<br />

C i := {x ∈ Ω: |x−p i | < |x−p j | ∀j ≠ i} .<br />

Voronoi dual mesh ˜M := {C i } M i=1<br />

(4.2.3)<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Fig. 129<br />

➢ geometric construction breaks down<br />

➢ connectivity of unknowns hard to determine<br />

△<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Fig. 127<br />

4.2<br />

p. 450<br />

Angle condition to ensure C i ∩C j ≠ ∅ ⇔ nodesi,j connected by edge ofM:<br />

(i) sum of angles facing interior edge≤ π,<br />

(ii) angles facing boundary edges≤ π/2 (<strong>for</strong> non-Dirichlet boundary conditions).<br />

(i), (ii) characterize Delaunay triangulations<br />

4.2<br />

p. 45


Popular choice:<br />

Barycentric dual mesh<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Idea:<br />

obtain numerical flux from<br />

Fourier’s law (2.5.3) applied to a (sufficiently smooth)u N : Ω ↦→ R<br />

reconstructed from dual cell valuesµ i .<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Fig. 130<br />

Dual cells:<br />

edges→union of lines connecting<br />

barycenters and midpoints of<br />

edges ofM<br />

nodes→barycenters of triangles<br />

No geometric obstructions<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Natural approach, since µ i is read as approximation of u(p i ), where the “center” p i of the dual cell<br />

C i coincides with a node x i ∈ V(M) of the triangular meshM:<br />

where<br />

N∑<br />

u N = I 1 ⃗µ := µ i b i N , (4.2.6)<br />

i=1<br />

N = ♯V(M) = number of dual cells, size of vector⃗µ,<br />

b i N ˆ= nodal basis function (“tent function”) ofS0 1,0 (M) belonging to the node insideC i.<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

u N ˆ= piecewise linear interpolant of vertex valuesµ i<br />

4.2.3 Relationship of finite elements and finite volume methods<br />

4.2<br />

p. 453<br />

Note that u N is not smooth across inner edges of M. However, we do not care when computing<br />

j := κ(x)gradu N , because this flux is only needed at edges of the dual mesh, which lie inside<br />

triangles ofM(with the exception of single points that are irrelevant <strong>for</strong> the flux integrals).<br />

4.2<br />

p. 45<br />

Hardly surprising, finite volume methods and finite element Galerkin discretizations are closely related.<br />

This will be explored in this section <strong>for</strong> a model problem.<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Illustration of point evaluation<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Setting:<br />

1<br />

We consider the homogeneous Dirichlet problem <strong>for</strong> the Laplacian∆<br />

1<br />

0.8<br />

0.6<br />

0.4<br />

0.6<br />

0.8<br />

−∆u = f inΩ , u = 0 on∂Ω . (4.2.5)<br />

Discretization by finite volume method based on a triangular mesh M and on Voronoi dual cells<br />

→ Fig. 127:<br />

Assumption:<br />

M = Delaunay triangulation ofΩ ⇔ angle condition<br />

Number of control volumes = number of interior nodes ofM<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

0.2<br />

0<br />

0<br />

0.1<br />

0.2<br />

0.3<br />

0.4<br />

0.5<br />

0.6<br />

vertex valuesµ i onV(M)<br />

0.7<br />

0.8<br />

Choice of numerical flux:<br />

0.9<br />

1<br />

0<br />

0.2<br />

0.4<br />

Fig. 131<br />

Fig. 132<br />

p.w. linear interpolantu N := I 1 ⃗µ ∈ S 0 1,0 (M)<br />

∫<br />

J ik := − gradI 1 ⃗µ·n ik dS (4.2.7)<br />

Γ ik<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Still missing:<br />

specification of numerical flux functionΨ : R 2 ↦→ R <strong>for</strong> each dual edge<br />

4.2<br />

p. 454<br />

(4.2.7) ➥ (4.2.2)↔one row of finite volume discretization matrix from<br />

∑<br />

∫<br />

gradI 1 ⃗µ·n ik dS = ∑ (∑<br />

∫<br />

µ j gradb j ) ∫<br />

N ·n ikdS = f(x)dx .<br />

k∈U<br />

Γ ik i j∈U i k∈U<br />

Γ ik C i i<br />

} {{ }<br />

= matrix entry (A) ij<br />

4.2<br />

p. 45


n i ˆ= exterior unit normal vector to∂C i .<br />

p i<br />

∫<br />

⇒ (A) ij = gradb j N ·n idS .<br />

∂C i<br />

(4.2.8)<br />

Γ K i<br />

K 1<br />

p j<br />

Part of the boundary of the control<br />

volumeC i :<br />

Γ K i := ∂C i ∩K .<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

K 2 p j<br />

K 1<br />

e 2<br />

Γ<br />

e ik ij<br />

p i e 1<br />

Fig. 134<br />

Now apply Gauss’ theorem<br />

Thm. 2.4.5 to the domainsC i ∩K 1<br />

andC i ∩K 2 (shaded in figure).<br />

Also use again that gradb j N ≡<br />

const onK 1 andK 2 .<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

K 2<br />

Fig. 133<br />

4.2<br />

p. 457<br />

(A) ij = 1 ∫<br />

gradb j ·n<br />

2 N|K e1 dS + 1 ∫<br />

gradb j ·n<br />

1 2 N|K 1 1<br />

e ij<br />

dS<br />

e 1 e ij<br />

+ 1 ∫<br />

gradb j ·n<br />

2 N|K 2 2 e ij<br />

dS + 1 ∫<br />

gradb j ·n<br />

2 N|K e2 dS . (4.2.10)<br />

1<br />

e ij e 2<br />

4.2<br />

p. 45<br />

Now, consideri ≠ j ↔ off-diagonal entries ofA:<br />

First, we recall that the intersection of the support of the “tent function”b j N with ∂C i is located inside<br />

K 1 ∪K 2 , see Fig. 133.<br />

∫ ∫<br />

(A) ij = gradb j N ·n idS + gradb j N ·n idS .<br />

Γ K 1<br />

i<br />

Γ K 2<br />

i<br />

Next observe thatgradb j N<br />

is piecewise constant, which implies<br />

divgradb j N = 0 inK 1 , divgradb j N = 0 inK 2 . (4.2.9)<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

On the other hand, an entry of finite element Galerkin matrix à based on linear Lagrangian finite<br />

element spaceS1 0 (M) can be computed as, see Sect. 3.2.5:<br />

∫<br />

∫<br />

(Ã) ij = gradb j N ·gradbi N dx+ gradb j N ·gradbi N dx .<br />

K 1 K 2<br />

Conduct local integration by parts using Green’s first <strong>for</strong>mula from Thm. 2.4.7 and taking into account<br />

(4.2.9) and the linearity of the local shape functions<br />

∫<br />

∫<br />

(Ã) ij = (gradb j ·n N|K 1 1 )b i N dS +<br />

∂K 1<br />

∂K 2<br />

(gradb j N|K 2<br />

·n 2 )b i N dS<br />

= 1 2 |e 1|gradb j N|K 1<br />

·n e1 + 1 2 |e ij|gradb j N|K 1<br />

·n 1 e ij<br />

+<br />

1<br />

2 |e 2|gradb j N|K 2<br />

·n e2 + 1 2 |e ij|gradb j N|K 2<br />

·n 2 e ij<br />

.<br />

This is the same value as <strong>for</strong>(A) ij from (4.2.10)! Similar considerations apply to the diagonal entries<br />

(A) ii and(Ã) ii.<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

4.2<br />

p. 458<br />

The finite volume discretization and the finite element Galerkin discretization spawn the same<br />

system matrix <strong>for</strong> the model problem (4.2.5).<br />

4.2<br />

p. 46


5 Convergence and Accuracy<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

a supplies an inner product onV 0<br />

a induces energy norm‖·‖ a onV 0 (→ Def. 2.1.27)<br />

☞ We want (3.1.1) to be well posed, see Rem. 2.3.11<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

In this chapter we resume the discussion of Sect. 1.6 of accuracy of a Galerkin solution u N of a<br />

variational boundary value problem.<br />

More precisely, we are going to study convergence, see Rem. 1.6.2<br />

Focus: finite element Galerkin discretization of linear scalar 2nd-order elliptic boundary value problems<br />

in 2D, 3D<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Assumption 5.1.2. The right hand side functionall : V 0 ↦→ R from (3.1.1) is continous w.r.t. to<br />

the energy norm (→ Def. 2.1.27) induced bya:<br />

☞ An assumption to appease fastidious mathematicians:<br />

∃C > 0: |l(u)| ≤ C‖u‖ a ∀u ∈ V 0 . (2.2.1)<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Prerequisites (what you should know by now):<br />

➣ Boundary value problems (from equilibrium models, diffusion models): Sects. 2.4, 2.6,<br />

Assumption 5.1.3.V 0 equipped with the energy norm‖·‖ a is a Hilbert space, that is, complete.<br />

➣ Variational <strong>for</strong>mulation: Sect. 2.8, see also (2.3.3), (2.8.15), (3.0.1),<br />

➣ Some Sobolev spaces and their norms: Sect. 2.2<br />

➣ Abstract Galerkin discretization: Sect. 3.1,<br />

➣ Lagrangian finite elements: Sects. 3.4, 3.2.<br />

5.1 Galerkin error estimates<br />

5.1<br />

p. 461<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

✬<br />

Theorem 5.1.4 (Existence and uniqueness of solution of linear variational problem).<br />

Under Assumptions 5.1.1–5.1.3 the linear variational problem has a unique solutionu ∈ V 0 .<br />

✫<br />

This theorem is also known as Riesz representation theorem <strong>for</strong> continuous linear functionals.<br />

✩<br />

✪<br />

5.1<br />

p. 46<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Setting:<br />

linear variational problem (1.4.6) in the <strong>for</strong>m<br />

u ∈ V 0 : a(u,v) = l(v) ∀v ∈ V 0 , (3.1.1)<br />

V 0 ˆ= (real) vector space, a space of functions Ω ↦→ R <strong>for</strong> scalar 2nd-order elliptic variational<br />

problems,<br />

a : V 0 ×V 0 ↦→ R ˆ= a bilinear <strong>for</strong>m, see Def. 1.3.13,<br />

l : V 0 ↦→ R ˆ= a linear <strong>for</strong>m, see Def. 1.3.13,<br />

☞ We want (3.1.1) to be related to a quadratic minimization problem (→ Def. 2.1.21):<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Remark 5.1.5 (Well-posed 2nd-order linear elliptic variational problems).<br />

For instance, Assumption 5.1.1 is satisfied <strong>for</strong> the bilinear <strong>for</strong>m<br />

∫<br />

a(u,v) := (α(x)gradu)·gradvdx , u,v ∈ H0 1 (Ω) , (5.1.6)<br />

Ω<br />

and uni<strong>for</strong>mly positive definite (→ Def. 2.1.11) coefficient tensorα : Ω ↦→ R d,d , see Sect. 2.1.3.<br />

For the right hand side functional<br />

∫ ∫<br />

l(v) := f(x)v(x)dx+ h(x)v(x)dS , v ∈ H 1 (Ω) ,<br />

Ω ∂Ω<br />

we found in Sect. 2.2, see (2.2.15), and Rem. 2.9.5 that f ∈ L 2 (Ω) and h ∈ L 2 (∂Ω) ensures<br />

Assumption 5.1.2.<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Assumption 5.1.1. The bilinear <strong>for</strong>m a : V 0 × V 0 ↦→ R in (3.1.1) is symmetric and positive<br />

definite (→ Def. 2.1.25).<br />

5.1<br />

p. 462<br />

Assumption 5.1.3 <strong>for</strong> a from (5.1.6) is a deep result in the theory of Sobolev spaces [12, Sect. 5.2.3,<br />

Thm. 2].<br />

△<br />

5.1<br />

p. 46


Now consider Galerkin discretization of (3.1.1) based on Galerkin trial/test space V 0,N ⊂ V 0 , N :=<br />

dimV 0,N < ∞:<br />

u N ∈ V 0,N : a(u N ,v N ) = l(v N ) ∀v N ∈ V 0,N . (3.1.4)<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Discretization errore N := u−u N “a(·,·)-orthogonal” to discrete trial/test spaceV N<br />

u<br />

Remark 5.1.8. If a(·,·) is inner product on V :<br />

“Phythagoras’ theorem”→Fig. 136<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Thm. 3.1.5: existence and uniqueness of Galerkin solutionu N ∈ V 0,N<br />

V 0<br />

e N := u−u N<br />

V 0,N<br />

‖u−v N ‖ 2 a = ‖u−u N‖ 2 a −‖u N −v N ‖ 2 a .<br />

(5.1.9)<br />

Goal:<br />

bound relevant norm of discretization erroru−u N<br />

Here:<br />

relevant norm = energy norm‖·‖ a<br />

Why is the energy norm a “relevant norm” ?<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

u N<br />

v N<br />

Fig. 136<br />

(5.1.9) ➣ (v N = 0) simple <strong>for</strong>mula <strong>for</strong> computation<br />

of energy norm of Galerkin<br />

discretization error in numerical experiments<br />

with knownu.<br />

△<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

➣ Bounds of‖u−u N ‖ a provide bounds <strong>for</strong> the error in energy, see Rem. 1.6.7, (1.6.10)<br />

✬<br />

✩<br />

|J(u)−J(u N )| = 1 2 |a(u,u)−a(u N,u N )|=| 1 2 a(u+u N,u−u N )|<br />

(2.1.28)<br />

≤ ‖u−u N ‖ a·‖u+u N ‖ a .<br />

(No doubt, energy is a key quantity <strong>for</strong> the solution of an equilibrium problem, which is defined as the<br />

minimizer of a potential energy functional.)<br />

5.1<br />

p. 465<br />

Theorem 5.1.10 (Cea’s lemma).<br />

Under Assumptions 5.1.1–5.1.3 the energy norm of the Galerkin discretization error satisfies<br />

✫<br />

‖u−u N ‖ a = inf<br />

v N ∈V 0,N<br />

‖u−v N ‖ a .<br />

✪<br />

5.1<br />

p. 46<br />

Other “relevant norms” were discussed in Sects. 1.6.1, 2.2:<br />

• the mean square norm orL 2 (Ω)-norm, see Def. 2.2.5,<br />

• the supremum norm orL ∞ (Ω)-norm, see Def. 1.6.4.<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Proof. Use bilinearity ofaand Galerkin orthogonality (5.1.7): <strong>for</strong> any v N ∈ V 0,N<br />

‖u−u N ‖ 2 a = a(u−u N,u−u N ) = a(u−v N ,u−u N )+a(v N −u N ,u−u N ) .<br />

} {{ }<br />

=0<br />

Next, use the Cauchy-Schwarz inequality <strong>for</strong> the inner producta:<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

a(u,v) ≤ ‖u‖ a ‖v‖ a ∀u,v ∈ V 0 .<br />

‖u−u N ‖ 2 a ≤ ‖u−v N‖ a·‖u−u N ‖ a ,<br />

and cancel one factor‖u−u<br />

R. Hiptmair<br />

N ‖ a .<br />

✷<br />

The Galerkin approach allows a remarkably simple bound of the energy norm of the C. Schwab,<br />

H.<br />

discretization erroru−u N :<br />

Harbrecht<br />

V.<br />

Gradinaru ✬<br />

A. Chernov<br />

a(u,v) = l(v) ∀v ∈ V 0 , V 0,N ⊂V 0<br />

DRAFT<br />

=⇒ a(u−u<br />

a(u N ,v N ) = l(v) ∀v N ∈ V N ,v N ) = 0 ∀v N ∈ V 0,N .<br />

Optimality of Galerkin solutions:<br />

0,N<br />

‖u−u N ‖ a = inf ‖u−v N ‖ a , (5.1.11)<br />

v N ∈V 0,N<br />

} {{ } } {{ }<br />

↑ ↑<br />

u<br />

(norm of) discretization error best approximation error<br />

Galerkin orthogonality<br />

V 0<br />

✫<br />

e N := u−u N<br />

a(u−u N ,v N ) = 0 ∀v N ∈ V 0,N . (5.1.7)<br />

V 0,N<br />

[Geometric meaning <strong>for</strong> inner producta(·,·)→]<br />

5.1<br />

u N Fig. 135<br />

p. 466<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

✩Gradinar<br />

A. Chern<br />

✪<br />

DRAFT<br />

5.1<br />

p. 46


☞ To assess accuracy of Galerkin solution: study capability ofV 0,N to approximateu!<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

• p-refinement: replaceV 0,N := S 0 p(M),p ∈ N withV ′<br />

0,N := S0 p+1 (M) ⇒ V 0,N ⊂ V ′<br />

0,N<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

“Monotonicity” of best approximation: consider different trial/test spaces<br />

V 0,N ,V ′<br />

0,N ⊂ V 0 ,<br />

V 0,N ⊂ V ′<br />

0,N<br />

⇒<br />

inf ‖u−v N ‖<br />

v N ∈V 0,N<br />

′ a ≤ inf ‖u−v N ‖ a .<br />

v N ∈V 0,N<br />

The extreme case of p-refinement amounts to the use of global polynomials on Ω as trial and test<br />

functions ➣ (polynomial) spectral Galerkin method, see Sect. 1.5.1.1.<br />

Enhance accuracy by enlarging (“refining”) trial space.<br />

Now return to finite element Galerkin discretization of linear 2nd-order elliptic variational problems.<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Combination of h-refinement and p-refinement ? OF COURSE (hp-refinement, [26])<br />

5.2 Empirical Convergence of FEM<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

How to achieve refinement of FE space ?<br />

• h-refinement: replace M (underlying V 0,N ) → M ′ (underlying larger discrete trial space<br />

V<br />

0,N ′ )<br />

5.1<br />

p. 469<br />

5.2<br />

p. 47<br />

Example 5.1.12 (regular refinement of triangular mesh in 2D).<br />

1<br />

2D triangular mesh<br />

1<br />

2D triangular mesh<br />

1<br />

2D triangular mesh<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Recall from Sect. 1.6.2:<br />

✬<br />

Crucial: convergence is an asymptotic notion !<br />

Numerica<br />

<strong>Methods</strong><br />

✩<strong>for</strong> PDEs<br />

0.8<br />

0.6<br />

0.4<br />

0.2<br />

0<br />

0.8<br />

0.6<br />

0.4<br />

0.2<br />

0<br />

0.8<br />

0.6<br />

0.4<br />

0.2<br />

0<br />

✫<br />

sequence of discrete models ⇒ sequence of approximate solutions(u (i)<br />

N ) i∈N<br />

⇒ study sequence(‖u (i)<br />

N −u‖) i∈N<br />

✪<br />

−0.2<br />

−0.2<br />

−0.2<br />

created by variation of a discretization parameter:<br />

−0.4<br />

−0.4<br />

−0.4<br />

−0.6<br />

−0.8<br />

−1<br />

−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1<br />

# Vertices : 45, # Elements : 64, # Edges : 108<br />

−0.6<br />

−0.6<br />

−0.8<br />

−0.8<br />

−1<br />

−1<br />

−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1<br />

−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1<br />

# Vertices : 153, # Elements : 256, # Edges : 408<br />

# Vertices : 561, # Elements : 1024, # Edges : 1584<br />

K<br />

T 3<br />

T 4<br />

T<br />

T 2 1<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

In this section some numerical experiments will demonstrate<br />

meaningful notions of “discretization parameters”,<br />

qualitative behaviors of the sequence(‖u (i)<br />

N −u‖) i∈N we may expect,<br />

<strong>for</strong> Lagrangian finite element discretization of linear scalar 2nd-order elliptic variational problems (→<br />

Sect. 2.8).<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Regular refinement of triangleK into four congruent trianglesT 1 ,T 2 ,T 3 ,T 4<br />

Sequences of discrete models will be generated by eitherh-refinement orp-refinement.<br />

✸<br />

5.1<br />

p. 470<br />

5.2<br />

p. 47


Model problem:<br />

Dirichlet problem <strong>for</strong> Poisson equation:<br />

−∆u = f ∈ L 2 (Ω) inΩ, u = g ∈ C 0 (∂Ω) on∂Ω . (5.2.1)<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

The discretization parameter must be linked to the resolution (“capability to approximate generic<br />

solution”) of the Galerkin trial/test spaceV 0,N . Possible choices are<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Example 5.2.2 (Convergence of linear and quadratic Lagrangian finite elements in energy norm).<br />

Setting: Ω =]0,1[ 2 ,f(x 1 ,x 2 ) = 2π 2 sin(πx 1 )sin(πx 2 ),x ∈ Ω,g = 0<br />

N := dimV 0,N as a measure of the “cost” of a discretization, see Sect. 1.6.2,<br />

the maximum “size” of mesh cells, expressed by the mesh widthh M (→ Def. 5.2.3), see below.<br />

➢ Smooth solution u(x,y) = sin(πx)sin(πy).<br />

• Galerkin finite element discretization based on triangulas meshes and<br />

– linear Lagrangian finite elements,V 0,N = S1,0 0 (M) ⊂ H1 0 (Ω) (→ Sect. 3.2),<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Definition 5.2.3 (Mesh width).<br />

Given a meshM = {K}, its mesh widthh M is defined as<br />

h M := max{diamK: K ∈ M} , diamK := max{|p−q|: p,q ∈ K} .<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

– quadratic Lagrangian finite elements,V 0,N = S2,0 0 (M) ⊂ H1 0 (Ω) (→ Ex. 3.4.2),<br />

• quadrature rule (3.5.38) <strong>for</strong> assembly of local load vectors (→ Sect. 3.5.4),<br />

Monitored: H 1 (Ω)-semi-norm (→ Def. 2.2.10) of the Galerkin discretization erroru−u N<br />

This generalizes the concept of “mesh width” introduced in Sect. 1.5.1.2.<br />

Approximate(∗) computation of|u−u N | H 1 (Ω) on a sequence of meshes (created by<br />

sucessive regular refinement (→ Ex. 5.1.12) of coarse initial mesh)<br />

(∗): use of local quadrature rule (3.5.38) (on current FE mesh)<br />

5.2<br />

p. 473<br />

5.2<br />

p. 47<br />

1<br />

2D triangular mesh<br />

1<br />

2D triangular mesh<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

10 0 Discretization errors with respect to H 1 semi−norm<br />

10 0 Discretization errors with respect to H 1 semi−norm<br />

p = −0.5<br />

Quadratic FE<br />

Linear FE<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

0.9<br />

0.9<br />

10 −1<br />

p = 1.0<br />

10 −1<br />

0.8<br />

0.7<br />

0.6<br />

0.5<br />

0.8<br />

0.7<br />

0.6<br />

0.5<br />

Discretization error [log]<br />

10 −2<br />

Discretization error [log]<br />

10 −2<br />

p = −1.0<br />

10 −3<br />

10 −3<br />

0.4<br />

0.4<br />

0.3<br />

0.2<br />

0.1<br />

0.3<br />

0.2<br />

0.1<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

10 −4<br />

10 0<br />

Quadratic FE<br />

p = 2.1<br />

Linear FE<br />

10 −1<br />

Mesh width [log]<br />

10<br />

Fig. 137 1 10 2 10 3 10 4 10<br />

Fig. 138<br />

5<br />

10 −2<br />

10 −4<br />

Dofs [log]<br />

H 1 (Ω)-semi-norm of discretization error on unit square (−↔p = 1,−↔p = 2)<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

0<br />

0<br />

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1<br />

# Vertices : 25, # Elements : 32, # Edges : 56<br />

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1<br />

# Vertices : 81, # Elements : 128, # Edges : 208<br />

Unstructured triangular meshes ofΩ =]0,1[ 2 (two coarsest specimens)<br />

Recall type of convergence (algebraic convergence vs. exponential convergence) from Def. 1.6.20<br />

and how to detect them in a numerical experiment by inspecting appropriate graphs, see Rem. 1.6.22.<br />

Focus on asymptotics entails studying a<br />

norm of the discretization error as function of a (real, cardinal) discretization parameter.<br />

5.2<br />

p. 474<br />

Observations: • Algebraic rates of convergence in terms ofN andh<br />

• Quadratic Lagrangian FE converge with double the rate of linear Lagrangian FE<br />

5.2<br />

p. 47


Example 5.2.4 (Convergence of linear and quadratic Lagrangian finite elements inL 2 -norm).<br />

✸<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

✸<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Example 5.2.6 (h-convergence of Lagrangian FEM on L-shaped domain).<br />

Setting as above in Ex. 5.2.2,Ω =]0,1[ 2 .<br />

Monitored: asymptotics of the L 2 (Ω)-semi-norm of the Galerkin discretization error (approximate<br />

computation of‖u−u N ‖ L 2 (Ω) by means of local quadrature rule (3.5.38) on a sequence of meshes<br />

created by sucessive regular refinement (→ Ex. 5.1.12) of coarse initial mesh).<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Setting: Model problem (5.2.1) onΩ =]−1,1[ 2 \(]0,1[×]−1,0[), exact solution (in polar coordinates)<br />

u(r,ϕ) = r 2/3 sin(2/3ϕ) ➢ f = 0,g = u |∂Ω .<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

5.2<br />

p. 477<br />

5.2<br />

p. 47<br />

10 −1 Discretization errors with respect to L 2 norm<br />

10 −1 Discretization errors with respect to L 2 norm<br />

Quadratic FE<br />

Linear FE<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

10 −2<br />

10 −2<br />

p = 2.0<br />

Discretization error [log]<br />

10 −3<br />

10 −4<br />

10 −5<br />

Discretization error [log]<br />

10 −3<br />

10 −4<br />

10 −5<br />

p = −1.5<br />

p = −1.0<br />

10 −6<br />

10 −7<br />

10 0<br />

Quadratic FE<br />

Linear FE<br />

p = 3.1<br />

10 −1<br />

Mesh width [log]<br />

10 −2<br />

L 2 (Ω)-norm of discretization error on unit square (−↔p = 1,−↔p = 2)<br />

Observations: • Linear Lagrangian FE (p = 1) ➽ ‖u−u N ‖ 0 = O(h 2 M ) = O(N−1 )<br />

• Quadratic Lagrangian FE (p = 2) ➽ ‖u−u N ‖ 0 = O(h 3 M ) = O(N−1.5 )<br />

For the “conversion” of convergence rates with respect to the mesh widthh M andN := dimS 0 p(M),<br />

note that in 2D <strong>for</strong> Lagrangian finite element spaces with fixed polynomial degree (→ Sect. 3.4) and<br />

meshes created by global (that is, carried out everywhere) regular refinement<br />

10 −6<br />

10 −7<br />

N = O(h −2<br />

M ) .<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

10 1 10 2 10 3 10 4 10 5 Harbrecht<br />

Dofs [log]<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

(5.2.5)<br />

5.2<br />

p. 478<br />

Note:<br />

Exact solutionu<br />

Fig. 139<br />

gradu has a singularity at0, that is, “‖gradu(0)‖ = ∞”.<br />

• Galerkin finite element discretization based on triangulas meshes and<br />

Norm of gradient‖gradu‖<br />

Fig. 140<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

5.2<br />

p. 48


– linear Lagrangian finite elements,V 0,N = S1,0 0 (M) ⊂ H1 0 (Ω) (→ Sect. 3.2),<br />

– quadratic Lagrangian finite elements,V 0,N = S2,0 0 (M) ⊂ H1 0 (Ω) (→ Ex. 3.4.2),<br />

• linear/quadratic interpolation of Dirichlet data to obtain offset function u 0 ∈ Sp,0 0 (M), p = 1,2,<br />

see Sect. 3.5.5, Ex. 3.5.43.<br />

Sequence of meshes created by sucessive regular refinement (→ Ex. 5.1.12) of coarse initial mesh,<br />

see Fig. 141.<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Discretization error [log]<br />

Discretization errors with respect to H 1 semi−norm<br />

10 0 Quadratic FE<br />

Linear FE<br />

p = 0.7<br />

10 −1<br />

10 −2<br />

p = 0.6<br />

10 −3<br />

10 0<br />

10 −1<br />

10 −2<br />

Mesh width [log]<br />

Discretization error [log]<br />

Discretization errors with respect to H 1 semi−norm<br />

Quadratic FE<br />

Linear FE<br />

p = −0.3<br />

10 −1<br />

10 −2<br />

p = −0.3<br />

10 −3<br />

10 1 10 2 10 3 10 4 10 5 10 6<br />

Dofs [log]<br />

H 1 (Ω)-semi-norm of discretization error on “L-shaped” domain (−↔p = 1,−↔p = 2)<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Observations: • For bothp = 1,2: ‖u−u N ‖ 1 = O(N −1/3 )<br />

• No gain from higher polynomial degree<br />

5.2<br />

p. 481<br />

Conjecture: singularity of gradu at x = 0 seems to foil faster algebraic convergence of quadratice<br />

Lagrangian finite element solutions!<br />

5.2<br />

p. 48<br />

1<br />

0.8<br />

2D triangular mesh<br />

1<br />

0.8<br />

2D triangular mesh<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Example 5.2.7 (Convergence of Lagrangian FEM <strong>for</strong>p-refinement).<br />

✸<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

0.6<br />

0.6<br />

0.4<br />

0.4<br />

0.2<br />

0.2<br />

0<br />

−0.2<br />

0<br />

−0.2<br />

Model BVP as in Ex. 5.2.2 (Ω =]0,1[ 2 ) and Ex. 5.2.6<br />

(L-shaped domainΩ =]−1,1[ 2 \(]0,1[×]−1,0[)).<br />

−0.4<br />

−0.6<br />

−0.8<br />

−1<br />

−0.4<br />

−0.6<br />

−0.8<br />

−1<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Galerkin finite element discretization based on S 0 p(M), p = 1,2,3,5,6,7,8,9,10, built on a<br />

fixed coarse triangular mesh ofΩ.<br />

➤<br />

p-refinement<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1<br />

−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1<br />

# Vertices : 45, # Elements : 64, # Edges : 108<br />

# Vertices : 153, # Elements : 256, # Edges : 408Fig. 141<br />

Unstructured triangular meshes ofΩ =]−1,1[ 2 \(]0,1[×]−1,0[) (two coarsest specimens)<br />

Monitored: H 1 (Ω)-semi-norm (energy norm) and L 2 (Ω)-norm of discretization error as functions of<br />

polynomial degreepandN := dimS 0 p(M).<br />

Approximate computation of |u−u N | H 1 (Ω)<br />

meshes.<br />

by using local quadrature <strong>for</strong>mula (3.5.38) on FE<br />

5.2<br />

p. 482<br />

(Computation of norms by means of local quadrature rule of order 19!. This renders the error in norm<br />

computations introduced by numerical quadrature negligible.)<br />

Meaningful discretization parameters <strong>for</strong> asymptotic study of error norms:<br />

5.2<br />

p. 48


polynomial degreep<strong>for</strong> Lagrangian finite element space,<br />

N := dimV 0,N as a measure of the “cost” of a discretization, see Sect. 1.6.2.<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

✸<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

10 2 Discretization errors <strong>for</strong> p−FEM<br />

10 2 Discretization errors <strong>for</strong> p−FEM<br />

5.3 A priori finite element error estimates<br />

10 0<br />

10 0<br />

Discretization error<br />

10 −2<br />

10 −4<br />

10 −6<br />

10 −8<br />

10 −10<br />

10 −12<br />

H 1 semi−norm<br />

L 2 norm<br />

0 50 100 150 200 250 300 350 400<br />

p 2<br />

Fig. 142<br />

Discretization error<br />

10 −2<br />

10 −4<br />

10 −6<br />

10 −8<br />

10 −10<br />

10 −12<br />

H 1 semi−norm<br />

L 2 norm<br />

0 50 100 150 200 250 300 350 400 450<br />

N<br />

Fig. 143<br />

Ω =]0,1[ 2 : behavior of|u−u N | H 1 (Ω) <strong>for</strong> different polynomial degrees.<br />

Lagrangian FEM:p-convergence <strong>for</strong> smooth (analytic) solution<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

We are interested in a priori estimates of norms of the discretization error.<br />

A priori estimate: bounds <strong>for</strong> error norms available be<strong>for</strong>e computing approximate solutions.<br />

⇕<br />

A posteriori estimate: bounds <strong>for</strong> error norms based on an approximate solution already computed.<br />

Results of Sect. 5.1 provide handle on a priori estimate <strong>for</strong> Galerkin discretization error:<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

5.2<br />

p. 485<br />

✗<br />

✖<br />

Optimality (5.1.11) of Galerkin solution<br />

a priori error estimates<br />

✔<br />

✕<br />

5.3<br />

p. 48<br />

Observation: exponential convergence of FE discretization error, cf. the behavior of the discretization<br />

error of spectral collocation and polynomial spectral Galerkin methods in 1D,<br />

Ex. 1.6.19.<br />

Norm of Discretization error<br />

Discretization errors <strong>for</strong> p−FEM<br />

H 1 semi−norm<br />

L 2 norm<br />

10 −1<br />

10 −2<br />

10 −3<br />

10 −4<br />

10 0 10 1 10 2<br />

p<br />

Fig. 144<br />

Norm of Discretization error<br />

Discretization errors <strong>for</strong> p−FEM<br />

H 1 semi−norm<br />

L 2 norm<br />

10 −1<br />

10 −2<br />

10 −3<br />

10 −4<br />

10 0 10 1 10 2 10 3<br />

Lagrangian FEM:p-convergence <strong>for</strong> solution with singular gradient<br />

N<br />

Fig. 145<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Thm. 5.1.10 ➤ Estimate energy norm of Galerkin discretization erroru−u N<br />

by bounding best approximation error<br />

<strong>for</strong> exact solutionuin finite element space:<br />

‖u−u N ‖ a ≤ inf ‖u−v N ‖ a , (5.1.11)<br />

v N ∈V 0,N<br />

} {{ } } {{ }<br />

↑ ↑<br />

(norm of) discretization error<br />

How to estimate best approximation error<br />

best approximation error<br />

inf<br />

v N ∈V 0,N<br />

‖u−v N ‖ V ?<br />

➣ Well, given solutionuseek candidate functionw N ∈ V 0,N with<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Observation: Only algebraic convergence of FE discretization error!<br />

The suspect: “singular behavior” ofgradu atx = 0.<br />

5.2<br />

p. 486<br />

Natural choice:<br />

‖u−w N ‖ V ≈ inf<br />

v N ∈V N<br />

‖u−v N ‖ V .<br />

w N by interpolation/averaging of (unknown, but existing)u<br />

5.3<br />

p. 48


5.3.1 Estimates <strong>for</strong> linear interpolation in 1D<br />

Computational domain (→ Sect. 1.4):<br />

intervalΩ = [a,b]<br />

Given: mesh ofΩ(→ Sect. 1.5.1.2): M := {]x j−1 ,x j [: j = 1,...,M},M ∈ N<br />

a<br />

Goal:<br />

x 1 x 2 x 3 ···<br />

Fig. 146<br />

b<br />

u<br />

Piecewise linear interpolant ofu ∈ C 0 ([a,b])<br />

I 1 u ∈ S1 0 (M) , (5.3.1)<br />

(I 1 u)(x j ) = u(x j ) , j = 0,...,M . (5.3.2)<br />

➣ [18, Sect. 3.5.1]<br />

Bound suitable norm (→ Sect. 1.6.1) of interpolation erroru−I 1 u<br />

in terms of geometric quantities(∗) characterizingM.<br />

(∗): A typical such quantity is the mesh width h M := max|x j −x j−1 |<br />

j<br />

Now we investigate different norms of the interpolation error.<br />

‖u−I 1 u‖ L ∞ ([a,b]), see [18, Sect. 9.1] and [18, Sect. 9.4.1]: from [18, Thm. 9.1.7] <strong>for</strong> n = 1: <strong>for</strong><br />

u ∈ C 2 ([a,b])<br />

max<br />

x j−1 ≤x≤x j<br />

u(t)−(Iu)(x) = 1 4 u′′ (ξ t )(x j −x j−1 ) 2 , <strong>for</strong> someξ t ∈]x j−1 ,x j [ , (5.3.3)<br />

with local linear interpolant<br />

(5.3.3) interpolation error estimate inL ∞ ([a,b])<br />

(Iu)(x) = x−x j−1<br />

x j −x j−1<br />

u(x j )− x j −x<br />

x j −x j−1<br />

u(x j−1 ) . (5.3.4)<br />

‖u−I 1 u‖ L ∞ ([a,b]) ≤ 4 1 ∥<br />

h2 M<br />

∥u ′′∥ ∥ L ∞ ([a,b]) . (5.3.5)<br />

This is obtained by simply taking the maximum over all local norms of the interpolation error.<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Now all mesh cells contribute to this norm:<br />

‖u−I 1 u‖ 2 M L 2 ([a,b]) = ∑<br />

‖u−I 1 u‖ 2 M L 2 (]x j−1 ,x j [) = ∑ ∫<br />

x j<br />

j=1<br />

➣ Idea: localization<br />

|(u−Iu)(x)| 2 dx , Iu from (5.3.4) .<br />

j=1x j−1<br />

(Estimate error on individual mesh cells and sum local bounds)<br />

By integrating by parts (1.3.22) twice, <strong>for</strong>u ∈ C 2 ([x j−1 ,x j ]),x ∈ [x j−1 ,x j ],<br />

∫x<br />

(x j −x)(ξ −x j−1 )<br />

u ′′ (ξ)dξ +<br />

x j −x j−1<br />

x j−1<br />

∫<br />

xx j<br />

(x−x j−1 )(x j −ξ)<br />

u ′′ (ξ)dξ<br />

x j −x j−1<br />

(5.3.6)<br />

= x j −x<br />

u(x<br />

x j −x j−1 )+ x−x j−1<br />

u(x<br />

j−1 x j −x j ) −u(x) . (5.3.7)<br />

j−1<br />

} {{ }<br />

=Iu(x)<br />

This is a representation <strong>for</strong>mula <strong>for</strong> the local interpolation errorIu−uof the <strong>for</strong>m<br />

∫<br />

5.3<br />

xj<br />

(Iu−u)(x) = G(x,ξ)u ′′ (ξ)dξ .<br />

p. 489<br />

x j−1<br />

⎧<br />

(x j −x)(ξ −x j−1 )<br />

⎪⎨<br />

<strong>for</strong>x<br />

x<br />

with G(x,ξ) = j −x j−1 ≤ ξ < x ,<br />

j−1<br />

,which satisfies<br />

(x−x j−1 )(x j −ξ)<br />

⎪⎩<br />

<strong>for</strong>x ≤ ξ ≤ x<br />

x j −x j .<br />

j−1<br />

|G(x,ξ)| ≤ |x j −x j−1 | ⇒<br />

∫<br />

x j<br />

x j−1<br />

G(x,ξ) 2 dξ ≤ |x j −x j−1 | 3 .<br />

Kernel functionsG<strong>for</strong> 1D linear interpolation <strong>for</strong> x j−1 = 0 , x j = 1 .<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

5.3<br />

p. 49<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Recall: supremum norm (maximum norm) from Def. 1.6.4<br />

Now, we also want to study other norms of the interpolation error:<br />

‖u−I 1 u‖ L 2 ([a,b]) :<br />

5.3<br />

p. 490<br />

5.3<br />

p. 49


0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1<br />

G(x,ξ)<br />

0.25<br />

0.2<br />

0.15<br />

0.1<br />

0.05<br />

0<br />

Kernel function G <strong>for</strong> 1D linear interpolation<br />

ξ<br />

x = 0.1<br />

x = 0.2<br />

x = 0.3<br />

x = 0.4<br />

x = 0.5<br />

x = 0.6<br />

x = 0.7<br />

x = 0.8<br />

x = 0.9<br />

Fig. 147<br />

G(ξ,x)<br />

0.25<br />

0.2<br />

0.15<br />

0.1<br />

0.05<br />

0<br />

1<br />

0.8<br />

0.6<br />

x<br />

0.4<br />

0.2<br />

0<br />

0<br />

0.2<br />

0.4<br />

ξ<br />

0.6<br />

0.8<br />

1<br />

Fig. 148<br />

∣ ∫<br />

x j ∫<br />

x j ∣∣∣∣∣∣ ∫<br />

x j<br />

2<br />

|u(x)−Iu(x)| 2 dx = G(x,ξ)u ′′ (ξ)dξ<br />

dx<br />

(5.3.8)<br />

x j−1 x j−1 x j−1<br />

∣<br />

⎧ ⎫<br />

(2.2.15) ∫<br />

x j ⎪⎨ ∫<br />

x j ∫<br />

x j ⎪⎬<br />

≤ G(x,ξ) 2 dξ · |u ′′ (ξ)| 2 dξ<br />

⎪ ⎩ ⎪⎭ dx , x j−1 x j−1 x j−1<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

5.3<br />

p. 493<br />

∫<br />

x j<br />

x j−1<br />

∣ ∣∣∣ d<br />

dx (Iu−u)(x) ∣ ∣∣∣ 2<br />

∣ ∫<br />

x j ∣∣∣∣∣∣ ∫<br />

x j<br />

2<br />

∂G<br />

dx =<br />

∂x (x,ξ)u′′ (ξ)dξ<br />

dx<br />

x j−1 x j−1<br />

∣<br />

∫<br />

x j<br />

⎧⎪ ⎨ ∫<br />

x j ∣ ∣ ∣∣∣ ∂G ∣∣∣ 2 ∫<br />

x j ⎪⎬<br />

≤<br />

∂x (x,ξ) dξ · |u ′′ (ξ)| 2 dξ dx .<br />

x j−1<br />

⎪ ⎩ x j−1 } {{ } x j−1<br />

⎪⎭<br />

≤1<br />

∫<br />

x j<br />

|u−I 1 u| 2 H 1 (]x j−1 ,x j [) ≤ (x j −x j−1 ) 2<br />

⎫<br />

x j−1<br />

|u ′′ (ξ)| 2 dξ . (5.3.11)<br />

As above, apply this estimate on[x j−1 ,x j ], sum over all cells of the meshMand take square root.<br />

(5.3.11) ⇒ |u−I 1 u| H 1 ([a,b]) ≤ h ∥<br />

M<br />

∥u ′′∥ ∥ L 2 ([a,b]) . (5.3.12)<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

5.3<br />

p. 49<br />

(5.3.8)<br />

⇒<br />

∫<br />

x j<br />

∫<br />

x j<br />

‖u−iu‖ 2 L 2 (]x j−1 ,x j [) = |u(x)−Iu(x)| 2 dx ≤ |x j −x j−1 | 4<br />

x j−1<br />

x j−1<br />

|u ′′ (ξ)| 2 dξ .<br />

Apply this estimate on[x j−1 ,x j ], sum over all cells of the meshMand take square root.<br />

(5.3.9)<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

What we learn from this example:<br />

1. We have to rely on smoothness of the interpolandu to obtain bounds <strong>for</strong> norms of the interpolation<br />

error.<br />

2. The bounds involve norms of derivatives of the interpoland.<br />

3. For smoothuwe find algebraic convergence (→ Def. 1.6.20) of norms of the interpolation error in<br />

terms of mesh width h M → 0.<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

(5.3.9) ⇒ ‖u−I 1 u‖ L 2 ([a,b]) ≤ ∥<br />

h2 M<br />

∥u ′′∥ ∥ L 2 ([a,b]) . (5.3.10)<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

5.3.2 Error estimates <strong>for</strong> linear interpolation in 2D<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

|u−I 1 u| H 1 ([a,b]) :<br />

Differentiate representation <strong>for</strong>mula (5.3.7): <strong>for</strong>x j−1 < x < x j<br />

∫<br />

x j<br />

d<br />

dx (Iu−u)(x) = − ξ −x j−1<br />

u ′′ (ξ)dξ +<br />

x j −x j−1<br />

x j−1<br />

∫<br />

x j<br />

x j−1<br />

x j −ξ<br />

x j −x j−1<br />

u ′′ (ξ)dξ .<br />

5.3<br />

p. 494<br />

Focus on gist of proof and its analogy to 1D; technical details should be skipped<br />

5.3<br />

p. 49


Given: polygonal domainΩ ⊂ R 2<br />

triangular mesh M of Ω (→<br />

Def. 3.3.1)<br />

Ω<br />

Fig. 149<br />

Sect 5.3.1 introduced piecewise linear interpolation on a mesh/grid in 1D. The next definition gives<br />

the natural 2D counterpart on a triangular mesh, which is closely related to the piecewise linear<br />

reconstruction (interpolation) operator from (4.2.6), see Figs. 131, 132.<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Crucial <strong>for</strong> localization to work: linear interpolation operator I 1 : C 0 (¯Ω) ↦→ S1 0 (M) can be defined<br />

purely locally by<br />

I 1 u |K = u(a 1 )λ 1 +u(a 2 )λ 2 +u(a 3 )λ 3 , (5.3.15)<br />

<strong>for</strong> each triangle K ∈ M with vertices a 1 , a 2 , a 3 (λ k ˆ= barycentric coordinate functions = local<br />

shape functions <strong>for</strong> S1 0 (M), see Fig. 72).<br />

Next step, cf. (5.3.7):<br />

representation <strong>for</strong>mula <strong>for</strong> local interpolation error.<br />

a 3<br />

u ∈ C 2 ( ¯K): by mean value <strong>for</strong>mula∀x ∈ K,<br />

u(a j ) = u(x)+gradu(x)·(a j −x)+<br />

ω 3 ∫ 1<br />

(a j −x) ⊤ D 2 u(x+ξ(a j −x))(a j −x)(1−ξ)dξ ,<br />

K 0<br />

(5.3.16)<br />

ω 1 ⎛<br />

a 1 ∂<br />

ω 2 u<br />

2<br />

D 2 u(x) = ⎝ ∂x 2 (x) ∂ 2 ⎞<br />

u<br />

1 ∂x 1 ∂x (x) 2<br />

∂ 2 u<br />

a 2 ∂x 1 ∂x (x) ∂ 2 ⎠<br />

u<br />

2 ∂x 2 (x) ˆ= Hessian.<br />

2<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

The <strong>for</strong>mula (5.3.16) is easily verified by applying integration by parts<br />

5.3<br />

p. 497<br />

f(b)−f(a) = [ ξf ′ (ξ) ] ∫ b<br />

∫ b<br />

b<br />

a − ξf ′′ (ξ)dξ = f ′ (a)(b−a)+ (b−ξ)f ′′ (ξ)dξ .<br />

a<br />

a<br />

5.3<br />

p. 49<br />

Definition 5.3.13 (Linear interpolation in 2D).<br />

The linear interpolation operatorI 1 : C 0 (¯Ω) ↦→ S1 0 (M) is defined by<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

to the functionφ(t) = u(ta j +(1−t)x) witha = 0,b = 1.<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

I 1 u ∈ S 0 1 (M) , I 1u(p) = u(p) ∀p ∈ V(M) .<br />

Next, use (5.3.16) to replace u(a j ) in the <strong>for</strong>mula (5.3.15) <strong>for</strong> local linear interpolation. Also use the<br />

identities <strong>for</strong> the barycentric coordinate functions<br />

3∑<br />

3∑<br />

λ j (x) = 1 , x = a j λ j (x) . (5.3.17)<br />

j=1 j=1<br />

Recalling the definition of the nodal basis B = {b p N :p ∈ V(M)} of S0 1 (M) from (3.2.3), where bp N<br />

is the “tent function” associated with nodep, an equivalent definition is, cf. (3.5.44),<br />

I 1 u = ∑<br />

u(p)b p N , u ∈ C0 (Ω) . (5.3.14)<br />

Task:<br />

p∈V(M)<br />

☞ For “sufficiently smooth”u : Ω ↦→ R (↔u ∈ C ∞ (¯Ω) to begin with) estimate<br />

Idea:<br />

➣<br />

interpolation error norm ‖u−I 1 u‖ H 1 (Ω) .<br />

Localization<br />

I 1 local ➣ first, estimate ‖u−I 1 u‖ 2 H 1 (K)<br />

,K ∈ M,<br />

then, global estimate via summation as in Sect. 5.3.1.<br />

Focus on single triangleK ∈ M<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

5.3<br />

p. 498<br />

3∑<br />

3∑<br />

3∑<br />

I 1 u(x) = u(a j )λ j (x) = u(x)· λ j (x) +gradu(x)· (a j −x)λ j (x) +R(x) ,<br />

j=1<br />

j=1<br />

j=1<br />

} {{ } } {{ }<br />

=1<br />

=0<br />

(<br />

3∑ ∫ )<br />

1<br />

with R(x) := (a j −x) ⊤ D 2 u(x+ξ(a j −x))(a j −x)(1−ξ)dξ λ j (x) . (5.3.18)<br />

j=1<br />

0<br />

Again, as in the case of (5.3.7) <strong>for</strong> 1D linear interpolation we have arrived at an integral representation<br />

<strong>for</strong>mula <strong>for</strong> the local interpolation error:<br />

(<br />

3∑ ∫ )<br />

1<br />

(u−I 1 u)(x) = (a j −x) T D 2 u(x+ξ(a j −x))(a j −x)(1−ξ)dξ λ j (x) . (5.3.19)<br />

j=1<br />

0<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

5.3<br />

p. 50


Together with the triangle inequality, the trivial bound|λ j | ≤ 1 yields<br />

⎛ ⎛<br />

⎞ ⎞<br />

2<br />

3∑<br />

∫ ∫1<br />

‖u−I 1 u‖ L 2 (K) ≤ ⎜ ⎜<br />

⎝ ⎝ (a j −x) T D 2 u(x+ξ(a j −x))(a j ⎟<br />

−x)(1−ξ)dξ⎠<br />

dx⎟<br />

⎠<br />

j=1<br />

K<br />

0<br />

To estimate an expression of the <strong>for</strong>m<br />

∫<br />

K<br />

( ∫ 1<br />

2<br />

(a j −x) T D 2 u(x+ξ(a j −x))(a −x)(1−ξ)dξ) j dx , (5.3.20)<br />

0<br />

we may assume, without loss of generality, thata j = 0.<br />

➣<br />

Denote<br />

✬<br />

✫<br />

Task: estimate terms (where0is a vertex ofK!)<br />

∫<br />

K<br />

( ∫ 1<br />

0<br />

2 ∫<br />

x ⊤ D u((1−ξ)x)x(1−ξ)dξ) 2 dx =<br />

γ ˆ= angle ofK at vertex0,<br />

h ˆ= length of longest edge ofK.<br />

K is contained in the sector<br />

S := {x = ( rcosϕ<br />

rsinϕ) : 0 ≤ r < h,0 ≤ ϕ ≤ γ}<br />

K<br />

( ∫ 1<br />

2<br />

x ⊤ D u(ξx)xξdξ) 2 dx .<br />

0<br />

✩<br />

Lemma 5.3.21. For anyψ ∈ L 2 (S)<br />

⎛ ⎞2<br />

∫ ∫1<br />

⎜<br />

⎝ |y| 2 ⎟<br />

ψ(τy)τ dτ⎠<br />

dy ≤ h4<br />

8 ‖ψ‖2 L 2 (S) .<br />

S 0<br />

0<br />

Using polar coordinates (r,ϕ), ŝ ϕ = ( cosϕ<br />

sinϕ)<br />

, see [29, Bsp. 8.5.3], and Cauchy-Schwarz inequality<br />

(2.2.15):<br />

⎛ ⎞2<br />

⎛ ⎞2<br />

∫<br />

S<br />

⎜<br />

⎝<br />

∫1<br />

|y| 2 ⎟<br />

]ψ(τy)τ dτ⎠<br />

0<br />

∫ γ ∫h<br />

dy =<br />

⎜<br />

⎝<br />

✪<br />

∫1<br />

r 2 ⎟<br />

ψ(τrŝ ϕ )τ dτ⎠<br />

rdrdϕ<br />

0 0 0<br />

∫ γ ⎛ ⎞2<br />

∫h ∫r<br />

∫ γ ∫h ∫r<br />

⎜ ⎟<br />

= ⎝ ψ(σŝ ϕ )σdσ⎠<br />

rdrdϕ ≤<br />

0<br />

0<br />

0<br />

0<br />

0<br />

0<br />

γ<br />

∫r<br />

ψ 2 (σŝ ϕ )σdσ ·<br />

0<br />

S<br />

h<br />

σdσrdrdϕ<br />

1<br />

2<br />

.<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

5.3<br />

p. 501<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

5.3<br />

p. 502<br />

≤ 2<br />

1 0<br />

∫ γ ∫h<br />

0<br />

∫h<br />

ψ 2 (σŝ ϕ )σdσdϕ·<br />

0<br />

r 3 dr .<br />

Use|z ⊤ Ay| ≤ ‖A‖ F |z||y|,A ∈ R n,n ,z,y ∈ R n , and then apply Lemma 5.3.21 withy := x−a j ,<br />

τ = 1−ξ<br />

‖u−I 1 u‖ 2 L 2 (K) ≤ 3 8 h4 ∥<br />

K ∥∥D 2 ∥ ∥∥ 2<br />

u∥ , F L 2 (K) (5.3.22)<br />

∥<br />

with Frobenius matrix norm ∥D 2 u(x) ∥ 2 2∑<br />

F := ∂ 2 u<br />

2<br />

(x)<br />

(→ [18, Def. 6.5.24]),<br />

∣∂x i,j=1 i ∂x j ∣<br />

size of triangle h K := diamK := max{|p−q|: p,q ∈ K}<br />

Estimate <strong>for</strong> gradient: from (5.3.16) we infer the local integral representation <strong>for</strong>mula, which can also<br />

be obtained by taking the gradient of (5.3.19).<br />

3∑ 3∑<br />

gradI 1 u(x) = u(x) gradλ j (x) + (a j −x) ⊤ gradλ j (x)·gradu(x)+G(x) ,<br />

j=1<br />

} {{ }<br />

j=1<br />

} {{ }<br />

=0<br />

=I<br />

(<br />

3∑ ∫ )<br />

1<br />

with G(x) := (a j −x) ⊤ D 2 u(x+ξ(a j −x))(a j −x)(1−ξ)dξ gradλ j (x) .<br />

j=1<br />

0<br />

} {{ }<br />

cf. (5.3.20)<br />

Note that<br />

∑<br />

grad 3 λ j (x) = grad1 = 0 and<br />

j=1<br />

3∑<br />

3∑<br />

gradλ j (x)(a j −x) ⊤ = gradλ j (x)(a j ) ⊤ = grad ( ∑ 3 λ j (x)a j) = gradx = I .<br />

j=1<br />

j=1<br />

j=1<br />

(3.5.22) ➤ |gradλ j (x)| ≤ h K<br />

2|K| , x ∈ K . (5.3.23)<br />

‖grad(u−I 1 u)‖ 2 L 2 (K) ≤ h2 (5.3.22)<br />

K<br />

4|K| 2 ‖R‖2 L 2 (K)<br />

≤ 3 h 6 ∥∥ K ∥∥ ∥∥D<br />

84|K| 2 2 ∥ ∥∥ 2<br />

u∥ . F L 2 (K) (5.3.24)<br />

Summary of local interpolation error estimates <strong>for</strong> linear interpolation according to Def. 5.3.13:<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

5.3<br />

p. 50<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

5.3<br />

p. 50


✬<br />

✩<br />

Lemma 5.3.25 (Local interpolation error estimates <strong>for</strong> 2D linear interpolation).<br />

For any triangleK andu ∈ C 2 (K) the following holds<br />

‖u−I 1 u‖ 2 L 2 (K) ≤ 3 8 h4 ∥<br />

K ∥∥D 2 ∥ ∥∥ 2<br />

u∥ , F L 2 (K) (5.3.22)<br />

‖grad(u−I 1 u)‖ 2 L 2 (K) ≤ 24<br />

3 h 6 ∥∥ K ∥∥ ∥∥D 2 ∥ ∥∥ 2<br />

|K| 2 u∥ . F L 2 (K) (5.3.24)<br />

✫<br />

✪<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

ρ k small<br />

Fig. 150<br />

ρ k large<br />

Fig. 151<br />

ρ k large<br />

Fig. 152<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

New aspect compared to Sect. 5.3.1: shape ofK enters error bounds of Lemma 5.3.25.<br />

We aim to extract this shape dependence from the bounds.<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

The shape regularity measure ρ M is often used to gauge the quality of meshes produced by mesh<br />

generators.<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Final step: we add up the local estimates from Lemma 5.3.25 over all triangles of the mesh and take<br />

the square root.<br />

5.3<br />

p. 505<br />

✬<br />

✩<br />

5.3<br />

p. 50<br />

Definition 5.3.26 (Shape regularity measures).<br />

For a simplexK ∈ R d we define its shape regularity measure as the ratio<br />

ρ K := h d K : |K| ,<br />

and the shape regularity measure of a simplicial meshM = {K}<br />

ρ M := max<br />

K∈M ρ K .<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Theorem 5.3.27 (Error estimate <strong>for</strong> piecewise linear interpolation).<br />

For anyu ∈ C 2 (¯Ω)<br />

√<br />

‖u−I 1 u‖ L 2 (Ω) ≤ 38 h 2 ∥<br />

M∥∥D 2 ∥ ∥∥L<br />

u∥ , F 2 (Ω)<br />

√ ∥∥ ‖grad(u−I 1 u)‖ L 2 (Ω) ≤ 3 ∥∥ ∥∥D<br />

24 ρ M h 2 ∥ ∥∥L M u∥ . F 2 (Ω)<br />

✫<br />

✪<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Important:<br />

✗<br />

✖<br />

shape regularity measureρ K is an invariant of a similarity class of triangles.<br />

(= if a triangle is trans<strong>for</strong>med by scaling, rotation, and translation, the shape regularity measure does<br />

not change)<br />

➣<br />

Sloppily speaking,ρ K depends only on the shape, not the size ofK<br />

For triangleK: ρ K large ⇔ K “distorted” ⇔ K has small angles<br />

✔<br />

✕<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

5.3<br />

p. 506<br />

Remark 5.3.28 (Energy norm andH 1 (Ω)-norm).<br />

Objection!<br />

Well, Cea’s lemma Thm. 5.1.10 refers to the energy norm, but Thm. 5.3.27 provides<br />

estimates inH 1 (Ω)-norm only!<br />

☞ For uni<strong>for</strong>mly positive definite (→ Def. 2.1.11) and bounded coefficient tensorα : Ω ↦→ R d,d , cf.<br />

(2.1.8),<br />

∃0 < α − < α + : α − ‖z‖ 2 ≤ z T α(x)z ≤ α + ‖z‖ 2 ∀z ∈ R d , x ∈ Ω ,<br />

and the energy norm (→ Def. 2.1.27) induced by<br />

∫<br />

a(u,v) := (α(x)gradu)·gradvdx , u,v ∈ H0 1 (Ω) ,<br />

Ω<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

(5.1.6) 5.3<br />

p. 50


we immediately find the equivalence (= two-sided uni<strong>for</strong>m estimate)<br />

√<br />

α − |v| H 1 (Ω) ≤ ‖v‖ a ≤ √ α + |v| H 1 (Ω) . (5.3.29)<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Reassuring: Again, it is only the norms‖u‖ H m (Ω) that matter <strong>for</strong> us !<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Thus, interpolation error estimates in |·| H 1 (Ω) immediately translate into estimates in terms of the<br />

energy norm.<br />

5.3.3 The Sobolev scales<br />

Bounds in Thm. 5.3.27 involve<br />

∥ ∥<br />

∥∥D 2 ∥∥L<br />

u∥ F 2 (Ω)<br />

measures smoothness ofu<br />

△<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Now, we have come across an additional purpose of Sobolev spaces and their norms:<br />

✗<br />

✖<br />

provide framework <strong>for</strong><br />

variational <strong>for</strong>mulation of<br />

Sobolev scale:<br />

elliptic BVP<br />

(→ Sect. 2.2)<br />

Sobolev<br />

spaces<br />

... ⊂ H 3 (Ω) ⊂ H 2 (Ω) ⊂ H 1 (Ω) ⊂ L 2 (Ω)<br />

provide norms‖·‖ H m (Ω) that<br />

measure smoothness of<br />

functions<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

✔A. Chern<br />

✕<br />

DRAFT<br />

➡<br />

Norms of this type are a tool to measure the smoothness of functions (that usually are solutions<br />

of elliptic BVP):<br />

Observation:<br />

bounds in Thm. 5.3.27 = “principal parts” of Sobolev norms, that is, the parts containing<br />

the highest partial derivatives.<br />

5.3<br />

p. 509<br />

5.3<br />

p. 51<br />

Definition 5.3.30 (Higher order Sobolev spaces/norms).<br />

Them-th order Sobolev norm,m ∈ N 0 , <strong>for</strong>u : Ω ⊂ R d ↦→ R (sufficiently smooth) is defined by<br />

‖u‖ 2 m H m (Ω) := ∑ ∑<br />

∫<br />

|D α u| 2 dx , where D α ∂ |α| u<br />

u :=<br />

k=0α∈N d Ω<br />

∂x α .<br />

1<br />

,|α|=k<br />

1 ···∂xα d<br />

d<br />

Sobolev space H m (Ω) := {v : Ω ↦→ R: ‖v‖ H m (Ω) < ∞} .<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Definition 5.3.31 (Higher order Sobolev semi-norms).<br />

Them-th order Sobolev semi-norm,m ∈ N, <strong>for</strong> sufficiently smoothu : Ω ↦→ R is defined by<br />

|u| 2 H m (Ω) :=<br />

∑<br />

∫<br />

|D α u| 2 dx .<br />

α∈N d Ω<br />

,|α|=m<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Recall: multiindex notation (3.3.4), (3.3.5)<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Elementary observation: |p| H m (Ω) = 0 ⇔ p ∈ P m−1(R d )<br />

By density arguments we can rewrite the interpolation error estimates of Thm. 5.3.27 in<br />

terms of Sobolev semi-norms:<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

✬<br />

✩<br />

Gripe (→ Sect. 2.2): Don’t bother me with these Sobolev spaces !<br />

Corollary 5.3.32 (Error estimate <strong>for</strong> piecewise linear interpolation in 2D).<br />

Under the assumptions/with notations of Thm. 5.3.27<br />

Response: Well, these concepts are pervasive in the numerical analysis literature and you have to<br />

be familiar with them.<br />

5.3<br />

p. 510<br />

✫<br />

√<br />

‖u−I 1 u‖ L 2 (Ω) ≤ 38 h 2 M |u| H 2 (Ω)<br />

√ ,<br />

∀u ∈ H 2 (Ω) .<br />

|u−I 1 u| H 1 (Ω) ≤ 3<br />

24 ρ M h M |u| H 2 (Ω) ,<br />

✪<br />

5.3<br />

p. 51


<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

We will try to find this out experimentally by computing the best possible constants in the estimates<br />

‖u−I 1 u‖ L 2 (K) ≤ C K,2h 2 k ‖u‖ H 2 (K) , ‖u−I 1u‖ H 1 (K) ≤ C Kh K ‖u‖ H 2 (K) .<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Remark 5.3.33 (Continuity of interpolation operators).<br />

Apply△-inequality to estimates of Cor. 5.3.32:<br />

Note: Merely translating, rotating, or scalingK does not affect the constantsC K,2 andC K . There<strong>for</strong>e,<br />

we can restrict ourselves to “canonical triangles”. Every general triangle can be mapped to one<br />

of these by translating, rotating, and scaling.<br />

‖I 1 u‖ L 2 (Ω) ≤ ‖u‖ L 2 (Ω) + √<br />

38 h 2 M |u| H 2 (Ω) ≤ 2‖u‖ H 2 (Ω) , (5.3.34)<br />

if lengths are scaled such that h M ≤ 1. Estimate (5.3.34) means that I 1 : H 2 (Ω) ↦→ L 2 (Ω) is a<br />

continuous linear mapping.<br />

The same conclusion could have been drawn from the following fundamental result:<br />

✬<br />

Theorem 5.3.35 (Sobolev embedding theorem).<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

✩<br />

‖u−I 1 u‖ L<br />

C K,2 := sup<br />

2 (K)<br />

u∈H 2 (K)\{0} ‖u‖ H 2 (K)<br />

on triangleK := convex{ (00 ) ,<br />

( 10 ) ,<br />

( px<br />

p y<br />

) } .<br />

‖u−I 1 u‖ H<br />

, C K := sup<br />

1 (K)<br />

,<br />

u∈H 2 (k)\{0} ‖u‖ H 2 (K)<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

m > d 2<br />

✫<br />

⇒ H m (Ω) ⊂ C 0 (Ω) ∧ ∃C = C(Ω) > 0: ‖u‖ ∞ ≤ C‖u‖ H m (Ω) ∀u ∈ H m (Ω) .<br />

✪<br />

On the other handI 1 : H 1 (Ω) ↦→ L 2 (Ω) is not continuous, as we learn from Rem. 2.3.16.<br />

5.3.4 Anisotropic interpolation error estimates<br />

△<br />

5.3<br />

p. 513<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Sampling the space of “canonical” triangles<br />

(modulo similarity)<br />

5.3<br />

p. 51<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

0 ≤ p x ,p y ≤ 1 .<br />

OPTIONAL SECTION<br />

Triangular cells with “bad shape regularity” (ρ K “large”): very small/large angles:<br />

0<br />

p x<br />

p y<br />

K<br />

1<br />

+ <strong>Numerical</strong> computation ofC K ,C K,2<br />

implementation by A. Inci (spectral polynomial<br />

Galerkin method)<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

DRAFT<br />

The estimates of Lemma 5.3.25 might suggest that we face huge local interpolation errors, once ρ K<br />

becomes large.<br />

Issue: are the estimates of Lemma 5.3.25 sharp ?<br />

5.3<br />

p. 514<br />

5.3<br />

p. 51


<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

y<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

0.18<br />

0.16<br />

0.14<br />

0.12<br />

0.1<br />

C K,2<br />

0.08<br />

0.06<br />

0.04<br />

0.02<br />

0<br />

1<br />

1<br />

0.8<br />

0.8<br />

0.6<br />

0.6<br />

0.4<br />

0.4 p px<br />

y<br />

0.2<br />

0.2<br />

0 0<br />

Fig. 153<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Fig. 156<br />

The interpolant becomes steeper and steeper ash → 0:<br />

h<br />

1 x<br />

{ (00 ) (<br />

triangle K := convex , 10 ) ( 1/2 ) } ,<br />

h<br />

, h > 0,<br />

u(x,y) = x(1−x),0 < x < 1.<br />

✁ linear interpolant ofuonK ash → 0<br />

‖u‖ 2 H 2 (K) = 3031<br />

1440 h , ‖u−I 1u‖ 2 H 1 (K) = 29<br />

2880 h+ 1<br />

12 h+ 1<br />

32 h−1 , ‖u−I 1 u‖ 2 L 2 (K) = 29<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

R. Hiptm<br />

DRAFT<br />

2889 h<br />

5.3<br />

p. 517<br />

5.3<br />

p. 51<br />

14<br />

5<br />

4.5<br />

4<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

‖u−I 1 u‖ 2 H 1 (K)<br />

‖u‖ 2 H 2 (K)<br />

≥ 269<br />

6062 + 45<br />

3031 h−2 ,<br />

‖u−I 1 u‖ 2 L 2 (K)<br />

‖u‖ 2 H 2 (K)<br />

= 29<br />

6062 .<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

12<br />

3.5<br />

10<br />

8<br />

3<br />

log(C K<br />

)<br />

2.5<br />

Example 5.3.36 (Good accuracy on “bad” meshes).<br />

C K<br />

Fig. 154 0<br />

6<br />

2<br />

1.5<br />

4<br />

1<br />

2<br />

0.5<br />

0<br />

1<br />

0.8<br />

0.6<br />

p x<br />

0.4<br />

0.2<br />

0<br />

1<br />

0.8<br />

0.6<br />

p y<br />

0.4<br />

0.2<br />

0<br />

0<br />

1<br />

0.8<br />

p x<br />

0.6<br />

0.4<br />

0.2<br />

1<br />

0.8<br />

0.6<br />

0<br />

0.2<br />

0.4<br />

R. Hiptmair<br />

p y<br />

C. Schwab,<br />

Fig. 155 H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Ω =]0,1[ 2 , u(x 1 ,x 2 ) = sin(πx 1 )sin(πx 2 ), BVP −∆u = f, u |∂Ω = 0, finite element Galerkin<br />

discretization on triangular meshes,V N = S 0 1,0 (M).<br />

☞<br />

meshes created by random distortion of tensor product grids<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

5.3<br />

p. 518<br />

5.3<br />

p. 52


1<br />

2D triangular mesh<br />

1<br />

2D triangular mesh<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Example 5.3.37 (Gap between interpolation error and best approximation error).<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

0.9<br />

0.9<br />

0.8<br />

0.7<br />

0.8<br />

0.7<br />

Ex. 5.3.36 raises doubts whether the interpolation error can be trusted to provide good, that is, reasonably<br />

sharp bounds <strong>for</strong> the best approximation error.<br />

0.6<br />

0.6<br />

0.5<br />

0.4<br />

0.3<br />

0.2<br />

0.5<br />

0.4<br />

0.3<br />

0.2<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

In this example we will see that<br />

inf ‖u−v N ‖ 1 ≪ ∥ ∥u−I p u ∥ v N ∈Sp(M)<br />

0 H 1 (Ω)<br />

is possible !<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

0.1<br />

0.1<br />

DRAFT<br />

DRAFT<br />

0<br />

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1<br />

# Vertices : 41, # Elements : 64, # Edges : 56 Fig. 157<br />

0<br />

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1<br />

# Vertices : 145, # Elements : 256, # Edges : 208Fig. 158<br />

h<br />

δ<br />

h<br />

δ<br />

Elementary cell of “bad mesh”M bad<br />

Elementary cell of “good mesh”M good<br />

5.3<br />

p. 521<br />

5.3<br />

p. 52<br />

H 1 seminnorm error [log]<br />

H 1 seminnorm errors against minimum angles<br />

10 0<br />

10 −1<br />

145 nodes<br />

545 nodes<br />

2113 nodes<br />

8321 nodes<br />

33025 nodes<br />

H 1 seminnorm error [log]<br />

H 1 seminnorm errors against maximum angles<br />

10 0<br />

10 −1<br />

145 nodes<br />

545 nodes<br />

2113 nodes<br />

8321 nodes<br />

33025 nodes<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Yet,<br />

‖u−I 1 u‖ H<br />

On “bad” mesh : sup<br />

1 (Ω)<br />

→ ∞ ash/δ → ∞,<br />

u∈H 2 (Ω) ‖u‖ H 2 (Ω)<br />

‖u−I 1 u‖ H<br />

On “good” mesh : sup<br />

1 (Ω)<br />

uni<strong>for</strong>mly bounded inh/δ.<br />

u∈H 2 (Ω) ‖u‖ H 2 (Ω)<br />

inf ‖u−v N ‖<br />

v N ∈S1 0 H (M bad)<br />

1 (Ω) ≤<br />

inf ‖u−v N ‖<br />

v N ∈S1 0 H (M good)<br />

1 (Ω) ∀u ∈ H 2 (Ω) .<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

10 −2<br />

Fig. 159<br />

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8<br />

Minimum angle<br />

10 −2<br />

1.6 1.8 2 2.2 2.4 2.6 2.8 3 3.2<br />

Maximum angle<br />

Fig. 160<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

✸<br />

Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

DRAFT<br />

Monitored: <strong>for</strong> different mesh resolutions, H 1 (Ω)-seminorm of discretization error as function of<br />

smallest/largest angle in the mesh.<br />

5.3.5 General approximation error estimates<br />

Observation: Accuracy does not suffer much from distorted elements !<br />

✸<br />

5.3<br />

p. 522<br />

In Sect. 5.3.2 we only examined the behavior of norms of the interpolation error <strong>for</strong> piecewise linear<br />

R.<br />

interpolation intoS1 0 (M), that is, the case of Lagrangian finite elements of degreep = 1.<br />

5.3<br />

p. 52


However, Ex. 5.2.2 sent the clear message that quadratic Lagrangian finite elements achieve faster<br />

convergence of the energy norm of the Galerkin discretization error, see Fig. 137, 138.<br />

⇕<br />

On the other hand quadratic finite elements could not deliver faster convergence in Ex. 5.2.6.<br />

In this section we learn about theoretical results that shed light on these observations and extend the<br />

results of Sect. 5.3.2.<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

whereb l N<br />

are the nodal basis functions.<br />

(3.4.3) ⇒ I p (u)(p l ) = u(p l ) , l = 1,...,N (Interpolation!) .<br />

By virtue of the location of the interpolation nodes, see Ex. 3.4.2, Ex. 3.4.5, and Fig. 103, the nodal<br />

interpolation operators are purely local:<br />

Q∑<br />

∀K ∈ M: I p u |K = u(q K i )bK i , (5.3.40)<br />

i=1<br />

q K i ,i = 1,...,Q = local interpolation nodes in cellK ∈ M, see Ex. 3.4.2, Ex. 3.4.5, and Fig. 103,<br />

b K i ,i = 1,...,Q = local shape functions: bK i (qK j ) = δ ij.<br />

△<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Remark 5.3.38 (L ∞ interpolation error estimate in 1D).<br />

The faster convergence of quadratic Lagrangian FE in Ex. 5.2.2 does not come as a surprise: recall<br />

the esimtate from [18, Eq. 9.4.6]:<br />

∥<br />

∥u−I p u ∥ L ∞ ([a,b]) ≤ hp+1<br />

M ∥<br />

∥u (p+1)∥ ∥ ∥L<br />

(p+1)! ∞ ([a,b])<br />

∀u ∈ C p+1 ([a,b]) ,<br />

whereI p u is theM-piecewise polynomial interpolant ofuof local degreep. It generalizes (5.3.5).<br />

➣<br />

∥<br />

∥u−I p u ∥ ∥ L ∞ ([a,b]) = O(hp+1 M ) !<br />

Remark 5.3.39 (Local interpolation onto higher degree Lagrangian finite element spaces).<br />

M: triangular/tetrahedral/quadrilateral/hybrid mesh of domainΩ(→ Sect. 3.3.1)<br />

Recall (→ Sect. 3.4): nodal basis functions of p-th degree Lagrangian finite element space S 0 p(M)<br />

defined via interpolation nodes, cf. (3.4.3).<br />

△<br />

5.3<br />

p. 525<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Example 5.3.41 (Piecewise quadratic interpolation). → Ex. 3.4.2<br />

triangleK =convex{a 1 ,a 2 ,a 3 },p = 2<br />

⇒ local quadratic interpolation:<br />

3∑<br />

I 2 u |K = − λ i (1−2λ i )u(a i )<br />

i=1<br />

+ ∑<br />

4λ i λ j u( 1 2 (ai +a j )) .<br />

1≤i


✬<br />

✩<br />

Theorem 5.3.42 (Best approximation error estimates <strong>for</strong> Lagrangian finite elements).<br />

Let Ω ⊂ R d , d = 1,2,3, be a bounded polygonal/polyhedral domain equipped with a mesh M<br />

consisting of simplices or parallelepipeds. Then, <strong>for</strong> each k ∈ N, there is a constant C > 0<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

A priori error estimates like (5.3.46) exhibit only the trend of the (norm of) the discretization<br />

error as discretization parametersh M (mesh width),p(polynomial degree) are varied.<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

depending only onk and the shape regularity measureρ M such that<br />

✫<br />

( hM<br />

inf N ‖<br />

v N ∈Sp(M)‖u−v 0 H 1 (Ω) ≤ C p<br />

) min{p+1,k}−1<br />

‖u‖ H k (Ω) ∀u ∈ H k (Ω) . (5.3.43)<br />

✪<br />

△<br />

This theorem is a typical example of finite element analysis results that you can find in the literature. It<br />

is important to know what kind of in<strong>for</strong>mation can be gleaned from statements like that of Thm. 5.3.42.<br />

Remark 5.3.44 (“Generic constants”).<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Remark 5.3.47. The estimate of Thm. 5.3.42 is sharp: the powers ofh M andpcannot be increased.<br />

△<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

A statement like (5.3.43) is typical of a priori error estimates in the numerical analysis literature, which<br />

often come in the <strong>for</strong>m<br />

where<br />

‖u−u N ‖ X ≤ C · “discretization parameter”·‖u‖ Y ,<br />

C > 0 is not specified precisely or only claimed to exist (though, in principle, they<br />

could be computed),<br />

C must neither depend on the exact solutionunor the discrete solutionu N ,<br />

the possible dependence ofC on problem parameters or discretization paramters has<br />

Such constantsC > 0 are known as generic constants. Customarily, different generic constants are<br />

even denoted by the same symbol (“C” is most common).<br />

△<br />

5.3<br />

p. 529<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

What do Thm. 5.3.42, (5.3.46), tell us about the efficiency of a Lagrangian finite element Galerkin<br />

discretization of a 2nd-order elliptic BVP?<br />

Question 5.3.48. What computational ef<strong>for</strong>t buys us what error (measured in energy norm)?<br />

Bad luck (→ Rem. 5.3.45):<br />

actual error norm remains elusive! There<strong>for</strong>e, rephrase the question so<br />

that it fits the available in<strong>for</strong>mation about the effect of changing discretization parameters on the error:<br />

5.3<br />

p. 53<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Remark 5.3.45 (Nature of a priori estimates). → Sect. 1.6.2<br />

Question 5.3.49. What increase in computational ef<strong>for</strong>t buys us a presribed decrease of the (energy<br />

norm of the) error?<br />

Cea’s lemma, Thm. 5.1.10<br />

➣ Thm. 5.3.42 implies a priori estimates of the energy norm of the<br />

finite element Galerkin discretization error (see also Rem. 5.3.28) of<br />

the <strong>for</strong>m<br />

( hM<br />

‖u−u N ‖ a ≤ C<br />

p<br />

) min{p+1,k}−1<br />

‖u‖ H k (Ω) , (5.3.46)<br />

whereuis the exact solution of the discretized 2nd-order elliptic boundary value problem.<br />

Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

The answer to this question offers an a priori gauge of the asymptotic efficiency of a discretization<br />

method.<br />

Convention:<br />

computational ef<strong>for</strong>t≈number of unkonwnsN = dimS 0 p(M) (problem size)<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

(5.3.46) does not give concrete in<strong>for</strong>mation about‖u−u N ‖ a , because<br />

Framework:<br />

familyMof simplicial meshes of domainΩ ⊂ R d ,d = 1,2,3, created by<br />

global regular refinement of a single initial mesh<br />

we do not know the value of the “generic constant”C > 0, see Rem. 5.3.44,<br />

R.<br />

asuis unknown, a bound <strong>for</strong>‖u‖ H k (Ω)<br />

may not be available.<br />

5.3<br />

p. 530<br />

5.3<br />

p. 53


Global regular refinement of a simplicial mesh (→ Ex. 5.1.12)<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

with constants hidden in≈depending onρ M only.<br />

✸<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

avoids greater distortion of “child cells” w.r.t. their parents,<br />

spawns meshes with fairly uni<strong>for</strong>m sizeh K of cells.<br />

Now, we merge (5.3.46) and (5.3.50):<br />

∃C > 0: ρ M ≤ C ,<br />

∃C > 0: max{h K /h K ′, K,K ′ ∈ M} ≤ C ,<br />

∀M ∈ M .<br />

Now, <strong>for</strong> meshes ∈ M, we investigate “N-dependence”, N = dimS 0 p(M), of energy norm of finite<br />

element discretization error:<br />

Counting argument<br />

N = dimS 0 p(M) ≈ p d h −d<br />

M ⇒ h M<br />

p ≈ N−1/d . (5.3.50)<br />

dimensions of local spaces, Lemma 3.3.6<br />

∼ ♯M ∼ ♯V(M),E(M) etc.<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

u ∈ H k (Ω)<br />

Thm. 5.3.42<br />

⇒<br />

withC > 0 depending only ond,p,k, andρ M .<br />

inf ‖u−v N ‖<br />

v N ∈Sp 0 H (M) 1 (Ω) ≤ CN−min{p,k−1} d ‖u‖ H k (Ω) , (5.3.53)<br />

(5.3.53) ➣ algebraic convergence (→ Def. 1.6.20) in problem size<br />

We observe that<br />

(rate<br />

min{p,k −1}<br />

)<br />

d<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Notation:<br />

≈ ˆ= equivalence up to constants only depending onγ (in M γ ),Ω<br />

5.3<br />

p. 533<br />

the rate of convergence is limited by the polynomial degreepof the Lagragian FEM,<br />

5.3<br />

p. 53<br />

Example 5.3.51 (Dimensions of Lagrangian finite element spaces on triangular meshes).<br />

d = 2: <strong>for</strong> triangular meshesM, by Lemma 3.3.6<br />

dimS 0 p(M) = ♯{nodes(M)}+♯{edges(M)}(p−1)+♯M 1 2 (p−1)(p−2) .<br />

1 basis function per vertex<br />

p−1 basis functions per edge<br />

1<br />

2 (p−1)(p−2) “interior” basis functions<br />

Geometric considerations: the number of triangles sharing a vertex can be bounded in terms ofρ M ,<br />

becauseρ M implies a lower bound <strong>for</strong> the smallest angles of the triangular cells.<br />

∃C = C(ρ M ): ♯{K j ∈ M: K i ∩K j ≠ ∅} ≤ C (i = 1,2,...,#.M) .<br />

If every vertex belongs only to a small number of triangles, the number♯{nodes(M)} can be bounded<br />

byC ·♯M, whereC > 0 will depend onρ M only. The same applies to the edges.<br />

♯{nodes(M)},♯{edges(M)} ≈ ♯M .<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

the rate of convergence is limited by the smoothness of the exact solutionu, measured by means<br />

of the Sobolev indexk, see Sect. 5.3.3,<br />

the rate of convergence will be worse <strong>for</strong> d = 3 than <strong>for</strong> d = 2, the effect being more pronounced<br />

<strong>for</strong> smallk orp.<br />

Answer to Question 5.3.49:<br />

Assumption:<br />

✬<br />

✫<br />

a priori error estimate (5.3.53) is sharp<br />

∃C = C(u,...) > 0: error norm(N) ≈ CN −min{p,k−1} d ∀M ∈ M .<br />

(<br />

error norm(N 1 )<br />

) min{p,k −1}<br />

N1<br />

−<br />

error norm(N 2 ) ≈ d .<br />

N 2<br />

reduction of (the energy norm of)<br />

the error by a factorρ > 1<br />

requires<br />

increase of the problem size<br />

d<br />

by factorρmin{p,k−1}<br />

✩<br />

✪<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

dimS 0 p(M) ≈ (♯M)p 2 , (5.3.52)<br />

5.3<br />

p. 534<br />

5.3<br />

p. 53


increase in problem size (factor)<br />

error ρ<br />

d = 2, u∈ H 6 (Ω)<br />

p = 1<br />

p = 2<br />

p = 3<br />

10 12<br />

p = 4<br />

p = 5<br />

10 10<br />

10 8<br />

10 6<br />

10 4<br />

10 2<br />

10 0<br />

10 0 10 1 10 2 10 3 10 4 10 5 10 6 10 7<br />

reduction factor Fig. 161<br />

10 14<br />

exact solutionu ∈ H 6 (Ω)<br />

10<br />

8<br />

6<br />

4<br />

2<br />

0<br />

0<br />

2<br />

4<br />

6<br />

8<br />

5<br />

10<br />

10<br />

15<br />

20<br />

smoothness index k: u∈ H k (Ω)<br />

polynomial degree p<br />

log(increase in problem size)<br />

error reduction by factorρ = 100<br />

0<br />

Fig. 162<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Note:<br />

arbitrarily fast (super-)algebraic convergence <strong>for</strong> very smooth solutionsu ∈ C ∞ (Ω)<br />

5.4 Elliptic regularity theory<br />

Crudely speaking, in Sect. 5.3.5 we saw that the asymptotic behavior of the Lagrangian finite element<br />

Galerkin discretization error (<strong>for</strong> 2nd-order elliptic BVPs) can be predicted provided that<br />

△<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Discussion: Solutionu ∈ H k (Ω) ➣ optimal asymptotic efficiency <strong>for</strong>p = k −1<br />

• we use families of meshes, whose cells have rather uni<strong>for</strong>m size and whose<br />

shape regularity measure is uni<strong>for</strong>mly bounded,<br />

Remark 5.3.54 (General asymptotic estimates).<br />

5.3<br />

p. 537<br />

• we have an idea about the smoothness of the exact solution u, that is, we knowu ∈ H k (Ω) <strong>for</strong> a<br />

(maximal)k, see Thm. 5.3.42.<br />

5.4<br />

p. 53<br />

Recall (→ Sect. 1.6.2):<br />

convergence is an asymptotic notion<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Knowledge about the mesh can be taken <strong>for</strong> granted, but<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Now we deduce asymptotic estimates <strong>for</strong> the best approximation errors from Thm. 5.3.42, and<br />

(5.3.53), in particular, <strong>for</strong> the caseN → ∞:<br />

• h-refinement: p fixed,h M → 0 <strong>for</strong>M ∈ M:<br />

(5.3.53) ⇒ algebraic convergence w.r.t. N<br />

☞ p ≤ k −1 inf ‖u−v N ‖ 1 = O(N −p/d ) (5.3.55)<br />

v N ∈Sp(M)<br />

0<br />

☞ k ≤ p+1 inf ‖u−v N ‖ 1 = O(N −(k−1)/d ) (5.3.56)<br />

v N ∈Sp(M)<br />

0<br />

Note:<br />

<strong>for</strong> very smooth solutionu, i.e. k ≫ 1, polynomial degreeplimits speed of convergence<br />

• p-refinement: M ∈ M fixed,p → ∞:<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

how can we guess the smoothness of the (unknown !) exact solutionu?<br />

A (partial) answer is given in this section.<br />

Focus:<br />

Scalar 2nd-order elliptic BVP with homogeneous Dirichlet boundary conditions<br />

−div(σ(x)gradu) = f inΩ , u = g on∂Ω .<br />

To begin with, we summarize the available in<strong>for</strong>mation:<br />

➣ Known: u solves BVP + In<strong>for</strong>mtion about coefficientσ, domain<br />

Ω, source functionf, boundary datag<br />

} {{ }<br />

u will belong to a certain class of functions (e.g. subspaceS ⊂ V )<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

☞ p large inf ‖u−v N ‖ 1 = O(N −(k−1)/d ) (5.3.57)<br />

v N ∈Sp(M)<br />

0<br />

5.3<br />

p. 538<br />

5.4<br />

p. 54


Example 5.4.1 (Elliptic lifting result in 1D).<br />

d = 1,Ω =]0,1[, coefficientσ ≡ 1, homogeneous Dirichlet boundary conditions:<br />

u ′′ = f , u(0) = u(1) = 0 .<br />

Obvious: f ∈ H k (Ω) ⇒ u ∈ H k+2 (Ω) (a lifting theorem)<br />

Can this be generalized to higher dimensionsd > 1?<br />

Partly so:<br />

✸<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

What about non-smooth∂Ω ?<br />

c 4<br />

ω 4<br />

c 3 c 5 These are very common in engineering applications<br />

(“CAD-geometries”).<br />

3 ω<br />

ω 5<br />

✁ polygonal domain with cornersc i<br />

c 2 ω 2<br />

How will the corners affect the smoothness of solutions<br />

of<br />

c 1 ω<br />

ω 6 c 6<br />

1 u ∈ H0 1 (Ω): ∆u = f ∈ C∞ (Ω)?<br />

Example 5.4.3 (Conrner singular functions).<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

✬<br />

✩<br />

5.4<br />

p. 541<br />

5.4<br />

p. 54<br />

Theorem 5.4.2 (Smooth elliptic lifting theorem).<br />

If∂Ω isC ∞ -smooth, ie. possesses a local parameterization byC ∞ -functions, andσ ∈ C ∞ (Ω),<br />

then, <strong>for</strong> anyk ∈ N,<br />

✫<br />

u ∈ H0 1 (Ω) and −div(σgradu)<br />

∈ Hk (Ω)<br />

u ∈ H 1 (Ω) , −div(σgradu) ∈ H k (Ω) and<br />

In addition, <strong>for</strong> suchuthere isC = C(k,Ω,σ) such that<br />

‖u‖ H k+2 (Ω) ≤ C‖div(σgradu)‖ H k (Ω) .<br />

⇒ u ∈ H k+2 (Ω) .<br />

gradu·n = 0 on∂Ω<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

✪H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

c<br />

ϕ<br />

Ω<br />

ϕ = ω r<br />

ϕ = 0<br />

Fig. 163<br />

corner singular function<br />

u s (r,ϕ) = rω π sin( π ϕ) , (5.4.4)<br />

ω<br />

r ≥ 0 , 0 ≤ ϕ ≤ ω .<br />

(in local polar coordinates)<br />

u s = 0 on∂Ω locally atc!<br />

Straight<strong>for</strong>ward computation: ∆u s = 0 in Ω !<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

5.4<br />

p. 542<br />

To see this recall:<br />

∆ in polar coordinates:<br />

∆u = 1 ∂<br />

r∂r (r∂u ∂r )+ 1 ∂ 2 u<br />

r 2 ∂ϕ 2 . (5.4.5)<br />

=⇒ ∆u s (r,ϕ)= 1 ∂<br />

(r π r∂r<br />

ω rπ ω −1 sin( π )<br />

ω ϕ) + 1 ∂<br />

r 2rπ ω<br />

∂ϕ cos(π ω ϕ)π ω<br />

( π<br />

) 2r π<br />

= ω −2 π<br />

( π<br />

) 2r sin(<br />

ω ω ϕ)− π<br />

ω −2 π sin(<br />

ω ω ϕ) = 0 .<br />

(5.4.4)<br />

5.4<br />

p. 54


What is “singular” about these functions? Plot them <strong>for</strong>ω = 3π 2 , cf. Ex. 5.2.6<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

✸<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Bad news: With the exeption of concocted examples,<br />

corner singular functions like (5.4.4) will be present in the solution of linear scalar<br />

2nd-order elliptic BVP on polygonal domains!<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

The meaning of “being present” is elucidated in the following theorem:<br />

Fig. 164<br />

Fig. 165<br />

u s <strong>for</strong> ω = 3π 2<br />

‖gradu s ‖ <strong>for</strong>ω = 3π 2<br />

Recall gradient (2.3.19) in polar coordinates<br />

gradu = ∂u<br />

∂r e r + 1 ∂u<br />

r∂ϕ e ϕ . (2.3.19)<br />

(5.4.4)<br />

=⇒ gradu s (r,ϕ) = π ω rπ ω −1( sin( ω πϕ)e r +cos( ω πϕ)) e ϕ .<br />

ω > π (“re-entrant corner”) =⇒ “gradu s (0) = ∞”<br />

How does this “blow-up” of the gradient affect the Sobolev regularity (that is, the smoothness as<br />

expressed through “u s ∈ H k (Ω)”) of the corner singular functionu s ?<br />

We try to compute|u| H 2 (D), with (in polar coordinates, see Fig. 163)<br />

By tedious computations we find<br />

D := {(r,ϕ):0 < r < 1, 0 < ϕ < ω} .<br />

ω > π ⇒<br />

Def. 5.3.30<br />

=⇒<br />

∫<br />

∥<br />

∥D 2 u s (r,ϕ) ∥ 2<br />

D F rd(r,ϕ) = ∞ .<br />

{<br />

ω > π ⇒ u s ∉H 2 }<br />

(D) .<br />

5.4<br />

p. 545<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

5.4<br />

p. 546<br />

✬<br />

Theorem 5.4.6 (Corner singular function decomposition).<br />

Let Ω ⊂ R 2 be a polygon with J corners c i . Denote the polar coordinates in the corner c i by<br />

(r i ,ϕ i ) and the inner angle at the corner c i by ω i . Additionally, let f ∈ H l (Ω) with l ∈ N 0 and<br />

l ≠ λ ik −1, where theλ ik are given by the singular exponents<br />

Thenu ∈ H0 1 (Ω) with−∆u = f inΩcan be decomposed<br />

✫<br />

λ ik = kπ<br />

ω i<br />

<strong>for</strong>k ∈ N . (5.4.7)<br />

J∑<br />

u = u 0 ∑<br />

+ ψ(r i ) κ ik s ik (r i ,ϕ i ) , κ ik ∈ R , (5.4.8)<br />

i=1 λ ik


★<br />

✧<br />

✬<br />

✫<br />

Ω ⊂ R 2 has re-entrant corners ⇒<br />

ifusolves∆u = f inΩ,u = 0 on∂Ω,<br />

thenu ∉ H 2 (Ω) in general.<br />

Theorem 5.4.10 (Elliptic lifting theorem on convex domains).<br />

If Ω ⊂ R d convex,u ∈ H0 1(Ω),∆u ∈ L2 (Ω) ⇒ u ∈ H 2 (Ω).<br />

✥<br />

✦<br />

✩<br />

✪<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Variational crime = replacing (exact) discrete (linear) variational problem<br />

with perturbed variational problem<br />

u N ∈ V 0,N : a(u N ,v N ) = f(v N ) ∀v N ∈ V 0,N , (3.1.4)<br />

ũ N ∈ V 0,N : a N (ũ N ,v N ) = f N (v N ) ∀v N ∈ V 0,N . (5.5.1)<br />

perturbation of Galerkin solutionu N ➥ perturbed solutionũ N ∈ V 0,N<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Terminology: if conclusion of Thm. 5.4.10 true → Dirichlet problem 2-regular.<br />

Similar lifting theorems also hold <strong>for</strong> Neumann BVPs, BVPs with smooth coefficients.<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Approximationsa N (·,·) ≈ a(·,·),f N (·) ≈ f(·) due to<br />

• use of numerical quadrature → Sect. 3.5.4,<br />

• approximation of boundary∂Ω → Sect. 3.6.4.<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

We are all sinners! Variational crimes are inevitable in practical FEM, recall Rem. 1.5.3!<br />

Remark 5.4.11 (Causes <strong>for</strong> non-smoothness of solutions of elliptic BVPs).<br />

Causes <strong>for</strong> poor Sobolev regularity of solutionuof BVPs <strong>for</strong>−div(σ(x)gradu) = f:<br />

5.4<br />

p. 549<br />

Which “variational petty crimes” can be tolerated?<br />

5.5<br />

p. 55<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Guideline 5.5.2. Variational crimes must not affect (type and rate) of asymptotic convergence!<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

• Corner of∂Ω, see above<br />

• Discontinuities ofσ<br />

→ singular functions at “material corners”<br />

• Mixed boundary conditions<br />

• Non-smooth source functionf<br />

σ(x) ≡ σ 2<br />

σ(x) ≡ σ 1<br />

c<br />

σ(x) ≡ σ 3<br />

“material corner” atc<br />

△<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

5.5.1 Impact of numerical quadrature<br />

Model problem: on polygonal/polyhedralΩ ⊂ R d :<br />

∫<br />

∫<br />

u ∈ H0 1 (Ω): a(u,v) := σ(x)gradu·gradvdx = f(v) := fvdx . (5.5.3)<br />

Ω<br />

Ω<br />

Assumptions: σ satisfies (2.5.4), σ ∈ C 0 (Ω),f ∈ C 0 (Ω)<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

• Galerkin finite element discretization,V N := S 0 p(M) on simplicial meshM<br />

5.5 Variational crimes<br />

5.5<br />

p. 550<br />

• Approximate evaluation ofa(u N ,v N ),f(v N ) by a fixed stable local numerical quadrature rule<br />

(→ Sect. 3.5.4)bigskip<br />

➤ perturbed bilinear <strong>for</strong>ma N , right hand sidef N (see (5.5.1))<br />

5.5<br />

p. 55


Focus: h-refinement (key discretization parameter is the mesh widthh M )<br />

Example 5.5.4 (Impact of numerical quadrature on finite element discretization error).<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Finite element theory [8, Ch. 4,§4.1] tells us that the Guideline 5.5.2 can be met, if the<br />

local numerical quadrature rule has sufficiently high order. The quantitative results can be condensed<br />

into the following rules of thumb:<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Ω =]0,1[ 2 ,σ ≡ 1,f(x,y) = 2π 2 sin(πx)sin(πy),(x,y) T ∈ Ω<br />

‖u−u N ‖ 1 = O(h p M ) at best Quadrature rule of order2p−1 sufficient <strong>for</strong>f N .<br />

➢ solution u(x,y) = sin(πx)sin(πy),g = 0.<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

‖u−u N ‖ 1 = O(h p M ) at best Quadrature rule of order2p−1 sufficient <strong>for</strong>a N.<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

Details of numerical experiment:<br />

DRAFT<br />

DRAFT<br />

• Quadratic Lagrangian FE (V N = S2 0 (M)) on triangular meshesM, obtained by<br />

regular refinement<br />

5.5.2 Approximation of boundary<br />

• “Exact” evaluation of bilinear <strong>for</strong>m by very high order quadrature<br />

•f N from one point quadrature rule (3.5.37) of order 2<br />

5.5<br />

p. 553<br />

We focus on 2nd-order scalar linear variational problems as in the previous section.<br />

5.5<br />

p. 55<br />

Discretization error [log]<br />

10 1 Discretization errors with respect to H 1 semi−norm <strong>for</strong> quaratic finit elements<br />

10 0<br />

10 −1<br />

10 −2<br />

p = 1.1<br />

Discretization error [log]<br />

10 1 Discretization errors with respect to H 1 semi−norm <strong>for</strong> quadratic finite elements<br />

10 0<br />

10 −1<br />

10 −2<br />

p = −0.5<br />

Low order quadrature<br />

High order quadrature<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Example 5.5.5 (Impact of linear boundary fitting on FE convergence).<br />

Setting:<br />

Ω := B 1 (0) := {x ∈ R 2 : |x| < 1},u(r,ϕ) = cos(rπ/2) (polar coordinates)<br />

➢ f = π 2r sin(r π/2)+ π 2 cos(r π/2)<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

10 −3<br />

Low order quadrature<br />

p = 2.1<br />

High order quadrature<br />

10 −4<br />

10 0<br />

10 −1<br />

Mesh width [log]<br />

Fig. 166<br />

10 −2<br />

p = −1.0<br />

10 −3<br />

10 −4<br />

10 1 10 2 10 3 10 4 10 5<br />

H 1 (Ω)-norm of discretization error on unit square (−↔rule (3.5.37),−↔rule (3.5.38))<br />

Dofs [log]<br />

Fig. 167<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

• Sequences of unstructured triangular meshesMobtained by regular refinement (of coarse<br />

mesh with 4 triangles) + linear boundary fitting.<br />

• Galerkin FE discretization based onV N := S1,0 0 (M) orV N := S2,0 0 (M).<br />

• Recorded: approximate norm|u−u N | 1,Ωh , evaluated using numerical quadrature rule (3.5.38).<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

(FE solution extended beyond the domain covered by M (“mesh interior”) to Ω (“full domain”) by<br />

means of polynomial extrapolation.)<br />

Observation: Use of quadrature rule of order 2 ⇒<br />

Algebraic rate of convergence (w.r.t. N)<br />

drops fromα = 1 to α = 1/2 !<br />

✸<br />

5.5<br />

p. 554<br />

5.5<br />

p. 55


1<br />

2D triangular mesh<br />

1<br />

2D triangular mesh<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

5.6 Duality techniques<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

0.8<br />

0.8<br />

0.6<br />

0.6<br />

0.4<br />

0.2<br />

0<br />

0.4<br />

0.2<br />

0<br />

OPTIONAL SECTION<br />

L 2 -estimates are useful occasionally, but not essential.<br />

−0.2<br />

−0.2<br />

−0.4<br />

−0.6<br />

−0.8<br />

−1<br />

−0.4<br />

−0.6<br />

−0.8<br />

−1<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

5.6.1 Linear output functionals<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1<br />

−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1<br />

# Vertices : 41, # Elements : 64, # Edges : 104Fig. 168<br />

# Vertices : 145, # Elements : 256, # Edges : 400Fig. 169<br />

Linearly boundary fitted unstructured triangular meshes ofΩ = B 1 (0).<br />

Adopt abstract setting of Sect. 5.1:<br />

linear variational problem (1.4.6) in the <strong>for</strong>m<br />

5.5<br />

p. 557<br />

u ∈ V 0 : a(u,v) = l(v) ∀v ∈ V 0 , (3.1.1)<br />

5.6<br />

p. 55<br />

Discretization errors with respect to H 1 semi−norm<br />

10 0 QFE error on full domain<br />

QFE error on mesh interior<br />

LFE error on full domain<br />

LFE error on mesh interior<br />

Discretization errors with respect to H 1 semi−norm<br />

10 0 QFE error on full domain<br />

p = −0.52<br />

QFE error on mesh interior<br />

LFE error on full domain<br />

LFE error on mesh interior<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

V 0 ˆ= (real) vector space, a space of functions Ω ↦→ R <strong>for</strong> scalar 2nd-order elliptic variational<br />

problems, usually “energy space”H 1 (Ω)/H0 1 (Ω), see Sect. 2.2<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

10 −1<br />

p = 1.02<br />

10 −1<br />

a : V 0 ×V 0 ↦→ R ˆ= a bilinear <strong>for</strong>m, see Def. 1.3.13,<br />

Discretization error [log]<br />

10 −2<br />

10 −3<br />

p = 1.57<br />

Discretization error [log]<br />

10 −2<br />

10 −3<br />

p = −0.78<br />

l : V 0 ↦→ R ˆ= a linear <strong>for</strong>m, see Def. 1.3.13,<br />

Assumptions 5.1.1, 5.1.2, 5.1.3 are supposed to hold ➣ existence, uniqueness, and stability of<br />

solutionuby Thm. 5.1.4.<br />

p = −1.01<br />

10 −4<br />

10 −5<br />

10 0<br />

p = 2.04<br />

10 −1<br />

Mesh width [log]<br />

10<br />

Fig. 170 1 10 2 10 3 10 4 10<br />

Fig. 171<br />

5<br />

10 −2<br />

10 −4<br />

10 −5<br />

Dofs [log]<br />

H 1 (Ω)-norm of discretization error on unit ball (−↔p = 1,−↔p = 2)<br />

✸<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

(Examples of 2nd-order linear BVPs discussed in Rem. 5.1.5, Sect. 2.8)<br />

Galerkin discretization usingV 0,N ⊂ V 0 ➢<br />

discrete variational problem<br />

u N ∈ V 0,N : a(u N ,v N ) = f(v N ) ∀v N ∈ V 0,N . (3.1.4)<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Theoretical guideline:<br />

IfV 0,N = S 0 p(M), use boundary fitting with polynomials of degreep.<br />

New twist: we are interested mainly/only in the number F(u), where<br />

F : V 0 ↦→ R is an output functional.<br />

Mathematical terminology: functional ˆ= mapping from a function space into R<br />

5.6<br />

p. 558<br />

5.6<br />

p. 56


Example 5.6.1 (Output functionals).<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

✗<br />

✖<br />

Galerkin solutionu N ∈ V 0,N ➥ approximate output valueF(u N )<br />

✔<br />

✕<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Some output functionals <strong>for</strong> solutions of PDEs commonly encountered in applications:<br />

• mean values, see Ex. 5.6.4 below<br />

• total heat flux through a surface (<strong>for</strong> heat conduction model→Sect. 2.5), see Ex. 5.6.13 below<br />

• total surface charge of a conducting body (<strong>for</strong> electrostatics→Sect. 2.1.2)<br />

• total heat production (Ohmic losses) by stationary currents<br />

• total <strong>for</strong>ce on a charged conductor (<strong>for</strong> electrostatics→Sect. 2.1.2)<br />

• lift and drag in computational fluid dynamics (aircraft simulation)<br />

• and many more...<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

How accurate isF(u N ), that is, how big is the output error|F(u)−F(u N )|?<br />

Linearity (→ Ass. 5.6.2) and continuity Ass. 5.6.3 conspire to furnish a very simple estimate<br />

|F(u)−F(u N )| ≤ C f ‖u−u N ‖ a .<br />

A priori estimates <strong>for</strong>‖u−u N ‖ a ➼ estimates <strong>for</strong>|F(u)−F(u N )|<br />

Hence, Thm. 5.3.42 immediately tells us the asymptotic convergence of linear and continuous output<br />

functionals defined <strong>for</strong> solutions of 2nd-order scalar elliptic BVPs and Lagrangian finite element<br />

discretization.<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

✸<br />

Example 5.6.4 (Approximation of mean temperature).<br />

We consider output functionals with special properties, which are rather common in practice:<br />

Assumption 5.6.2 (Linearity of output functional).<br />

The output functionalF is a linear <strong>for</strong>m (→ Def. 1.3.13) onV 0<br />

To put the next assumption into context, please recall Ass. 5.1.2 and Rem. 2.3.11.<br />

5.6<br />

p. 561<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Heat conduction model (→ Sect. 2.5), scaled heat conductivity κ ≡ 1, on domain Ω =]0,1[ 2 , fixed<br />

temperatureu = 0 on∂Ω:<br />

−∆u = f inΩ , u = 0 on∂Ω .<br />

Heat source function f(x,y) = 2π 2 sin(πx)sin(πy),(x,y) T ∈ Ω<br />

➢ solution u(x,y) = sin(πx)sin(πy).<br />

5.6<br />

p. 56<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Assumption 5.6.3 (Continuity of output functional).<br />

The output functional is continuous w.r.t. the energy norm in the sense that<br />

∃C f > 0: |F(v)| ≤ C f ‖v‖ a ∀v ∈ V 0 .<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Details of finite element Galerkin discretization:<br />

mean temperature F(u) = 1 ∫<br />

udx .<br />

|Ω| Ω<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

• Sequence of triangular meshesMcreated by regular refinement.<br />

Now consider Galerkin discretization of (3.1.1) based on Galerkin trial/test space V 0,N ⊂ V 0 , N :=<br />

dimV 0,N < ∞ ➣ discrete variational problem<br />

u N ∈ V 0,N : a(u N ,v N ) = l(v N ) ∀v N ∈ V 0,N . (3.1.4)<br />

What would you dare to sell as an approximation ofF(u)?<br />

Of course,...<br />

5.6<br />

p. 562<br />

• Galerkin discretization: V 0,N := S1,0 0 (M) (linear Lagrangian finite elements→Sect. 3.2).<br />

• Quadrature rule (3.5.38) of order 6 <strong>for</strong> assembly of right hand side vector<br />

(more than sufficiently accurate→guidelines from Sect. 5.5.1)<br />

Expected:<br />

algebraic convergence inh M with rate 1 of approximate mean temperature<br />

5.6<br />

p. 56


Mean error [log]<br />

10 0 Errors between the mean and exact solution<br />

10 −1<br />

10 −2<br />

10 −3<br />

10 −4<br />

10 −5<br />

10 −6<br />

10 −7<br />

10 −8<br />

10 −9<br />

10 −10<br />

10 0<br />

Quadratic FE<br />

Linear FE<br />

p = 4.1<br />

10 −1<br />

Mesh width [log]<br />

p = 2.0<br />

10 −2<br />

Mean error [log]<br />

10 0 Error between mean and exact solution<br />

10 −1<br />

10 −2<br />

10 −3<br />

10 −4<br />

10 −5<br />

10 −6<br />

10 −7<br />

10 −8<br />

10 −9<br />

10 −10<br />

p = −1.1<br />

p = −2.0<br />

10 1 10 2 10 3 10 4 10 5<br />

Number of dofs [log]<br />

Error in mean value on unit square (−↔p = 1,−↔p = 2)<br />

Quadratic FE<br />

Linear FE<br />

Observation: Mean value converges twice as fast as expected: algebraic convergenceO(h 2 M )! ✸<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

The mean temperature functional (5.6.6) is obviously linear→Ass. 5.6.2<br />

By the Cauchy-Schwarz inequality (2.2.15) it clearly satisfies Ass. 5.6.3 even with ‖·‖ a =<br />

‖·‖ L 2 (Ω) , let alone <strong>for</strong>‖·‖ a = |·| H 1 (Ω) onH1 0 (Ω).<br />

What isg F ∈ H0 1 (Ω) in this case? By Thm. 5.6.5 it is the solution of the variational problem<br />

∫<br />

gradg F ·gradvdx = F(v) = 1 ∫<br />

vdx ∀v ∈ H<br />

Ω<br />

|Ω|<br />

0 1 (Ω) .<br />

Ω<br />

The associated 2nd-order BVP reads<br />

−∆g F = 1 inΩ, g<br />

|Ω| F = 0 on∂Ω .<br />

Now recall the elliptic lifting theory Thm. 5.4.10 <strong>for</strong> convex domains: since Ω =]0,1[ 2 is convex, we<br />

concludeg F ∈ H 2 (Ω).<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

By interpolation estimate of Thm. 5.3.27<br />

(I 1 ˆ= linear interpolation ontoS 0 1 (M))<br />

✬<br />

Theorem 5.6.5 (Duality estimate <strong>for</strong> linear functional output).<br />

Define the dual solutiong F ∈ V 0 toF as solution of<br />

Then<br />

✫<br />

Proof. For any v N ∈ V 0,N :<br />

g F ∈ V 0 : a(v,g F ) = F(v) ∀v ∈ V 0 .<br />

|F(u)−F(u N )| ≤ ‖u−u N ‖ a<br />

inf<br />

v N ∈V 0,N<br />

‖g F −v N ‖ a . (5.6.6)<br />

F(u)−F(u N ) = a(u−u N ,g F ) (∗) = a(u−u N ,g F −v N ) ≤ ‖u−u N ‖ a ‖g F −v N ‖ a .<br />

(∗)←by Galerkin orthogonality (5.1.7).<br />

✩<br />

✪<br />

✷<br />

5.6<br />

p. 565<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

inf |g F −v N |<br />

v N ∈S1 0 H (M) 1 (Ω) ≤ |g F −I 1 g F | H 1 (Ω) ≤ Ch M|g F | H 2 (Ω) ,<br />

whereC > 0 may depend onΩand the shape regularity measure (→ Def. 5.3.26) ofM.<br />

Plug this into the duality estimate (5.6.6) of Thm. 5.6.5 and note that u ∈ H 2 (Ω) by virtue of<br />

Thm. 5.4.10 andf ∈ L 2 (Ω):<br />

|F(u)−F(u N )| ≤ Ch M· |u−u N | H 1 (Ω) ≤ Ch 2 M ,<br />

} {{ }<br />

≤Ch M ifu∈H 2 (Ω)<br />

where the “generic constant”C > 0 depends only onΩ,u,ρ M .<br />

Again, by the elliptic lifting theory Thm. 5.4.10 we infer that u ∈ H 2 (Ω) holds <strong>for</strong> this example since<br />

f ∈ L 2 (Ω).<br />

✸<br />

5.6<br />

p. 56<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

If g F can be approximated well in V 0,N , then the output error can converge → 0 (much)<br />

faster than‖u−u N ‖ a .<br />

Example 5.6.7 (Approximation of mean temperature cnt’d). → Ex. 5.6.4<br />

5.6<br />

p. 566<br />

5.6<br />

p. 56


5.6.2 Case study: Boundary flux computation<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

DomainΩ = B Ro (0)\B Ri (0) := {x ∈ R 2 : R i < |x| < R o } withR o = 1 andR i = 1/2<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Model problem (process engineering):<br />

Long pipe carrying turbulent flow of coolant (water)<br />

Ω ⊂ R 2 : cross-section of pipe<br />

κ : (scaled) heat conductivity of pipe material<br />

(assumed homogeneous, κ =<br />

const)<br />

Assumption: Constant temperatures u o , ,u i at<br />

Task:<br />

outer/inner wallΓ o ,Γ i of pipe<br />

Compute heat flow pipe→water<br />

Ω (pipe)<br />

Water<br />

Mathematical model: elliptic boundary value <strong>for</strong> stationary heat conduction (→ Sect. 2.5)<br />

Γ i<br />

Γ o<br />

Fig. 172<br />

−div(κgradu) = 0 inΩ , u = u x onΓ x , x ∈ {i,o} . (5.6.8)<br />

∫<br />

Heat flux throughΓ i : J(u) := κ gradu·ndS . (5.6.9)<br />

Γ i<br />

Relate to abstract framework: (5.6.8) ∼ = (3.1.1), V 0<br />

∼ = H 1<br />

0 (Ω) (→ Sect. 2.8)<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

5.6<br />

p. 569<br />

Dirichlet boundary datau i = 60 ◦ C onΓ i ,u o = 10 ◦ C onΓ o , heat sourcef ≡ 0, heat conductivity<br />

κ ≡ 1.<br />

➢ Exact solution: u(r,ϕ) = C 1 ln(r)+C 2 ,<br />

➢ Exact heat flux: J = 2πκC 1 ,<br />

Details of linear Lagrangian finite element Galerkin discretization:<br />

withC 1 := (u o −u i )/(lnR i −lnR o ),<br />

C 2 := (lnR o u i −lnR i u o )/(lnR i −lnR o ).<br />

• Sequences of unstructured triangular meshesMobtained by regular refinement of coarse mesh<br />

(from grid generator).<br />

• Galerkin FE discretization based onV 0,N := S 0 1,0 (M).<br />

• Approximate evaluation ofa(u N ,v N ),f(v N ) by six point quadrature rule (3.5.38) (“overkill<br />

quadrature”, see Sect. 5.5.1)<br />

• Approximate evaluation ofJ(u N ) by 4 point Gauss-Legendre quadrature rule on boundary edges<br />

ofM.<br />

• Linear boundary approximation (circle replaced by polygon).<br />

• Recorded: errors |J −J(u N )| on sequence of meshes.<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

5.6<br />

p. 57<br />

(Actually,u ∈ H 1 (Ω), but by means of offset functions we can switch to the variational spaceH 1 0 (Ω),<br />

see Sects. 2.1.3, 3.5.5.)<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

1<br />

0.8<br />

2D triangular mesh<br />

1<br />

0.8<br />

2D triangular mesh<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

0.6<br />

0.6<br />

<strong>Numerical</strong> method:<br />

finite element computation of heat conduction in pipe<br />

(e.g. linear Lagrangian finite element Galerkin discretization, Sect. 3.2)<br />

0.4<br />

0.2<br />

0.4<br />

0.2<br />

Expectation: Algebraic convergence |J(u)−J(u N )| = O(h 2 M ) <strong>for</strong> regularh-refinement<br />

This expectation is based on the analogy to Ex. 5.6.4 (Approximation of mean temperature), where<br />

duality estimates yieldedO(h 2 M ) convergence of the mean temperature error in the case of Galerkin<br />

discretization by means of linear Lagrangian finite elements on a sequence of meshes obtained by<br />

regular refinement. Now, it seems, we can follow the same reasoning.<br />

Example 5.6.10 (Computation of heat flux).<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

0<br />

0<br />

−0.2<br />

−0.2<br />

−0.4<br />

−0.4<br />

−0.6<br />

−0.6<br />

−0.8<br />

−0.8<br />

−1<br />

−1<br />

−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1<br />

−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1<br />

# Vertices : 144, # Elements : 232, # Edges : 376Fig. 173<br />

# Vertices : 520, # Elements : 928, # Edges : 1448 Fig. 174<br />

Unstructured triangular meshes <strong>for</strong>Ω = B 1 (0)\B 1/2 (0) (two coarsest specimens).<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Setting: model problem “heat flux pipeto water”, see (5.6.8) and Fig. 172.<br />

Linear output functional from (5.6.9)<br />

5.6<br />

p. 570<br />

5.6<br />

p. 57


Boundary flux [log scale]<br />

Convergence: standard boundary flux, linear FE<br />

10 2<br />

10 1<br />

p = 1.02<br />

10 0<br />

10 −1<br />

Mesh width [log scale]<br />

10<br />

Fig. 175<br />

−2<br />

Observation:<br />

Algebraic convergence of output error <strong>for</strong> J from<br />

(5.6.9) only with rate 1 (in mesh widthh M )!<br />

(This is not the fault of the piecewise linear boundary<br />

approximation, which is sufficient when using<br />

piecewise linear Lagrangian finite elements, see<br />

Sect. 5.5.2.)<br />

✸<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

☞ On the other hand, straight<strong>for</strong>ward computation of improper integral using (2.3.20):<br />

|u| 2 H 1 (Ω) = ] ∫<br />

∫1<br />

‖gradu(x)‖ 2 dx = 2π<br />

∫1<br />

|g ′ (r)| 2 rdr = 2πα 2<br />

(1−r) 2α−2 rdr<br />

Ω<br />

0<br />

0<br />

∫1<br />

[ ]<br />

= 2πα 2 s 2α−2 s 2α−1 s=1<br />

(1−s)ds = 2πα<br />

2α−1 − s2α 1<br />

= 2π<br />

2α 2α−1 < ∞ .<br />

0<br />

s=0<br />

Def. 2.2.12<br />

=⇒ u ∈ H 1 (Ω) (u ∈ C 0 (Ω) andu ∈ C ∞ (Ω\{0}) !) .<br />

✸<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Ex. 5.6.11 ➣ Thm. 5.6.5 cannot be applied<br />

Why was our expectation mistaken ?<br />

Suspicion: the output functionalJ fails to meet requirements of duality estimates of Thm. 5.6.5:<br />

5.6<br />

p. 573<br />

(Potentially) poor convergence of flux obtained from straight<strong>for</strong>ward evaluation of<br />

J(u N ) <strong>for</strong> FE solutionu N ∈ S 0 1,0 (M)!<br />

Apparently there is no remedy, because the boundary flux functional (5.6.9) seems to be en<strong>for</strong>ced on<br />

5.6<br />

p. 57<br />

boundary flux functionalJ from (5.6.9) is not continuous onH 1 (Ω)!<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

us by the problem: we are not allowed to tinker with it, are we?<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Example 5.6.11 (Non-continuity of boundary flux functional).<br />

Idea:<br />

findu ∈ H 1 (Ω), <strong>for</strong> which “J(u) = ∞”,<br />

cf. investigation of non-continuity of point evaluation functional onH 1 (Ω)→Rem. 2.3.16.<br />

OnΩ = {x ∈ R 2 : ‖x‖ < 1} (unit disk) consider<br />

u(x) = (1−‖x‖) α =: g(‖x‖) ,<br />

and the boundary flux functional (5.6.9) on∂Ω.<br />

1<br />

2 < α < 1 ,<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Trick:<br />

use fixed cut-off functionψ ∈ C 0 (Ω)∩H 1 (Ω),ψ ≡ 1 onΓ i ,ψ |Γo = 0<br />

∫ ∫<br />

∫<br />

κ gradu·ndS = (κ gradu·n) ψdS = div(κgradu) ψ +κgradu·gradψdx<br />

Γ i Γ i Ω} {{ }<br />

∫ =0<br />

use J ∗ (u) := κgradu·gradψdx . (5.6.12)<br />

Ω<br />

Obviously (∗): J ∗ : H 1 (Ω) ↦→ R continuous & J ∗ (u) = J(u) <strong>for</strong> solution of (5.6.8)<br />

Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

(∗): By the Cauchy-Schwarz inequality (2.2.15), sinceκ = const,<br />

☞ On the one hand, using the expression (2.3.19) <strong>for</strong> the gradient in polar coordinates,<br />

∫<br />

∂u<br />

J 0 (v) =<br />

∂Ω ∂r (x)dS(x) = 2π α(1−r)α−1 |r=1 “ = ∞′′ .<br />

5.6<br />

p. 574<br />

|J ∗ (u)| ≤ κ‖gradu‖ L 2 (Ω) ‖gradψ‖ L 2 (Ω) ≤ C|u| H 1 (Ω) ,<br />

R.<br />

withC := κ‖gradψ‖ L 2 (Ω), which is a constant independent ofu, asψ is a fixed function.<br />

5.6<br />

p. 57


Objection: You cannot just tamper with the output functional of a problem just because you do not<br />

like it!<br />

Retort: Of course, one can replace the output functionJ with another oneJ ∗ as long as<br />

J(u) = J ∗ (u) <strong>for</strong> the exact solutionuof the BVP,<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Remark 5.6.14 (Finding continuous replacement functionals).<br />

Now you will ask: How can we find good (continuous) replacement functionals, if we are confronted<br />

with an unbounded output functional on the energy space?<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

because the objective is not to “evaluateJ”, but to obtain an approximation <strong>for</strong> J(u)!<br />

Example 5.6.13 (Computation of heat flux cnt’d). → Ex. 5.6.13<br />

Further details on flux evaluation:<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Un<strong>for</strong>tunately, there is no recipe, and sometimes it does not seem to be possible to find a suitableJ ∗<br />

at all, <strong>for</strong> instance in the case of point evaluation, cf. Rem. 2.3.16.<br />

Good news:<br />

another opportunity to show off how smart you are!<br />

△<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

• Galerkin FE discretization based onV 0,N := S 0 1,0 (M) orV 0,N := S 0 2,0 (M).<br />

• Approximate evaluation ofJ ∗ (u N ) by six point quadrature rule (3.5.38) (“overkill quadrature”, see<br />

Sect. 5.5.1)<br />

5.6.3 L 2 -estimates<br />

• Cut-off function with linear decay in radial direction<br />

• Recorded: errors |J −J(u N )| and|J −J ∗ (u N )|.<br />

5.6<br />

p. 577<br />

5.6<br />

p. 57<br />

10 1<br />

Convergence: stable boundary flux, linear FE<br />

p = 1.02<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

So far we have only studied the energy norm (↔H 1 (Ω)-norm, see Rem. 5.3.28) of the finite element<br />

discretization error <strong>for</strong> 2nd-order elliptic BVP.<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Boundary flux [log scale]<br />

10 2 Mesh width [log scale]<br />

10 0<br />

10 −1<br />

Unstable flux J<br />

Stable flux J ∗<br />

✁ Convergence of |J(u)−J(u N )| and |J(u)−<br />

J ∗ (u N )| <strong>for</strong> linear Lagrangian finite element<br />

discretization.<br />

The reason was the handy tool of Cea’s lemma Thm. 5.1.10.<br />

What about error estimates in other “relevant norms”, e.g„<br />

10 −2<br />

10 −3<br />

10 −1<br />

Additional observations:<br />

p = 2.02<br />

Fig. 176<br />

10 −2<br />

• Algebraic convergence|J(u)−J ∗ (u N )| = O(h 2 M ) (rate 2 !) <strong>for</strong> alternative output functionalJ∗<br />

from (5.6.12).<br />

• Dramatically reduced output error!<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

• in the mean square norm orL 2 (Ω)-norm, see Def. 2.2.5,<br />

• in the supremum norm orL ∞ (Ω)-norm, see Def. 1.6.4?<br />

In this section we tackle‖u−u N ‖ L 2 (Ω). We largely reuse the abstract framework of Sect. 5.6.1: linear<br />

variational problem (3.1.1) with exact solutionu ∈ V 0 , Galerkin finite element solutionu N ∈ V 0,N ,<br />

see p. 559, and the special framework of linear 2nd-order elliptic BVPs, see Rem. 5.1.5: concretely,<br />

∫<br />

a(u,v) := κ(x)gradu·gradvdx , u,v ∈ H0 1 (Ω) .<br />

Ω<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

✸<br />

5.6<br />

p. 578<br />

Example 5.6.15 (L 2 -convergence of FE solutions). → Ex. 5.2.4<br />

5.6<br />

p. 58


Setting:<br />

Ω =]0,1[ 2 ,D ≡ 1,f(x,y) = 2π 2 sin(πx)sin(πy),(x,y) ⊤ ∈ Ω<br />

➢ u(x,y) = sin(πx)sin(πy).<br />

• Sequence of triangular meshesM, created by regular refinement.<br />

• FE Galerkin discretization based onS 0 1,0 (M) orS0 2 (M).<br />

• Quadrature rule (3.5.38) <strong>for</strong> assembly of local load vectors (→ Sect. 3.5.4).<br />

• ApproximateL 2 (Ω)-norm by means of quadrature rule (3.5.38).<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Remark 5.6.16 (L 2 interpolation error).<br />

Recall the interpolation error estimate of Thm. 5.3.27<br />

‖u−I 1 u‖ L 2 (Ω) = O(h2 M ) vs. |u−I 1u| H 1 (Ω) = O(h M) ,<br />

on a family of meshes with uni<strong>for</strong>mly bounded shape regularity measure.<br />

☞ Higher rate of algebraic convergence of the interpolation error when measured in the weaker<br />

L 2 (Ω)-norm compared to the strongerH 1 (Ω)-norm.<br />

There<strong>for</strong>e a similar observation in the case of the finite element approximation error is not so surprising.<br />

△<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Now we supply a rigorous underpinning and explanation of the behavior of ‖u−u N ‖ L 2 (Ω) that we<br />

have observed and expect.<br />

5.6<br />

p. 581<br />

5.6<br />

p. 58<br />

10 −1 Discretization errors with respect to L 2 norm<br />

10 −2<br />

p = 2.0<br />

10 −1 Discretization errors with respect to L 2 norm<br />

10 −2<br />

Quadratic FE<br />

Linear FE<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Idea: Consider special continuous linear output functional<br />

∫<br />

J(v) := v ·(u−u N )dx !<br />

Ω<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Discretization error [log]<br />

10 −3<br />

10 −4<br />

10 −5<br />

Discretization error [log]<br />

10 −3<br />

10 −4<br />

10 −5<br />

p = −1.5<br />

p = −1.0<br />

This functional is highly relevant <strong>for</strong>L 2 -estimates, because<br />

10 −6<br />

10 −7<br />

10 0<br />

10 −6<br />

Quadratic FE<br />

p = 3.1<br />

Linear FE<br />

10 −7<br />

10 −1<br />

10 −2<br />

10 1 10 2 10 3 10 4 10 5<br />

Mesh width [log]<br />

Dofs [log]<br />

L 2 (Ω)-norm of discretization error on unit square (−↔p = 1,−↔p = 2)<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

F(u)−F(u N ) = ‖u−u N ‖ 2 L 2 (Ω)<br />

➣ estimates <strong>for</strong> the output error will provide bounds <strong>for</strong>‖u−u N ‖ L 2 (Ω) !<br />

Note:<br />

Bothuandu N are fixed functions∈ H 1 (Ω)!<br />

!<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Observations: • Linear Lagrangian FE (p = 1) ➽ ‖u−u N ‖ 0 = O(N −1 )<br />

• Quadratic Lagrangian FE (p = 2) ➽ ‖u−u N ‖ 0 = O(N −1.5 )<br />

➣<br />

Linearity ofJ (→ Ass. 5.6.2) is obvious.<br />

➣ ContinuityJ : H0 1 (Ω) ↦→ R (→ Ass. 5.6.3) is clear, use Cauchy-Schwarz inequality (2.2.15).<br />

✸<br />

5.6<br />

p. 582<br />

Duality estimate of Thm. 5.6.5 can be applied:<br />

5.6<br />

p. 58


Thm. 5.6.5<br />

F(u)−F(u N ) = ‖u−u N ‖ 2 L 2 (Ω) ≤ C|u−u N| H 1 (Ω) inf |g F −v N |<br />

v N ∈V H 1 (Ω) ,<br />

0,N<br />

(5.6.17)<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Ass. 5.6.19 ⇒ ‖u−u N ‖ L 2 (Ω) ≤ C h M p ‖u−u N ‖ H 1 (Ω) .<br />

<strong>for</strong>h-refinement:<br />

gain of one factorO(h M ) (vs. H 1 (Ω)-estimates)<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

whereC > 0 may depend only onκ, and the dual solutiong F ∈ H0 1 (Ω) satisfies<br />

∫ ∫<br />

∫<br />

Is it important to assume 2-regtularity, Ass. 5.6.19 or merely a technical requirement of the theoretical<br />

a(g F ,v) = F(v) ∀v ∈ V 0 ⇔ κ(x)gradg F ·gradvdx = v(u−u N )dx ∀v ∈ H0 1 (Ω)<br />

R. Hiptmair<br />

C. Schwab,<br />

approach?<br />

H.<br />

Harbrecht<br />

Ω Ω<br />

Ω<br />

V.<br />

Gradinaru Example 5.6.22 (L 2 -estimates on non-convex domain). cf. Ex. 5.2.6<br />

A. Chernov<br />

⇓<br />

DRAFT<br />

−div(κ(x)gradg F ) = u−u N inΩ , g F = 0 on∂Ω . (5.6.18)<br />

Setting: Ω =]−1,1[ 2 \(]0,1[×]−1,0[),D ≡ 1,u(r,ϕ) = r 2/3 sin(2/3ϕ) (polar coordinates)<br />

Assumption 5.6.19 (2-regularity of homogeneous Dirichlet problem).<br />

➢ f = 0, Dirichlet datag = u |∂Ω .<br />

We assume that the homogeneous Dirichlet problem with coefficientκis 2-regular onΩ: There<br />

isC > 0, which depends onΩonly such that<br />

Finite element Galerkin discretization and evaluations as in Ex. 5.6.15.<br />

u ∈ H0 1(Ω)<br />

div(κ(x)gradu) ∈ L 2 ⇒ u ∈ H 2 (Ω) and |u|<br />

(Ω)<br />

H 2 (Ω) ≤ C‖div(κ(x)gradu)‖ L 2 (Ω) . 5.6<br />

p. 585<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

5.6<br />

p. 58<br />

By the elliptic lifting theorem <strong>for</strong> convex domains Thm. 5.4.10 we know<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

10 −1 Discretization errors with respect to L 2 norm<br />

Quadratic FE<br />

Linear FE<br />

10 −1 Discretization errors with respect to L 2 norm<br />

p = −0.7<br />

Quadratic FE<br />

Linear FE<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Ω convex<br />

Ass. 5.6.19 in conjunction with (5.6.18) yields<br />

whereC > 0 depends only onΩ.<br />

=⇒ Ass. 5.6.19 is satisfied.<br />

|g F | H 2 (Ω) ≤ C‖u−u N‖ L 2 (Ω) , (5.6.20)<br />

Now we can appeal to the general best approximation theorem <strong>for</strong> Lagrangian finite element spaces<br />

Thm. 5.3.42:<br />

inf |g F −v N |<br />

v N ∈Sp 0 H (M) 1 (Ω) ≤ C h M<br />

p |g (5.6.20)<br />

F| H 2 (Ω) ≤ C h M<br />

p ‖u−u N‖ L 2 (Ω) , (5.6.21)<br />

where the “generic constants” C > 0 depend only on Ω and the shape regularity measure ρ M (→<br />

Def. 5.3.26).<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Discretization error [log]<br />

10 −2<br />

10 −3<br />

10 −4<br />

10 −5<br />

10 0<br />

p = 1.2<br />

p = 1.3<br />

10 −1<br />

Mesh width [log]<br />

10 −2<br />

Discretization error [log]<br />

10 −2<br />

10 −3<br />

10 −4<br />

10 −5<br />

10 1 10 2 10 3 10 4 10 5 10 6<br />

Dofs [log]<br />

L 2 (Ω)-norm of discretization error on “L-shaped” domain (−↔p = 1,−↔p = 2)<br />

Observation: For both (p = 1,2) ➽ algebraic convergence‖u−u N ‖ 0 = O(N −2/3 )<br />

p = −0.7<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Combine (5.6.17) and (5.6.21) and cancel one power of‖u−u N ‖ L 2 (Ω) :<br />

Comparison with Ex. 5.2.6: <strong>for</strong> both linear and quadratic Lagrangian FEM<br />

WithC > 0 depending only onΩ,κ, and the shape regularity measureρ M we conclude<br />

5.6<br />

p. 586<br />

‖u−u N ‖ L 2 (Ω) = O(N−2/3 ) ←→ ‖u−u N ‖ H 1 (Ω) = O(N−1/3 ) ,<br />

5.6<br />

p. 58


that is, we again observe a doubling of the rate of convergence <strong>for</strong> the weaker norm.<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

No gain through the use of quadratic FEM, because of limited smoothness of bothuand dual solution<br />

g F . For both the solution and the dual solution the gradient will have a singularity at0.<br />

✸<br />

Intuition:<br />

In the absence of heat sources maximal and minimal temperature attained on surface.<br />

In the presence of a heat source (f ≥ 0) the temperature minimum will be attained on<br />

surface∂Ω.<br />

Iff ≤ 0 (heat sink), then the maximal temperature will be attained on the surface.<br />

5.7 Discrete maximum principle<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

In fact this is a theorem, cf. Sect. 2.7.<br />

✬<br />

Theorem 5.7.2 (Maximum principle <strong>for</strong> 2nd-order elliptic BVP).<br />

Foru ∈ C 0 (Ω)∩H 1 (Ω) holds the maximum principle<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

✩<br />

DRAFT<br />

KEY SECTION<br />

Discrete maximum principle as gauge <strong>for</strong> quality of discretization used in Sect. 7.2.2.<br />

✫<br />

−div(κ(x)gradu) ≥ 0 =⇒ min u(x) = min<br />

x∈∂Ω<br />

−div(κ(x)gradu) ≤ 0 =⇒ max<br />

x∈∂Ω<br />

u(x) , x∈Ω<br />

u(x) = max u(x) . x∈Ω<br />

✪<br />

So far we have investigated the accuracy of finite element Galerkin solutions: we studied relevant<br />

norms‖u−u N ‖ of the discretization error.<br />

5.7<br />

p. 589<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

5.7<br />

p. 59<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Now new perspective:<br />

structure preservation by FEM<br />

To what extent does the finite element solutionu N inherit key structural properties of the<br />

solutionuof a 2nd-order scalar elliptic BVP?<br />

This issue will be discussed <strong>for</strong> a special structural property of the solution of the linear 2nd-order<br />

elliptic BVP (inhomogeneous Dirichlet problem) in variational <strong>for</strong>m (→ Sect. 2.8)<br />

∫<br />

∫<br />

u ∈ ˜g +H0 1 (Ω): a(u,v) := κgradu·gradvdx = fvdx ∀v ∈ H0 1 (Ω) . (5.7.1)<br />

Ω<br />

Ω<br />

where ˜g ˆ= offset function, extension of Dirichlet datag ∈ C 0 (∂Ω), see Sect. 2.3.1, (2.3.5),<br />

κ ˆ= bounded and uni<strong>for</strong>mly positive definite diffusion coefficient, see (2.5.4).<br />

(5.7.1) ←→ BVP (PDE-<strong>for</strong>m)<br />

−div(κ(x)gradu) = f inΩ , u = g on∂Ω .<br />

Recall (→ Sect. 2.5): (5.7.1) models stationary temperature distribution in body, when temperature<br />

on its surface is prescribed byg.<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

5.7<br />

p. 590<br />

∆u = 0<br />

Maximum/minimum on∂Ω<br />

Proof. (<strong>for</strong> the case−div(κ(x)gradu) = 0)<br />

Sect. 2.1.3➣<br />

u solves quadratic minimization problem<br />

∫<br />

u = argmin κ(x)‖gradv(x)‖ 2 dx .<br />

v∈H 1 (Ω)<br />

v=g on∂Ω Ω<br />

Fig. 177<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

5.7<br />

p. 59


Ifuhad a global maximum atx ∗ in the interior ofΩ, that is<br />

Now “chop off” the maximum and define<br />

∃δ > 0: u(x ∗ ) ≥ max<br />

x∈∂Ω u(x)+δ .<br />

w(x) := min{u(x),u(x ∗ )−δ} , x ∈ Ω .<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

also belong toH 1 (Ω). However<br />

∫<br />

∫<br />

κ(x)‖gradw(x)‖ 2 dx < κ(x)‖gradu(x)‖ 2 dx ,<br />

Ω<br />

Ω<br />

which contradicts the definition ofuas the global minmizer of the quadratic energy functional.<br />

✷<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Now we consider a finite element Galerkin discretization of (5.7.1) by means of linear Lagrangian<br />

finite elements (→ Sect. 3.4), using offset functions supported near∂Ω as explained in Sect. 3.5.5.<br />

➣<br />

finite element Galerkin solutionu N ∈ S 0 1 (M) ⊂ C0 (Ω)<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Issue:<br />

doesu N satisfy a maximum principle, that is, can we conclude<br />

f ≥ 0 =⇒ min u N(x) = min u N(x) ,<br />

x∈∂Ω x∈Ω<br />

f ≤ 0 =⇒ max u N(x) = max u N(x) ?<br />

x∈∂Ω x∈Ω<br />

(5.7.3)<br />

5.7<br />

p. 593<br />

Example 5.7.4 (Maximum principle <strong>for</strong> finite difference discretization).<br />

5.7<br />

p. 59<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Recall from Sect. 4.1: finite difference discretization of<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

−∆u = 0 inΩ :=]0,1[ 2 , u = g on∂Ω,<br />

on anM ×M tensor product mesh<br />

M := {[(i−1)h,ih]×[(j −1)h,jh], 1 ≤ i,j ≤ M} , M ∈ N .<br />

Unknowns in the finite difference method: µ ij ≈ u((ih,jh) T ),1 ≤ i,j ≤ M −1.<br />

Fig. 178 Fig. 179<br />

∫<br />

∫<br />

κ(x)‖gradw(x)‖ 2 dx ≥ κ(x)‖gradv(x)‖ 2 dx .<br />

Ω<br />

Ω<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Unknowns are solutions of a linear system of equations, see (4.1.2)<br />

1<br />

h 2 (<br />

4µi,j −µ i−1,j −µ i+1,j −µ i,j−1 −µ i,j+1<br />

) = 0 , 1 ≤ i,j ≤ M −1 , (5.7.5)<br />

where values corresponding to points on the boundary are gleaned fromg:<br />

µ 0,j := g(0,hj) , µ M,j := g(1,hj) , µ i,0 := g(hi,0) , µ i,M := g(hi,1) , 1 ≤ i,j < M .<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Obviously, w ∈ C 0 (Ω), and as a continuous function which is piecewise in H 1 the function w will<br />

5.7<br />

p. 594<br />

5.7<br />

p. 59


−1<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

✸<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

−1<br />

4 −1<br />

Now we try to generalize the considerations of the previous example to the discretization by means of<br />

linear Lagrangian finite elements on a triangular mesh (of a polygonal domainΩ ⊂ R 2 ) see Sect. 3.2.<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

à ∈ R M,M ˆ= S1 0 (M)-Galerkin matrix <strong>for</strong>afrom (5.7.1)<br />

(M := ♯V(M))<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

Fig. 180<br />

−1<br />

Fig. 181<br />

DRAFT<br />

Row of this matrix connects all valuesµ j = u N (x j ) of Galerkin solutionu N ∈ S1 0 (M) according to<br />

(Ã) iiµ i + ∑ j≠i(Ã) ijµ j = (⃗ϕ) i , x i interior node ,<br />

DRAFT<br />

The finite difference solution(µ i,j ) 1≤i,j 0 (positive diagonal) , (5.7.9)<br />

• (Ã) ij ≤ 0 <strong>for</strong> j ≠ i (non-positive off-diagonal entries) ,(5.7.10)<br />

∑<br />

• (Ã) ij = 0 , ifx i is interior node . (5.7.11)<br />

j<br />

(Recall [18, Def. 2.7.7]:<br />

averaging argument<br />

matrixÃsatisfying (5.7.9)–(5.7.11) is diagonally dominant.)<br />

u N (x i ) = max<br />

y∈V(M) u N(y) can only hold <strong>for</strong> an interior nodex i ,<br />

ifµ N = const.<br />

Sinceu N ∈ S1 0 (M) attains its extremal values at nodes of the mesh, the maximum principles<br />

holds <strong>for</strong> it in the casef = 0 provided that (5.7.9)–(5.7.11) are satisfied.<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

The finite difference solution can attain its maximum in the interior only in the case of constant<br />

boundary datag!<br />

Maximum principle satisfied <strong>for</strong>f = 0!<br />

5.7<br />

p. 598<br />

More general casef ≤ 0:<br />

∫<br />

(⃗ϕ) i = f(x)b i N (x)dx ≤ 0 , sincebi N ≥ 0 .<br />

Ω<br />

Then the averaging argument again rules out the existence of an interior maximum <strong>for</strong> an nonconstant<br />

solution. The casef ≥ 0 follows similarly.<br />

5.7<br />

p. 60


When will (5.7.9)–(5.7.11) hold <strong>for</strong>S1 0 (M)-Galerkin matrix?<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Remark 5.7.14 (Maximum principle <strong>for</strong> higher order Lagrangian FEM).<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

First consider κ ≡ 1, ↔ −∆u = f<br />

(The linear finite element discretization of this BVP was scrutinized in Sect. 3.2)<br />

From <strong>for</strong>mula (3.2.10) <strong>for</strong> element matrix & assembly, see<br />

Fig. 74:<br />

(Ã) ij = −cotα−cotβ = − sin(α+β)<br />

sinα sinβ .<br />

⇓<br />

(Ã) ij ≤ 0 ⇔ α+β < π .<br />

α<br />

x j<br />

β<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Even when using p-degree Lagrangian finite elements with nodal basis functions associated with<br />

interpolation nodes, see Sect. 3.4.1, the discrete maximum principle will fail to hold on any mesh <strong>for</strong><br />

p > 1.<br />

△<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

x i<br />

Fig. 182<br />

Moreover<br />

∑<br />

x∈V(M)b x N ≡ 1 ⇒ ∑ (Ã) ij = 0 (↔(5.7.11)) .<br />

j<br />

The condition (5.7.9)↔(Ã) ii > 0 is straight<strong>for</strong>ward.<br />

✬<br />

✩<br />

5.7<br />

p. 601<br />

5.7<br />

p. 60<br />

Theorem 5.7.12 (Maximum principle <strong>for</strong> linear FE solution of Poisson equation).<br />

The linear finite element solution of<br />

−∆u = 0 inΩ ⊂ R 2 , u = g on∂Ω,<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

6 2nd-Order Linear Evolution Problems<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

on a triangular mesh M satisfies the maximum principle (5.7.3), if M is a<br />

Delaunay triangulation.<br />

✫<br />

✪<br />

CORE CHAPTER<br />

Remark 5.7.13 (Maximum principle <strong>for</strong> linear FE <strong>for</strong> 2nd-order elliptic BVPs).<br />

For S1 0 (M)-Galerkin discretization of (5.7.1) on triangular mesh, the conditions (5.7.9)–(5.7.11) are<br />

fulfilled,<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Takes <strong>for</strong> granted<br />

• Theory and variational <strong>for</strong>mulation of 2nd-order elliptic BVP, Ch. 2<br />

• Basic concepts and algorithms <strong>for</strong> finite elements, Sects. 3.1, 3.3, 3.4<br />

• Single step methods <strong>for</strong> ODEs, [18, Ch. 12].<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

if all angles of triangles ofM≤ π 2 .<br />

The fundamental idea of the methods of lines approach will be used in all other sections dealing with<br />

time-dependent problems.<br />

△<br />

5.7<br />

p. 602<br />

6.0<br />

p. 60


Now we study scalar linear partial differential equations <strong>for</strong> which one coordinate direction is special<br />

and identified with time and denoted by the independent variable t. The other coordinates are<br />

regarded as spatial coordinates and designated byx = (x 1 ,...,x d ) T .<br />

➣ solution will be a “function of time and space”: u = u(x,t)<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Note:<br />

No boundary conditions on Ω×{T} (“final conditions”) are prescribed: time is supposed to<br />

have a “direction” that governs the flow of in<strong>for</strong>mation in the evolution problem.<br />

evolution problems (on bounded spatial domains) are also known as<br />

initial-boundary value problems (IBVP).<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

The domain <strong>for</strong> such PDEs will have tensor product structure (tensor product of spatial domain and a<br />

bounded time interval):<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Remark 6.0.1 (Initial time).<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Why do we always pick initial timet = 0?<br />

The modelled physical systems will usually be time-invariant, so that we are free to shift time. Remember<br />

the analoguous situation with autonomous ODE, see [18, Sect. 12.1].<br />

△<br />

Computational domain:<br />

˜Ω := Ω×]0,T[⊂ R d+1 .<br />

T<br />

Ω<br />

6.0<br />

p. 605<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

6.1 Parabolic initial-boundary value problems<br />

6.1.1 Heat equation<br />

6.1<br />

p. 60<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

space-time cylinder<br />

Ω ⊂ R d ˆ= spatial domain (satisfying assumptions<br />

of Sect. 2.1.1)<br />

T > 0 ˆ= final time<br />

OnΩ×{0} → initial conditions,<br />

on∂Ω×]0,T[ → (spatial) boundary conditions.<br />

Time<br />

0<br />

Space<br />

Ω<br />

˜Ω<br />

Boundary conditions<br />

Initial conditions<br />

PDE <strong>for</strong>u(x,t) + initial conditions + boundary conditions<br />

} {{ }<br />

= evolution problem<br />

Fig. 183<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

6.0<br />

p. 606<br />

Sect. 2.5 treated stationary heat conduction: no change of temperature with time (temporal equilibrium)<br />

Now we consider the evolution of a temperature distributionu = u(x,t).<br />

Ω ⊂ R d<br />

: space occupied by solid body (bounded spatial computational domain),<br />

κ = κ(x) : (spatially varying) heat conductivity ([κ] = Km W ),<br />

T > 0<br />

: final time <strong>for</strong> “observation period”[0,T],<br />

u 0 : Ω ↦→ R : initial temperature distribution inΩ,<br />

g : ∂Ω×[0,T] ↦→ R : surface temperature, varying in space and time: g = g(x,t),<br />

f : Ω×[0,T] ↦→ R : time-dependent heat source/sink ([f] = W m3): f = f(x,t).<br />

Goal:<br />

derive PDE governing transient heat conduction.<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

6.1<br />

p. 60


✬<br />

Conservation of energy:<br />

∫ ∫ ∫<br />

d<br />

ρudx+ j·ndS = f dx <strong>for</strong> all “control volumes”V (6.1.1)<br />

dt V ∂V V<br />

✩<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Terminology: (6.1.2) & (6.1.4) & (6.1.5) is a specimen of a<br />

2nd-order parabolic initial-boundary value problem<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

✫<br />

energy stored inV power flux through∂V heat generation inV<br />

✪<br />

Remark 6.1.6 (Compatible boundary and initial data).<br />

ρ = ρ(x): (spatially varying) heat capacity ([ρ] = JK −1 ), uni<strong>for</strong>mly positive, cf. (2.5.4).<br />

Natural regularity requirements <strong>for</strong> Dirichlet datag:<br />

As in Sect. 2.5, now apply Gauss’ Theorem Thm. 2.4.5 to the power flux integral in (6.1.1). This<br />

converts the surface integral to a volume integral overdivj and we get<br />

∫ ∫ ∫<br />

d<br />

ρudx+ divjdx = f dx <strong>for</strong> all “control volumes”V<br />

dt V V V<br />

Now appeal to another version of the fundamental lemma of the calculus of variations, see<br />

Lemma 2.4.10, this time involving piecewise constant test functions.<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

g continuous in time and space<br />

Natural compatibility requirement at initial time andu 0 ∈ C 0 (Ω)<br />

g(x,0) = u 0 (x) ∀x ∈ ∂Ω .<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Local <strong>for</strong>m of energy balance law<br />

(Heat equation)<br />

∂<br />

∂t (ρu)(x,t)+(div xj)(x,t) = f(x,t) in ˜Ω . (6.1.2)<br />

6.1<br />

p. 609<br />

△<br />

6.1<br />

p. 61<br />

The heat flux is linked to temperature variations by Fourier’s law:<br />

j(x) = −κ(x)gradu(x) , x ∈ Ω . (2.5.3)<br />

From here we let all differential operators like grad and div act on the spatial independent variable<br />

x. As earlier, the independent variablesxandtwill be omitted frequently. Watch out!<br />

Now, plug (2.5.3) into (6.1.2).<br />

∂<br />

∂t (ρu)−div(κ(x)gradu) = f in ˜Ω := Ω×]0,T[ . (6.1.3)<br />

+ Dirichlet boundary conditions (fixed surface temperatur) on∂Ω×]0,T[:<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Remark 6.1.7 (Boundary conditions <strong>for</strong> 2nd-order parabolic IBVPs).<br />

Physical intuition <strong>for</strong> transient heat conduction:<br />

On∂Ω]0,T[ we can impose any of the boundary conditions discussed in Sect. 2.6:<br />

• Dirichlet boundary conditionsu(x,t) = g(x,t), see (6.1.4) (fixed surface temperature),<br />

• Neumann boundary conditionsj(x,t)·n = −h(x,t) (fixed heat flux through surface),<br />

• radiation boundary conditionsj(x,t)·n = Ψ(u(x,t)),<br />

and any combination of these as discussed in Ex. 2.6.7, yet, only one of them at any part of<br />

∂Ω×]0,T[, see Rem. 2.6.6.<br />

△<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

+ initial conditions <strong>for</strong>t = 0:<br />

u(x,t) = g(x,t) <strong>for</strong> (x,t) ∈ ∂Ω×]0,T[ . (6.1.4)<br />

6.1.2 Spatial variational <strong>for</strong>mulation<br />

u(x,0) = u 0 (x) <strong>for</strong> all x ∈ Ω . (6.1.5)<br />

6.1<br />

p. 610<br />

6.1<br />

p. 61


Now we study the linear 2nd-order parabolic initial-boundary value problem with pure Dirichlet boundary<br />

conditions, introduced in the preceding section:<br />

d<br />

dt (ρu)−div(κ(x)gradu) = f in ˜Ω := Ω×]0,T[ , (6.1.3)<br />

u(x,t) = g(x,t) <strong>for</strong> (x,t) ∈ ∂Ω×]0,T[ , (6.1.4)<br />

u(x,0) = u 0 (x) <strong>for</strong> all x ∈ Ω . (6.1.5)<br />

Assume: Homogeneous Dirichlet boundary conditionsg = 0<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

✬<br />

Spatial variational <strong>for</strong>m of (6.1.3)–(6.1.4): seekt ∈]0,T[↦→ u(t) ∈ H0 1(Ω)<br />

∫ ∫<br />

∫<br />

ρ(x)˙u(t)vdx+ κ(x)gradu(t)·gradvdx = f(x,t)v(x)dx ∀v ∈ H0 1 (Ω) ,<br />

✫<br />

Ω<br />

Ω<br />

Ω<br />

(6.1.8)<br />

u(0) = u 0 ∈ H0 1 (Ω) . (6.1.9)<br />

✩<br />

✪<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

The general case can be reduced to this by using the offset function trick, see Sect. 3.5.5, and solve<br />

the parabolic initial-boundary value problem <strong>for</strong> w(x,t) := u(x,t) − ˜g(x,t), where ˜g(·,t) is an<br />

extension of the Dirichlet datag to ˜Ω. Thenw will satisfy homogeneous Dirichlet boundary conditions<br />

and solve an evolution equation with a modified source function ˜f(x,t).<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Be aware: u(t) ˆ= function space (H0 1 (Ω)-)valued function on]0,T[.<br />

Also note that grad acts on the spatial independent variables that are suppressed in the notation<br />

u(t).<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Now we pursue the <strong>for</strong>mal derivation of the spatial variational <strong>for</strong>mulation of (6.1.3)–(6.1.4).<br />

The steps completely mirror those discussed in Sect. 2.8<br />

✎ Notation: ˙u(t) = ∂u<br />

∂t (t) ˆ= (partial) derivative w.r.t. time.<br />

Shorthand notation (with obvious correspondences):<br />

STEP 1:<br />

test PDE with functionsv ∈ H 1 0 (Ω)<br />

(do not test, where the solution is known, that is, on the boundary∂Ω )<br />

6.1<br />

p. 613<br />

t ∈]0,T[↦→ u(t) ∈ V 0 :<br />

{<br />

m(˙u(t),v)+a(u(t),v) = l(t)(v) ∀v ∈ V0 ,<br />

u(0) = u 0 ∈ V 0 .<br />

(6.1.10)<br />

6.1<br />

p. 61<br />

Note: test function does not depend on time:<br />

v = v(x)!<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Again, herel(t) ˆ= linear <strong>for</strong>m valued function on]0,T[.<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

STEP 2:<br />

STEP 3:<br />

STEP 4:<br />

integrate over domainΩ<br />

per<strong>for</strong>m integration by parts in space<br />

(by using Green’s first <strong>for</strong>mula, Thm. 2.4.7)<br />

[optional] incorporate boundary conditions into boundary terms<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Concretely:<br />

∫<br />

m(u,v) :=<br />

ρ(x)˙u(t)vdx , u,v ∈ H 1 0 (Ω) ,<br />

∫Ω<br />

a(u,v) := κ(x)gradu(t)·gradvdx , u,v ∈ H0 1 (Ω) ,<br />

Ω∫<br />

l(t)(v) := f(x,t)v(x)dx , v ∈ H0 1 (Ω) .<br />

Ω<br />

Note that bothmandaare symmetric, positive definite bilinear <strong>for</strong>ms (→ Def. 2.1.25).<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

For the concrete PDE (6.1.3) and boundary conditions (6.1.4) refer to Ex. 2.8.1, <strong>for</strong> more general<br />

boundary conditions to Ex. 2.8.5.<br />

Equivalent <strong>for</strong>mulation, since the bilinear <strong>for</strong>mm does not depend on time:<br />

6.1<br />

p. 614<br />

6.1<br />

p. 61


t ∈]0,T[↦→ u(t) ∈ V 0 :<br />

⎧<br />

⎨ d<br />

dt m(u(t),v)+a(u(t),v) = l(t)(v) ∀v ∈ V 0 ,<br />

⎩<br />

u(0) = u 0 ∈ V 0 .<br />

(6.1.11)<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

✬<br />

Lemma 6.1.14 (Decay of solutions of parabolic evolutions).<br />

Forρ ≡ 1,κ ≡ 1, andf ≡ 0 the solutionu(t) of (6.1.8) satisfies<br />

‖u(t)‖ L 2 (Ω) ≤ e−γt ‖u 0 ‖ L 2 (Ω) , |u(t)| H 1 (Ω) ≤ e−γt |u 0 | H 1 (Ω) ∀t ∈]0,T[ .<br />

✩<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

✫<br />

✪<br />

Proof. Multiply the solution of the parabolic IBVP with an exponential weight function:<br />

Now we are concerned with the stability of parabolic evolution problems: We investigate whether<br />

‖u‖ H 1 (Ω) stays bounded <strong>for</strong> all times in the casef ≡ 0.<br />

For the sake of simplicity: considerρ ≡ 1 andκ ≡ 1<br />

(General case is not more difficult, because both ρ and κ are bounded and uni<strong>for</strong>mly positive, see<br />

(2.5.4). )<br />

By the first Poincaré-Friedrichs inequality Thm. 2.2.16<br />

∃γ > 0: |v| 2 H 1 (Ω) ≥ γ‖v‖2 L 2 (Ω)<br />

In fact, Thm. 2.2.16 revealsγ = diam(Ω) −2 .<br />

∀v ∈ H0 1 (Ω) . (6.1.12)<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

6.1<br />

p. 617<br />

w(t) := exp(γt)u(t) ∈ H 1 0<br />

solves the parabolic IBVP<br />

(Ω) ⇒ ẇ := dw<br />

dt (t) = γw(t)+exp(γt)du dt (t) , (6.1.15)<br />

m(ẇ,v)+ã(w,v) = 0 ∀v ∈ V ,<br />

w(0) = u 0 ,<br />

with ã(w,v) = a(w,v) − γm(w,v), γ from (6.1.12). To see this, use that u(t) solves (6.1.11) with<br />

f ≡ 0 (elementary calculation).<br />

Note: (6.1.12) ⇒ ã(v,v) ≥ 0 ∀v ∈ V<br />

Exponential decay of‖·‖ L 2 (Ω)-norm of solution:<br />

d<br />

dt2 1‖w‖2 L 2 (Ω) = dt d 1 2m(w,w) = m(ẇ,w) = −ã(w,w) ≤ 0<br />

(6.1.17)<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

(6.1.16)<br />

DRAFT<br />

6.1<br />

p. 61<br />

Remark 6.1.13 (Differentiating bilinear <strong>for</strong>ms with time-dependent arguments).<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

This confirms thatt ↦→ ‖w‖ L 2 (Ω)(t) is a decreasing function, which involves<br />

(6.1.17) ⇒ ‖w(t)‖ L 2 (Ω) ≤ ‖w(0)‖ L 2 (Ω) ,<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Consider (temporally) smooth u : [0,T] ↦→ V 0 , v : [0,T] ↦→ V 0 and a symmetric bilinear <strong>for</strong>m<br />

b : V 0 ×V 0 ↦→ R.<br />

What is<br />

d<br />

dt b(u(t),v(t))?<br />

Formal Taylor expansion:<br />

b(u(t+τ),v(t+τ)) = b(u(t)+ ˙u(t)τ +O(τ 2 ),v(t)+ ˙v(t)τ +O(τ 2 ))<br />

= b(u(t),v(t))+τ(b(˙u(t),v(t))+b(u(t), ˙v(t)))+O(τ 2 ) .<br />

b(u(t+τ),v(t+τ))−b(u(t),v(t))<br />

lim<br />

= b(˙u(t),v(t))+b(u(t), ˙v(t)) .<br />

τ→0 τ<br />

This is a general product rule, see [18, Eq. 4.4.5].<br />

△<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

and the first assertion of the Lemma is evident. Next, we verify the exponential decay of|·| H 1 (Ω) -norm<br />

of solution by a similar trick:<br />

➽<br />

1<br />

2dt d ‖w‖2 ã = ã( dt dw,w) = −m( dt dw, dt dw) ≤ 0 ⇒ ‖w(t)‖ ã ≤ ‖w(0)‖ ã ,<br />

|w(t)| 2 H 1 (Ω) ≤ |w(0)|2 H 1 (Ω) −γ(‖w(0)‖2 L 2 (Ω) −‖w(t)‖2 L 2 (Ω)<br />

) .<br />

} {{ }<br />

≥0 by (6.1.17)<br />

Exponential decrease of energy during parabolic evolution without excitation<br />

MATLAB animation heatevl()<br />

(“Parabolic evolutions dissipate energy”)<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

6.1<br />

p. 618<br />

6.1<br />

p. 62


6.1.3 Method of lines<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Note:<br />

(6.1.19) is an ordinary differential equation (ODE) <strong>for</strong>t ↦→ ⃗µ(t) ∈ R N<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Idea:<br />

Apply Galerkin discretization (→ Sect. 3.1) to abstract linear parabolic variational problem<br />

(6.1.11).<br />

Conversion (6.1.11) ➙ (6.1.19) through Galerkin discretization in space only is known as<br />

method of lines.<br />

(6.1.19) ˆ= A semi-discrete evolution problem<br />

1st step:<br />

t ∈]0,T[↦→ u(t) ∈ V 0 :<br />

{<br />

m(˙u(t),v)+a(u(t),v) = l(t)(v) ∀v ∈ V0 ,<br />

u(0) = u 0 ∈ V 0 .<br />

replaceV 0 with a finite dimensional subspaceV 0,N ,N := dimV 0,N < ∞<br />

(6.1.11)<br />

Discrete parabolic evolution problem<br />

{<br />

m(˙uN (t),v N )+a(u N (t),v N ) = l(t)(v N ) ∀v N ∈ V 0,N ,<br />

t ∈]0,T[↦→ u(t) ∈ V 0,N :<br />

u N (0) = projection/interpolant ofu 0 inV 0,N .<br />

2nd step: introduce (ordered) basisB N := {b 1 N ,...,bN N } ofV 0,N<br />

⎧ }<br />

⎨<br />

M{ ddt ⃗µ(t) +A⃗µ(t) = ⃗ϕ(t) <strong>for</strong>0 < t < T ,<br />

(6.1.18) ⇒<br />

⎩⃗µ(0) = ⃗µ 0 .<br />

✄ s.p.d. stiffness matrixA ∈ R N,N ,(A) ij := a(b j N ,bi N ) (independent of time),<br />

✄ s.p.d. mass matrixM ∈ R N,N ,(M) ij := m(b j N ,bi N ) (independent of time),<br />

✄ source (load) vector ⃗ϕ(t) ∈ R N ,(⃗ϕ(t)) i := l(t)(b i N ) (time-dependent),<br />

✄ ⃗µ 0 ˆ= coefficient vector of a projection ofu 0 ontoV 0,N .<br />

(6.1.18)<br />

(6.1.19)<br />

For the concrete linear parabolic evolution problem (6.1.8)–(6.1.9) and spatial finite element discretization<br />

based on a finite element trial/test spaceV 0,N ⊂ H 1 (Ω) we can compute<br />

• the mass matrixMas the Galerkin matrix <strong>for</strong> the bilinear <strong>for</strong>m<br />

u,v ∈ L 2 (Ω),<br />

• the stiffness matrixAas Galerkin matrix arising from the bilinear <strong>for</strong>m<br />

gradvdx,u,v ∈ H 1 (Ω).<br />

(u,v) ↦→ ∫ Ω ρ(x)uvdx,<br />

(u,v) ↦→ ∫ Ω κ(x)gradu·<br />

The calculations are explained in Sects. 3.5.3 and 3.5.4 and may involve numerical quadrature.<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

6.1<br />

p. 621<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

6.1<br />

p. 622<br />

Discretized in space<br />

Remark 6.1.20 (Spatial discretization options).<br />

←→ but still continuous in time<br />

Beside the Galerkin approach any other method <strong>for</strong> spatial discretization of 2nd-order elliptic BVPs<br />

can be used in the context of the method of lines: the matrices A, M may also be generated by<br />

finite differences (→ Sect. 4.1), finite volume methods (→ Sect. 4.2), or collocation methods (→<br />

Sect. 1.5.2).<br />

6.1.4 Timestepping<br />

For implementation we need a fully discrete evolution problem. This requires additional discretization<br />

in time:<br />

semi-discrete evolution problem (6.1.19) + timestepping fully discrete evolution problem<br />

Benefit of method of lines: we can apply already known integrators <strong>for</strong> initial value problems <strong>for</strong> ODEs<br />

to (6.1.19).<br />

First, refresh central concepts from numerical integration of initial value problems <strong>for</strong> ODEs, see [18,<br />

Ch. 12], [18, Ch. 13]:<br />

• single step methods of orderp, see [18, Def. 12.2.17] and [18, Thm. 12.3],<br />

• explicit and implicit Runge-Kutta single step methods, see [18, Sect. 12.4], [18, Sect. ??],<br />

encoded by Butcher scheme [18, Eq. 12.4.10], [18, Eq 13.3.8].<br />

• the notion of a stiff problem (→ [18, Notion 13.2.25]),<br />

• the definition of the stability function of a single step method, see [18, Thm. 13.3.9],<br />

• the concept of L-stability [18, Def 13.3.11] and how to verify it <strong>for</strong> Runge-Kutta methods.<br />

△<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

6.1<br />

p. 62<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

6.1<br />

p. 62


6.1.4.1 Single step methods<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Example 6.1.24 (Crank-Nicolson timestepping).<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Recall: single step methods (→ [18, Def. 12.2.17])<br />

are based on a temporal mesh {0 = t 0 < t 1 < ... < t M−1 < t M := T} (with local timestep<br />

sizeτ j = t j −t j−1 ),<br />

compute sequence<br />

(⃗µ (j)) M<br />

j=0 of approximations ⃗µ(j) ≈ µ(t j ) to the solution of (6.1.19) at the<br />

nodes of the temporal mesh according to<br />

⃗µ (j) := Ψ t j−1,t j⃗µ (j−1) := Ψ(t j−1 ,t j ,⃗µ (j−1) ) , j = 1,...,M ,<br />

whereΨis the discrete evolution defining the single step method, see [18, Def. 12.2.17].<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Crank-Nicolson method = implicit midpoint rule: replace<br />

dt d in (6.1.19) with symmetric difference quotient<br />

and average right hand side:<br />

}<br />

M{ ddt ⃗µ(t) +A⃗µ(t) = ⃗ϕ(t)<br />

⇓<br />

M ⃗µ(j) − ⃗µ (j−1)<br />

= − 1 τ 2<br />

(⃗µ A (j) + ⃗µ (j−1)) + 1 2 (⃗ϕ(t j)+ ⃗ϕ(t j−1 )) . (6.1.25)<br />

This yields a method that is 2nd-order consistent.<br />

✸<br />

Generalization of Euler methods:<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Runge-Kutta single step methods → [18, Sect. 12.4], [18, Sect. 13.3]<br />

Example 6.1.21 (Euler timestepping). → [18, Sect. 12.2]<br />

6.1<br />

p. 625<br />

6.1<br />

p. 62<br />

We target the initial value problem<br />

}<br />

M{ ddt ⃗µ(t) +A⃗µ(t) = ⃗ϕ(t) <strong>for</strong>0 < t < T ,<br />

⃗µ(0) = ⃗µ 0 .<br />

(6.1.19)<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Definition 6.1.26 (General Runge-Kutta method). → [18, Def. 13.3.7]<br />

For coefficientsb i ,a ij ∈ R, c i := ∑ s<br />

j=1 a ij , i,j = 1,...,s, s ∈ N, the discrete evolutionΨ s,t<br />

of ans-stage Runge-Kutta single step method (RK-SSM) <strong>for</strong> the ODEẏ = f(t,y), is defined by<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Explicit Euler method [18, Eq. 12.2.4]: replace<br />

dt d in (6.1.19) with <strong>for</strong>ward difference quotient, see<br />

[18, Rem. 12.2.5]:<br />

(6.1.19) M⃗µ (j) = M ⃗ µ (j−1) −τ j<br />

( A⃗µ<br />

(j−1) − ⃗ϕ(tj−1 ) ) , j = 1,...,M −1 . (6.1.22)<br />

Implicit Euler method [18, Eq. 12.2.10]: replace<br />

dt d in (6.1.19) with backward difference quotient<br />

(6.1.19) M⃗µ (j) = M ⃗ µ (j−1) −τ j<br />

( A⃗µ (j) − ⃗ϕ(t j ) ) , j = 1,...,M −1 . (6.1.23)<br />

Note that both (6.1.22) and (6.1.23) require the solution of a linear system of equations in each step<br />

Recall [18, Sect. 12.3]:<br />

(6.1.22): ⃗µ (j) = ⃗µ (j−1) +τ j M −1 (⃗ϕ(t j−1 )−A⃗µ (j−1) ) ,<br />

(<br />

(6.1.23): ⃗µ (j) = (τ j A+M) −1 Mµ (j−1) ⃗<br />

)<br />

+τ j ⃗ϕ(t j ) .<br />

both Euler method are of first order.<br />

✸<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

s∑<br />

s∑<br />

k i := f(t+c i τ,y+τ a ij k j ) , i = 1,...,s , Ψ t,t+τ y := y+τ b i k i .<br />

j=1<br />

i=1<br />

Thek i ∈ R d are called increments.<br />

Shorthand notation <strong>for</strong> s-stage Runge-Kutta methods: Butcher scheme → [18, Eq. 13.3.8]<br />

c A<br />

b T ˆ=<br />

c 1 a 11 a 12 ... ... a 1s<br />

c 2 a 21<br />

... a 2s<br />

. . ... .<br />

c s a s1 . a ss<br />

, c,b ∈ R s , A ∈ R s,s . (6.1.27)<br />

b 1 b 2 ... ... b s<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

Concretely <strong>for</strong> linear parabolic evolution: application ofs-stage Runge-Kutta method to<br />

}<br />

M{ ddt ⃗µ(t) +A⃗µ(t) = ⃗ϕ(t) ⇔ ˙⃗µ = M −1 (⃗ϕ(t)−A⃗µ(t)) . (6.1.19)<br />

6.1<br />

} {{ }<br />

6.1<br />

=f(t,⃗µ)<br />

p. 626<br />

p. 62<br />

DRAFT


Then simply plug this into the <strong>for</strong>mulas of Def. 6.1.26.<br />

Note:<br />

Timestepping scheme <strong>for</strong> (6.1.19): compute ⃗µ (j+1) from ⃗µ (j) through<br />

s∑<br />

⃗κ i ∈ R N : M⃗κ i + τa im A⃗κ m = ⃗ϕ(t j +c i τ)−A⃗µ (j) , i = 1,...,s , (6.1.28)<br />

m=1<br />

s∑<br />

⃗µ (j+1) = ⃗µ (j) +τ ⃗κ m b m . (6.1.29)<br />

m=1<br />

For an implicit RK-method (6.1.28) is a linear system of equations of sizeNs.<br />

6.1.4.2 Stability<br />

Example 6.1.30 (Convergence of Euler timestepping).<br />

Parabolic evolution problem in one spatial dimension (IBVP):<br />

∂u<br />

∂t = ∂2 u<br />

∂x 2 in[0,1]×]0,1[ , (6.1.31)<br />

u(t,0) = u(t,1) = 0 <strong>for</strong>0 ≤ t ≤ 1 , u(0,x) = sin(πx) <strong>for</strong>0 < x < 1 . (6.1.32)<br />

exact solution u(t,x) = exp(−π 2 t)sin(πx) . (6.1.33)<br />

Spatial finite element Galerkin discretization by means of linear finite elements (V 0,N =<br />

S1,0 0 (M)) on equidistant meshMwith meshwidthh := N 1 → Sect. 1.5.1.2.<br />

u N,0 := I 1 u 0 by linear interpolation onM, see Sect. 5.3.1.<br />

Timestepping by explicit and implicit Euler method (6.1.22), (6.1.23) with uni<strong>for</strong>m timestepτ :=<br />

1<br />

M .<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

6.1 20<br />

21 %Timestepping<br />

p. 629<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Code 6.1.34: Euler timestepping <strong>for</strong> (6.1.31)<br />

1 f u n c t i o n [errex,errimp] = sinevl(N,M,u)<br />

2 % Solve fully discrete two-point parabolic evolution problem (6.1.31)<br />

3 % in [0,1]×]0,1[. Use both explicit and implicit Euler method <strong>for</strong> timestepping<br />

4 % N: number of spatial grid cells<br />

5 % M: number of timesteps<br />

6 % u: handle of type @(t,x) to exact solution<br />

7<br />

8 i f (nargin < 3), u = @(t,x) (exp(-( p i ^2)*t).* s in(pi*x)); end %<br />

Exact solution<br />

9<br />

10 h = 1/N; tau = 1/M; % Spatial and temporal meshwidth<br />

11 x = h:h:1-h; % Spatial grid, interior points<br />

12<br />

13 % Finite element stiffness and mass matrix<br />

14 Amat = g a l l e r y (’tridiag’,N-1,-1,2,-1)/h;<br />

15 Mmat = h/6* g a l l e r y (’tridiag’,N-1,1,4,1);<br />

16 Xmat = Mmat+tau*Amat;<br />

17<br />

18 mu0 = u(0,x)’; % Discrete initial value<br />

19 mui = mu0; mue = mu0;<br />

22 erre = 0; erri = 0;<br />

23 f o r k=1:M<br />

24 mue = mue - tau*(Mmat\(Amat*mue)); % explicit Euler step<br />

25 mui = Xmat\(Mmat*mui); % implicit Euler step<br />

26 utk = u(k*tau,x)’;<br />

27 erre = erre + norm(mue-utk)^2; % Computation of error norm<br />

28 erri = erri + norm(mui-utk)^2;<br />

29 end<br />

30<br />

31 errex = s q r t(erre*h*tau);<br />

32 errimp = s q r t(erri*h*tau);<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

6.1<br />

p. 63<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Galerkin matrices, see (1.5.60):<br />

⎛<br />

⎞ ⎛<br />

⎞<br />

2 −1 0 0 4 1 0 0<br />

−1 2 −1<br />

1 4 1<br />

A = 1 0 ... ... . ..<br />

h<br />

, M = h 0 . .. . .. ...<br />

⎜<br />

... . .. ... 0<br />

6<br />

.<br />

⎟ ⎜<br />

... ... . .. 0<br />

⎟<br />

⎝ −1 2 −1⎠<br />

⎝ 1 4 1⎠<br />

0 0 −1 2 0 0 1 4<br />

6.1<br />

p. 630<br />

Evaluation of approximate space-timeL 2 -norm of the discretization error:<br />

M∑<br />

err 2 N−1 ∑<br />

:= hτ · |u(t j ,x i )−µ (j)<br />

i | 2 . (6.1.35)<br />

j=1 i=1<br />

Error norm <strong>for</strong> explicit Euler timestepping:<br />

6.1<br />

p. 63


N\M 50 100 200 400 800 1600 3200<br />

5 Inf 0.009479 0.006523 0.005080 0.004366 0.004011 0.003834<br />

10 Inf Inf Inf Inf 0.001623 0.001272 0.001097<br />

20 Inf Inf Inf Inf Inf Inf 0.000405<br />

40 Inf Inf Inf Inf Inf Inf Inf<br />

80 Inf Inf Inf Inf Inf Inf Inf<br />

160 Inf Inf Inf Inf Inf Inf Inf<br />

320 Inf Inf Inf Inf Inf Inf Inf<br />

Error norm <strong>for</strong> implicit Euler timestepping:<br />

N\M 50 100 200 400 800 1600 3200<br />

5 0.007025 0.001828 0.000876 0.002257 0.002955 0.003306 0.003482<br />

10 0.009641 0.004500 0.001826 0.000461 0.000228 0.000575 0.000749<br />

20 0.010303 0.005175 0.002509 0.001149 0.000461 0.000116 0.000058<br />

40 0.010469 0.005345 0.002681 0.001321 0.000634 0.000289 0.000116<br />

80 0.010511 0.005387 0.002724 0.001364 0.000677 0.000332 0.000159<br />

160 0.010521 0.005398 0.002734 0.001375 0.000688 0.000343 0.000170<br />

320 0.010524 0.005400 0.002737 0.001378 0.000691 0.000346 0.000172<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Code 6.1.37: ode45 applied semi-discrete (6.1.31)<br />

1 f u n c t i o n [Nsteps,err] = peode45(N,tol,u)<br />

2 % Solving fully discrete two-point parabolic evolution problem (6.1.31)<br />

3 % in [0,1]×]0,1[ by means of adaptiv MATLAB standard Runge-Kutta integrator.<br />

4 i f (nargin < 3), u = @(t,x) (exp(-( p i ^2)*t).* s in(pi*x)); end %<br />

Exact solution<br />

5<br />

6 % Finite element stiffness and mass matrix, see Sect. 1.5.1.2<br />

7 h = 1/N; % spatial meshwidth<br />

8 Amat = g a l l e r y (’tridiag’,N-1,-1,2,-1)/h;<br />

9 Mmat = h/6* g a l l e r y (’tridiag’,N-1,1,4,1);<br />

10 x = h:h:1-h; % Spatial grid, interior points<br />

11<br />

12 mu0 = u(0,x)’; % Discrete initial value<br />

13 fun = @(t,muv) -(Mmat\(Amat*muv)); % right hand side of ODE<br />

14<br />

15 opts = odeset(’reltol’,tol,’abstol’,0.01*tol);<br />

16 [t,mu] = ode45(fun,[0,1],mu0,opts);<br />

17<br />

18 Nsteps = l e n g t h(t);<br />

19 [T,X] = meshgrid(t,x); err = norm(mu’-u(T,X),’fro’);<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

6.1<br />

p. 633<br />

6.1<br />

p. 63<br />

Explicit Euler timestepping: we observe a glaring instability (exponential blow-up) in case of large<br />

timestep combined with fine mesh.<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

ode45: atol = 0.00001, rtol = 0.001<br />

ode45: atol = 0.00001, rtol = 0.001<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Implicit Euler timestepping: no blow-up at any combination of spatial and temporal mesh width.<br />

✸<br />

No. of ode45 steps h<br />

10 4<br />

10 3<br />

discrete L 2 norm of error<br />

10 −2<br />

ode45<br />

impl Euler, 100 steps<br />

Example 6.1.36 (ode45 <strong>for</strong> discrete parabolic evolution).<br />

Same IBVP and spatial discretization as in Ex. 6.1.30.<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

10 5 spatial mesh width h<br />

10 2<br />

10 −2 10 −1 10 0<br />

Fig. 184<br />

10 −1 spatial mesh width h<br />

10 −2 10 −1 10 0<br />

Fig. 185<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Adaptive Runge-Kutta timestepping by MATLAB standard integrator ode45.<br />

Monitored:<br />

Number of timesteps as a function on spatial meshwidthh,<br />

discreteL 2 -error (6.1.35).<br />

Observations:<br />

ode45: dramatic increase of no. of timesteps <strong>for</strong>h M → 0 without gain in accuracy.<br />

Implicit Euler achieves better accuracy with only 100 equidistant timesteps!<br />

6.1<br />

p. 634<br />

✸<br />

6.1<br />

p. 63


This reminds us of the stiff initial value problems studied in [18, Thm. 13.2]:<br />

Notion 6.1.38 (Stiff IVP). → [18, Notion 13.2.25]<br />

An initial value problem <strong>for</strong> an ODE is called stiff, if stability imposes much tighter timestep<br />

constraints on explicit single step methods than the accuracy requirements.<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

that is, the decoupling of eigencomponents carries over to the explicit Euler method: <strong>for</strong>i = 1,...,N<br />

η (j)<br />

i = η (j−1)<br />

i<br />

The condition|1−τλ i | < 1 en<strong>for</strong>ces a<br />

−τλ i η (j−1) ⇒ η (j)<br />

i = (1−τλ i ) j η (0)<br />

i . (6.1.40)<br />

|1−τλ i | < 1 ⇔ lim<br />

j→∞ η(j) i = 0 . (6.1.41)<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Admittedly, this is a fuzzy notion. Yet, it cannot be fleshed out on the abstract level, but has to be<br />

discussed <strong>for</strong> concrete evolution problem, which is done next.<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

timestep size constraint: τ < 2 λ i<br />

(6.1.42)<br />

in order to achieve the qualitatively correct behavior lim<br />

j→∞ η(j) i = 0 and to avoid blow-up lim<br />

j→∞ |η(j) i | =<br />

∞: the timestep size constraint (6.1.42) is necessary only <strong>for</strong> the sake of stability (not in order to<br />

guarantee a prescribed accuracy).<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Let us try to understand, why semi-discrete parabolic evolutions (6.1.19) arising from the method of<br />

lines lead to stiff initial value problems.<br />

This accounts to the observed blow-ups in Ex. 6.1.30. On the other hand, adaptive stepsize control<br />

[18, Sect. 12.5] manages to ensure the timestep constraint, but the expense of prohibitively small<br />

timesteps that render the method grossly inefficient, if some of theλ i are large.<br />

Technique: Diagonalization, cf. [18, Eq. 13.2.10]<br />

(Recall the concept of a “square root”M 1/2 of an s.p.d. matrixM, see [18, Sect. 5.3])<br />

A,M symmetric positive definite ⇒ M −1/2 AM −1/2 symmetric positive definite .<br />

[18, Cor. 6.1.9]<br />

⇒ ∃ orthogonalT ∈ R N,N : T ⊤ M −1/2 AM −1/2 T = D := diag(λ 1 ....,λ N ) ,<br />

where the λ i > 0 are generalized eigenvalues <strong>for</strong> A ⃗ ξ = λM ⃗ ξ ➤<br />

constant introduced in (6.1.12)).<br />

λ i ≥ γ <strong>for</strong> all i (γ is the<br />

6.1<br />

p. 637<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

The next numerical demonstrations and Lemma show that λ max := max i λ i will inevitably become<br />

huge <strong>for</strong> finite element discretization on fine meshes.<br />

Example 6.1.43 (Behavior of generalized eigenvalues ofA⃗µ = λM⃗µ).<br />

Bilinear <strong>for</strong>ms associated with parabolic IBVP and homogeneous Dirichlet boundary conditions<br />

∫<br />

∫<br />

a(u,v) = gradu·gradvdx , m(u,v) = u(x)v(x)dx , u,v ∈ H0 1 (Ω) .<br />

Ω<br />

Ω<br />

6.1<br />

p. 63<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

➤<br />

Trans<strong>for</strong>mation (“diagonalization”) of (6.1.19) based on substitution⃗η := T ⊤ M 1/2 ⃗µ:<br />

(6.1.19)<br />

⃗η:=T ⊤ M 1/2 ⃗µ<br />

=⇒ d<br />

dt ⃗η(t)+D⃗η = T ⊤ M −1/2 ⃗ϕ(t) . (6.1.39)<br />

Since D is diagonal, (6.1.39) amounts to N decoupled scalar ODEs (<strong>for</strong> eigencomponentsη i<br />

of ⃗µ).<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Linear finite element Galerkin discretization, see Sect. 1.5.1.2 <strong>for</strong> 1D, and Sect. 3.2 <strong>for</strong> 2D.<br />

<strong>Numerical</strong> experiments in 1D & 2D:<br />

•Ω =]0,1[, equidistant meshes→Ex. 6.1.30<br />

• “disk domain”Ω = {x ∈ R 2 : ‖x‖ < 1}, sequence of regularly refined meshes.<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Note: <strong>for</strong> ⃗ϕ ≡ 0,λ > 0 : η i (t) = exp(−λ i t)η i (0) → 0 <strong>for</strong>t → ∞<br />

As in [18, Thm. 13.2.12] this trans<strong>for</strong>mation can be applied to the explicit Euler timestepping (6.1.22)<br />

(<strong>for</strong> ⃗ϕ ≡ 0, uni<strong>for</strong>m timestepτ > 0)<br />

Monitored:<br />

largest and smallest generalized eigenvalue<br />

⃗µ (j) = ⃗µ (j−1) −τM −1 A⃗µ (j−1) ⃗η:=T ⊤ M 1/2 ⃗µ<br />

⃗η (j) = ⃗η (j−1) −τD⃗η (j−1) ,<br />

6.1<br />

p. 638<br />

6.1<br />

p. 64


Code 6.1.44: Computation of extremal generalized eigenvalues<br />

1 % LehrFEM MATLAB script <strong>for</strong> computing Dirichlet eigenvalues of Laplacian<br />

2 % on a unit disc domain.<br />

3<br />

4 GD_HANDLE = @(x,varargin)zeros( s i z e (x,1),1); % Zero Dirichlet data<br />

5 H0 =[ .25 .2 .1 .05 .02 .01 0.005]’; % target mesh widths<br />

6 NRef = l e n g t h(H0); % Number of refinement steps<br />

7<br />

8 % Variables <strong>for</strong> mesh widths and eigenvalues<br />

9 M_W = zeros(NRef,1); lmax = M_W; lmin = M_W;<br />

10<br />

11 % Main refinement loop<br />

12 f o r iter = 1:NRef<br />

13<br />

14 % Set parameters <strong>for</strong> mesh<br />

15 C = [0 0]; % Center of circle<br />

16 R = 1; % Radius of circle<br />

17 BBOX = [-1 -1; 1 1]; % Bounding box<br />

18 DHANDLE = @dist_circ; % Signed distance function<br />

19 HHANDLE = @h_uni<strong>for</strong>m; % Element size function<br />

20 FIXEDPOS = []; % Fixed boundary vertices of the mesh<br />

21 DISP = 0; % Display flag<br />

22<br />

23 % Mesh generation<br />

24 Mesh =<br />

init_Mesh(BBOX,H0(iter),DHANDLE,HHANDLE,FIXEDPOS,DISP,C,R);<br />

25 Mesh = add_Edges(Mesh); % Provide edge in<strong>for</strong>mation<br />

26 Loc = get_BdEdges(Mesh); % Obtain indices of edges on ∂Ω<br />

27 Mesh.BdFlags = zeros( s i z e (Mesh.Edges,1),1);<br />

28 Mesh.BdFlags(Loc) = -1; % Flag boundary edges<br />

29 Mesh.ElemFlag = zeros( s i z e (Mesh.Elements,1),1);<br />

30 M_W(iter) = get_MeshWidth(Mesh); % Get mesh width<br />

31<br />

32 f p r i n t f (’Mesh on level %i: %i elements, h =<br />

%f\n’,iter, s i z e (Mesh,1),M_W(iter));<br />

33 % Assemble stiffness matrix and mass matrix<br />

34 A = assemMat_LFE(Mesh,@STIMA_Lapl_LFE,P7O6());<br />

35 M = assemMat_LFE(Mesh,@MASS_LFE,P7O6());<br />

36 % Incorporate Dirichlet boundary data (nothing to do here)<br />

37 [U,FreeNodes] = assemDir_LFE(Mesh,-1,GD_HANDLE);<br />

38 A = A(FreeNodes,FreeNodes);<br />

39 M = M(FreeNodes,FreeNodes);<br />

40<br />

41 % Use MATLAB’s built-in eigs-function to compute the<br />

42 % extremal eigenvalues, see [18, Sect. 6.4].<br />

43 NEigen = 6;<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

6.1<br />

p. 641<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

6.1<br />

p. 642<br />

44 d = eigs(A,M,NEigen,’sm’); lmin(iter) = min(d);<br />

45 d = eigs(A,M,NEigen,’lm’); lmax(iter) = max(d);<br />

46 end<br />

47<br />

48 f i g u r e ; p l o t (M_W,lmin,’b-+’,M_W,lmax,’r-*’); g r i d on;<br />

49 s e t(gca,’XScale’,’log’,’YScale’,’log’,’XDir’,’reverse’);<br />

50 t i t l e (’\bf Eigenvalues of Laplacian on unit disc’);<br />

51 x l a b e l (’{\bf mesh width h}’,’fontsize’,14);<br />

52 y l a b e l (’{\bf generalized eigenvalues}’,’fontsize’,14);<br />

53 legend(’\lambda_{min}’,’\lambda_{max}’,’Location’,’NorthWest’)<br />

54 p = p o l y f i t (log(M_W),log(lmax),1);<br />

55 add_Slope(gca,’east’,p(1));<br />

56<br />

57 p r i n t -depsc2 ’../../../Slides/NPDEPics/geneigdisklfe.eps’;<br />

generalized eigenvalues<br />

Linear FE in 1D: lambda i<br />

10 7 λ min<br />

λ max<br />

10 6 O(h −2 )<br />

10 5<br />

10 4<br />

10 3<br />

10 2<br />

10 1<br />

10 0<br />

10 0<br />

10 −1<br />

10 −2<br />

spatial mesh width h<br />

Observation:<br />

Ω =]0,1[<br />

10 −3<br />

Fig. 186<br />

λ min := min i λ i does hardly depend on the mesh width.<br />

λ max := max i λ i displays aO(h −2<br />

M ) growth ash M → 0<br />

generalized eigenvalues<br />

Eigenvalues of Laplacian on unit disc<br />

10 6 λ min<br />

10 5<br />

10 4<br />

10 3<br />

10 2<br />

10 1<br />

10 0<br />

10 0<br />

λ max<br />

p = −2.00<br />

10 −1<br />

10 −2<br />

10 −3<br />

Fig. 187<br />

mesh width h<br />

Ω = {x ∈ R 2 : ‖x‖ < 1}<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

6.1<br />

p. 64<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

6.1<br />

p. 64


Remark 6.1.45 (Spectrum of elliptic operators).<br />

The observation made in Ex. 6.1.43 is not surprising!<br />

To understand why, let us translate the generalized eigenproblem “back to the ODE/PDE level”:<br />

A⃗µ = λM⃗µ (6.1.46)<br />

⇕<br />

u N ∈ V 0,N : a(u N ,v N ) = λm(u N ,v N ) ∀v N ∈ V 0,N .<br />

← “undo Galerkin discretization”<br />

∫<br />

∫<br />

u ∈ H0 1 (Ω): gradu·gradvdx = λ u·vdx ∀v ∈ H0 1 (Ω) .<br />

Ω<br />

Ω<br />

⇓<br />

which is a so-called elliptic eigenvalue problem.<br />

It is easily solved in 1D onΩ =]0,1[:<br />

−∆u = λu inΩ , u = 0 on∂Ω , (6.1.47)<br />

d 2 u<br />

(6.1.47) ˆ=<br />

dx2(x) = λu(x) , 0 < x < 1 , u(0) = u(1) = 0 .<br />

⇒ u k (x) = sin(kπx) ↔ λ k = (πk) 2 , k ∈ N .<br />

Note that we find an infinite number of eigenfunctions and eigenvalues, parameterized byk ∈ N. The<br />

eigenvalues tend to∞<strong>for</strong>k → ∞:<br />

λ k = O(k 2 ) <strong>for</strong> k → ∞ .<br />

Of course, (6.1.46) can have a finite number of eigenvectors only. Crudely speaking, they correspond<br />

to those eigenfunctions u k (x) = sin(kπx) that can be resolved by the mesh (if u k “oscillates too<br />

much”, then it cannot be represented on a grid). These are the first N so that we find in 1D <strong>for</strong> an<br />

equidistant mesh<br />

λ max = O(N 2 ) = O(h −2<br />

M ) .<br />

This is heuristics, but the following Lemma will a precise statement.<br />

✸<br />

△<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

6.1<br />

p. 645<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

6.1<br />

p. 646<br />

✬<br />

Lemma 6.1.48 (Behavior of of generalized eigenvalues).<br />

Let M be a simplicial mesh and A, M denote the Galerkin matrices <strong>for</strong> the bilinear <strong>for</strong>ms<br />

a(u,v) = ∫ Ω gradu · gradvdx and m(u,v) = ∫ Ω u(x)v(x)dx, respectively, and V 0,N :=<br />

Sp,0 0 (M). Then the smallest and largest generalized eigenvalues of A⃗µ = λM⃗µ, denoted by<br />

λ min andλ max , satisfy<br />

✫<br />

1<br />

diam(Ω) 2 ≤ λ min ≤ C , λ max ≥ Ch −2<br />

M ,<br />

where the “generic constants” (→ Rem. 5.3.44) depend only on the polybomial degree p and<br />

the shape regularity measureρ M .<br />

Proof.<br />

(partial) We rely on the Courant-Fischer min-max theorem [18, Thm. 6.3.35] that, among<br />

other consequencees, expresses the boundaries of the spectrum of a symmetric matrix through the<br />

extrema of its Rayleigh quotient<br />

T = T T ∈ R N,N ⃗T ξ T ⃗ ξ<br />

⃗T ξ T ⃗ ξ<br />

⇒ λ min (T) = min<br />

⃗ ξ∈R N \{0} ⃗ ξ T , λ max (T) = max<br />

⃗ ξ ⃗ ξ∈R N \{0} ⃗ ξ T .<br />

⃗ ξ<br />

Apply this to the generalized eigenvalue problem<br />

A⃗µ = λM⃗µ ⃗ ζ:=M 1/2 ⃗µ<br />

⇔<br />

}<br />

M −1/2 {{<br />

AM −1/2 ⃗<br />

} ζ = λ ⃗ ζ .<br />

=:T<br />

⃗µ T A⃗µ<br />

λ min = min<br />

⃗µ≠0 ⃗µ T M⃗µ , λ ⃗µ T A⃗µ<br />

max = max<br />

⃗µ≠0 ⃗µ T M⃗µ . (6.1.49)<br />

As a consequence we only have to find bounds <strong>for</strong> the extrema of a generalized Rayleigh quotient,<br />

cf. [18, Eq. 6.3.33]. This generalized Rayleigh quotient can be expressed as<br />

⃗µ T A⃗µ<br />

⃗µ T M⃗µ = a(u N,u N )<br />

m(u N ,u N ) , ⃗µˆ= coefficient vector <strong>for</strong> u N . (6.1.50)<br />

Now we discuss a lower bound <strong>for</strong> λ max , which can be obtained by inserting a suitable candidate<br />

function into (6.1.50).<br />

✩<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

✪V.<br />

Gradinar<br />

A. Chern<br />

R. Hiptm<br />

DRAFT<br />

Discussion <strong>for</strong> special setting: V 0,N = S1 0 (M) on triangular meshM<br />

Candidate function: “tent function” u N = b i N (→ Sect. 3.2.3) <strong>for</strong> some node xi ∈ V(M) of the<br />

mesh!<br />

By elementary computations as in Sect. 3.2.5 we find<br />

(6.1.51)<br />

a(b i N ,bi N ) ≈ C , m(bi N ,bi N ) ≤ C max h 2<br />

K∈U(x i K ,<br />

)<br />

DRAFT<br />

6.1<br />

p. 64<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

6.1<br />

p. 64


where the generic constantsC > 0 depend on the shape regularity measureρ M only.<br />

(6.1.49) & (6.1.51) ⇒ λ max ≥ Ch −2<br />

M .<br />

✷<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

There we saw that everything boils down to inspecting the modulus of a rational stability function on<br />

C, see [18, Thm. 13.3.9]. This gave rise to the concept of L-stability, see [18, Def. 13.3.11]. Here, we<br />

will not delve into a study of stability functions.<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Necessary condition <strong>for</strong> suitability of a single step method <strong>for</strong> semi-discrete parabolic evolution<br />

problem (6.1.19)(“method of lines”):<br />

Lemma 6.1.48 timestep constraint (6.1.42) unacceptable to semi-discrete parabolic evolutions!<br />

C. Schwab,<br />

The discrete evolution Ψ τ λ : R ↦→ R of the single step method applied to the scalar ODE<br />

R. Hiptmair<br />

ẏ = −λy satisfies<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru λ > 0 ⇒ lim<br />

A. Chernov<br />

j→∞ (Ψτ λ )j y 0 = 0 ∀y 0 ∈ R, ∀τ > 0 . (6.1.55)<br />

From [18, Sect. 13.3] we already know that some implicit single step methods are not affected by DRAFT<br />

stability induced timestep constraints.<br />

Definition 6.1.56 (L(π)-stability).<br />

A single step method satisfying (6.1.55) is called L(π)-stable.<br />

Recall [18, Ex. 13.3.1]: apply diagonalization technique, see (6.1.39), to implicit Euler timestepping<br />

with uni<strong>for</strong>m timestepτ > 0<br />

Example 6.1.57 (L(π)-stable Runge-Kutta single step methods).<br />

⃗µ (j) = ⃗µ (j−1) −τM −1 A⃗µ (j) ⃗η:=T ⊤ M 1/2 ⃗µ<br />

⃗η<br />

(j) = ⃗η<br />

(j−1) −τD⃗η<br />

(j) ,<br />

that is, the decoupling of eigencomponents carries over to the implicit Euler method: <strong>for</strong>i = 1,...,N<br />

η (j)<br />

i = η (j−1)<br />

i<br />

[ ∣ ∣ ∣∣<br />

1<br />

1+τλ i<br />

∣ ∣∣∣<br />

< 1 and<br />

−τλ i η (j) ⇒ η (j) ( )<br />

i = 1 jη (0)<br />

1+τλ i i . (6.1.52)<br />

λ i > 0 ⇒<br />

]<br />

lim<br />

j→∞ η(j) i = 0 ∀τ > 0 . (6.1.53)<br />

This diagonalization trick can be applied to general Runge-Kutta single step methods (RKSSM, →<br />

Def. 6.1.26). Loosely speaking, the following diagram commutes<br />

Mdt d⃗µ+Aµ = 0 trans<strong>for</strong>mation ⃗η = TT M 1 /2<br />

⃗µ<br />

−−−−−−−−−−−−−−−−−→<br />

⏐<br />

RK-SSM↓<br />

dt dη i = −λ i η i , i = 1,...,N<br />

⏐<br />

↓RK-SSM<br />

⃗µ (j) = Ψ τ ⃗µ (j−1) trans<strong>for</strong>mation ⃗η = T T M 1 /2<br />

⃗µ<br />

−−−−−−−−−−−−−−−−−→ ⃗η (j)<br />

i = ˜Ψ τ ⃗η (j−1)<br />

i , i = 1,...,N .<br />

The bottom line is<br />

(6.1.54)<br />

that we have to study the behavior of the RK-SSM only <strong>for</strong> linear scalar ODEsẏ = −λy,λ > 0.<br />

6.1<br />

p. 649<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Simplest example: implicit Euler timestepping (6.1.23).<br />

Some commonly used higher order methods, specified through their Butcher schemes, see (6.1.27):<br />

1 5<br />

3 12 − 12<br />

1<br />

1 3 1<br />

4 4<br />

(6.1.58)<br />

3 1<br />

4 4<br />

RADAU-3 scheme (order 3)<br />

More examples → [18, Ex. 13.3.20]<br />

6.1.5 Convergence<br />

λ λ 0<br />

1 1−λ λ<br />

1−λ λ<br />

, λ := 1− 1 2√<br />

2 , (6.1.59)<br />

SDIRK-2 scheme (order 2)<br />

✸<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

6.1<br />

p. 65<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

This is the gist of the model problem analysis discussed in [18, Sect. 13.3].<br />

6.1<br />

p. 650<br />

6.1<br />

p. 65


Why should one prefer complicated implicit L(π)-stable Runge-Kutta single step methods (→<br />

Ex. 6.1.57) to the simple implicit Euler method?<br />

Silly question! Because these methods deliver “better accuracy”!<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Since the implicit Euler method is first order consistent we expect<br />

temporal timestepping error<br />

O(τ)<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

However, we need some clearer idea of what is meant by this. To this end, we now study the dependence<br />

of (a norm of) the discretization error <strong>for</strong> a parabolic IBVP on the parameters of the spatial and<br />

temporal discretization.<br />

(6.1.61) ➣ conjecture: total error is sum of spatial and temporal discretization error.<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Example 6.1.60 (Convergence of fully discrete timestepping in one spatial dimension).<br />

Harbrecht From Fig. 188 we draw the compelling conclusion:<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

d<br />

dt u−u′′ DRAFT<br />

= f(t,x) on]0,1[×]0,1[<br />

exact solutionu(x,t) = (1+t 2 )e −π2t • <strong>for</strong> big mesh widthh M (spatial error dominates) further reduction of timestep sizeτ is useless,<br />

sin(πx), source term accordingly<br />

Linear finite element Galerkin discretization equidistant mesh, see Sect. 1.5.1.2,V 0,N = S1,0 0 (M),<br />

yield a reduction of the total error.<br />

piecewise linear spatial approximation of source termf(x,t)<br />

implicit Euler timestepping (→ Ex. 6.1.21) with uni<strong>for</strong>m timestepτ > 0<br />

)1 2.<br />

Monitored:<br />

error norm<br />

(<br />

τ<br />

M∑<br />

|u−u N (τj)| 2 H 1 (Ω)<br />

j=1<br />

The norms |u−u N (τj)| H 1 (Ω) were approximated by high order local quadrature rules, whose impact<br />

can be neglected.<br />

l 2 −mean of H 1 −seminorm of error<br />

✁ h M - andτ-dependence of error norm<br />

6.1<br />

p. 653<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

• if timestep τ is large (temporal error dominates), refinement of the finite element space does not<br />

Example 6.1.62 (Higher order timestepping <strong>for</strong> 1D heat equation).<br />

same IBVP as in Ex. 6.1.60<br />

spatial discretization on equidistant grid, very small meshwidthh = 0.5·10 −4 ,V N = S 0 1,0 (M)<br />

✸<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

6.1<br />

p. 65<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

error norm<br />

10 −2<br />

10 −3<br />

10 −4<br />

10 −1<br />

10 −2<br />

timestep ∆ t<br />

10 −3<br />

10 −4<br />

Fig. 188<br />

10 −4 10 −3 10 −2 10 −1<br />

Obervation:<br />

τ small: error norm≈ h M<br />

h M small: error norm≈ τ<br />

The error seems to behave like<br />

error norm ≈ C 1 h M +C 2 τ . (6.1.61)<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Various timestepping methods<br />

(➣ different orders of consistency)<br />

• implicit Euler timestepping (6.1.23), first order<br />

• Crank-Nicolson-method (6.1.25), order 2<br />

• SDIRK-2 timestepping (→ Ex. 6.1.57), order 2<br />

• Gauss-Radau-Runge-Kutta collocation methods<br />

withsstages, order2s−1<br />

Maximal L 2 −error<br />

10 −1<br />

10 −2<br />

10 −3<br />

10 −4<br />

10 −5<br />

10 −6<br />

10 −7<br />

10 −8<br />

Discretization error <strong>for</strong> heat equation<br />

Implicit Euler<br />

Crank−Nicolson<br />

SDIRK2<br />

Radau, s=2<br />

Radau, s=3<br />

Radau, s=4<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

10 −1 meshwidth h<br />

Recall from Sect. 5.3.5, Thm. 5.1.10, Thm. 5.3.42:<br />

Note: all methods L(π)-stable (→ Def. 6.1.56),<br />

except <strong>for</strong> Crank-Nicolson-method.<br />

10 0 No. of timesteps<br />

10 −9<br />

10 −10<br />

10 1 10 2<br />

Fig. 189<br />

energy norm of spatial finite element discretization error O(h M ) <strong>for</strong>h M → 0<br />

6.1<br />

p. 654<br />

6.1<br />

p. 65


Monitored:<br />

max<br />

j<br />

∥<br />

∥u(t j )−u (j)<br />

N ∥ L 2 (evaluated by high order quadrature)<br />

(]0,1[)<br />

✸<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

A message contained in (6.1.64):<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

total discretization error = spatial error + temporal error<br />

Rem. 5.3.45 still applies:<br />

(6.1.64) does not give in<strong>for</strong>mation about actual error, but only about the<br />

trend of the error, when discretization parametersh M andτ are varied.<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Nevertheless, as in the case of the a priori error estimates of Sect. 5.3.5, we can draw conclusions<br />

about optimal refinement strategies in order to achieve prescribed error reduction.<br />

As in Sect. 5.3.5 we make the assumption that the estimates (6.1.64) are sharp <strong>for</strong> all contributions<br />

to the total error and that the constants are the same (!)<br />

contribution of spatial error ≈ Ch p M , h M ˆ= mesh width (→ Def. 5.2.3) ,<br />

contribution of temporal error ≈ Cτ q , τ ˆ= timestep size .<br />

(6.1.65)<br />

This suggests the following change ofh M ,τ in order to achieve error reduction by a factor ofρ > 1:<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

✬<br />

✩<br />

6.1<br />

p. 657<br />

reduce mesh width by factor ρ 1/p<br />

reduce timestep by factor ρ 1/q (6.1.65)<br />

=⇒ error reduction byρ > 1 . (6.1.66)<br />

6.1<br />

p. 65<br />

“Meta-theorem” 6.1.63 (Convergence of solutions of fully discrete parabolic evolution problems).<br />

Assume that<br />

the solution of the parabolic IBVP (6.1.3)–(6.1.5) is “sufficiently smooth”,<br />

its spatial Galerkin finite element discretization relies on degree p Lagrangian finite elements<br />

(→ Sect. 3.4) on uni<strong>for</strong>mly shape-regular families of meshes,<br />

timestepping is based on an L(π)-stable single step method of orderq with uni<strong>for</strong>m timestep<br />

τ > 0.<br />

Then we can expect an asymptotic behavior of the total discretization error according to<br />

(<br />

τ<br />

M∑<br />

j=1<br />

whereC > 0 must not depend onh M ,τ.<br />

|u−u N (τj)| 2 H 1 (Ω))1 2<br />

≤C(h p M +τq ) , (6.1.64)<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Guideline:<br />

spatial and temporal resolution have to be adjusted in tandem<br />

Remark 6.1.67 (Potential inefficiency of conditionally stable single step methods).<br />

Terminology:<br />

A timestepping scheme is labelled conditionally stable, if blow-up can be avoided by<br />

using sufficient small timesteps (timestep constraint).<br />

Now we can answer the question, why a stability induced timestep constraint like<br />

τ ≤ O(h −2<br />

M ) (6.1.68)<br />

can render a single step method grossly inefficient <strong>for</strong> integrating semi-discrete parabolic IBVPs.<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

✫<br />

✪<br />

(6.1.66) ➣ in order to reduce the error by a fixed factor ρ one has to reduce both timestep and<br />

meshwidth by some other fixed factors (asymptotically). More concretely, <strong>for</strong> the timestepτ:<br />

This has been dubbed a “meta-theorem”, because quite a few technical assumptions on the exact<br />

solution and the methods have been omitted in its statement. There<strong>for</strong>e it is not a mathematically<br />

rigorous statement of facts. More details in [19].<br />

6.1<br />

p. 658<br />

(6.1.66) ➣ accuracy requires reduction ofτ by a factorρ 1/q<br />

(6.1.68) ➣ stability entails reduction ofτ by a factor(ρ 1/p ) 2 = ρ 2/p .<br />

6.1<br />

p. 66


1<br />

q < 2 p<br />

⇒ stability en<strong>for</strong>ces smaller timestep than required by accuracy<br />

⇒ timestepping is inefficient!<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

6.2.1 Vibrating membrane<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Faced with conditional stability (6.1.68), then <strong>for</strong> the sake of efficiency<br />

use high-order spatial discretization combined with low order timestepping.<br />

However, this may not be easy to achieve<br />

because high-order timestepping is much simpler than high-order spatial discretization,<br />

because limited spatial smoothness of exact solution (→ results of Sect. 5.4 apply!) may impose<br />

a limit onq in (6.1.64).<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Recall:<br />

Tense string model (→ Sect. 1.4), shape of string described by continuous displacement function<br />

u : [a,b] ↦→ R,u ∈ H 1 ([a,b]).<br />

Taut membrane model (→ Sect. 2.1.1), shape of membrane given by displacement function u :<br />

Ω ↦→ R,u ∈ H 1 (Ω), over base domainΩ ⊂ R 2 .<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Concretely: 5th-order ode45 timestepping (q = 5)<br />

1<br />

q = 2 p<br />

➣<br />

use degree-10 Lagrangian FEM!<br />

6.2 Wave equations<br />

△<br />

6.2<br />

p. 661<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

u<br />

6.2<br />

p. 66<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

5<br />

OPTIONAL SECTION<br />

Lemma 6.1.14 teaches that in the absence of time-dependent sources the rate of change of temperature<br />

will decay exponentially in the case of heat conduction.<br />

Now we will encounter a class of evolution problems where temporal and spatial fluctuations will not<br />

be demped and will persist <strong>for</strong> good:<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Forcef(x)<br />

(a,u l )<br />

a<br />

Tense string↔u : [a,b] ↦→ R<br />

u(x)<br />

(b,u r )<br />

b<br />

Fig. 190<br />

x<br />

u(x 1<br />

,x 2<br />

)<br />

4<br />

3<br />

2<br />

1<br />

0<br />

−1<br />

−2<br />

−3<br />

0<br />

u(x,t)<br />

1<br />

0.8<br />

0.6<br />

0.4<br />

0.2<br />

0.4<br />

0.2<br />

0.6<br />

0.8<br />

0<br />

1<br />

x 2<br />

x 1<br />

Fig. 191<br />

Taut membrane↔u : Ω ↦→ R<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

This will be the class of linear conservative wave propagation problems<br />

As be<strong>for</strong>e these initial-boundary value problems (IBVP) will be posed on a space time cylinder ˜Ω :=<br />

Ω×]0,T[⊂ R d+1 (→ Fig. 183), whereΩ ⊂ R d , d = 2,3, is a bounded spatial domain as introduced<br />

in the context of elliptic boundary value problems, see Sect. 2.1.1.<br />

In Sect. 2.1.3 we introduced the general variational <strong>for</strong>mulation: with Dirichlet data (elevation of frame)<br />

given byg ∈ C 0 (∂Ω),<br />

V := {v ∈ H 1 (Ω): v |∂Ω = g}<br />

we seek<br />

The unknown will be a functionu = (x,t) : ˜Ω ↦→ R.<br />

6.2<br />

p. 662<br />

6.2<br />

p. 66


where<br />

u ∈ V:<br />

∫<br />

∫<br />

σ(x)gradu·gradvdx =<br />

Ω<br />

Ω<br />

f : Ω ↦→ R ˆ= density of vertical <strong>for</strong>ce,<br />

f(x)v(x)dx , ∀v ∈ H0 1 (Ω) , (6.2.1)<br />

σ : Ω ↦→ R ˆ= uni<strong>for</strong>mly positive stiffness coefficient (characteristic of material of the<br />

membrane).<br />

Now we switch to a dynamic setting: we allow variation of displacement with time, u = u(x,t), the<br />

membrane is allowed to vibrate.<br />

Recall (secondary school):<br />

Newton’s second law of motion (law of inertia)<br />

Apply this in a local version (stated <strong>for</strong> densities) to membrane<br />

F = ma (6.2.2)<br />

<strong>for</strong>ce = mass · acceleration (6.2.3)<br />

<strong>for</strong>ce density<br />

f(x,t) = ρ(x)· ∂2 u<br />

∂t 2(x,t) ,<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

(6.2.4) 6.2<br />

p. 665<br />

where V(t) := {v :]0,T[↦→ H 1 (Ω): v(x,t) = g(x,t) <strong>for</strong> x ∈ ∂Ω, 0 < t < T}<br />

(with continuous time-dependent Dirichlet datag : ∂Ω×]0,T[↦→ R.)<br />

Undo integration by parts by reverse application of Green’s first <strong>for</strong>mula Thm. 2.4.7:<br />

∫ {<br />

∂ 2 }<br />

u<br />

(6.2.5) ⇒<br />

Ω ∂t 2(x,t)−div x(σ(x)(grad x u)(x,t)) v(x)dx = 0 ∀v ∈ H0 1 (Ω) .<br />

(6.2.7)<br />

Here it is indicated that the differential operatorsgrad anddiv act on the spatial independent variable<br />

x only. This will tacitly be assumed below.<br />

Now appeal to the fundamental lemma of calculus of variations in higher dimensions Lemma 2.4.10.<br />

(6.2.7)<br />

Lemma 2.4.10<br />

=⇒<br />

∂ 2 u<br />

∂t 2 −div(σ(x)gradu) = 0 in ˜Ω . (6.2.8)<br />

(6.2.8) is called a (homogeneous) wave equation. A general wave equation is obtained, when an<br />

addition exciting vertical <strong>for</strong>ce densityf = f(x,t) comes into play:<br />

∂ 2 u<br />

∂t 2 −div(σ(x)gradu) = f(x,t) in ˜Ω . (6.2.9)<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

6.2<br />

p. 66<br />

where ρ : Ω ↦→ R + ˆ= uni<strong>for</strong>mly positive mass density of membrane,[ρ] = kgm −2 ,<br />

ü := ∂2 u<br />

∂t 2 ˆ= vertical aceleration (second temporal derivative of position).<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

The wave equations (6.2.8), (6.2.9) have to be supplemented by<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Now, we assume that the <strong>for</strong>ce f in (2.3.2) is due to inertia <strong>for</strong>ces only and express these using<br />

(6.2.4):<br />

(2.3.2)<br />

(6.2.4)<br />

∫<br />

Ω<br />

∫<br />

σ(x)gradu(x,t)·gradv(x)dx = −<br />

Why the “−”-sign? Because, here the inertia <strong>for</strong>ce enters as a reaction <strong>for</strong>ce.<br />

Ω<br />

ρ(x)· ∂2 u<br />

∂t 2(x,t)dx ∀v ∈ H1 0 (Ω) .<br />

Linear wave equation in variational <strong>for</strong>m (Dirichlet boundary conditions):<br />

∫<br />

u ∈ V(t): ρ(x)· ∂2 ∫<br />

u<br />

∂t 2(x,t)v(x)dx+ σ(x)gradu(x,t)·gradv(x)dx = 0 ∀v ∈ H0 1 (Ω)<br />

Ω<br />

Ω<br />

stiffness<br />

mass density<br />

(6.2.5)<br />

↕<br />

u ∈ V(t): m(ü,v)+a(u,v) = 0 ∀v ∈ V 0 . (6.2.6)<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

6.2<br />

p. 666<br />

• spatial boundary conditions: v(x,t) = g(x,t) <strong>for</strong> x ∈ ∂Ω, 0 < t < T ,<br />

• two initial conditions<br />

u(x,0) = u 0 (x) ,<br />

∂u<br />

∂t (x,0) = v 0 <strong>for</strong> x ∈ Ω ,<br />

with initial data u 0 ,v 0 ∈ H 1 (Ω), satisfying the compatibility conditions u 0 (x) = g(x,0) <strong>for</strong> x ∈<br />

∂Ω.<br />

(6.2.8) & boundary conditions & initial conditions = hyperbolic evolution problem<br />

Hey, why do we need two initial conditions in contrast to the heat equation?<br />

Remember that<br />

• (6.2.8) is a second-order equation also in time (whereas the heat equation is merely first-order),<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

6.2<br />

p. 66


• <strong>for</strong> second order ODEsÿ = f(y) we need two initial conditions<br />

y(0) = y 0 and ẏ(0) = v 0 , (6.2.10)<br />

in order to get a well-posed initial value problem, see [18, Rem. 12.1.15].<br />

The physical meaning of the initial conditions (6.2.10) in the case of the membrane model is<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Additional unknown: velocity v(x,t) = ∂u<br />

∂t (x,t)<br />

∂ 2 {<br />

u<br />

˙u = v ,<br />

∂t 2 −div(σ(x)gradu) = 0 ˙v = div(σ(x)gradu)<br />

with initial conditions<br />

in ˜Ω (6.2.13)<br />

u(x,0) = u 0 (x) , v(x,0) = v 0 (x) <strong>for</strong> x ∈ Ω . (6.2.14)<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

•u 0 ˆ= initial displacement of membrane,u 0 ∈ H 1 (Ω) “continuous”,<br />

•v 0 ˆ= initial vertical velocity of membrane.<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

△<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

6.2.2 Wave propagation<br />

Remark 6.2.11 (Boundary conditions <strong>for</strong> wave equation).<br />

Constant coefficient wave equation <strong>for</strong>d = 1,Ω = R (“Cauchy problem”)<br />

Rem. 6.1.7 also applies to the wave equation (6.2.8):<br />

6.2<br />

p. 669<br />

c > 0:<br />

∂ 2 u<br />

∂t 2 −c2∂2 u<br />

∂x 2 = 0 , u(x,0) = u 0(x) ,<br />

∂u<br />

∂t (x,0) = v 0(x) , x ∈ R . (6.2.15)<br />

6.2<br />

p. 67<br />

On∂Ω×]0,T[ we can impose any of the boundary conditions discussed in Sect. 2.6:<br />

• Dirichlet boundary conditions u(x,t) = g(x,t) (membrane attached to frame),<br />

• Neumann boundary conditions j(x,t)·n = 0 (free boundary, Rem. 2.4.16)<br />

• radiation boundary conditionsj(x,t)·n = Ψ(u(x,t)),<br />

and any combination of these as discussed in Ex. 2.6.7, yet, only one of them at any part of<br />

∂Ω×]0,T[, see Rem. 2.6.6.<br />

Remark 6.2.12 (Wave equation as first order system in time).<br />

△<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Change of variables: ξ = x+ct, τ = x−ct: ũ(ξ,τ) := u( ξ+τ<br />

2 , ξ−τ<br />

2c ). Applying the chain<br />

rule we immediately see<br />

u satisfies (6.2.15)<br />

<strong>for</strong> anyF,G ∈ C 2 (R) !<br />

∂ 2 ũ<br />

= 0 ⇒ ũ(ξ,τ) = F(ξ)+G(τ) ,<br />

∂ξ∂τ<br />

← matching initial data<br />

∫ x+ct<br />

u(x,t) = 2 1(u 0(x+ct)+u 0 (x−ct))+ 1 2 v 0 (s)ds . (6.2.16)<br />

x−ct<br />

(6.2.16) = d’Alembert solution of Cauchy problem (6.2.15).<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Usual procedure [18, Rem. 12.1.15]: higher-order ODE can be converted into first-order ODEs by<br />

introducing derivatives as additional solution components. This approach also works <strong>for</strong> the secondorder<br />

(in time) wave equation (6.2.8):<br />

6.2<br />

p. 670<br />

6.2<br />

p. 67


u(x,t j )<br />

v 0 = 0 ➤ initial data u 0 travel with speed c in<br />

opposite directions<br />

t 6<br />

t 5<br />

t 4<br />

t 3<br />

finite speed of propagation is typical feature<br />

of solutions of wave equations<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Domain of influence: intial data in I 0 will be relevant <strong>for</strong> the solution only in the yellow triangle in<br />

Fig. 193.<br />

✸<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

t 2<br />

t 1<br />

0<br />

finite speed of propagation<br />

x<br />

Note: (6.2.16) meaningful even <strong>for</strong> discontinuous<br />

u 0 ,v 0 !<br />

➡ “generalized solutions” !<br />

“point value”u(¯x,¯t),(¯x,¯t) ∈ ˜Ω, may not depend on initial values<br />

outside proper subdomain ofΩ!<br />

Example 6.2.17 (Domain of dependence/influence <strong>for</strong> 1D wave equation, constant coefficient case).<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

✬<br />

Theorem 6.2.18 (Domain of dependence <strong>for</strong> isotropic wave equation). → [12, 2.5, Thm. 6]<br />

Letu : ˜Ω ↦→ R be a (classical) solution of ∂2 u<br />

∂t2 −c∆u = 0. Then<br />

(|x−x 0 | ≥ R ⇒ u(x,0) = 0 , )<br />

∂u ⇒ u(x,t) = 0 , if |x−x<br />

∂t (x,0) = 0<br />

0 | ≥ R+ct .<br />

✫<br />

The solution <strong>for</strong>mula (6.2.16) clearly indicates that in 1D and in the absence of boundary conditions<br />

the solution of the wave equation will persist undamped <strong>for</strong> all times.<br />

✩<br />

✪<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Considerd = 1, initial-boundary value problem (6.2.15) <strong>for</strong> wave equation:<br />

c > 0:<br />

∂ 2 u<br />

∂t 2 −c2∂2 u<br />

∂x 2 = 0 , u(x,0) = u 0(x) ,<br />

Intuitive: from D’Alembert <strong>for</strong>mula (6.2.16)<br />

∂u<br />

∂t (x,0) = v 0(x) , x ∈ R . (6.2.15)<br />

6.2<br />

p. 673<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

This absence of damping corresponds to a conservation of total energy, which is a distinguishing<br />

feature of conservative wave propagation phenomena.<br />

Now, we examine this <strong>for</strong> the model problem<br />

6.2<br />

p. 67<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

t<br />

(¯x,¯t)<br />

c<br />

1<br />

D − (¯x,¯t)<br />

domain of dependence of(¯x,¯t) ∈ ˜Ω<br />

Fig. 192<br />

x<br />

t<br />

D + (I 0 )<br />

c<br />

I 0<br />

domain of influence ofI 0 ⊂ R<br />

1<br />

Fig. 193<br />

x<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

u ∈ H 1 0 (Ω): ∫<br />

Ω<br />

ρ(x)· ∂2 u<br />

∂t 2 vdx+ ∫<br />

Ω<br />

σ(x)gradu·gradvdx = 0 ∀v ∈ H0 1 (Ω) (6.2.19)<br />

↕<br />

u ∈ V 0 : m(ü,v)+a(u,v) = 0 ∀v ∈ V 0 . (6.2.20)<br />

Here we do not include the case of non-homogeneous spatial Dirichlet boundary conditions through<br />

an affine trial space. This can always be taken into account by offset functions, see the remark after<br />

(6.1.5).<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Domain of dependence: the value of the solution in (¯x,¯t) (•) will depend only on data in the yellow<br />

triangle in Fig. 192.<br />

6.2<br />

p. 674<br />

6.2<br />

p. 67


✬<br />

✩<br />

Theorem 6.2.21 (Energy conservation in wave propagation).<br />

Ifu : ˜Ω ↦→ R solves (6.2.20), then<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

2nd step: introducce (ordered) basisB N := {b 1 N ,...,bN N } ofV 0,N<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

✫<br />

t ↦→ 2 1m(∂u<br />

∂t ,∂u ∂t )+ 2 1 a(u,u) ≡ const .<br />

kinetic energy elastic (potential) energy, see (2.1.3)<br />

✪<br />

(6.2.23) ⇒<br />

⎧ { }<br />

⎨M<br />

d 2<br />

dt 2⃗µ(t) +A⃗µ(t) = 0 <strong>for</strong>0 < t < T ,<br />

⎩ d⃗µ<br />

⃗µ(0) = ⃗µ 0 , dt (0) = ⃗ν 0 .<br />

(6.2.24)<br />

Proof. A “<strong>for</strong>mal proof” boils down to a straight<strong>for</strong>ward application of the product rule (→<br />

Rem. 6.1.13) together with the symmetry of the bilinear <strong>for</strong>msmanda.<br />

Introduce the total energy<br />

E(t) := 1 2 m(∂u ∂t ,∂u ∂t )+ 1 2 a(u,u) .<br />

dE<br />

(t) = m(ü, ˙u)+a(˙u,u) = 0 <strong>for</strong> solutionuof (6.2.20) ,<br />

dt<br />

because this is what we conclude from (6.2.20) <strong>for</strong> the special test function v(x) = ˙u(x,t) <strong>for</strong> any<br />

t ∈]0,T[.<br />

✷<br />

6.2.3 Method of lines<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

6.2<br />

p. 677<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

✄ s.p.d. stiffness matrixA ∈ R N,N ,(A) ij := a(b j N ,bi N ) (independent of time),<br />

✄ s.p.d. mass matrixM ∈ R N,N ,(M) ij := m(b j N ,bi N ) (independent of time),<br />

✄ source (load) vector ⃗ϕ(t) ∈ R N ,(⃗ϕ(t)) i := l(t)(b i N ) (time-dependent),<br />

✄ ⃗µ 0 ˆ= coefficient vector of a projection ofu 0 ontoV 0,N .<br />

✄ ⃗ν 0 ˆ= coefficient vector of a projection ofv 0 ontoV 0,N .<br />

Note:<br />

(6.2.24) is a 2nd-order ordinary differential equation (ODE) <strong>for</strong>t ↦→ ⃗µ(t) ∈ R N<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

6.2<br />

p. 67<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

The method of lines approach to the wave equation (6.2.19), (6.2.20) is exactly the same as <strong>for</strong> the<br />

heat equation, see Sect. 6.1.3.<br />

Remark 6.2.25 (First-order semidiscrete hyperbolic evolution problem).<br />

Idea:<br />

Apply Galerkin discretization (→ Sect. 3.1) to abstract linear parabolic variational problem<br />

(6.1.11).<br />

⎧<br />

⎪⎨ m( d2 u<br />

t ∈]0,T[↦→ u(t) ∈ V 0 : dt 2(t),v)+a(u(t),v) = 0 ∀v ∈ V 0 ,<br />

du<br />

⎪⎩ u(0) = u 0 ∈ V 0 ,<br />

dt (0) = v 0 ∈ V 0 .<br />

1st step: replaceV 0 with a finite dimensional subspaceV 0,N ,N := dimV 0,N < ∞<br />

(6.2.22)<br />

Discrete hyperbolic evolution problem<br />

⎧<br />

m( d2 u N<br />

⎪⎨ dt 2 (t),v N)+a(u N (t),v N ) = 0 ∀v N ∈ V 0,N ,<br />

t ∈]0,T[↦→ u(t) ∈ V 0,N : u N (0) = projection/interpolant ofu 0 inV 0,N , (6.2.23)<br />

du ⎪⎩ N<br />

dt (0) = projection/interpolant ofv 0 inV 0,N .<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

6.2<br />

p. 678<br />

Completely analoguous to Rem. 6.2.12:<br />

with intial conditions<br />

M<br />

{ d 2<br />

dt 2⃗µ(t) }<br />

+A⃗µ(t) = 0<br />

← auxiliary unknownν = ˙µ<br />

⎧<br />

d ⎪⎨ ⃗µ(t) = ⃗ν(t) ,<br />

dt<br />

⎪⎩ M d , 0 < t < T . (6.2.26)<br />

dt ⃗ν(t) = −A⃗µ(t) ,<br />

⃗µ(0) = ⃗µ 0 , ⃗ν(0) = ⃗ν 0 . (6.2.27)<br />

△<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

6.2<br />

p. 68


6.2.4 Timestepping<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

A =N ×N Poisson matrix, see (4.1.3), scaled withh := n −1 ,<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

mass matrixM = hI, thanks to quadrature <strong>for</strong>mula, see Rem. 6.2.34.<br />

The method of lines approach gives us the semi-discrete hyperbolic evolution problem =<br />

ODE:<br />

{ }<br />

M d 2<br />

dt 2⃗µ(t) +A⃗µ(t) = 0 , ⃗µ(0) = ⃗µ 0 ,<br />

Key features of (6.2.28) ➡ to be respected “approximately” by timestepping:<br />

reversibility: (6.2.28) invariant under time-reversal t ← −t<br />

2nd-order<br />

d⃗µ<br />

dt (0) = ⃗η 0 . (6.2.28)<br />

energy conservation, cf. Thm. 6.2.21: E N (t) := 1 d⃗µ<br />

2dt ·Md⃗µ dt + 1 2⃗µ·A⃗µ = const<br />

Example 6.2.29 (Euler timestepping <strong>for</strong> 1st-order <strong>for</strong>m of semi-discrete wave equation).<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Timestepping:<br />

(6.2.26), timestepτ > 0:<br />

implicit and explicit Euler method (→ Ex. 6.1.21, [18, Sect. 12.2]) <strong>for</strong> 1st-order ODE<br />

⃗µ (j) − ⃗µ (j−1) = τ⃗ν (j−1) ,<br />

M(⃗ν (j) −⃗ν (j−1) ) = −τA⃗µ (j−1) .<br />

explicit Euler<br />

Monitored: behavior of (discrete) kinetic, potential, and total energy<br />

⃗µ (j) − ⃗µ (j−1) = τ⃗ν (j) ,<br />

M(⃗ν (j) −⃗ν (j−1) ) = −τA⃗µ (j) .<br />

implicit Euler<br />

E (j)<br />

kin = (⃗ν(j) ) T M⃗ν (j) , E (j)<br />

pot = (⃗µ(j) ) T A⃗µ (j) , j = 0,1,... .<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Explicit Euler timestepping:<br />

6.2<br />

p. 681<br />

6.2<br />

p. 68<br />

u(x 1<br />

,x 2<br />

)<br />

5<br />

4<br />

3<br />

2<br />

1<br />

0<br />

−1<br />

−2<br />

−3<br />

0<br />

0.2<br />

0.4<br />

0.6<br />

x 1<br />

0.8<br />

1<br />

u(x,t)<br />

1<br />

0.8<br />

0.6<br />

0.4<br />

0.2<br />

0<br />

x 2<br />

Fig. 194<br />

Model problem:<br />

membrane<br />

wave propagation on a square<br />

∂ 2 u<br />

∂t 2 −∆u = 0 on ]0,1[2 ×]0,1[ ,<br />

u(x,t) = 0 on ∂Ω×]0,T[ ,<br />

∂u<br />

u(x,0) = u 0 (x) ,<br />

∂t (x,0) = 0 .<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

u<br />

0.06<br />

0.04<br />

0.02<br />

0<br />

−0.02<br />

−0.04<br />

−0.06<br />

−0.08<br />

1<br />

0.8<br />

0.6<br />

0.4<br />

0.2<br />

0<br />

t = 1.000000<br />

0<br />

0.2<br />

0.4<br />

0.6<br />

0.8<br />

1<br />

energy<br />

4.5<br />

4<br />

3.5<br />

3<br />

2.5<br />

2<br />

1.5<br />

1<br />

0.5<br />

kinetic energy<br />

potential energy<br />

total energy<br />

Spatial resolution n = 30, 3000 timesteps<br />

Fig. 195 0<br />

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1<br />

time t<br />

Fig. 196<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Implcit Euler timestepping:<br />

DRAFT<br />

Initial data u 0 (x) = max{0, 1 5 −‖x‖},v 0(x) = 0,<br />

M ˆ= “structured triangular tensor product mesh”, see Fig. 123,nsquares in each direction,<br />

linear finite element spaceV N,0 = S1,0 0 (M),N := dimS0 1,0 (M) = (n−1)2 ,<br />

All local computations (→ Sect. 3.5.4) rely on 3-point vertex based local quadrature <strong>for</strong>mula “2D<br />

trapezoidal rule” (3.2.17). More explanations will be given in Rem. 6.2.34 below.<br />

6.2<br />

p. 682<br />

6.2<br />

p. 68


0<br />

t = 1.000000<br />

4<br />

3.5<br />

Spatial resolution n = 30, 3000 timesteps<br />

kinetic energy<br />

potential energy<br />

total energy<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

{ }<br />

M d 2<br />

dt 2⃗µ(t) +A⃗µ(t) = 0 (6.2.28)<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

0.04<br />

3<br />

u<br />

0.02<br />

0<br />

−0.02<br />

−0.04<br />

−0.06<br />

energy<br />

2.5<br />

2<br />

1.5<br />

M ⃗µ(j+1) −2⃗µ (j) + ⃗µ (j−1)<br />

τ 2 = −A⃗µ (j) , j = 0,1,... . (6.2.30)<br />

This is a two-step method, the Störmer scheme/explicit trapezoidal rule<br />

−0.08<br />

1<br />

0.8<br />

0.6<br />

0.4<br />

0.2<br />

0<br />

0.2<br />

0.4<br />

0.6<br />

0.8<br />

1<br />

1<br />

0.5<br />

Fig. 197 0<br />

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1<br />

time t<br />

Fig. 198<br />

Also runs animations <strong>for</strong> numerical wave propagation based on expliiti/implicit Euler timestepping<br />

weeul(30,3000).<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

By Taylor expansion:<br />

Störmer scheme is a 2nd-order method<br />

However, from where do we get ⃗µ (−1) ? Two-step methods need to be kick-started by a special initial<br />

step: This is constructed by approximating the second initial condition by a symmetric difference<br />

quotient:<br />

d<br />

dt ⃗µ(0) = ⃗ν 0<br />

⃗µ (1) − ⃗µ (−1)<br />

= ⃗ν<br />

2τ 0 . (6.2.31)<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Parallel animation in windows next to each other.<br />

6.2<br />

p. 685<br />

Example 6.2.32 (Leapfrog timestepping).<br />

6.2<br />

p. 68<br />

Observation:<br />

neither method conserves energy,<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

For the semi-discrete wave equation we again consider the explicit trapezoidal rule (Störmer scheme):<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

☞<br />

☞<br />

explicit Euler timestepping ➣ steady increase of total energy<br />

implicit Euler timestepping ➣ steady decrease of total energy<br />

Ex. 6.2.29 ➣<br />

Euler methods violate energy conservation!<br />

(The same is true of all explicit Runge-Kutta methods, which lead to an increase of<br />

the total energy over time, and L(π)-stable implicit Runge-Kutta method, which make<br />

the total energy decay.)<br />

Let us try another simple idea <strong>for</strong> the 2nd-order ODE (6.2.24):<br />

Replace<br />

R.<br />

d 2<br />

dt2⃗µ with symmetric difference quotient (1.5.96)<br />

✸<br />

Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

6.2<br />

p. 686<br />

M ⃗µ(j+1) −2⃗µ (j) + ⃗µ (j−1)<br />

τ 2 = −A⃗µ (j) , j = 1,... . (6.2.30)<br />

Inspired by Rem. 6.2.25 we introduce the auxiliary variable<br />

⃗ν (j+1/2) := ⃗µ(j+1) − ⃗µ (j)<br />

,<br />

τ<br />

which can be read as an approximation of the velocityv := ˙u.<br />

This leads to a timestepping scheme, which is algebraically equivalent to the explicit trapezoidal rule:<br />

leapfrog timestepping (with uni<strong>for</strong>m timestepτ > 0):<br />

M ⃗ν(j+1 2 ) −⃗ν (j−1 2 )<br />

τ<br />

⃗µ (j+1) − ⃗µ (j)<br />

τ<br />

= −A⃗µ (j) ,<br />

= ⃗ν (j+1 2 ) ,<br />

+ initial step ⃗ν (−1 2 ) +⃗ν (1 2 ) = 2⃗ν 0 .<br />

j = 0,1,... , (6.2.33)<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

6.2<br />

p. 68


t<br />

⃗µ (j−1) ⃗ν (j−1 2 ) ⃗µ (j) ⃗ν (j+1 2 ) ⃗µ (j+1)<br />

Remark 6.2.34 (Mass lumping).<br />

work per step:<br />

1× evaluationA×vector,<br />

1× solution of linear system <strong>for</strong>M<br />

✸<br />

Required in each step of leapfrog timestepping: solution of linear system of equations with (large<br />

sparse) system matrixM ∈ R N,N ➣ expensive!<br />

Trick <strong>for</strong> (bi-)linear finite element Galerkin discretization:<br />

V 0,N ⊂ S 0 1 (M):<br />

use vertex based local quadrature rule<br />

(e.g. “2D trapezoidal rule” (3.2.17) on triangular mesh)<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

6.2<br />

p. 689<br />

Code 6.2.36: Computing behavior of energies <strong>for</strong> Störmer timestepping<br />

1 f u n c t i o n lfen(n,m)<br />

2 % leapfrom timestepping <strong>for</strong> 2D wave equation, computation of energies<br />

3 % n: spatial resolution (no. of cells in one direction)<br />

4 % m: number of timesteps<br />

5<br />

6 % Assemble stiffness matrix, see Sect. 4.1, (4.1.3)<br />

7 N = (n-1)^2; h = 1/n; A = g a l l e r y (’poisson’,n-1)/(h*h);<br />

8<br />

9 % initial displacement u 0 (x) = max{0, 1 5 −‖x‖}<br />

10 [X,Y] = meshgrid(0:h:1,0:h:1);<br />

11 U0 = 0.2- s q r t((X-0.5).^2+(Y-0.5).^2);<br />

12 U0( f i n d (U0 < 0)) = 0.0;<br />

13 u0 = reshape(U0(2:end-1,2:end-1),N,1);<br />

14 v0 = zeros(N,1); % initial velocity<br />

15<br />

16 % loop <strong>for</strong> Störmer timestepping, see (6.2.30)<br />

17 tau = 1/m; % uni<strong>for</strong>m timestep size<br />

18 u = u0+tau*v0-0.5*tau^2*A*u0; % special initial step<br />

19 u_old = u0;<br />

20 [pen,ken] = geten(A,tau,u0,u); % compute potential and kinetic energy<br />

21 E = [0.5*tau,pen,ken,pen+ken];<br />

22 f o r k=1:m-1<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

6.2<br />

p. 69<br />

∫<br />

f(x)dx ≈ |K| ∑<br />

f(p) , V(K) := set of vertices ofK .<br />

K ♯V(K)<br />

p∈V(K)<br />

(For a comprehensive discussion of local quadrature rules see Sect. 3.5.4)<br />

Mass matrixMwill become a diagonal matrix (due to defining equation (3.2.3) <strong>for</strong> nodal basis<br />

functions, which are associated with nodes of the mesh).<br />

This so-called mass lumping trick was was used in the finite element discretization of Ex. 6.2.29.<br />

Example 6.2.35 (Energy conservation <strong>for</strong> leapfrog).<br />

△<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

23 u_new = -(tau^2)*(A*u) + 2*u - u_old;<br />

24 [pen,ken] = geten(A,tau,u,u_new);<br />

25 E = [E;(k+0.5)*tau,pen,ken,pen+ken];<br />

26 u_old = u; u = u_new;<br />

27 end<br />

28<br />

29 f i g u r e (’name’,’Leapfrog energies’);<br />

30 p l o t (E(:,1),E(:,3),’r-’,E(:,1),E(:,2),’b-’,E(:,1),E(:,4),’m-’);<br />

31 x l a b e l (’{\bf time t}’,’fontsize’,14);<br />

32 y l a b e l (’{\bf energies}’,’fontsize’,14);<br />

33 legend(’kinetic energy’,’potential energy’,’total<br />

energy’,’location’,’south’);<br />

34 t i t l e ( s p r i n t f (’Spatial resolution n = %i, %i timesteps’,n,m));<br />

35<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

36 p r i n t (’-depsc’, s p r i n t f (’../../../../rw/Slides/NPDEPics/leapfrogen%d.eps<br />

DRAFT<br />

Model problem and discretization as in Ex. 6.2.29.<br />

Leapfrog timestepping with constant timestep sizeτ = 0.01<br />

6.2<br />

p. 690<br />

Code 6.2.37: Computing potential and kinetic energiy <strong>for</strong> Störmer timestepping<br />

1 f u n c t i o n [pen,ken] = geten(A,ts,u_old,u_new)<br />

2 % Compute the current approximate potential and kinetic energies <strong>for</strong> u_old<br />

6.2<br />

p. 69


3 % and u_new from Sörmer timestepping<br />

4 %E (j)<br />

kin = τ−2 (⃗µ (j) − ⃗µ (j−1) ) T M(⃗µ (j) − ⃗µ (j−1) ) , E (j)<br />

pot = 1 4 (⃗µ(j) + ⃗µ (j−1) ) T A(⃗µ (j) + ⃗µ (j−1) ) , j = 0,1,... .<br />

5 meanv = 0.5*(u_old+u_new); pen = dot(meanv,A*meanv); % potential<br />

energy<br />

6 dtemp = (u_new-u_old)/ts; ken = dot(dtemp,dtemp); % kinetic energy<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

➣<br />

(as in Sect. 6.1.4.2) Stability analysis of leapfrog timestepping based on diagonalization:<br />

∃ orthogonalT ∈ R N,N : T ⊤ M −1/2 AM −1/2 T = D := diag(λ 1 ....,λ N ) .<br />

where the λ i > 0 are generalized eigenvalues <strong>for</strong> A ⃗ ξ = λM ⃗ ξ ➤<br />

constant introduced in (6.1.12)).<br />

λ i ≥ γ <strong>for</strong> all i (γ is the<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

60<br />

Spatial resolution n = 30, 100 timesteps<br />

Next, apply trans<strong>for</strong>mation⃗η := T T M 1/2 ⃗µ to the 2-step <strong>for</strong>mulation (6.2.30)<br />

energies<br />

50<br />

40<br />

30<br />

20<br />

10<br />

kinetic energy<br />

potential energy<br />

total energy<br />

0<br />

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1<br />

time t<br />

Fig. 199<br />

Leapfrog is (nearly) energy conserving<br />

(no energy drift, only small oscillations)<br />

This behavior is explained by the deep mathemtical<br />

theorie of symplectic integrators, see [17].<br />

✸<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

(6.2.30)<br />

⃗η:=T ⊤ M 1/2 ⃗µ<br />

=⇒ ⃗η (j+1) −2⃗η (j) +⃗η (j−1) = −τ 2 D⃗η (j) .<br />

Again, we have achieved a complete decoupling of the timestepping <strong>for</strong> the eigencomponents.<br />

η (j+1)<br />

i −2η (j)<br />

i +η (j−1)<br />

i = −τ 2 λ i η (j)<br />

i , i = 1,...,N , j = 1,2,... . (6.2.39)<br />

In fact, (6.2.39) is what we end up with then applying Störmers scheme to the scalar linear 2nd-order<br />

ODE ¨η i = −λ i η i . In a sense, the commuting diagram (6.1.54) remains true <strong>for</strong> 2-step methods and<br />

second-order ODEs.<br />

(6.2.39) is a linear two-step recurrence <strong>for</strong>mula <strong>for</strong> the sequences(η (j)<br />

i ) j<br />

.<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

6.2.5 CFL-condition<br />

Example 6.2.38 (Blow-up <strong>for</strong> leapfrog timestepping).<br />

6.2<br />

p. 693<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Try:<br />

Plug this into (6.2.39)<br />

η (j)<br />

i = ξ j <strong>for</strong> some<br />

ξ ∈ C\{0}<br />

ξ 2 −2ξ +1 = −τ 2 λ i ξ ⇔ ξ 2 −(2−τ 2 λ i )ξ +1 = 0 .<br />

( √ )<br />

⇒ two solutions ξ ± = 2<br />

1 2−τ 2 λ i ± (2−τ 2 λ i ) 2 −4 .<br />

6.2<br />

p. 69<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

energies<br />

Spatial resolution n = 30, 40 timesteps<br />

6 x 1019 kinetic energy<br />

potential energy<br />

total energy<br />

5<br />

4<br />

3<br />

2<br />

1<br />

0<br />

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1<br />

time t<br />

Fig. 200<br />

✁ Ex. 6.2.35 repeated withτ = 0.04<br />

Observation:<br />

Leapfrog suffers a blow-up: exponential increase<br />

of energies!<br />

A similar behavior is observed with the explicit Euler<br />

scheme <strong>for</strong> the semi-discrete heat equation,<br />

in case the timestep constraint is violated, see<br />

Sect. 6.1.4.2.<br />

✸<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

We can get a blow-up of some solutions of (6.2.39), if |ξ + | > 1 of |ξ − | > 1. From secondary school<br />

we know Vieta’s <strong>for</strong>mula<br />

{<br />

}<br />

ξ ± ∈ R and ξ + ≠ ξ − ⇒ |ξ + | > 1 or |ξ − | > 1 ,<br />

ξ +·ξ − = 1 ⇒ {<br />

ξ − = ξ+ ∗ }<br />

⇒ |ξ − | = |ξ + | = 1 ,<br />

where ξ+ ∗ designates complex conjugation. So the recurrence (6.2.39) has only bounded solution, if<br />

and only if<br />

←→<br />

discriminant D := (2−τ 2 λ i ) 2 −4 ≤ 0 ⇔ τ < 2 √ λi<br />

. (6.2.40)<br />

stability induced timestep constraint <strong>for</strong> leapfrog timestepping<br />

Special setting: spatial finite element Galerkin discretization based on fixed degree Lagrangian finite<br />

element spaces (→ Sect. 3.4), meshes created by uni<strong>for</strong>m regular refinement.<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

6.2<br />

p. 694<br />

Under these conditions a generalization of Lemma 6.1.48 shows<br />

6.2<br />

p. 69


Stability of leapfrog timestepping entails τ ≤ O(h M ) <strong>for</strong>h M → 0<br />

This is known as<br />

Courant-Friedrichs-Lewy (CFL) condition<br />

Remark 6.2.41 (Geometric interpretation of CFL condition in 1D).<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

t<br />

(¯x,¯t)<br />

h<br />

τ<br />

t<br />

(¯x,¯t)<br />

h<br />

τ<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Setting:<br />

t<br />

1D wave equation, (spatial) boundary conditions ignored<br />

c > 0:<br />

∂ 2 u<br />

∂t 2 −c2∂2 u<br />

∂x 2 = 0 , u(x,0) = u 0(x) ,<br />

(“Cauchy problem”),<br />

∂u<br />

∂t (x,0) = v 0(x) , x ∈ R . (6.2.15)<br />

Linear finite element Galerkin discretization on equidistant spatial meshM := {[x j−1 ,x j ]:j ∈<br />

Z},x j := hj (meshwidthh), see Sect. 1.5.1.2.<br />

Mass lumping <strong>for</strong> computation of mass matrix, which will becomeh·I, see Rem 6.2.34.<br />

Timestepping by Sörmer scheme (6.2.30) with constant timestepτ > 0.<br />

t k+1<br />

t k<br />

t k−1<br />

x j−1 x j x j+1<br />

Fig. 201x<br />

✁ flow of in<strong>for</strong>mation in one step of Störmer<br />

scheme<br />

Since the method is a two-step method, in<strong>for</strong>mation<br />

from time-slicest k andt k−1 is needed.<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

6.2<br />

p. 697<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

▲<br />

✗<br />

✖<br />

x<br />

Fig. 202<br />

cτ < h: numerical domain of dependence<br />

t<br />

(marked —) contained in d.o.d.<br />

➪ CFL-condition met<br />

(¯x,¯t)<br />

h<br />

x<br />

τ<br />

u 0<br />

Fig. 204<br />

x<br />

Fig. 203<br />

cτ > h: numerical domain of dependence<br />

(marked —) not contained in d.o.d.<br />

➪ CFL-condition violated<br />

(• ˆ= coarse grid, ■ ˆ= fine grid,<br />

✁ 1D consideration:<br />

ˆ= d.o.d)<br />

sequence of equidistant space-time grids of ˜Ω with<br />

τ = γh (τ/h = meshwidth in time/space)<br />

Ifγ > CFL-constraint (hereγ > c −1 ), then<br />

analytical domain<br />

of dependence<br />

numerical domain<br />

⊄<br />

of dependence<br />

initial data u 0 outside numerical domain of dependence cannot influence approximation at grid<br />

point(¯x,¯t) on any mesh no convergence !<br />

CFL-condition ⇔ analytical domain of dependence ⊂ numerical domain of dependence<br />

Will the CFL-condition thwart the efficient use of leapfrog, see Rem. 6.1.67 ?<br />

✔<br />

✕<br />

△<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

6.2<br />

p. 69<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Below: yellow region ˆ= domain of dependence (d.o.d.) of(¯x,¯t)<br />

To this end we need an idea about the convergence of the solutions of the fully discrete method:<br />

6.2<br />

p. 698<br />

6.2<br />

p. 70


✬<br />

“Meta-theorem” 6.2.42 (Convergene of fully discrete solutions of the wave equation).<br />

Assume that<br />

the solution of the IBVP <strong>for</strong> the wave equation (6.2.19) is “sufficiently smooth”,<br />

its spatial Galerkin finite element discretization relies on degree p Lagrangian finite elements<br />

(→ Sect. 3.4) on uni<strong>for</strong>mly shape-regular families of meshes,<br />

timestepping is based on the leapfrog method (6.2.33) with uni<strong>for</strong>m timestepτ > 0.<br />

Then we can expect an asymptotic behavior of the total discretization error according to<br />

( M∑<br />

τ ‖u−u N (τj)‖ 2 2<br />

H<br />

≤C(h p (Ω))1 1 M +τ2 ) ,<br />

j=1<br />

(6.2.43)<br />

( M∑<br />

τ ‖u−u N (τj)‖ 2 )1<br />

2<br />

L 2 (Ω)<br />

≤ C(h p+1<br />

M +τ2 ) , (6.2.44)<br />

j=1<br />

whereC > 0 must not depend onh M ,τ. L.F. is 2nd-order !<br />

✩<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Guideline:<br />

spatial and temporal resolution have to be adjusted in tandem<br />

Parallel zu Rem. 6.1.67 we may wonder whether the timestep constraintτ < O(h M ) (asymptotically)<br />

en<strong>for</strong>ces small timesteps not required <strong>for</strong> accuracy:<br />

When interested in error in energy norm (↔H 1 (Ω)-norm):<br />

Only <strong>for</strong> p = 1 (linear Lagrangian finite elements) the requirementτ < O(h M ) stipulates the<br />

use of a smaller timestep than accuracy balancing according to (6.2.46).<br />

When interested inL 2 (Ω)-norm:<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

✫<br />

✪<br />

No undue timestep constraint en<strong>for</strong>ced by CFL-conditon <strong>for</strong> any (h-version) of Lagrangian finite<br />

element Galerkin discretization.<br />

“expect”: unless lack of regularity of the solutionuinterferes, cf. 5.4, Rem. 5.4.11.<br />

6.2<br />

p. 701<br />

★<br />

✥<br />

6.2<br />

p. 70<br />

As in the case of Metatheorem 6.1.63 (☞ nothing new!) we find:<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

The leapfrog timestep constraint τ ≤ O(h M ) does not compromise (asymptotic) efficiency,<br />

ifp ≥ 2 (p ˆ= degree of spatial Lagrangian finite elements).<br />

✧<br />

✦<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

total discretization error = spatial error + temporal error<br />

Rem. 5.3.45 still applies:<br />

(6.2.43) does not give in<strong>for</strong>mation about actual error, but only about the<br />

trend of the error, when discretization parametersh M andτ are varied.<br />

Nevertheless, as in the case of the a priori error estimates of Sect. 5.3.5, we can draw conclusions<br />

about optimal y refinement strategies in order to achieve prescribed error reduction.<br />

As in Sect. 5.3.5 we make the assumption that the estimates (6.2.43) are sharp <strong>for</strong> all contributions<br />

to the total error and that the constants are the same (!)<br />

contribution of spatial (energy) error ≈ Ch p M , h M ˆ= mesh width (→ Def. 5.2.3) ,<br />

contribution of temporal error ≈ Cτ 2 , τ ˆ= timestep size .<br />

(6.2.45)<br />

This suggests the following change ofh M ,τ in order to achieve error reduction by a factor ofρ > 1:<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

reduce mesh width by factor ρ 1/p<br />

reduce timestep by factor ρ 1/2 (6.1.65)<br />

=⇒ (energy) error reduction byρ > 1 . (6.2.46)<br />

6.2<br />

p. 702<br />

6.2<br />

p. 70


<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

7.1.1 Modelling fluid flow<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

7 Convection-Diffusion Problems<br />

Flow field:<br />

v : Ω ↦→ R d<br />

Assumption:<br />

OPTIONAL CHAPTER<br />

v is continuous,v ∈ (C 0 (Ω)) d<br />

Dependencies:<br />

• Theory and variational <strong>for</strong>mulation of 2nd-order elliptic BVP, Ch. 2<br />

• Basic concepts and algorithms <strong>for</strong> finite elements, Sects. 3.1, 3.3, 3.4<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

In fact, we will require that v is uni<strong>for</strong>mly Lipschitz<br />

continuous, but this is a mere technical assumption.<br />

Fig. 205<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

• 1D finite differences/finite elements Sect. 1.5.1.2<br />

• MATLAB FEM library [6], Sect. 3.5<br />

• Method of lines, Sect. 6.1.3<br />

Clearly:<br />

v(x) ˆ= fluid velocity at pointx ∈ Ω<br />

➣<br />

v corresponds to a velocity field!<br />

Supplementary and further reading:<br />

[25] offers comprehensive about theory and algorithms <strong>for</strong> the numerical approximation of singularly<br />

perturbed problems of the type treated in this chapter.<br />

7.0<br />

p. 705<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Given a flow fieldv ∈ (C 0 (Ω)) d we can consider the autonomous initial value problems<br />

d<br />

dt y = v(y) , y(0) = x 0 . (7.1.1)<br />

Its solution t ↦→ y(t) defines the path travelled by a particle carried along by the fluid, a particle<br />

trajectory, also called a streamline.<br />

7.1<br />

p. 70<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

7.1 Heat conduction in a fluid<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

✁ particle trajectories (streamlines) in flow field<br />

of Fig. 205.<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

(∗ ˆ= initial particle positions)<br />

Ω ⊂ R d ˆ= bounded computational domain,d = 1,2,3<br />

To begin with we want to develop a mathematical model <strong>for</strong> stationary fluid flow, <strong>for</strong> instance, the<br />

Fig. 206<br />

steady streaming of water.<br />

7.1<br />

7.1<br />

p. 706<br />

p. 70


A flow field induces a trans<strong>for</strong>mation (mapping) of space! to explain this, let us temporarily make the<br />

assumption that<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Φ τ (V) ˆ= volume occupied at timet = τ by particles that occupiedV ⊂ Ω at timet = 0.<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

7.1.2 Heat convection and diffusion<br />

the flow does neither enter nor leaveΩ,<br />

(this applies to fluid flow in a close container)<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

u : Ω ↦→ R ˆ= stationary temperature distribution in fluid moving according to a stationary flow field<br />

v : Ω ↦→ R d<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

which can be modelled by<br />

x 0<br />

Φ t x 0<br />

Fig. 207<br />

DRAFT<br />

We adapt the considerations of Sect. 2.5 that led to the stationary heat equation. Recall<br />

DRAFT<br />

v(x)·n(x) = 0 ∀x ∈ ∂Ω , (7.1.2)<br />

that is, the flow is always parallel to the boundary ofΩ: all particle trajectories stay insideΩ.<br />

Now we fix some “time of interest”t > 0.<br />

{<br />

➣ mapping Φ t Ω ↦→ Ω<br />

: , t ↦→ y(t) solution of IVP (7.1.1) , (7.1.3)<br />

x 0 ↦→ y(t)<br />

7.1<br />

p. 709<br />

✬<br />

✫<br />

Conservation of energy<br />

∫ ∫<br />

j·ndS = f dx <strong>for</strong> all “control volumes”V . (2.5.2)<br />

∂V V<br />

power flux through surface ofV<br />

heat production insideV<br />

✩<br />

✪<br />

7.1<br />

p. 71<br />

is well-defined mapping ofΩto itself, the flow map. Obviously, it satisfies<br />

Φ 0 x 0 = x 0 ∀x 0 ∈ Ω . (7.1.4)<br />

In [18, Def. 12.1.27] the more general concept of an evolution operator was introduced, which agrees<br />

with the flow map in the current setting.<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

From 2.5.2 by Gauss’ theorem Thm. 2.4.5<br />

∫ ∫<br />

divj(x)dx = f(x)dx <strong>for</strong> all “control volumes” V ⊂ Ω .<br />

V<br />

V<br />

Now appeal to another version of the fundamental lemma of the calculus of variations, see<br />

Lemma 2.4.10, this time sporting piecewise constant test functions.<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

x 2<br />

11<br />

10<br />

9<br />

8<br />

7<br />

q = α<br />

11<br />

10<br />

9<br />

8<br />

7<br />

t=0<br />

t=0.5<br />

t=1<br />

t=2<br />

t=3<br />

t=5<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

local <strong>for</strong>m of energy conservation:<br />

divj = f inΩ . (2.5.5)<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

6<br />

6<br />

5<br />

4<br />

−1.5 −1 −0.5 0 0.5 1 1.5<br />

x 1<br />

Fig. 208<br />

5<br />

4<br />

−1.5 −1 −0.5 0 0.5 1 1.5 2 2.5<br />

p<br />

Fig. 209<br />

flow fieldv : Ω ↦→ R 2 snapshots ofΦ t (V) <strong>for</strong> control volumeV<br />

7.1<br />

p. 710<br />

However, in a moving fluid a power flux through a fixed surface is already caused by the sheer fluid<br />

flow carrying along thermal energy. This is reflected in a modified Fourier’s law (2.5.3):<br />

7.1<br />

p. 71


✬<br />

Fourier’s law in moving fluid<br />

j(x) = −κgradu(x)+v(x)ρu(x) , x ∈ Ω . (7.1.5)<br />

✩<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

7.1.3 Incompressible fluids<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

✫<br />

diffusive heat flux<br />

(due to spatial variation of temperature)<br />

convective heat flux<br />

(due to fluid flow)<br />

✪<br />

For the sake of simplicity we will mainly consider incompressible fluids.<br />

κ > 0 ˆ= heat conductivity ([κ] = 1Km W ), ρ > 0 ˆ= heat capavity ([ρ] = J<br />

Km3), both assumed to be<br />

constant (in contrast to the models of Sect. 2.5 and Sect. 6.1.1).<br />

Combine equations (2.5.5) & (7.1.5):<br />

divj = f + j(x) = −κgradu(x)+v(x)ρu(x)<br />

−div(κgradu)+div(ρv(x)u) = f in Ω . (7.1.6)<br />

Linear scalar convection-diffusion equation (<strong>for</strong> unknown temperatureu)<br />

Terminology :<br />

−div(κgradu) + div(ρv(x)u) = f .<br />

↓ ↓<br />

diffusive term convective term<br />

(2nd-order) (1st-order)<br />

The 2nd-order elliptic PDE (7.1.6) has to be supplemented with exactly one boundary condition on<br />

any part of ∂Ω, see Sect. 2.6, Ex. 2.6.7.<br />

introduced in Sect. 2.6:<br />

Dirichlet boundary conditions:<br />

Neumann boundary conditions:<br />

(non-linear) radiation boundary conditions:<br />

flux, radiative heat flux).<br />

This can be any of the (“elliptic”) boundary conditions<br />

u = g ∈ C 0 (∂Ω) on∂Ω (fixed surface temperatur),<br />

j·n = −h on∂Ω (fixed heat flux),<br />

j · n = Ψ(u) on ∂Ω (temperature dependent heat<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

7.1<br />

p. 713<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Definition 7.1.7 (Incompressible flow field).<br />

A fluid flow is called incompressible, if the associated flow mapΦ t is volume preserving,<br />

|Φ t (V)| = |Φ 0 (V)| <strong>for</strong> all sufficiently smallt > 0, <strong>for</strong> all control volumesV .<br />

Can incompressibility be read off the velocity fieldvof the flow?<br />

To investigate this issue, again assume the “no flow through the boundary condition” (7.1.2) and recall<br />

that the flowmapΦ t from (7.1.3) satisfies<br />

∂<br />

Φ(t,x) = v(Φ(t,x)) , x ∈ Ω, t > 0 .<br />

∂t (7.1.8)<br />

Here, in order to make clear the dependence on independent variables, time occurs as an argument<br />

ofΦin brackets, on par withx.<br />

Next, <strong>for</strong>mal differentiation w.r.t. x and change of order of differentiation yields a differential equation<br />

<strong>for</strong> the JacobianD x Φ t ,<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

7.1<br />

(7.1.8) ⇒ ∂ ∂t ( D x Φ)(t,x) = Dv(Φ(t,x))(D x Φ)(t,x) . (7.1.9)<br />

Jacobian ∈ R d,d<br />

Jacobian ∈ R d,d<br />

Second strand of thought: apply trans<strong>for</strong>mation <strong>for</strong>mula <strong>for</strong> integrals (3.5.31), [29, Satz 8.5.2]: <strong>for</strong><br />

fixedt > 0<br />

∫ ∫<br />

|Φ(t,V)| = 1dx = |det(D x Φ)(t,̂x)|d̂x . (7.1.10)<br />

Φ(t,V) V<br />

Volume preservation by the flow map is equivalent to<br />

t ↦→ |Φ(t,V)| = const. ⇐⇒ d dt |Φ(t,V)| = 0 ,<br />

p. 71<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Guideline:<br />

Required boundary conditions determined by highest-order term<br />

7.1<br />

p. 714<br />

<strong>for</strong> any control volumeV ⊂ Ω.<br />

(7.1.10) ⇒ d dt |Φ(t,V)| = ∫<br />

V<br />

∂<br />

∂t |det(D xΦ)(t,̂x)|d̂x .<br />

7.1<br />

p. 71


✬<br />

Theorem 7.1.11 (Differentiation <strong>for</strong>mula <strong>for</strong> determinants).<br />

LetS : I ⊂ R ↦→ R n,n be a smooth matrix-valued function. If S(t 0 ) is regular <strong>for</strong> somet 0 ∈ I,<br />

then<br />

✫<br />

d<br />

dt (det◦S)(t 0) = det(S(t 0 )) tr( dS<br />

dt (t 0)S −1 (t 0 )) .<br />

∂<br />

∂t det(D xΦ)(t,̂x) (7.1.9)<br />

= det(D x Φ)(t,̂x) tr(Dv(Φ(t,̂x))(D x Φ)(t,̂x)(D x Φ) −1 (t,̂x) )<br />

} {{ }<br />

=I<br />

= det(D x Φ)(t,̂x) divv(Φ(t,̂x)) ,<br />

because the divergence of a vector fieldvis just the trace of its JacobianDv! From (7.1.4) we know<br />

that <strong>for</strong> small t > 0 the Jacobian D x Φ(t,̂x) will be close to I and, there<strong>for</strong>e, det(D x Φ)(t,̂x) ≠ 0<br />

<strong>for</strong>t ≈ 0. Thus, <strong>for</strong> smallt > 0 we conclude<br />

d<br />

|Φ(t,V)| = 0 ⇔ divv(Φ(t,̂x)) = 0 ∀̂x ∈ V .<br />

dt<br />

Since this is to hold <strong>for</strong> any control volumeV, the final equivalence is<br />

✬<br />

R.<br />

d<br />

|Φ(t,V)| = 0 ∀ control volumesV ⇔ divv = 0 inΩ .<br />

dt<br />

Theorem 7.1.12 (Divergence-free velocity fields <strong>for</strong> incompressible flows).<br />

A stationary fluid flow inΩis incompressible (→ Def. 7.1.7), if and only if its associated velocity<br />

fieldvsatisfiesdivv = 0 everywhere inΩ.<br />

✫<br />

✩<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

✪<br />

✩<br />

✪<br />

Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

7.1<br />

p. 717<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

←divv = 0<br />

−κ∆u+ρv·gradu = f in Ω . (7.1.14)<br />

When carried along by the flow of an incompressible fluid, the temperature cannot be increased by<br />

local compression, the effect that you can witness when pumping air. Hence, only sources/sinks can<br />

lead to local extrema of the temperature.<br />

Now recall the discussion of the physical intuition behind the maximum principle of Thm. 5.7.2. These<br />

considerations still apply to stationary heat flow in a moving incompressible fluid.<br />

✬<br />

Theorem 7.1.15 (Maximum principle <strong>for</strong> scalar 2nd-order convection diffusion equations).<br />

[12, 6.4.1, Thm. I]<br />

Let v : Ω ↦→ R d be a continuously differentiable vector field. Then there holds the maximum<br />

principle<br />

✫<br />

−∆u+v·gradu ≥ 0 =⇒ min u(x) = min<br />

x∈∂Ω<br />

−∆u+v·gradu ≤ 0 =⇒ max<br />

x∈∂Ω<br />

7.1.4 Transient heat conduction<br />

u(x) , x∈Ω<br />

u(x) = max u(x) . x∈Ω<br />

In Sect. 6.1.1 we generalized the laws of stationary heat conduction derived in Sect. 2.5 to timedependent<br />

temperature distributions u = u(x,t) sought on a space-time cylinder ˜Ω := Ω×]0,T[.<br />

The same ideas apply to heat conduction in a fluid:<br />

→<br />

✩<br />

✪<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

7.1<br />

p. 71<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

d∑ ∂v j<br />

In the sequel we make the assumption: divv = = 0 .<br />

∂x<br />

j=1 j<br />

(Note: <strong>for</strong>d = 1 this boils down to<br />

dx dv = 0 and impliesv = const.)<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

• Start from energy balance law (6.1.1) and convert it into local <strong>for</strong>m (6.1.2).<br />

• Combine it with the extended Fourier’s law (7.1.5).<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Then we can use the product rule in higher dimensions of Lemma 2.4.3:<br />

Lemma 2.4.3<br />

div(ρvu) = ρ(u divv+v·gradu) divv=0 = ρv·gradu . (7.1.13)<br />

∂<br />

∂t (ρu)−div(κgradu)+div(ρv(x,t)u) = f(x,t) in ˜Ω := Ω×]0,T[ . (7.1.16)<br />

Thus, we can rewrite the scalar convection-diffusion equation (7.1.6) <strong>for</strong> an incompressible flow field<br />

For details and notations refer to Sect. 6.1.1.<br />

−div(κgradu)+div(ρv(x)u) = f in<br />

Ω<br />

7.1<br />

p. 718<br />

This PDE has to be supplemented with<br />

7.1<br />

p. 72


• boundary conditions (as in the stationary case, see Sect. 2.6),<br />

• initial conditions (same as <strong>for</strong> pure diffusion, see Sect. 6.1.1).<br />

Under the assumption div x v(x,t) = 0 of incompressibilty (→ Def. 7.1.7 and Thm. 7.1.12) (7.1.16)<br />

is equivalent to, cf. (7.1.13),<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Remark 7.2.2 (Variational <strong>for</strong>mulation <strong>for</strong> convection-diffusion BVP).<br />

Standard “4-step approach” of Sect. 2.8 can be directly applied to BVP (7.2.1) with one new twist:<br />

Do not use integration by parts (Green’s <strong>for</strong>mula, Thm. 2.4.7) on convective terms!<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

∂<br />

∂t (ρu)−κ∆u+ρv(x,t)·gradu = f(x,t) in ˜Ω := Ω×]0,T[ . (7.1.17)<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

variational <strong>for</strong>mulation <strong>for</strong> BVP (7.2.1):<br />

∫<br />

∫ ∫<br />

u ∈ H0 1 (Ω): ǫ gradu·gradvdx+ (v·gradu)vdx = f(x)dx<br />

Ω<br />

Ω<br />

} {{ }<br />

bilinear <strong>for</strong>ma(u,v)<br />

ˆ= a linear variational problem, see Sect. 2.3.1.<br />

Ω<br />

} {{ }<br />

linear <strong>for</strong>ml(v)<br />

∀v ∈ H 1 0 (Ω) .<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

7.2 Stationary convection-diffusion problems<br />

Obvious: a is not symmetric, see (2.1.19).<br />

➥ a does not induce an energy norm (→ Def. 2.1.27)<br />

7.2<br />

p. 721<br />

As replacement <strong>for</strong> the energy norm useH 1 (Ω)-(semi)norm (→ Def. 2.2.10)<br />

7.2<br />

p. 72<br />

Model problem, cf. (7.1.14), modelling stationary heat flow in an incompressible fluid with prescribed<br />

temperature at “walls of the container” (↔ Dirichlet boundary conditions).<br />

−κ∆u+ρv(x)·gradu = f inΩ , u = 0 on∂Ω .<br />

Per<strong>for</strong>m scaling ˆ= choice of physical units: makes equation non-dimensional by fixing “reference<br />

length”, “reference time interval”. “reference temperature”, “reference power”.<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

In this case we have to make sure thatafits the chosen norm in the sense that<br />

∃C > 0: |a(u,v)| ≤ C|u| H 1 (Ω) |v| H 1 (Ω) ∀u,v ∈ H0 1 (Ω) . (7.2.3)<br />

←→ Terminology: (7.2.3) ˆ=ais continuous onH 1 (Ω), cf. (3.1.2).<br />

By Cauchy-Schwarz inequality <strong>for</strong> integrals (2.1.28):<br />

A suitable choice of physical units leads to rescaled physical constantsκ→ǫ,ρ→1,‖v‖ L ∞ (Ω) →1.<br />

|a(u,v)| ≤ ‖v‖<br />

R. Hiptmair L ∞ (Ω) |u| H 1 (Ω) ‖v‖ Thm. 2.2.16<br />

L 2 (Ω) ≤ diam(Ω)‖v‖ L ∞ (Ω) |u| H 1 (Ω) |v| H 1 (Ω) ∀u,v ∈ H0 1 (Ω)<br />

C. Schwab,<br />

After scaling we deal with the non-dimensional boundary value problem<br />

H.<br />

Harbrecht which confirms (7.2.3) ]<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

DRAFT<br />

Surprise: a is positive definite (→ Def. 2.1.25), because<br />

−ǫ∆u+v(x)·gradu = f inΩ , u = 0 on∂Ω , (7.2.1)<br />

∫ ∫<br />

(v·gradu)udx = (vu)·gradudx<br />

diffusion term<br />

convection term<br />

Ω<br />

Ω ∫ ∫<br />

Green’s <strong>for</strong>mula<br />

(2nd-order term)<br />

(1st-order term)<br />

= − div(vu)udx+<br />

}{{}<br />

u 2 v·ndS<br />

withǫ > 0,‖v‖ L ∞ (Ω) = 1, divv = 0 → incompressible fluid, see Def. 7.1.7 . Ω ∂Ω =0<br />

∫<br />

(2.4.4) & divv=0<br />

= − (v·gradu)udx .<br />

7.2<br />

7.2<br />

p. 722<br />

Ω<br />

p. 72<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern


∫<br />

a(u,u) = ǫ ‖gradu‖ 2 dx > 0 ∀u ∈ H0 1 (Ω)\{0} . (7.2.4)<br />

Ω<br />

From this and (7.2.3) we conclude existence and uniqueness of solutions of the BVP (7.2.1) in the<br />

Sobolev spaceH 1 0 (Ω).<br />

△<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Cased = 1 (Ω =]0,1[,v = ±1)<br />

(7.2.6)<br />

What about this constantC?<br />

d=1<br />

± du<br />

dx (x) = f(x) ⇒ u(x) = ∫<br />

f dx+C . (7.2.7)<br />

Ifv = 1 ↔ fluid flows “from left to right”, so we should integrate the source from0tox:<br />

∫x ∫x<br />

u(x) = u(0)+ f(s)ds = f(s)ds , (7.2.8)<br />

0<br />

because u(0) = 0 by the boundary condition u = 0 on ∂Ω. If v = −1 we start the integration at<br />

x = 1. Note that this makes the maximum principle of Thm. 7.1.15 hold.<br />

0<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

7.2.1 Singular perturbation<br />

Ford > 1 we can solve (7.2.6) by<br />

the method of characteristics:<br />

Setting: fast-moving fluid↔convection dominates diffusion↔ǫ≪1in (7.2.1)<br />

.<br />

Example 7.2.5 (1D convection-diffusion boundary value problem).<br />

Forǫ ≪ 1:<br />

Pointwise limit:<br />

−ǫ d2 u ǫ<br />

dx 2 + du ǫ<br />

dx = 1 inΩ ,<br />

u ǫ (0) = 0 , u ǫ (1) = 0 ,<br />

u ǫ (x) = x+ exp(−x/ǫ)−1<br />

1−exp(−1/ǫ) .<br />

boundary layer atx = 1<br />

lim u ǫ(x) → x ∀0 < x < 1 .<br />

ǫ→0<br />

u(x)<br />

1<br />

0.9<br />

0.8<br />

0.7<br />

0.6<br />

0.5<br />

0.4<br />

0.3<br />

0.2<br />

0.1<br />

ε = 1<br />

ε = 1.000000e−01<br />

ε = 1.000000e−02<br />

ε = 1.000000e−03<br />

0<br />

0 0.2 0.4 0.6 0.8 1<br />

x<br />

Fig. 210<br />

✸<br />

7.2<br />

p. 725<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

To motivate it, be aware that (7.2.6) describes pure transport of a temperature distribution in the<br />

velocity field v, that is, the heat/temperature is just carried along particle trajectories and changes<br />

only under the influence of heat sources/sinks along that trajectory.<br />

Denote byuthe solution of (7.2.6) and recall the differential equation (7.1.1) <strong>for</strong> a particle trajectory<br />

➣<br />

dy<br />

dt (t) = v(y(t)) , y(0) = x 0 . (7.1.1)<br />

d<br />

d<br />

(7.2.6)<br />

u(y(t)) = gradu(y(t))· y(t) = gradu·v(y(t)) = f(y(t)) .<br />

dt dt<br />

Computeu(y(t)) by integrating sourcef along particle trajectory!<br />

∫t<br />

u(y(t)) = u(x 0 )+<br />

0<br />

f(y(s))ds (7.2.9)<br />

Taking the cue fromd = 1 we choosex 0 as “the point on the boundary where the particle entersΩ”.<br />

These points <strong>for</strong>m the part of the boundary through which the flow entersΩ, the inflow boundary<br />

Its complement in∂Ω contains the outflow boundary<br />

Γ in := {x ∈ ∂Ω: v(x)·n(x) < 0} . (7.2.10)<br />

Γ out := {x ∈ ∂Ω: v(x)·n(x) > 0} . (7.2.11)<br />

7.2<br />

p. 72<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

“Limit problem”: ignore diffusion ➣ set ǫ = 0<br />

ǫ=0<br />

(7.2.1) v(x)·gradu = f(x) inΩ . (7.2.6)<br />

7.2<br />

p. 726<br />

Remark 7.2.12 (Streamlines).<br />

7.2<br />

p. 72


→ velocity field<br />

11<br />

10<br />

9<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

In mathematical terms, singular perturbation <strong>for</strong> boundary values <strong>for</strong> PDEs is defined as a change<br />

of type of the PDE <strong>for</strong> ǫ = 0: in the case of (7.2.1) the type changes from elliptic to hyperbolic, see<br />

Rem. 2.0.1.<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

—: Streamline connectingΓ in andΓ out<br />

8<br />

x 2<br />

—: Closed streamline<br />

(recirculating flow)<br />

7<br />

6<br />

7.2.2 Upwinding<br />

5<br />

4<br />

−1.5 −1 −0.5 0 0.5 1 1.5<br />

x 1<br />

Fig. 211<br />

In the case of closed streamlines the stationary pure transport problem fails to have a unique solution:<br />

on a closed streamlineucan attain “any” value, because there is no boundary value to fixu.<br />

△<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

7.2<br />

p. 729<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

R. Hiptm<br />

Focus: linear finite element Galerkin discretization <strong>for</strong> 1D model problem, cf. Ex. 7.2.5<br />

DRAFT<br />

−ǫ d2 u<br />

dx 2 + du = f(x) inΩ , u(0) = 0 , u(1) = 0 . (7.2.14)<br />

dx<br />

Variational <strong>for</strong>mulation, see Rem. 7.2.2:<br />

∫1<br />

∫1<br />

∫1<br />

u ∈ H0 1 (]0,1[): ǫ du dv<br />

(x)<br />

dx dx (x)dx+ du<br />

dx (x)v(x)dx = f(x)v(x)dx ∀v ∈ H0 1 (]0,1[) .<br />

0 0 0<br />

} {{ } } {{ }<br />

=:a(u,v)<br />

=:l(v)<br />

7.2<br />

p. 73<br />

Return to case d = 1. In general solution u(x) from (7.2.7) will not satisfy the boundary condition<br />

u(1) = 0! Also <strong>for</strong> u(x) from (7.2.9) the homogeneos boundary conditions may be violated where<br />

the particle trajectory leavesΩ!<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

As in Sect. 1.5.1.2: use equidistant meshM(mesh widthh > 0), composite trapezoidal rule (1.5.59)<br />

<strong>for</strong> right hand side linear <strong>for</strong>m, standard “tent function basis”, see (1.5.53).<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

In the limit caseǫ = 0 not all boundary conditions of (7.2.1) can be satisfied.<br />

Notion 7.2.13 (Singularly perturbed problem).<br />

A boundary value problem depending on parameterǫ ≈ ǫ 0 is called singularly perturbed, if the<br />

limit problem <strong>for</strong>ǫ → ǫ 0 is not compatible with the boundary conditions.<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

linear system of equations <strong>for</strong> coefficients µ i , i = 1,...,M − 1, providing approximations <strong>for</strong><br />

point valuesu(ih) of exact solutionu.<br />

(<br />

− ǫ h − 1 )<br />

µ<br />

2 i−1 + 2ǫ<br />

h µ i +<br />

(<br />

− ǫ h + 1 2<br />

)<br />

µ i+1 = hf(ih) , i = 1,...,M −1 , (7.2.15)<br />

where the homogeneous Dirichlet boundary conditions are taken into account by settingµ 0 = µ M =<br />

0.<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Especially in the case of 2nd-order elliptic boundary value problems:<br />

Singular perturbation = 1st-order terms become dominant <strong>for</strong>ǫ → ǫ 0<br />

Remark 7.2.16 (Finite differences <strong>for</strong> convection-diffusion equation in 1D).<br />

As in Sect. 1.5.3 on the finite difference in 1D, we can also obtain (7.2.15) by replacing the derivatives<br />

7.2<br />

p. 730<br />

7.2<br />

p. 73


y suitable difference quotients:<br />

−ǫ d2 u du<br />

dx 2 + = f(x)<br />

dx<br />

↕ ↕ ↕<br />

ǫ −µ i+1 +2µ i −µ i−1<br />

}<br />

h<br />

{{ 2 + µ i+1 −µ i−1<br />

} }<br />

2h<br />

{{ }<br />

difference quotient <strong>for</strong> d2 u<br />

dx 2 symmetric d.q. <strong>for</strong> du<br />

dx<br />

= f(ih) .<br />

Example 7.2.17 (Linear FE discretization of 1D convection-diffusion problem).<br />

(7.2.15)<br />

△<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

In order to understand this observation, study the linear finite element Galerkin discretization in the<br />

limit caseǫ = 0<br />

(7.2.15)<br />

ǫ=0<br />

µ i+1 −µ i−1 = 2hf(ih) , i = 1,...,M . (7.2.18)<br />

(7.2.18) ˆ= Linear system of equations with singular system matrix!<br />

Forǫ > 0 the Galerkin matrix will always be regular due to (7.2.4), but the linear relationship (7.2.18)<br />

will become more and more dominant as ǫ > 0 becomes smaller and smaller. In particular, (7.2.18)<br />

sends the message that values at even and odd numbered nodes will become decoupled, which<br />

accounts <strong>for</strong> the oscillations.<br />

Desired: robust discretization of (7.2.14)<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

= discretization that produces qualitatively correct(∗) solutions <strong>for</strong> anyǫ > 0<br />

Model boundary value problem (7.2.14)<br />

(∗): “qualitatively correct”, e.g., satisfaction of maximum principle, Thm. 7.1.15]<br />

linear finite element Galerkin discretization as described above<br />

As in Ex. 7.2.5: f ≡ 1<br />

7.2<br />

p. 733<br />

Guideline:<br />

7.2<br />

p. 73<br />

u(x)<br />

1<br />

0.9<br />

0.8<br />

0.7<br />

0.6<br />

0.5<br />

0.4<br />

0.3<br />

0.2<br />

0.1<br />

ε = 1<br />

ε = 1.000000e−01<br />

ε = 1.000000e−02<br />

ε = 1.000000e−03<br />

0<br />

0 0.2 0.4 0.6 0.8 1<br />

x<br />

Fig. 212<br />

exact solutions<br />

u N<br />

(x)<br />

2<br />

1.8<br />

1.6<br />

1.4<br />

1.2<br />

1<br />

0.8<br />

0.6<br />

0.4<br />

0.2<br />

ε = 1<br />

ε = 1.000000e−01<br />

ε = 1.000000e−02<br />

ε = 1.000000e−03<br />

For very smallǫ: spurious oscillations of linear FE Galerkin solution.<br />

Linear finite elements, M=30<br />

0<br />

0 0.2 0.4 0.6 0.8 1<br />

x<br />

Fig. 213<br />

FE solutions<br />

✸<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

<strong>Numerical</strong> methods <strong>for</strong> singularly perturbed problems must “work” <strong>for</strong> the limit problem<br />

What is a meaningful scheme <strong>for</strong> limit problemu ′ = f on an equidistant mesh ofΩ :=]0,1[?<br />

Explicit Euler method: µ i+1 −µ i = hf(ξ i ) i = 0,...,N ,<br />

Implicit Euler method: µ i+1 −µ i = hf(ξ i+1 ) i = 0,...,N .<br />

Use one-sided difference quotients <strong>for</strong> discretization of convective term !<br />

Which type ? (Explicit or implicit Euler ?)<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

du<br />

Linear system arising from use of backward difference quotient = µ DRAFT<br />

i−µ i−1<br />

:<br />

dx|x=x i h<br />

(− ǫ ) ( ) 2ǫ<br />

h −1 µ i−1 +<br />

h +1 µ i +− ǫ h µ i+1 = hf(ih) , i = 1,...,M −1 , (7.2.19)<br />

du<br />

Linear system arising from use of <strong>for</strong>ward difference quotient = µ i+1 −µ i<br />

:<br />

dx|x=x i h<br />

− ǫ ( ) 2ǫ<br />

7.2 h µ i−1+<br />

h −1 µ i +<br />

(− ǫ )<br />

h +1 µ i+1 = hf(ih) , i = 1,...,M −1 , (7.2.20)<br />

7.2<br />

p. 734<br />

p. 73


Example 7.2.21 (One-sided difference approximation of convective terms).<br />

Model problem of Ex. 7.2.17, discretizations (7.2.19) and (7.2.20).<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Nodal finite element Galerkin discretization ˆ= basis expansion coefficients µ i of Galerkin solution<br />

u N ∈ V N double as point values of u N at interpolation nodes. This is satisfied <strong>for</strong> Lagrangian finite<br />

element methods (→ Sect. 3.4) when standard nodal basis functions according to (3.4.3) are used.<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

1<br />

0.9<br />

0.8<br />

ε = 1<br />

ε = 1.000000e−01<br />

ε = 1.000000e−02<br />

ε = 1.000000e−03<br />

Upwind discretization, M=30<br />

1<br />

0.5<br />

ε = 1<br />

ε = 1.000000e−01<br />

ε = 1.000000e−02<br />

ε = 1.000000e−03<br />

Downwind discretization, M=30<br />

Recall the sign-conditions (5.7.9)–(5.7.11) <strong>for</strong> the system matrix A arising from nodal finite element<br />

Galerkin discretization or finite difference discretization:<br />

u N<br />

(x)<br />

0.7<br />

0.6<br />

0.5<br />

0.4<br />

0.3<br />

0.2<br />

0.1<br />

0<br />

0 0.2 0.4 0.6 0.8 1<br />

x<br />

Fig. 214<br />

backward difference quotient<br />

u N<br />

(x)<br />

0<br />

−0.5<br />

−1<br />

−1.5<br />

0 0.2 0.4 0.6 0.8 1<br />

x<br />

Fig. 215<br />

<strong>for</strong>ward difference quotient<br />

Only the discretization of du<br />

dx<br />

based on the backward difference quotient generates qualitatively correct<br />

(piecewise linear) discrete solutions (a “good method”).<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

7.2<br />

p. 737<br />

(5.7.9): positive diagonal entries, (A) ii > 0 ,<br />

(5.7.10): non-positive off-diagonal entries, (A) ij ≤ 0, ifi ≠ j ,<br />

“(5.7.11)”: diagonal dominance,<br />

∑<br />

These conditions are met <strong>for</strong> equidistant meshes in 1D<br />

j (A) ij ≥ 0 .<br />

<strong>for</strong> the standardS 0 1 (M)-Galerkin discretization (7.2.15), provided that |ǫh−1 | ≥ 1 2 ,<br />

when using backward difference quotients <strong>for</strong> the convective term (7.2.19) <strong>for</strong> any choice ofǫ ≥ 0,<br />

h > 0,<br />

when using <strong>for</strong>ward difference quotients <strong>for</strong> the convective term (7.2.20), provided that<br />

|ǫh −1 | ≥ 1.<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

7.2<br />

p. 73<br />

If the <strong>for</strong>ward difference quotient is used, the discrete solutions may violate the maximum principle of<br />

Thm. 7.1.15 (a “bad method”).<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Only the use of a backward difference quotient <strong>for</strong> the convective term guarantees the (discrete)<br />

maximum principle in anǫ → 0-robust fashion!<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

How can we tell a good method from a bad method by merely examining the system matrix?<br />

Terminology:<br />

Approximation of du<br />

dx<br />

by backward difference quotients<br />

ˆ= upwinding<br />

Example 7.2.22 (Spurious Galerkin solution <strong>for</strong> 2D convection-diffusion BVP).<br />

Heuristic criterion <strong>for</strong>ǫ → 0-robust stability of nodal finite element Galerkin discretization/finite<br />

difference discretization of singularly perturbed scalar linear convection-diffusion BVP (7.2.1)<br />

(with Dirichlet b.c.):<br />

(Linearly interpolated) discrete solution satisfies maximum principle (5.7.3).<br />

⇕<br />

System matrix complies with sign-conditions (5.7.9)–(5.7.11).<br />

✸<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Triangle domain Ω = {(x,y) : 0 ≤ x ≤ 1,−x ≤ y ≤ x}.<br />

Velocityv(x) = ( 1)<br />

0 ➣ (7.2.1) becomes−ǫ∆u+u x = 1.<br />

Exact solution: u ǫ (x 1 ,x 2 ) = x − 1<br />

1−e −1/ǫ(e−(1−x 1)/ǫ − e −1/ǫ ), Dirichlet boundary conditions<br />

set accordingly<br />

Standard Galerkin discretization by means of linear finite elements on sequence of triangular<br />

mesh created by regular refinement.<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

7.2<br />

p. 738<br />

7.2<br />

p. 74


0 0.2 0.4 0.6 0.8 1<br />

1<br />

0.8<br />

0.6<br />

0.4<br />

2D triangular mesh<br />

800<br />

600<br />

400<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

We opt <strong>for</strong> the composite trapezoidal rule<br />

∫ 1<br />

0<br />

M−1 ∑<br />

ψ(x)dx ≈ h ψ(jh) , <strong>for</strong> ψ ∈ C 0 (]0,1[), ψ(0) = ψ(1) = 0 .<br />

j=1<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

0.2<br />

0<br />

200<br />

<strong>for</strong> evaluation of convective term in bilinear <strong>for</strong>ma:<br />

−0.2<br />

−0.4<br />

−0.6<br />

−0.8<br />

−1<br />

Fig. 216<br />

# Vertices : 15, # Elements : 16, # Edges : 30<br />

Coarse initial mesh<br />

Exact solution<br />

(ǫ = 10 −10 )<br />

Fig. 217<br />

0<br />

−200<br />

−400<br />

−600<br />

Fig. 218<br />

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1<br />

Standard Galerkin solution onx 2 = 0-line<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

∫1<br />

0<br />

du N<br />

dx (x)v N(x)dx ≈ h<br />

M−1 ∑<br />

j=1<br />

du N<br />

dx (jh)v(hj) , v N ∈ S1,0 0 (M) . (7.2.23)<br />

Note: this is not a valid <strong>for</strong>mula, because du N<br />

dx (jh) is ambiguous, since du N<br />

dx<br />

is discontinuous at<br />

nodes of the mesh <strong>for</strong> u N ∈ S1,0 0 (M)!<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

As expected:<br />

spurious oscillations mar Galerkin solution<br />

➣ Difficulty observed in 1D also haunts discretization in higher dimensions.<br />

Up to now we resolved this ambiguity by the policy of local quadrature, see Sect. 3.5.4: quadrature<br />

rule applied locally on each cell with all in<strong>for</strong>mation taken from that cell.<br />

✸<br />

7.2<br />

p. 741<br />

However:<br />

✗<br />

✖<br />

Convection transports in<strong>for</strong>mation in the direction ofv!<br />

✔<br />

✕<br />

7.2<br />

p. 74<br />

Issue: extension of upwinding idea tod > 1<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Idea:<br />

Use upstream/upwind in<strong>for</strong>mation to evaluate du N<br />

dx (jh) in (7.2.23)<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

du N du<br />

(jh) := lim N<br />

dx δ→0 dx (jh−δ) = du N<br />

.<br />

dx |]x j−1 ,x j [<br />

7.2.2.1 Upwind quadrature<br />

ˆ= upwind quadrature<br />

v<br />

Revisit 1D model problem<br />

−ǫ d2 u<br />

dx 2 + du = f(x) inΩ , u(0) = 0 , u(1) = 0 , (7.2.14)<br />

dx<br />

with variational <strong>for</strong>mulation, see Rem. 7.2.2:<br />

convective term<br />

∫1<br />

u ∈ H0 1 (]0,1[): ǫ<br />

∫1<br />

du<br />

dx (x)du dx (x)dx+ du<br />

dx (x)v(x)dx<br />

0 0<br />

} {{ }<br />

=:a(u,v)<br />

∫1<br />

=<br />

f(x)v(x)dx<br />

0<br />

} {{ }<br />

=:l(v)<br />

∀v ∈ H 1 0 (]0,1[) .<br />

Linear finite element Galerkin discretization on equidistant meshMwithM cells, meshwidthh = 1 M ,<br />

cf. Sect. 1.5.1.2.<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

7.2<br />

p. 742<br />

x 0 x 1 x 2 x 3 x 4 x 5 x 6<br />

x7<br />

x<br />

Fig. 219<br />

Upwind quadrature yields the following contribution of the discretized convective term to the linear<br />

system using the basis expansion u N = ∑ M−1<br />

l=1 µ l b l N<br />

into locally supported nodal basis functions<br />

(“tent functions”)<br />

where we used<br />

∫1<br />

0<br />

M−1 ∑<br />

l=1<br />

db l µ N l<br />

dx (x)bi (7.2.23)<br />

N (x)dx ≈ h µ i −µ i−1<br />

,<br />

h<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

7.2<br />

p. 74


•b i N (jh) = δ ij, see (1.5.54),<br />

• du N<br />

dx = µ i −µ i−1<br />

from (1.5.55).<br />

|]x j−1 ,x j [ h<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Idea: Use upstream/upwind in<strong>for</strong>mation to evaluategradu N (p) in (7.2.24)<br />

v(p)·gradu N (p) := lim δ→0<br />

v(p)·gradu N (p−δv(p)) . (7.2.25)<br />

ˆ= general upwind quadrature<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Linear system from upwind quadrature:<br />

(− ǫ ) ( ) 2ǫ<br />

h −1 µ i−1 +<br />

h +1 µ i +− ǫ h µ i+1 = hf(ih) , i = 1,...,M −1 , (7.2.19)<br />

which is the same as that obtained from a backward finite difference discretization of du<br />

dx !<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Note: By (7.1.1) the vectorv(p) supplies the direction of the streamline throughp. Hence,−v(p) is<br />

the direction from which in<strong>for</strong>mation is “carried intop” by the flow.<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

The idea of upwind quadrature can be generalized tod > 1: we considerd = 2 and linear Lagrangian<br />

finite element Galerkin discretization on triangular meshes, see Sect. 3.2.<br />

➊<br />

Approximation of contribution of convective terms to bilinear <strong>for</strong>m by means of global trapezoidal<br />

rule:<br />

7.2<br />

p. 745<br />

7.2<br />

p. 74<br />

∫<br />

(v·gradu)vdx ≈ ∑ ( ∑ ) 13 |K| · v(p)·gradu(p)v(p) . (7.2.24)<br />

Ω<br />

p∈N(M) K∈U p<br />

ambiguous <strong>for</strong>u ∈ S1 0(M) !<br />

✎ notation: U p := {K ∈ M:p ∈ K}<br />

v(p)<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Contribution of convective term to thei-th linear of<br />

the final linear system of equations (test function =<br />

tent functionb i N )<br />

( 13<br />

∑<br />

)<br />

|K| v(x i )· gradu N|Ku ,<br />

K∈U i<br />

} {{ }<br />

=:U i<br />

whereK u is the upstream triangle ofp.<br />

✄<br />

x j<br />

v(x i )<br />

n k x i<br />

K u<br />

n j<br />

n i x k<br />

Fig. 221<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

➋ Fix the ambiguous value of v(p) ·<br />

gradu N (p), u N ∈ S1 0 (M), by taking<br />

the gradient from the triangle upstream to<br />

the nodep:<br />

p<br />

upstream triangle<br />

Fig. 220<br />

7.2<br />

p. 746<br />

Using the expressions <strong>for</strong> the gradients of barycentric coordinate functions from Sect. 3.2.5 and the<br />

nodal basis expansion of u N , we obtain <strong>for</strong> the convective contribution to the i-th line of the final<br />

linear system<br />

⎛<br />

⎞<br />

U ∥ i<br />

∥∥x<br />

⎜<br />

2|K u | ⎝ − j −x k∥ ∥ ∥ni ·v(x i ∥<br />

) µ i −∥x i −x j∥ ∥ ∥nk ·v(x i ∥<br />

)µ k −∥x i −x k∥ ∥ ∥nj ·v(x i )µ j ⎟<br />

} {{ }<br />

⎠<br />

↔ diagonal entry<br />

7.2<br />

p. 74


By the very definition of the upstream triangleK u we find<br />

n i·v(x i ) ≤ 0 , n k ·v(x i ) ≥ 0 , n j ·v(x i ) ≥ 0 .<br />

➣ sign conditions (5.7.9), (5.7.10) are satisfied, (5.7.11) is obvious.<br />

Example 7.2.26 (Upwind quadrature discretization).<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Upwind quadrature scheme respects maximum principle, whereas the standard Galerkin solution is<br />

rendered useless by spurious oscillations.<br />

✸<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

All the numerical examples can be found in the folder LehrFEM/Examples/DiffConv/. The<br />

necessary data is produced by running main_exp2.m and running plot_exp2.m produces the<br />

plots and saves everything as *.eps files.<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

7.2.2.2 Streamline diffusion<br />

We take another look at the 1D upwind discretization of (7.2.14) and view it from a different perspective.<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Ω = [0,1] 2<br />

−ǫ∆u+ ( 1<br />

1<br />

)·gradu = 0<br />

Dirichlet boundary conditions: u(x,y) = 1 <strong>for</strong>x > y andu(x,y) = 0 <strong>for</strong> x ≤ y<br />

Limiting case (ǫ → 0): u(x,y) = 1 <strong>for</strong> x > y andu(x,y) = 0 <strong>for</strong>x ≤ y<br />

layer along the diagonal from ( 0<br />

1<br />

)<br />

to<br />

( 10 )<br />

in the limitǫ → 0<br />

linear finite element upwind quadrature discretization on triangular mesh.<br />

Monitored: discrete solutions along diagonal from ( 0<br />

1<br />

)<br />

to<br />

( 10 )<br />

<strong>for</strong>ǫ = 10 −10 .<br />

7.2<br />

p. 749<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

1D upwind (finite difference) discretization of (7.2.14):<br />

(− ǫ ) ( ) 2ǫ<br />

h −1 µ i−1 +<br />

h +1 µ i +− ǫ h µ i+1 = hf(ih) .i = 1,...,M −1 . (7.2.19)<br />

<strong>for</strong>i = 1,...,M −1.<br />

(ǫ+h/2) −µ i−1+2µ i −µ i+1<br />

h 2 } {{ }<br />

ˆ= difference quotient <strong>for</strong> d2 u<br />

⇕<br />

dx 2 +<br />

−µ i−1 +µ i+1<br />

= f(ih) ,<br />

}<br />

2h<br />

{{ }<br />

ˆ= difference quotient <strong>for</strong> du<br />

dx<br />

7.2<br />

p. 75<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

1.4<br />

1.2<br />

1<br />

0.8<br />

0.6<br />

0.4<br />

10000<br />

8000<br />

6000<br />

4000<br />

2000<br />

0<br />

−2000<br />

−4000<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

✬<br />

✫<br />

Upwinding = h-dependent enhancement of diffusive term<br />

artificial diffusion/viscosity<br />

We also observe that the upwinding strategy just ads the minimal amount of diffusion to make the<br />

resulting system matrix comply with the conditions (5.7.9)–(5.7.11), which ensure that the discrete<br />

solution satisfies the maximum principle.<br />

✩<br />

✪R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

0.2<br />

0<br />

Fig. 222<br />

0 0.5 1 1.5<br />

upwind quadrature solution<br />

−6000<br />

Fig. 223<br />

−8000<br />

0 0.5 1 1.5<br />

standard Galerkin solution<br />

7.2<br />

p. 750<br />

Issue: How to extend the trick of adding artificial diffusion tod > 1 ?<br />

Well, just add an extrah-dependent multiple of−∆! Let’s try.<br />

7.2<br />

p. 75


x 1<br />

x 1<br />

x 1<br />

x 1<br />

Example 7.2.27 (Effect of added diffusion).<br />

Convection-diffusion boundary value problem ((7.2.1) withv = ( 1<br />

0<br />

)<br />

)<br />

−ǫ∆u+ ∂u<br />

∂x 1<br />

= 0 inΩ =]0,1[ 2 , u = g on∂Ω .<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

u = 1<br />

u = 1<br />

u ≈ 1<br />

v<br />

u = 0<br />

Pure transport problem:<br />

v·gradu = 0 inΩ ,<br />

whereΩ =]0,1[ 2 ,v = ( 2<br />

1<br />

) ,ǫ = 10 −4 ,<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Here, Dirichlet datag(x) = 1−2|x 2 − 1 2 |.<br />

Thus, <strong>for</strong> ǫ ≈ 0 we expect u ≈ g, because the Dirichlet data are just transported in x 1 -direction and<br />

there are no boundary layers.<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Internal layer<br />

u = 0<br />

u ≈ 0<br />

Fig. 224<br />

Dirchlet b.c. that can only partly be fulfilled: u = 1<br />

on {x 1 = 0} ∪ {x 2 = 1}, u = 0 on {x 1 = 1} ∪<br />

{x 2 = 0}<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

1<br />

Grid with 300 x/y−cells, ε = 1.000000<br />

1<br />

Grid with 300 x/y−cells, ε = 0.100000<br />

1<br />

Grid with 300 x/y−cells, ε = 0.010000<br />

1<br />

Grid with 300 x/y−cells, ε = 0.001000<br />

0.9<br />

0.9<br />

0.9<br />

0.9<br />

0.8<br />

0.7<br />

0.6<br />

0.8<br />

0.7<br />

0.6<br />

0.8<br />

0.7<br />

0.6<br />

0.8<br />

0.7<br />

0.6<br />

Solution of pure transport problem with discontinuous boundary data<br />

0.5<br />

0.5<br />

0.5<br />

0.5<br />

0.4<br />

0.3<br />

0.2<br />

0.1<br />

0<br />

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1<br />

x 2<br />

ǫ = 1<br />

0.4<br />

0.3<br />

0.2<br />

0.1<br />

0<br />

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1<br />

x 2<br />

ǫ = 0.1<br />

0.4<br />

0.3<br />

0.2<br />

0.1<br />

0<br />

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1<br />

x 2<br />

ǫ = 0.01<br />

0.4<br />

0.3<br />

0.2<br />

0.1<br />

0<br />

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1<br />

x 2<br />

ǫ = 0.001<br />

Stronger diffusion leads to “smearing” of features that the flow field transports into the interior of the<br />

domain.<br />

Remark 7.2.28 (Internal layers).<br />

(Too much) artificial diffusion ➣ smearing of internal layers<br />

(We are no longer solving the right problem!)<br />

✸<br />

7.2<br />

p. 753<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

• displays a discontinuity across the streamline emanating from the point of discontinuity on∂Ω,<br />

• is smooth along streamlines.<br />

Qualitative solution of<br />

−δ∆+v·gradu = 0 inΩ ,<br />

withδ > 0, the same boundary data<br />

➣ Smearing of internal layer !<br />

We would also find a boundary layer which is omitted<br />

in the figure.<br />

✄<br />

u = 1<br />

u = 1<br />

u ≈ 1<br />

v<br />

Internal layer<br />

u = 0<br />

u ≈ 0<br />

Fig. 225<br />

u = 0<br />

△<br />

7.2<br />

p. 75<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Heuristics:<br />

If the solution is smooth along streamlines, then adding diffusion in the direction of<br />

streamlines cannot do much harm.<br />

7.2<br />

p. 754<br />

What does “diffusion in a direction” mean?<br />

7.2<br />

p. 75


☞<br />

Think of a generalized Fourier’s law (2.5.3) <strong>for</strong> d = 2, e.g„<br />

( ) 1 0<br />

j(x) = − gradu(x) .<br />

0 0<br />

This means, only a temperature variation inx 1 -direction triggers a heat flow.<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Note: the variational crimes investigated in Sect. 5.5 represent non-consistent modifications.<br />

Ensuring consistency <strong>for</strong> streamline-upwind variational problem:<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

➥ diffusion in a directionv ∈ R 2 j(x) = −vv T gradu(x) (7.2.29)<br />

Such an extended Fourier’s law is an example of anisotropic diffusion.<br />

Anisotropic diffusion can simply be taken into account in variational <strong>for</strong>mulations and Galerkin discretization<br />

by replacing the heat conductivity κ/stiffness σ with a symmetric, positive (semi-)definite<br />

matrix, the diffusion tensor.<br />

Idea:<br />

Anisotropic artificial diffusion in streamline direction<br />

On cellK replace: ǫ ← ǫI+δ K v K vK<br />

T ∈ R 2,2 .<br />

} {{ }<br />

new diffusion tensor<br />

v K ˆ= local velocity (e.g., obtained by averaging)<br />

δ K > 0 ˆ= method parameter controlling the streng of anisotropic diffusion<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

7.2<br />

p. 757<br />

∫<br />

Idea:<br />

Add anistropic diffusion through a residual term that vanishes <strong>for</strong> the exact<br />

solutionu<br />

streamline-upwind variational problem: given meshMseeku ∈ H 1 0 (Ω)∩H2 (M)<br />

ǫgradu·gradv +v(x)·graduvdx<br />

Ω<br />

+ ∑ ∫<br />

∫<br />

δ K (−ǫ∆u+v·gradu−f)·(v·gradv)dx =<br />

K∈M<br />

}<br />

K<br />

{{ }<br />

Ω<br />

stabilization term<br />

☞<br />

fvdx ∀v ∈ H0 1 (Ω) . (7.2.32)<br />

Note that enhanced smoothness ofu, namely in additionu ∈ H 2 (K) <strong>for</strong> allK ∈ M, is required<br />

to render (7.2.32) meaningful (→ Sobolev spaceH 2 (M)).<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

7.2<br />

p. 75<br />

This idea underlies the so-called<br />

streamline-diffusion method.<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Note: in the case of Galerkin discretization based on V N,0 = S 0 1 (M), we find ∆u N = 0 in each<br />

K ∈ M.<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Thus, (<strong>for</strong> the model problem) Galerkin discretization may target the variational problem<br />

∫<br />

∫<br />

( ǫI+δK v K vK<br />

T ) gradu·gradv +v(x)·graduvdx = fvdx ∀v ∈ H0 1 (Ω) . (7.2.30)<br />

Ω<br />

!<br />

Desirable:<br />

This tampering affects the solutionu<br />

(solution of (7.2.30)≠solution of (7.2.1))<br />

Maintain consistency of variational problem!<br />

Ω<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

For Galerkin discretization of (7.2.32) by means of linear Lagrangian finite elements, the local control<br />

parametersδ K are usually chosen according to the rule<br />

⎧<br />

⎪⎨ ǫ −1 h 2 ‖v‖ K,∞ h K<br />

K<br />

δ K :=<br />

, if ≤ 1 ,<br />

2ǫ<br />

‖v‖<br />

⎪⎩ K,∞ h K<br />

h K , if > 1 .<br />

2ǫ<br />

which is suggested by theoretical investigations and practical experience.<br />

Example 7.2.33 (Streamline-diffusion discretization).<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Exactly the same setting as in Ex. 7.2.26 with the upwind quadrature approach replaced with the<br />

Definition 7.2.31 (Consistent modifications of variational problems).<br />

streamline diffusion method.<br />

A variational problem is called a consistent modification of another, if both possess the same<br />

(unique) solution(s).<br />

7.2<br />

p. 758<br />

Code 7.2.34: Assembling SUPG stabilization part of element matrix in LehrFEM<br />

1 f u n c t i o n Aloc = STIMASUPGLFE(Vertices, f l a g , QuadRule, VHandle,<br />

a,d1,d2, varargin)<br />

7.2<br />

p. 76


2 % ALOC = STIMA_SUPG_LFE(VERTICES) provides the extra terms <strong>for</strong> SUPG<br />

stabilization to be<br />

3 % added to the Galerkin element matrix <strong>for</strong> linear finite elements<br />

4 %<br />

5 % VERTICES is 3-by-2 matrix specifying the vertices of the current element<br />

6 % in a row wise orientation.<br />

7 %<br />

8 % a: diffusivity<br />

9 % d1 d2: apriori chosen constants <strong>for</strong> SUPG-modification<br />

10 %<br />

11 % Flag not used, needed <strong>for</strong> interface to assemMat_LFE<br />

12 %<br />

13 % QUADRULE is a struct, which specifies the Gauss qaudrature that is used<br />

14 % to do the numerical integration:<br />

15 % W Weights of the Gauss quadrature.<br />

16 % X Abscissae of the Gauss quadrature.e:<br />

17 %<br />

18 % VHANDLE is function handle <strong>for</strong> velocity field<br />

19<br />

20 % Preallocate memory <strong>for</strong> element matrix<br />

21 Aloc = zeros(3,3);<br />

22<br />

23 % Analytic computation of entries of element matrix using barycentric<br />

24 % coordinates, see Sect. 3.2.5<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

48 % Entries of anisotropic diffusion tensor<br />

49 FHandle=[c(:,1).*c(:,1) c(:,1).*c(:,2) c(:,2).*c(:,1)<br />

c(:,2).*c(:,2)];<br />

50<br />

51 % Compute local PecletNumber <strong>for</strong> SUPG control parameter<br />

52 hK=max([norm(P2-P1),norm(P3-P1),norm(P2-P3)]);<br />

53 v_infK=max(abs(c(:))); PK=v_infK*hK/(2*a);<br />

54 % Apply quadrature rule and fix constant part<br />

55 w = QuadRule.w; e = sum((FHandle.*[w w w w]), 1);<br />

56 te = (reshape(e,2,2)’)/det_BK;<br />

57<br />

58 % Compute Aloc values<br />

59 Aloc(1,1) = (te*[l1x l1y]’)’*[l1x l1y]’;<br />

60 Aloc(1,2) = (te*[l1x l1y]’)’*[l2x l2y]’;<br />

61 Aloc(1,3) = (te*[l1x l1y]’)’*[l3x l3y]’;<br />

62 Aloc(2,2) = (te*[l2x l2y]’)’*[l2x l2y]’;<br />

63 Aloc(2,3) = (te*[l2x l2y]’)’*[l3x l3y]’;<br />

64 Aloc(3,3) = (te*[l3x l3y]’)’*[l3x l3y]’;<br />

65 Aloc(2,1) = (te*[l2x l2y]’)’*[l1x l1y]’;<br />

66 Aloc(3,1) = (te*[l3x l3y]’)’*[l1x l1y]’;<br />

67 Aloc(3,2) = (te*[l3x l3y]’)’*[l2x l2y]’;<br />

68<br />

7.2 69 i f (PK


Observations:<br />

• The streamline upwind method does not exactly respect the maximum principle, but offers a better<br />

resolution of the internal layer compared with upwind quadrature (Parlance: streamline diffusion<br />

method is “less diffusive”).<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Ich haenge noch 2 Referenzen zu diesem Thema an.<br />

7.3 Transient convection-diffusion BVP<br />

✸<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Example 7.2.35 (Convergence of SUPG and upwind quadrature FEM).<br />

Ω =]0,1[ 2 , model problem (7.2.1),v(x) = ( 2<br />

3<br />

)<br />

, right hand sidef such that<br />

u ε (x,y) = xy 2 −y 2 e 2x−1 ǫ −xe 3y−1 ǫ +e 2x−1 ǫ +3 y−1<br />

ǫ .<br />

✸<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Sect. 7.1.4 introduced the transient heat conduction model in a fluid, whose motion is described by a<br />

non-stationary velocity field (→ Sect. 7.1.1)v : Ω×]0,T[↦→ R d<br />

∂<br />

∂t (ρu)−div(κgradu)+div(ρv(x,t)u) = f(x,t) in ˜Ω := Ω×]0,T[ , (7.1.16)<br />

whereu = u(x,t) : ˜Ω ↦→ R is the unknown temperature.<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Finite element discretization,V 0,N = S1 0 (M) und sequence of unstructured triangular “uni<strong>for</strong>m”<br />

meshes, with<br />

• upwind quadrature stabilization from Sect. 7.2.2.1,<br />

• SUPG stabilization according to (7.2.32).<br />

Monitored: (Approximate) L 2 (Ω)-norm of discretization error (computed with high-order local<br />

quadrature)<br />

7.2<br />

p. 765<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Assuming divv(x,t) = 0, as in Sect. 7.2, by scaling we arrive at the model equation <strong>for</strong> transient<br />

convection-diffusion<br />

supplemented with<br />

∂u<br />

∂t −ǫ∆u+v(x,t)·gradu = f in ˜Ω := Ω×]0,T[ , (7.3.1)<br />

Dirichlet boundary conditions: u(x,t) = g(x,t) ∀x ∈ ∂Ω , 0 < t < T ,<br />

7.3<br />

p. 76<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

1<br />

10 −2<br />

10 −1 h<br />

L 2 −error u (Up)<br />

L 2 −error u (FEM)<br />

L 2 −error u (SUPG)<br />

initial conditions: u(x,0) = u 0 (x) ∀x ∈ Ω.<br />

0.8<br />

0.6<br />

0.4<br />

0.2<br />

0<br />

0<br />

0.5<br />

0.5<br />

x<br />

1 0<br />

y Fig. 228<br />

u ǫ <strong>for</strong>ǫ = 1<br />

1<br />

error<br />

10 −3<br />

10 −4<br />

10 −5<br />

p = 2.02<br />

p = 2.02<br />

p = 1.09<br />

10 −6<br />

10 −2 10 −1 10 0<br />

Fig. 229<br />

Convergence <strong>for</strong> ǫ = 1<br />

Observation: SUPG stabilization does not affect O(h 2 M )-convergence of ‖u−u N‖ L 2 (Ω) <strong>for</strong> h-<br />

refinement and h M → 0, whereas upwind quadrature leads to worse O(h M ) convergence of the<br />

L 2 -error norm.<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

7.2<br />

p. 766<br />

7.3.1 Method of lines<br />

For the solution of IBVP (7.3.1) follow the general policy introduced in Sect. 6.1.3:<br />

➊ Discretization in space on a fixed mesh ➣ initial value problem <strong>for</strong> ODE<br />

➋ Discretization in time (by suitable numerical integrator = timestepping)<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

7.3<br />

p. 76


u<br />

u<br />

u<br />

u<br />

u<br />

u<br />

u<br />

u<br />

For instance, in the case of Dirichlet boundary conditions,<br />

⎧<br />

⎨ ∂u<br />

∂t −ǫ∆u+v(x,t)·gradu = f in ˜Ω := Ω×]0,T[ ,<br />

⎩<br />

u(x,t) = g(x,t) ∀x ∈ ∂Ω, 0 < t < T , u(x,0) = u 0 (x) ∀x ∈ Ω .<br />

(7.3.2)<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

1<br />

0.9<br />

0.8<br />

0.7<br />

0.6<br />

0.5<br />

0.4<br />

0.3<br />

t=0<br />

1<br />

0.9<br />

0.8<br />

0.7<br />

0.6<br />

0.5<br />

0.4<br />

0.3<br />

central scheme<br />

upwinding<br />

h = 0.010000, tau = 0.001250, t=0.126250<br />

1<br />

0.9<br />

0.8<br />

0.7<br />

0.6<br />

0.5<br />

0.4<br />

0.3<br />

central scheme<br />

upwinding<br />

h = 0.010000, tau = 0.001250, t=0.251250<br />

1<br />

0.9<br />

0.8<br />

0.7<br />

0.6<br />

0.5<br />

0.4<br />

0.3<br />

central scheme<br />

upwinding<br />

h = 0.010000, tau = 0.001250, t=0.376250<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

0.2<br />

0.2<br />

0.2<br />

0.2<br />

← spatial discretization<br />

0.1<br />

0<br />

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1<br />

x<br />

0.1<br />

0<br />

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1<br />

x<br />

0.1<br />

0<br />

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1<br />

x<br />

0.1<br />

Fig. 230<br />

0<br />

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1<br />

x<br />

M d⃗µ (t)+ǫA⃗µ(t)+B⃗µ(t) = ⃗ϕ(t) , (7.3.3)<br />

dt<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Observation:<br />

• Central finite differences display spurious oscillations as in Ex. 7.2.17.<br />

• Upwinding suppresses spurious oscillations, but introduces spurious damping.<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

where<br />

⃗µ = ⃗µ(t) :]0,T[↦→ R N ˆ= coefficient vector describing approximationu N (t) ofu(·,t),<br />

A ∈ R N,N ˆ= s.p.d. matrix of discretized−∆, e.g., (finite element) Galerkin matrix,<br />

M ∈ R N,N ˆ= (lumped→Rem. 6.2.34) mass matrix<br />

Computations withǫ = 10 −5 , spatial upwind discretization,h = 0.01,τ = 0.005:<br />

B ∈ R N,N ˆ= matrix <strong>for</strong> discretized convective term, e.g., Galerkin matrix, upwind quadrature<br />

matrix (→ Sect. 7.2.2.1), streamline diffusion matrix (→ Sect. 7.2.2.2).<br />

Example 7.3.4 (Implicit Euler method of lines <strong>for</strong> transient convection-diffusion).<br />

1D convection-diffusion IBVP:<br />

∂u u<br />

∂t −ǫ∂2 ∂x 2 + ∂u<br />

∂x = 0 , u(x,0) = max(1−3|x− 1 3 |,0) , u(0) = u(1) = 0 . (7.3.5)<br />

7.3<br />

p. 769<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

1<br />

0.9<br />

0.8<br />

0.7<br />

0.6<br />

0.5<br />

0.4<br />

0.3<br />

0.2<br />

0.1<br />

t=0<br />

0<br />

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1<br />

x<br />

1<br />

0.9<br />

0.8<br />

0.7<br />

0.6<br />

0.5<br />

0.4<br />

0.3<br />

0.2<br />

0.1<br />

implicit Euler<br />

explicit Euler<br />

Expl. Euler: h = 0.010000, τ = 0.005000, t=0.130000<br />

0<br />

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1<br />

x<br />

1<br />

0.9<br />

0.8<br />

0.7<br />

0.6<br />

0.5<br />

0.4<br />

0.3<br />

0.2<br />

0.1<br />

implicit Euler<br />

explicit Euler<br />

Expl. Euler: h = 0.010000, τ = 0.005000, t=0.255000<br />

0<br />

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1<br />

x<br />

1<br />

0.9<br />

0.8<br />

0.7<br />

0.6<br />

0.5<br />

0.4<br />

0.3<br />

0.2<br />

0.1<br />

implicit Euler<br />

explicit Euler<br />

Expl. Euler: h = 0.010000, τ = 0.005000, t=0.380000<br />

Fig. 231<br />

0<br />

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1<br />

x<br />

7.3<br />

p. 77<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Spatial discretization on equidistant mesh with meshwidthh = 1/N:<br />

1. central finite difference scheme, see (7.2.15),<br />

2. upwind finite difference discretization, see (7.2.19),<br />

M = hI (“lumped” mass matrix, see Rem. 6.2.34),<br />

Temporal discretization with uni<strong>for</strong>m timestepτ > 0:<br />

1. implicit Euler method, see (6.1.23),<br />

2. explicit Euler method, see (6.1.22),<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Observation:<br />

timestepping.<br />

implicit Euler timestepping causes stronger spurious damping than explicit Euler<br />

However, explicit Euler subject to tight stability induced timestep constraint <strong>for</strong> larger values ofǫ, see<br />

Sect. 6.1.4.2.<br />

✸<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Computations withǫ = 10 −5 , implicit Euler discretization,h = 0.01,τ = 0.00125:<br />

7.3<br />

p. 770<br />

7.3<br />

p. 77


Advice <strong>for</strong> spatial discretization <strong>for</strong> method of lines approach<br />

✗<br />

✖<br />

Useǫ-robustly stable spatial discretization of convective term.<br />

Remark 7.3.6 (Choice of timestepping <strong>for</strong> m.o.l. <strong>for</strong> transient convection-diffusion).<br />

If ǫ-robustness <strong>for</strong> all ǫ > 0 (including ǫ > 1) desired ➣ Arguments of Sect. 6.1.4.2 stipulate<br />

use of L(π)-stable (→ Def. 6.1.56) timestepping methods (implicit Euler (6.1.23), RADAU-3 (6.1.58),<br />

SDIRK-2 (6.1.59))<br />

In the singularly perturbed case0 < ǫ ≪ 1 conditionally stable explicit timestepping is an option, due<br />

to a timestep constraint of the <strong>for</strong>m “τ < O(h M )”, which does not interfere with efficiency, cf. the<br />

discussion in Sect. 6.1.5.<br />

✔<br />

✕<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Now: focus on case f ≡ 0 (no sources)<br />

Letu = u(x,t) be aC 1 -solution of<br />

Recall:<br />

➣<br />

∂u<br />

∂t +v(x,t)·gradu = 0 in ˜Ω := Ω×]0,T[ . (7.3.8)<br />

<strong>for</strong> the stationary pure tranport problem (7.2.6) we found solutions by integrating the source<br />

term along streamlines (following the flow direction).<br />

study the behavior ofu“as seen from a moving fluid particle”<br />

By the chain rule<br />

t ↦→ u(y(t),t) , where<br />

d<br />

dt<br />

y(t) solves<br />

dy<br />

(t) = v(y(t),t) , see (7.1.1) .<br />

dt<br />

dy<br />

u(y(t),t) = gradu(y(t),t)·<br />

dt<br />

= gradu(y(t),t)·v(y(t),t)+ ∂u (7.3.8)<br />

(y(t),t) = 0 .<br />

∂t<br />

(t)+<br />

∂u<br />

∂t (y(t),t)<br />

A fluid particle “sees” a constant temperature!<br />

(7.3.9)<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

7.3.2 Transport equation<br />

△<br />

7.3<br />

p. 773<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Remark 7.3.10 (Solution <strong>for</strong>mula <strong>for</strong> sourceless transport).<br />

Situation: no inflow/outflow (e.g., fluid in a container)<br />

v(x,t)·n(x) = 0 ∀x ∈ ∂Ω , 0 < t < T . (7.1.2)<br />

7.3<br />

p. 77<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Focus on the situation of singular perturbation (→ Def. 7.2.13): 0 < ǫ ≪ 1<br />

➣ study limit problem (as in Sect. 7.2.1)<br />

➣ all streamlines will “stay insideΩ”, flow mapΦ t (7.1.3) defined <strong>for</strong> all timest ∈ R.<br />

Initial value problem:<br />

∂u<br />

∂t −ǫ∆u+v(x,t)·gradu = f in ˜Ω := Ω×]0,T[ ,<br />

←ǫ = 0<br />

∂u<br />

∂t +v(x,t)·gradu = f in ˜Ω := Ω×]0,T[ . (7.3.7)<br />

= transport equation<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Exact solution<br />

v(x,t)·gradu = 0 in ˜Ω , u(x,0) = u 0 (x) ∀x ∈ Ω .<br />

u(x,t) = u 0 (x 0 (x,t)) , (7.3.11)<br />

wherex 0 (x,t) is the position at time 0 of the fluid<br />

particle that is located atxat timet.<br />

x<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

7.3<br />

p. 774<br />

x 0 (x,t)<br />

Fig. 232<br />

△<br />

7.3<br />

p. 77


This solution <strong>for</strong>mula can be generalized to any divergence free velocity fieldv : Ω ↦→ R d andf ≠ 0.<br />

The new aspect is that streamlines can enter and leave the domainΩ. In the <strong>for</strong>mer case the solution<br />

value is given by a “transported boundary value”:<br />

d<br />

u(y(t)) = f(y(t),t)<br />

⎧ dt<br />

∫<br />

⎪⎨ u 0 (x 0 )+ t<br />

f(y(s),s)ds , if y(s) ∈ Ω ∀0 < s < t ,<br />

u(x,t) = 0<br />

∫<br />

⎪⎩ g(y(s 0 ),s 0 )+ t<br />

f(y(s),s)ds , if y(s 0 ) ∈ ∂Ω, y(s) ∈ Ω ∀s 0 < s < t ,<br />

s 0<br />

where we have assumed Dirichlet boundary conditions on the inflow boundary<br />

(7.3.12)<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Strang splitting single step method <strong>for</strong> (7.3.13), timestep τ := t j −t j−1 > 0: compute y (j) ≈<br />

y(t j ) fromy (j−1) ≈ y(t j−1 ) according to<br />

ỹ := z(t j−1 + 1 2 τ) , where z(t) solves ż = g(t,z) , z(t j−1) = y (j−1) , (7.3.14)<br />

ŷ := w(t j ) where w(t) solves ẇ = h(t,w) , w(t j−1 ) = ỹ , (7.3.15)<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

y (j) := z(t j ) , where z(t) solves ż = g(t,z) , z(t j−1 + 1 2 τ) = ŷ . (7.3.16) R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

u(x,t) = g(x,t) <strong>for</strong> x ∈ Γ in := {x ∈ ∂Ω : v(x)·n(x) < 0} , cf. (7.2.10).<br />

7.3.3 Lagrangian split-step method<br />

Lagrangian discretization schemes <strong>for</strong> the IBVP (7.3.2) are inspired by insight into the traits of solutions<br />

of pure transport problems.<br />

The variant that we are going to study separates the transient convection-diffusion problem into a<br />

pure diffusion problem (heat equation → Sect. 6.1.1) and a pure transport problem (7.3.7). This is<br />

achieved by means of a particular approach to timestepping.<br />

7.3.3.1 Split-step timestepping<br />

Abstract perspective: consider ODE, whose right hand side is the sum of two (smooth) functions<br />

7.3<br />

p. 777<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

One timestep involves three sub-steps:<br />

➀ Solveż = g(t,z) over time[t j−1 ,t j−1 + 2 1 τ] using the result<br />

of the previous timestep as initial value ↔ (7.3.14).<br />

➁ Solve ẇ = h(t,w) over time τ using the result of ➀ as<br />

initial value ↔ (7.3.15).<br />

➂ Solveż = g(t,z) over time[t j−1 + 2 1τ,t j] using the result<br />

of ➁ as initial value ↔ (7.3.16). y (j−1)<br />

✬<br />

Theorem 7.3.17 (Order of Strang splitting single step method).<br />

ż = g(z)<br />

ż = g(z)<br />

ẇ = h(w)<br />

Assuming exact solution of the initial value problems of the sub-steps, the Strang splitting single<br />

step method <strong>for</strong> (7.3.13) is of second order.<br />

✫<br />

Fig. 233<br />

y (j)<br />

✩<br />

✪<br />

7.3<br />

p. 77<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

ẏ = g(t,y)+h(t,y) , g,h : R m ↦→ R m . (7.3.13)<br />

There is an abstract timestepping scheme that offers great benefits if one commands efficient methods<br />

to solve initial value problems <strong>for</strong> bothż = g(z) andẇ = h(w).<br />

7.3<br />

p. 778<br />

This applies to Strang splitting timestepping <strong>for</strong> initial value problems <strong>for</strong> ODEs. Now we boldly regard<br />

(7.3.2) as an “ODE in function space” <strong>for</strong> the unknown “function space valued function” u = u(t) :<br />

7.3<br />

p. 78


[0,T] ↦→ H 1 (Ω).<br />

du<br />

= ǫ∆u + f −v·gradu<br />

dt<br />

↕ ↕ ↕<br />

ẏ = g(y) + h(y)<br />

Formally, we arrive at the following “timestepping scheme in function space” on a temporal mesh<br />

0 = t 0 < t 1 < ··· < t M := T <strong>for</strong> (7.3.1):<br />

Given approximation u (j−1) ≈ u(t j−1 ),<br />

➀ Solve (autonomous) IBVP <strong>for</strong> pure diffusion fromt j−1 to t j−1 + 1 2 τ<br />

(7.3.14) ↔<br />

∂w<br />

∂t −ǫ∆w = 0 inΩ×]t j−1,t j−1 + 1 2 τ[ ,<br />

w(x,t) = g(x,t j−1 ) ∀x ∈ ∂Ω, t j−1 < t < t j−1 + 1 2 τ ,<br />

w(x,t j−1 ) = u (j−1) (x) ∀x ∈ Ω .<br />

(7.3.18)<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

t 0 t 1 t 2 t 3 t 4<br />

Fig. 234<br />

—: sub-step ➁, —: sub-step ➀ & ➂<br />

Remark 7.3.21 (Approximate sub-steps <strong>for</strong> Strang splitting time).<br />

The solutions of the initial value problems in the sub-steps of Strang splitting timestepping may be<br />

computed only approximately.<br />

If this is done by one step of a 2nd-order timestepping method in each case, then the resulting<br />

approximate Strang splitting timestepping will still be of second order, cf. Thm. 7.3.17.<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

➁ Solve IBVP <strong>for</strong> pure transport (= advection), see Sect. 7.3.2,<br />

(7.3.15) ↔<br />

∂z<br />

∂t +v(x,t)·gradz = f(x,t) inΩ×]t j−1,t j [ ,<br />

z(x,t) = g(x,t) on inflow boundaryΓ in , t j−1 < t < t j , (7.3.19)<br />

z(x,t j−1 ) = w(x,t j−1 + 1 2 τ) ∀x ∈ Ω .<br />

➂ Solve IBVP <strong>for</strong> pure diffusion fromt j−1 + 1 2 τ tot j<br />

(7.3.16) ↔<br />

Then set u (j) (x) := w(x,t j ),x ∈ Ω.<br />

∂w<br />

∂t −ǫ∆w = 0 inΩ×]t j−1+ 1 2 τ,t j[ ,<br />

w(x,t) = g(x,t j ) ∀x ∈ ∂Ω , t j−1 + 1 2 τ < t < t j ,<br />

w(x,t j−1 + 1 2 τ) = z(x,t j) ∀x ∈ Ω .<br />

(7.3.20)<br />

7.3<br />

p. 781<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

7.3.3.2 Particle method <strong>for</strong> advection<br />

Recall the discussion of the IBVP <strong>for</strong> the pure transport (= advection) equation from Sect. 7.3.2<br />

with inflow boundary<br />

∂u<br />

∂t +v(x,t)·gradu = f in ˜Ω := Ω×]0,T[ ,<br />

u(x,t) = g(x,t) on Γ in ×]0,T[ ,<br />

u(x,0) = u 0 (x) inΩ ,<br />

△<br />

(7.3.22)<br />

Γ in := {x ∈ ∂Ω: v(x)·n(x) < 0} . (7.2.10)<br />

Case f ≡ 0: a travelling fluid particle sees a constant solution, see (7.3.9)<br />

7.3<br />

p. 78<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Efficient “implementation” of Strang splitting timestepping, ifg = g(y):<br />

combine last sub-step ➂ with first sub-step ➀ of the next timestep<br />

u(x,t) =<br />

where s ↦→ y(s) solves the initial value problem<br />

trajectory”).<br />

{<br />

u0 (x 0 ) , if y(s) ∈ Ω ∀0 < s < t ,<br />

g(y(s 0 ),s 0 ) , if y(s 0 ) ∈ ∂Ω, y(s) ∈ Ω ∀s 0 < s < t ,<br />

(7.3.23)<br />

dy<br />

ds (s) = v(y(s),s), y(t) = x (“backward particle<br />

7.3<br />

p. 782<br />

7.3<br />

p. 78


Case of generalf, see Rem. 7.3.10: Since<br />

dt d u(y(t)) = f(y(t),t)<br />

⎧<br />

∫<br />

⎪⎨ u 0 (x 0 )+ t<br />

f(y(s),s)ds , if y(s) ∈ Ω ∀0 < s < t ,<br />

u(x,t) = 0<br />

∫<br />

⎪⎩ g(y(s 0 ),s 0 )+ t<br />

f(y(s),s)ds , if y(s 0 ) ∈ ∂Ω, y(s) ∈ Ω ∀s 0 < s < t .<br />

s 0<br />

(7.3.12)<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

For general velocity fieldv : Ω ↦→ R d :<br />

Stop trackingi-th trajectory as soon as an interpolation nodesp (j)<br />

i<br />

lies outside spatial domainΩ.<br />

In each timestep start new trajectories from fixed locations on inflow boundaryΓ in (“particle injection”).<br />

These interpolation nodes will carry the boundary value.<br />

Example 7.3.24 (Point particle method <strong>for</strong> pure advection).<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

R. Hiptmair<br />

The solution <strong>for</strong>mula (7.3.12) suggests an approach <strong>for</strong> solving (7.3.22) approximately.<br />

DRAFT<br />

We first consider the simple situation of no inflow/outflow (e.g., fluid in a container, see Rem. 7.3.10)<br />

v(x,t)·n(x) = 0 ∀x ∈ ∂Ω , 0 < t < T . (7.1.2)<br />

➀ Pick suitable interpolation nodes {p i } N i=1 ⊂ Ω (initial ‘particle positions”)<br />

7.3<br />

p. 785<br />

IBVP (7.3.22) onΩ =]0,1[ 2 ,T = 2, withf ≡ 0,g ≡ 0.<br />

∥<br />

Initial locally supported bump u 0 (x) = max{0,1−4∥x− ( 1/2) ∥ 1/4 ∥}.<br />

Two stationary divergence-free velocity fields<br />

( ) −sin(πx1 )cos(πx<br />

•v 1 (x) = 2 )<br />

satisfying (7.1.2),<br />

cos(πx 1 )sin(πx 2 )<br />

( ) −x2<br />

•v 2 (x) = .<br />

x 1<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

7.3<br />

p. 78<br />

➁ Solve initial value problems (cf. ODE (7.1.1) <strong>for</strong> particle trajectories)<br />

ẏ(t) = v(y(t),t) , y(0) = p i , i = 1,...,N ,<br />

by means of a suitable single-step method with uni<strong>for</strong>m timestepτ := T/M,M ∈ N.<br />

➣ sequencies of solution points p (j)<br />

i ,j = 0,...,M,i = 1,...,N<br />

➂ Reconstruct approximationu (j)<br />

N ≈ u(·,t j),t j := jτ, by interpolation:<br />

u (j)<br />

j−1 ∑<br />

N (p(j) i ) := u 0 (p i )+τ f( 2 1(p(l)<br />

i +p (l−1)<br />

i ), 1 2 (t l +t l−1 )) , i = 1,...,N<br />

l=1<br />

where the composite midpoint quadrature rule was used to approximate the source integral in<br />

(7.3.12).<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Initial positions of interpolation points on regular tensor product grid with meshwidthh = 1 40 .<br />

Approximation of trajectories by means of explicit trapezoidal rule [18, Eq. 12.4.6] (method of<br />

Heun).<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

This method falls into the class of<br />

• particle methods, because the interpolation nodes can be regarded fluid particles tracked by the<br />

method,<br />

velocity fieldv 1 (circvel)<br />

Fig. 235<br />

velocity fieldv 2 (rotvel)<br />

Fig. 236<br />

• Lagrangian methods, which treat the IBVP in coordinate systems moving with the flow,<br />

• characteristic methods, which reconstruct the solution from knowledge about its behavior along<br />

streamlines.<br />

7.3<br />

p. 786<br />

7.3<br />

p. 78


Code 7.3.25: Confined velocity field<br />

1 f u n c t i o n V = circvel(P)<br />

2 % Circular velocity (divergence free, zero normal component on unit square).<br />

3 % P: 2xN matrix of point coordinates<br />

4 % return value: velocity vectors at points in P<br />

5<br />

6 v = @(p) [-sin ( p i *p(1))*cos( p i *p(2));sin ( p i *p(2))*cos( p i *p(1))];<br />

7<br />

8 V = [];<br />

9 f o r p=P<br />

10 V = [V, v(p)];<br />

11 end<br />

Code 7.3.26: Pass-through velocity field<br />

1 f u n c t i o n V = rotvel(P)<br />

2 % Circular velocity<br />

3<br />

4 v = @(p) [-p(2); p(1)];<br />

5<br />

6 V = [];<br />

7 f o r p=P<br />

8 V = [V, v(p)];<br />

9 end<br />

Code 7.3.27: Point particle method <strong>for</strong> pure advection<br />

1 f u n c t i o n partadv(v,u0,g,n,tau,m)<br />

2 % Point particle method <strong>for</strong> pure advection problem<br />

3 % on the unit sqaure<br />

4 % v: handle to a function returning the velocity field <strong>for</strong> (an array) of<br />

points<br />

5 % u0: handle to a function returning the initial value u 0 <strong>for</strong> (an array)<br />

6 % of points<br />

7 % g: handle to a function g = g(x) returning the Dirichlet boundary values<br />

8 % n: h = 1/n is the grid spacing of the inintial point distribution<br />

9 % tau: timestep size, m: number of timesteps, that is, T = mτ<br />

10<br />

11 % Initialize points<br />

12 h = 1/n; [Xp,Yp] = meshgrid(0:h:1,0:h:1);<br />

13 P = [reshape(Xp,1,(n+1)^2);reshape(Yp,1,(n+1)^2)];<br />

14 % Initialize points on the boundary<br />

15 BP = [[(0:h:1);zeros(1,n+1)],[ones(1,n+1);(0:h:1)],...<br />

16 [(0:h:1);ones(1,n+1)],[zeros(1,n+1);(0:h:1)]];<br />

17 U = u0(P); % Initial values<br />

18<br />

19 % Plot velocity field<br />

20 hp = 1/10; [Xp,Yp] = meshgrid(0:hp:1,0:hp:1);<br />

21 Up = zeros( s i z e (Xp)); Vp = zeros( s i z e(Xp));<br />

22 f o r i=0:10, f o r j=0:10<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

43<br />

7.3 44 t = 0;<br />

p. 789<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

7.3<br />

p. 790<br />

23 x = v([Xp(i+1,j+1);Yp(i+1,j+1)]);<br />

24 Up(i+1,j+1) = x(1); Vp(i+1,j+1) = x(2);<br />

25 end; end<br />

26 f i g u r e (’name’,’velocity field’,’renderer’,’painters’);<br />

27 q u i v e r(Xp,Yp,Up,Vp,’b-’); s e t(gca,’fontsize’,14); hold on;<br />

28 p l o t ([0 1 1 0 0],[0 0 1 1 0],’k-’);<br />

29 a x i s([-0.1 1.1 -0.1 1.1]);<br />

30 x l a b e l (’{\bf x_1}’); y l a b e l (’{\bf x_2}’);<br />

31 a x i s off;<br />

32<br />

33 fp = f i g u r e (’name’,’particles’,’renderer’,’painters’);<br />

34 fs = f i g u r e (’name’,’solution’,’renderer’,’painter’);<br />

35<br />

36 % Visualize points (interior points in red, boundary points in blue)<br />

37 f i g u r e (fp); p l o t (P(1,:),P(2,:),’r+’,BP(1,:),BP(2,:),’b*’);<br />

38 t i t l e ( s p r i n t f (’n = %i, t = %f, \\tau = %f, %i<br />

points’,n,0,tau, s i z e (P,2)));<br />

39 drawnow; pause;<br />

40<br />

41 % Visualize solution<br />

42 f i g u r e (fs); plotpartsol(P,U); drawnow;<br />

45 f o r l=1:m<br />

46 % Advect points (explicit trapezoidal rule)<br />

47 P1 = P + tau/2*v(P); P = P + tau*v(P1);<br />

48<br />

49 % Remove points on the boundary or outside the domain<br />

50 Pnew = []; Unew = []; l = 1;<br />

51 f o r p=P<br />

52 i f ((p(1) > eps) (p(1) < 1-eps) (p(2) > eps) (p(2) <<br />

1-eps))<br />

53 Pnew = [Pnew,p]; Unew = [Unew; U(l)];<br />

54 end<br />

55 l = l+1;<br />

56 end<br />

57<br />

58 % Add points on the boundary (particle injection)<br />

59 P = [Pnew, BP]; U = [Unew; g(BP)];<br />

60<br />

61 % Visualize points<br />

62 f i g u r e (fp); p l o t (P(1,:),P(2,:),’r+’,BP(1,:),BP(2,:),’b*’);<br />

63 t i t l e ( s p r i n t f (’n = %i, t = %f, \\tau = %f, %i<br />

points’,n,t,tau, s i z e (P,2)));<br />

64 drawnow;<br />

65 % Visualize solution<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

7.3<br />

p. 79<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

7.3<br />

p. 79


66 f i g u r e (fs); plotpartsol(P,U); drawnow;<br />

67<br />

68 t = t+tau;<br />

69 end<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

➊ Given triangular meshM (j−1) ofΩ,<br />

u (j−1)<br />

N ∈ S1,0 0 (M(j−1) )↔coefficient vector ⃗µ (j−1) ∈ R Nj−1 ,<br />

approximately solve (7.3.18) by a single step of implicit Euler (6.1.23) (size 1 2 τ)<br />

⃗ν = (M+ 1 2 τǫA)−1 ⃗µ (j−1) ,<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Start animations:<br />

partadv(@circvel,@initvals,@bdvals,40,0.025,80);<br />

partadv(@rotvel,@initvals,@bdvals,40,0.025,80);<br />

7.3.3.3 Particle mesh method<br />

✸<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

7.3<br />

p. 793<br />

where A ∈ R N j−1,N j−1 ˆ= S 0<br />

1,0 (M)-Galerkin matrix <strong>for</strong> −∆, M ˆ= (possibly lumped) S 0 1,0 (M)-<br />

mass matrix.<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

R. Hiptm<br />

More advisable to maintain 2nd-order timestepping: 2nd-order L(π)-stable single step<br />

method,e.g., SDIRK-2 (6.1.59).<br />

DRAFT<br />

➋ Lagrangian advection step (of sizeτ) <strong>for</strong> (7.3.19) with<br />

initial “particle positions”p i given by nodes ofM (j−1) ,i = 1,...,N j ,<br />

initial “particle temperatures” given by corresponding coefficientsν i .<br />

➌ Remeshing: advection step has moved nodes to new positions ˜p i (and, maybe, introduced new<br />

nodes by “particle injection”, deleted nodes by “particle removal”).<br />

➣ Create new triangular meshM (j) with nodes ˜p i (+ boundary nodes),i = 1,...,N j<br />

7.3<br />

p. 79<br />

The method introduced in the previous section, can be used to tackle the pure advection problem<br />

(7.3.19) in the 2nd sub-step of the Strang splitting timestepping.<br />

Issue: How to combine Lagrangian advection with a method <strong>for</strong> the pure diffusion problem (7.3.18)<br />

faced in the other sub-steps of the Strang splitting timestepping?<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

➍ Repeat diffusion step ➊ starting with w N ∈ S 0 1,0 (M(j) ) = linear interpolant (→ Def. 5.3.13) of<br />

“particle temperatures” onM (j) .<br />

➣<br />

new approximate solutionu (j)<br />

N<br />

Example 7.3.28 (Delaunay-remeshing in 2D).<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Idea:<br />

two views<br />

“particle temperatures”<br />

↕<br />

u(p (j)<br />

i )<br />

Nodal values of finite element functionu (j)<br />

N ∈ S0 1 (M)<br />

Outline: algorithm <strong>for</strong> one step of size τ > 0 of Strang splitting timestepping <strong>for</strong> transient<br />

convection-diffusion problem<br />

⎧<br />

⎨ ∂u<br />

∂t −ǫ∆u+v(x,t)·gradu = f in ˜Ω := Ω×]0,T[ ,<br />

⎩<br />

u(x,t) = 0 ∀x ∈ ∂Ω, 0 < t < T , u(x,0) = u 0 (x) ∀x ∈ Ω .<br />

(7.3.2)<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

7.3<br />

p. 794<br />

Delaunay algorithm <strong>for</strong> creating a 2D triangular<br />

mesh with prescribed nodes:<br />

1 Compute Voronoi cells, see (4.2.3) &<br />

http://www.qhull.org/.<br />

2 Connect two nodes, if their associated Voronoi<br />

dual cells have an edge in common.<br />

➥ MATLAB TRI = delaunay(x,y)<br />

Fig. 237<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

7.3<br />

p. 79


Code 7.3.29: Demonstration of Delaunay-remeshing<br />

1 f u n c t i o n meshadv(v,n,tau,m)<br />

2 % Point advaction and remeshing <strong>for</strong> Lagrangian method<br />

3 % v: handle to a function returning the velocity field <strong>for</strong> (an array) of<br />

points<br />

4 % n: h = 1/n is the grid spacing of the inintial point distribution<br />

5<br />

6 % Initialize points<br />

7 h = 1/n; [Xp,Yp] = meshgrid(0:h:1,0:h:1);<br />

8 P = [reshape(Xp,1,(n+1)^2);reshape(Yp,1,(n+1)^2)];<br />

9 % Initialize points on the boundary<br />

10 BP = [[(0:h:1);zeros(1,n+1)],[ones(1,n+1);(0:h:1)],...<br />

11 [(0:h:1);ones(1,n+1)],[zeros(1,n+1);(0:h:1)]];<br />

12<br />

13 % Plot triangulation<br />

14 fp = f i g u r e (’name’,’evolving meshes’,’renderer’,’painters’);<br />

15 TRI = delaunay(P(1,:),P(2,:));<br />

16 p l o t (P(1,:),P(2,:),’r+’); hold on;<br />

triplot(TRI,P(1,:),P(2,:),’blue’); hold off;<br />

17 t i t l e ( s p r i n t f (’n = %i, t = %f, \\tau = %f, %i<br />

points’,n,0,tau, s i z e (P,2)));<br />

18 drawnow; pause;<br />

19<br />

20 t = 0;<br />

21 f o r l=1:m<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

7.3<br />

p. 797<br />

43 end<br />

Ω =]0,1[ 2 , velocity fields like in Ex. 7.3.24. Advection of interpolation nodes by means of explicit<br />

trapezoidal rule.<br />

Start animations:<br />

meshadv(@circvel,20,0.05,40);<br />

meshadv(@rotvel,20,0.05,40);<br />

Example 7.3.30 (Lagrangian method <strong>for</strong> convection-diffusion in 1D).<br />

✸<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

7.3<br />

p. 79<br />

22 % Advect points (explicit trapezoidal rule)<br />

23 P1 = P + tau/2*v(P); P = P + tau*v(P1);<br />

24<br />

25 % Remove points on the boundary or outside the domain<br />

26 Pnew = []; l = 1;<br />

27 f o r p=P<br />

28 i f ((p(1) > eps) (p(1) < 1-eps) (p(2) > eps) (p(2) <<br />

1-eps))<br />

29 Pnew = [Pnew,p];<br />

30 end<br />

31 l = l+1;<br />

32 end<br />

33<br />

34 P = [Pnew, BP]; % Add points on the boundary (particle injection)<br />

35<br />

36 % Plot triangulation<br />

37 TRI = delaunay(P(1,:),P(2,:));<br />

38 p l o t (P(1,:),P(2,:),’r+’); hold on;<br />

triplot(TRI,P(1,:),P(2,:),’blue’); hold off;<br />

39 t i t l e ( s p r i n t f (’n = %i, t = %f, \\tau = %f, %i<br />

points’,n,t,tau, s i z e (P,2)));<br />

40 drawnow;<br />

41<br />

42 t = t+tau;<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

7.3<br />

p. 798<br />

Same IBVP as in Ex. 7.3.4<br />

Linear finite element Galerkin discretization<br />

with mass lumping in space<br />

Strang splitting applied to diffusive and convective<br />

terms<br />

Implicit Euler timestepping <strong>for</strong> diffusive partial<br />

timestep<br />

u<br />

1<br />

0.9<br />

0.8<br />

0.7<br />

0.6<br />

0.5<br />

0.4<br />

0.3<br />

0.2<br />

0.1<br />

t=0<br />

0<br />

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1<br />

x<br />

Fig. 238<br />

Code 7.3.31: Lagrangian method <strong>for</strong> (7.3.5)<br />

1 f u n c t i o n lagr(epsilon,N,M)<br />

2 % This function implements a simple Lagrangian advection scheme <strong>for</strong> the 1D<br />

convection-diffusion<br />

3 % IBVP −ǫ d2 u<br />

+ du<br />

dx 2 dx = 0, u(x,0) = max(1−3|x− 1 3 |,0),<br />

4 % and homogeneous Dirichlet boundary conditions u(0) = u(1) = 0. Timestepping<br />

employs Strang splitting<br />

5 % applied to diffusive and convective spatial operators.<br />

6 % epsilon: strength of diffusion<br />

7 % N: number of cells of spatial mesh<br />

8 % M: number of timesteps<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

7.3<br />

p. 80


u<br />

u<br />

u<br />

u<br />

u<br />

u<br />

u<br />

u<br />

u<br />

u<br />

u<br />

u<br />

9<br />

10 T = 0.5; tau = T/M; %<br />

timestep size<br />

11 h = 1/N; x = 0:h:1; u = max(1-3*abs(x(2:end-1)-1/3),0)’;<br />

value<br />

% Initial<br />

12<br />

13 [Amat,Mmat] = getdeltamat(x); % Obtain stiffness and mass<br />

matrix<br />

14 u = (Mmat+0.5*tau*epsilon*Amat)\(Mmat*u); % Implicit Euler timestep<br />

15<br />

16 f o r j=1:M+1<br />

17 % Advection step: shift meshpoints, drop those travelling out of Ω =]0,1[,<br />

insert<br />

18 % new meshpoints from the left. Solution values are just copied.<br />

19 xm = x(2:end-1)+tau; % Transport of meshpoints (here: explicit<br />

Euler)<br />

20 idx = f i n d (xm < 1); % Drop meshpoints beyond x = 1<br />

21 x = [0,tau,xm(idx),1]; % Insert new meshpoint at left end of Ω<br />

22 u = [0;u(idx)]; % Copy nodal values and feed 0 from left<br />

23<br />

24 % Diffusion partial timestep<br />

25 [Amat,Mmat] = getdeltamat(x); % Obtain stiffness and mass<br />

matrix on new mesh<br />

26 u = (Mmat+tau*epsilon*Amat)\(Mmat*u); % Implicit Euler step<br />

27 end<br />

28 end<br />

ǫ = 10 −5 :<br />

1<br />

0.9<br />

0.8<br />

0.7<br />

0.6<br />

0.5<br />

0.4<br />

0.3<br />

0.2<br />

0.1<br />

Lagrangian advection: M = 113.000000, τ = 0.005000, t=0.130000<br />

0<br />

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1<br />

x<br />

ǫ = 0.1:<br />

1<br />

0.9<br />

0.8<br />

0.7<br />

0.6<br />

0.5<br />

0.4<br />

0.3<br />

0.2<br />

0.1<br />

Lagrangian advection: M = 113.000000, τ = 0.005000, t=0.130000<br />

0<br />

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1<br />

x<br />

1<br />

0.9<br />

0.8<br />

0.7<br />

0.6<br />

0.5<br />

0.4<br />

0.3<br />

0.2<br />

0.1<br />

Lagrangian advection: M = 126.000000, τ = 0.005000, t=0.255000<br />

0<br />

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1<br />

x<br />

1<br />

0.9<br />

0.8<br />

0.7<br />

0.6<br />

0.5<br />

0.4<br />

0.3<br />

0.2<br />

0.1<br />

Lagrangian advection: M = 126.000000, τ = 0.005000, t=0.255000<br />

0<br />

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1<br />

x<br />

1<br />

0.9<br />

0.8<br />

0.7<br />

0.6<br />

0.5<br />

0.4<br />

0.3<br />

0.2<br />

0.1<br />

0.9<br />

0.8<br />

0.7<br />

0.6<br />

0.5<br />

0.4<br />

0.3<br />

0.2<br />

0.1<br />

Lagrangian advection: M = 138.000000, τ = 0.005000, t=0.380000<br />

0<br />

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1<br />

x<br />

1<br />

Lagrangian advection: M = 138.000000, τ = 0.005000, t=0.380000<br />

0<br />

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1<br />

x<br />

1<br />

0.9<br />

0.8<br />

0.7<br />

0.6<br />

0.5<br />

0.4<br />

0.3<br />

0.2<br />

0.1<br />

0.9<br />

0.8<br />

0.7<br />

0.6<br />

0.5<br />

0.4<br />

0.3<br />

0.2<br />

0.1<br />

Lagrangian advection: M = 151.000000, τ = 0.005000, t=0.505000<br />

Fig. 239<br />

0<br />

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1<br />

x<br />

1<br />

Lagrangian advection: M = 151.000000, τ = 0.005000, t=0.505000<br />

Fig. 240<br />

0<br />

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1<br />

x<br />

“Reference solution” computed by method of lines, see Ex. 7.3.4, withh = 10 −3 ,τ = 5·10 −5 :<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

7.3<br />

p. 801<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

17<br />

H.<br />

Harbrecht<br />

V. 19<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

7.3<br />

p. 802<br />

1<br />

0.9<br />

0.8<br />

0.7<br />

0.6<br />

0.5<br />

0.4<br />

0.3<br />

0.2<br />

0.1<br />

implicit Euler<br />

explicit Euler<br />

Expl. Euler: h = 0.001000, τ = 0.000050, t=0.125050<br />

0<br />

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1<br />

x<br />

1<br />

0.9<br />

0.8<br />

0.7<br />

0.6<br />

0.5<br />

0.4<br />

0.3<br />

0.2<br />

0.1<br />

implicit Euler<br />

explicit Euler<br />

Expl. Euler: h = 0.001000, τ = 0.000050, t=0.250050<br />

0<br />

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1<br />

x<br />

1<br />

0.9<br />

0.8<br />

0.7<br />

0.6<br />

0.5<br />

0.4<br />

0.3<br />

0.2<br />

0.1<br />

implicit Euler<br />

explicit Euler<br />

Expl. Euler: h = 0.001000, τ = 0.000050, t=0.375050<br />

0<br />

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1<br />

x<br />

Example 7.3.32 (Lagrangian method <strong>for</strong> convection-diffusion in 2D).<br />

IBVP (7.3.2) onΩ =]0,1[ 2 ,T = 1,<br />

1<br />

0.9<br />

0.8<br />

0.7<br />

0.6<br />

0.5<br />

0.4<br />

0.3<br />

0.2<br />

0.1<br />

implicit Euler<br />

explicit Euler<br />

Expl. Euler: h = 0.001000, τ = 0.000050, t=0.500050<br />

Fig. 241<br />

✸<br />

0<br />

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1<br />

x<br />

Particle mesh method based on Delaunay remeshing, see Ex. 7.3.28, and linear finite element<br />

Galerkin discretizatin <strong>for</strong> diffusion step.<br />

Code 7.3.33: Particle mesh method in 2D<br />

1 f u n c t i o n ConvDiffLagr(v,epsilon,u0,n,tau,m)<br />

2 % Point particle method <strong>for</strong> convection-diffusion problem on the unit sqaure<br />

3 % v: handle to a function returning the velocity field <strong>for</strong> (an array) of<br />

points<br />

4 % u0: handle to a function returning the initial value u 0 <strong>for</strong> (an array)<br />

5 % of points<br />

6 % n: h = 1/n is the grid spacing of the inintial point distribution<br />

7 % tau: timestep size, m: number of timesteps, that is, T = mτ<br />

8<br />

9 % Initialize points<br />

10 h = 1/n; [Xp,Yp] = meshgrid(0:h:1,0:h:1);<br />

11 P = [reshape(Xp,1,(n+1)^2);reshape(Yp,1,(n+1)^2)];<br />

12 % Initialize points on the boundary<br />

13 BP = [[(0:h:1);zeros(1,n+1)],[ones(1,n+1);(0:h:1)],...<br />

14 [(0:h:1);ones(1,n+1)],[zeros(1,n+1);(0:h:1)]];<br />

15 % Construct initial mesh by Delaunay algorithm<br />

16 TRI = delaunay(P(1,:),P(2,:));<br />

18 U = u0(P); % Initial values<br />

20 fp = f i g u r e (’name’,’particles’,’renderer’,’painters’);<br />

21 fs = f i g u r e (’name’,’solution’,’renderer’,’painters’);<br />

22<br />

23 % Visualize mesh, points (interior points in red, boundary points in blue)<br />

24 % the piecewise linear approximate solution<br />

25 f i g u r e (fp); p l o t (P(1,:),P(2,:),’r+’,BP(1,:),BP(2,:),’m*’); hold on;<br />

26 triplot(TRI,P(1,:),P(2,:),’blue’); hold off;<br />

27 t i t l e ( s p r i n t f (’n = %i, t = %f, \\tau = %f, %i points’,n,0,tau, s i z e (P,2)));<br />

28 drawnow;<br />

29<br />

30 f i g u r e (fs); trisurf(TRI,P(1,:),P(2,:),U’);<br />

31 a x i s([0 1 0 1 0 1]); x l a b e l (’{\bf x_1}’);<br />

32 y l a b e l (’{\bf x_2}’); z l a b e l (’{\bf u}’);<br />

33 t i t l e ( s p r i n t f (’n = %i, t = %f, \\tau = %f, %i points’,n,0,tau, s i z e (P,2)));<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

7.3<br />

p. 80<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

7.3<br />

p. 80


34 pause;<br />

35<br />

36 % Initial diffusion half step (implicit Euler)<br />

37 [Amat,Mmat] = getGalerkinMatrices(TRI,P(1,:),P(2,:)); % Compute Galerkin<br />

matrices<br />

38 % Isolate indices of interior points<br />

39 j = 1; intidx = [];<br />

40 f o r p=P<br />

41 i f ((p(1) > eps) (p(1) < 1-eps) (p(2) > eps) (p(2) < 1-eps))<br />

42 intidx = [intidx,j];<br />

43 end<br />

44 j = j+1;<br />

45 end<br />

46 Amat = Amat(intidx,intidx); Mmat = Mmat(intidx,intidx);<br />

47 U(intidx) = (Mmat+0.5*epsilon*tau*Amat)\(Mmat*U(intidx));<br />

48<br />

49 % full(Amat), full(Mmat), return;<br />

50<br />

51 t = 0;<br />

52 f o r l=1:m<br />

53 % Advect points (explicit trapezoidal rule)<br />

54 P1 = P + tau/2*v(P); P = P + tau*v(P1);<br />

55<br />

56 % Remove points on the boundary or outside the domain<br />

57 Pnew = []; Unew = []; l = 1; j = 0;<br />

58 f o r p=P<br />

59 i f ((p(1) > eps) (p(1) < 1-eps) (p(2) > eps) (p(2) < 1-eps))<br />

60 Pnew = [Pnew,p]; Unew = [Unew; U(l)];<br />

61 j = j+1; % Counter <strong>for</strong> interior points<br />

62 end<br />

63 l = l+1;<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

7.3<br />

p. 805<br />

Invocation: ConvDiffLagr(@circvel,0.001,@initvals,1/40,0.01,100)<br />

Advantage of Lagrangian (particle) methods <strong>for</strong> convection diffusion:<br />

No artificial diffusion required (no “smearing”)<br />

No stability induced timestep constraint<br />

Drawback of Lagrangian (particle) methods <strong>for</strong> convection diffusion:<br />

7.3.4 Semi-Lagrangian method<br />

Remeshing (may be) expensive and difficult.<br />

Point advection may produce “voids” in point set.<br />

✸<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

7.3<br />

p. 80<br />

64 end<br />

65<br />

66 % Add points on the boundary (particle injection)<br />

67 P = [Pnew, BP];<br />

68<br />

69 % Delaunay algorithm <strong>for</strong> building triangulation<br />

70 TRI = delaunay(P(1,:),P(2,:));<br />

71 [Amat,Mmat] = getGalerkinMatrices(TRI,P(1,:),P(2,:)); % Compute Galerkin<br />

matrices<br />

72 Amat = Amat(1:j,1:j); Mmat = Mmat(1:j,1:j);<br />

73 U = (Mmat+epsilon*tau*Amat)\(Mmat*Unew); % implicit Euler step<br />

74 U = [U; zeros( s i z e (BP,2),1)]; % zero padding <strong>for</strong> boundary nodes<br />

75<br />

76 % Visualize mesh, points (interior points in red, boundary points in blue)<br />

77 % the piecewise linear approximate solution<br />

78 f i g u r e (fp); p l o t (P(1,:),P(2,:),’r+’,BP(1,:),BP(2,:),’m*’); hold on;<br />

79 triplot(TRI,P(1,:),P(2,:),’blue’); hold off;<br />

80 t i t l e ( s p r i n t f (’n = %i, t = %f, \\tau = %f, %i points’,n,t,tau, s i z e (P,2)));<br />

81 drawnow;<br />

82<br />

83 f i g u r e (fs); trisurf(TRI,P(1,:),P(2,:),U’);<br />

84 a x i s ([0 1 0 1 0 1]); x l a b e l (’{\bf x_1}’);<br />

85 y l a b e l (’{\bf x_2}’); z l a b e l (’{\bf u}’);<br />

86 t i t l e ( s p r i n t f (’n = %i, t = %f, \\tau = %f, %i points’,n,t,tau, s i z e (P,2)));<br />

87 t = t+tau;<br />

88 end<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Now we study a family of methods <strong>for</strong> transient convection-diffusion that takes into account transport<br />

along streamlines, but, in constrast to genuine Lagrangian methods, relies on a fixed mesh.<br />

Definition 7.3.34 (Material derivative).<br />

Given a velocity field v : Ω×]0,T[↦→ R d , the material derivative of a function f = f(x,t) at<br />

(x,t) is<br />

Df<br />

Dv (x,t f(x,t 0 )−f(Φ −τ<br />

t<br />

0) = lim 0<br />

x,t 0 −τ)<br />

τ→0 τ<br />

, x ∈ Ω, 0 < t 0 < T ,<br />

withΦ t t 0<br />

the flow map (at timet 0 ) associated withv, that is, cf. (7.1.3), (7.1.4),<br />

The material derivative Df<br />

Dv<br />

is the<br />

dΦ t t 0<br />

x<br />

= v(Φ t dt 0<br />

x,t−t 0 ) , Φ 0 x = x .<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

7.3<br />

p. 806<br />

rate of change off experienced by a particle carried along by the flow<br />

7.3<br />

p. 80


ecauseΦ t t 0<br />

x describes the trajectory of a particle located atxat timet 0 (↔t = 0).<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Cast (7.3.40) into variational <strong>for</strong>m according to the recipe of Sect. 2.8 and apply Galerkin discretization<br />

(here discussed <strong>for</strong> linear finite elements, homogeneous Dirichlet boundary conditionsu = 0 on∂Ω).<br />

This yields one timestep (size τ) <strong>for</strong> the semi-Lagrangian method: the approximation u (j)<br />

N<br />

<strong>for</strong> u(jτ)<br />

(equidistant timesteps) is computed from the previous timestep according to<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

By a straight<strong>for</strong>ward application of the chain rule <strong>for</strong> smoothf<br />

Df<br />

Dv (x,t) = grad xf(x,t)·v(x,t)+ ∂f<br />

∂t (x,t) . (7.3.37)<br />

➣ The transient convection-diffusion equation can be rewritten as (7.3.1)<br />

Idea:<br />

∂u<br />

∂t −ǫ∆u+v(x,t)·gradu = f in ˜Ω := Ω×]0,T[ ,<br />

← (7.3.37)<br />

Du<br />

Dv −ǫ∆u = f in ˜Ω := Ω×]0,T[ . (7.3.38)<br />

Backward difference (“implicit Euler”) discretization of material derivative<br />

Du<br />

≈ u(x,t 0)−u(Φ −τ<br />

t 0<br />

x,t 0 −τ)<br />

,<br />

Dv|(x,t)=(x,t 0 ) τ<br />

with timestepτ > 0, wheret ↦→ Φ t x solves the initial value problem<br />

dΦ t t 0<br />

x<br />

(t) = v(Φ t t<br />

dt 0<br />

x,t 0 +t) , Φ 0 t 0<br />

x = x .<br />

Semi-discretization of (7.3.38) in time (with fixed timestepτ > 0)<br />

u (j) (x)−u (j−1) (Φ −τ<br />

t j<br />

x)<br />

−ǫ∆u (j) (x) = f(x,t<br />

τ<br />

j ) in Ω ,<br />

+ boundary conditions att = t j ,<br />

(7.3.40)<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

7.3<br />

p. 809<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

u (j)<br />

N ∈ S0 1,0 (M): ∫<br />

Ω<br />

u (j)<br />

N (x)−u(j−1) N (Φ −τ<br />

t j<br />

x)<br />

τ<br />

∫<br />

=<br />

Here,Mis supposed to be a fixed triangular mesh ofΩ.<br />

∫<br />

v N (x)dx+ǫ<br />

Ω<br />

Ω<br />

gradu (j)<br />

N ·gradv N dx<br />

f(x,t j )v N (x)dx ∀v N ∈ S1,0 0 (M) . (7.3.41)<br />

However, (7.3.41) cannot be implemented: x ↦→ u (j−1)<br />

N (Φ −τ<br />

t j<br />

x) is a finite element function that<br />

has been “transported with the (reversed) flow” (in the sense of pullback, see Def. 3.6.2)<br />

Fig. 242<br />

✁ - - - ˆ= image ofM(—) underΦ −τ<br />

t j<br />

The pullback x ↦→ v N (Φ −τ<br />

t j<br />

x) of v N ∈ S1,0 0 (M)<br />

is piecewise smooth w.r.t. the mapped mesh<br />

drawn with - - -.<br />

the cells ofM.<br />

Hence, it is not smooth inside<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

7.3<br />

p. 81<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

whereu (j) : Ω ↦→ R is an approximation <strong>for</strong> u(·,t j ),t j := jτ,j ∈ N.<br />

Note the difference to the method of lines (→ Sects. 6.1.3, 6.2.3, 7.3.1): in (7.3.40) semidiscretization<br />

in time was carried out first, now followed by discretization in space, which reverses the order adopted<br />

in the method of lines.<br />

7.3<br />

p. 810<br />

➣ the transported function may not be a finite element function onM,<br />

➣ the transported function may not even be piecewise smooth onM<br />

7.3<br />

p. 81


➤<br />

✬<br />

local quadrature <strong>for</strong> the approximate computation of the integral in (7.3.41) that<br />

involves u (j−1)<br />

N (Φ −τ<br />

t j<br />

x) is not possible, because accurate numerical quadrature<br />

requires a (locally) smooth integrand.<br />

✫<br />

Idea:<br />

replaceu (j−1)<br />

N (y x (−τ)) with linear interpolant (→ Def. 5.3.13)<br />

approximate Φ −τ<br />

t j<br />

x by<br />

(“streamline backtracking”)<br />

( (j−1)<br />

I 1 u N ◦Φ −τ )<br />

t j ∈ S<br />

0<br />

1,0 (M),<br />

x−τv(x,t j ) (explicit Euler).<br />

Implementable version of (7.3.41) (using mass lumping, see Rem. 6.2.34)<br />

∫<br />

u (j)<br />

N ∈ S0 1,0 (M): 1<br />

3 |U p |(µ (j)<br />

p −u (j−1)<br />

N (p−τv(p,t j ))+τ gradu (j)<br />

N ·gradbp N dx<br />

Ω<br />

= 3 1|U p|f(p) , p ∈ N(M)∩Ω , (7.3.42)<br />

where µ (j)<br />

p are the nodal values of u (j)<br />

N ∈ S0 1,0 (M) associated with the interior nodes of the mesh<br />

M,b p N is the “tent function” belonging to nodep,|U p| is the sum of the areas of all triangles adjacent<br />

top.<br />

Example 7.3.43 (Semi-Lagrangian method <strong>for</strong> convection-diffusion in 1D).<br />

Same IBVP as in Ex. 7.3.30<br />

Linear finite element Galerkin discretization<br />

with mass lumping in space<br />

Semi-Lagrangian method:<br />

(7.3.41)<br />

1D version of<br />

Explicit Euler streamline backtracking<br />

u<br />

1<br />

0.9<br />

0.8<br />

0.7<br />

0.6<br />

0.5<br />

0.4<br />

0.3<br />

0.2<br />

0.1<br />

t=0<br />

✩<br />

✪<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

7.3<br />

p. 813<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Code 7.3.44: Lagrangian method <strong>for</strong> (7.3.5)<br />

1 f u n c t i o n semilagr(epsilon,N,M,filename)<br />

2 % Semi-Lagrangian linear finite element method <strong>for</strong> transient<br />

convection-diffusion problem in 1D<br />

3 i f (nargin < 4), filename = ’semilagr’; end<br />

4<br />

5 T = 0.5; tau = T/M; tstop = T/4; % timestep size<br />

6 % Initial value u(x,0)<br />

7 h = 1/N; x = 0:h:1; u = max(1-3*abs(x(2:end-1)-1/3),0)’;<br />

8 % Obtain stiffness and mass matrix, see Sect. 1.5.1.2<br />

9 [Amat,Mmat] = getdeltamat(x);<br />

10<br />

11 f i g u r e ; p l o t (x,[0;u;0],’r+’); a x i s([0 1 0 1]);<br />

12 x l a b e l (’{\bf x}’,’fontsize’,14);<br />

13 y l a b e l (’{\bf u}’,’fontsize’,14);<br />

14 t i t l e (’t=0’);<br />

15 p r i n t (’-depsc2’, s p r i n t f (’../../../../rw/Slides/NPDEPics/%s%i.eps’,<br />

filename,0));<br />

16<br />

17 f o r j=1:M+1<br />

18 xs = x(2:end-1) - tau; % Shifted gridpoints<br />

19 uv = [0;u;0]; % Nodal values padded with zero<br />

20 % Find intervals to which shifted points belong and per<strong>for</strong>m linear<br />

interpolation<br />

21 xsp = xs/h; xsp( f i n d (xsp < 0)) = 0;<br />

22 xw = (xsp - f l o o r (xsp))’;<br />

23 uxs = (1-xw).*uv( f l o o r (xsp)+1) + xw.*uv( c e i l (xsp)+1);<br />

24<br />

25 %Timestep <strong>for</strong> material derivative<br />

26 u = (Mmat+tau*epsilon*Amat)\(Mmat*uxs);<br />

27<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

7.3<br />

p. 81<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

28 i f (j*tau > tstop)<br />

29 f i g u r e ;<br />

30 p l o t (x,[0;u;0],’r+’); a x i s([0 1 0 1]);<br />

31 x l a b e l (’{\bf x}’,’fontsize’,14);<br />

32 y l a b e l (’{\bf u}’,’fontsize’,14);<br />

33 t i t l e ( s p r i n t f (’Semi-Lagrangian method: M = %f, \\tau = %f,<br />

t=%f’, l e n g t h(x)-1,tau,j*tau));<br />

DRAFT<br />

34 tstop = tstop + T/4;<br />

35 p r i n t (’-depsc2’, s p r i n t f (’../../../../rw/Slides/NPDEPics/%s%i.eps’,<br />

filename,j));<br />

36 end<br />

37 end<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

0<br />

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1<br />

x<br />

Fig. 243<br />

7.3<br />

p. 814<br />

ǫ = 10 −5 :<br />

7.3<br />

p. 81


u<br />

u<br />

u<br />

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1<br />

u<br />

u<br />

u<br />

u<br />

u<br />

u<br />

u<br />

u<br />

u<br />

1<br />

0.9<br />

0.8<br />

0.7<br />

0.6<br />

0.5<br />

0.4<br />

0.3<br />

0.2<br />

0.1<br />

0<br />

t = 0.500000<br />

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1<br />

0.8<br />

0.7<br />

0.6<br />

0.5<br />

0.4<br />

0.3<br />

0.2<br />

0.1<br />

0<br />

1<br />

0.9<br />

0.8<br />

Semi−Lagrangian method: M = 100.000000, τ = 0.005000, t=0.130000<br />

1<br />

0.9<br />

0.8<br />

Semi−Lagrangian method: M = 100.000000, τ = 0.005000, t=0.255000<br />

1<br />

0.9<br />

0.8<br />

Semi−Lagrangian method: M = 100.000000, τ = 0.005000, t=0.380000<br />

1<br />

0.9<br />

0.8<br />

Semi−Lagrangian method: M = 100.000000, τ = 0.005000, t=0.505000<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Example withǫ = 0:<br />

t = 0.150000<br />

1<br />

0.9<br />

1<br />

t = 0.300000<br />

0.8<br />

1<br />

t = 1.000000<br />

0.7<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

0.7<br />

0.6<br />

0.5<br />

0.7<br />

0.6<br />

0.5<br />

0.7<br />

0.6<br />

0.5<br />

0.7<br />

0.6<br />

0.5<br />

0.9<br />

0.8<br />

0.7<br />

0.8<br />

0.7<br />

0.6<br />

0.9<br />

0.8<br />

0.7<br />

0.7<br />

0.6<br />

0.9<br />

0.8<br />

0.7<br />

0.6<br />

0.5<br />

0.4<br />

0.4<br />

0.4<br />

0.4<br />

0.6<br />

0.5<br />

0.6<br />

0.5<br />

0.6<br />

0.4<br />

0.3<br />

0.2<br />

0.1<br />

0<br />

x<br />

0.3<br />

0.2<br />

0.1<br />

0<br />

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1<br />

x<br />

0.3<br />

0.2<br />

0.1<br />

0<br />

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1<br />

x<br />

0.3<br />

0.2<br />

0.1<br />

Fig. 244<br />

0<br />

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1<br />

x<br />

0.5<br />

0.4<br />

0.3<br />

0.2<br />

0.1<br />

0.4<br />

0.3<br />

0.2<br />

0.1<br />

0.5<br />

0.4<br />

0.3<br />

0.2<br />

0.1<br />

0.4<br />

0.3<br />

0.2<br />

0.1<br />

0.5<br />

0.4<br />

0.3<br />

0.2<br />

0.1<br />

0.3<br />

0.2<br />

0.1<br />

0<br />

0<br />

0<br />

0<br />

0<br />

0<br />

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1<br />

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1<br />

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1<br />

ǫ = 0.1:<br />

1<br />

t = 1.450000<br />

0.6<br />

1<br />

t = 2.000000<br />

0.5<br />

1<br />

t = 2.500000<br />

0.4<br />

1<br />

t = 3.000000<br />

0.35<br />

1<br />

0.9<br />

0.8<br />

0.7<br />

0.6<br />

0.5<br />

0.4<br />

0.3<br />

Semi−Lagrangian method: M = 100.000000, τ = 0.005000, t=0.130000<br />

1<br />

0.9<br />

0.8<br />

0.7<br />

0.6<br />

0.5<br />

0.4<br />

0.3<br />

Semi−Lagrangian method: M = 100.000000, τ = 0.005000, t=0.255000<br />

1<br />

0.9<br />

0.8<br />

0.7<br />

0.6<br />

0.5<br />

0.4<br />

0.3<br />

Semi−Lagrangian method: M = 100.000000, τ = 0.005000, t=0.380000<br />

1<br />

0.9<br />

0.8<br />

0.7<br />

0.6<br />

0.5<br />

0.4<br />

0.3<br />

Semi−Lagrangian method: M = 100.000000, τ = 0.005000, t=0.505000<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

0.9<br />

0.8<br />

0.7<br />

0.6<br />

0.5<br />

0.4<br />

0.3<br />

0.2<br />

0.1<br />

0.5<br />

0.4<br />

0.3<br />

0.2<br />

0.1<br />

0.9<br />

0.8<br />

0.7<br />

0.6<br />

0.5<br />

0.4<br />

0.3<br />

0.2<br />

0.1<br />

0.45<br />

0.4<br />

0.35<br />

0.3<br />

0.25<br />

0.2<br />

0.15<br />

0.1<br />

0.05<br />

0.9<br />

0.8<br />

0.7<br />

0.6<br />

0.5<br />

0.4<br />

0.3<br />

0.2<br />

0.1<br />

0.35<br />

0.3<br />

0.25<br />

0.2<br />

0.15<br />

0.1<br />

0.05<br />

0.9<br />

0.8<br />

0.7<br />

0.6<br />

0.5<br />

0.4<br />

0.3<br />

0.2<br />

0.1<br />

0.3<br />

0.25<br />

0.2<br />

0.15<br />

0.1<br />

0.05<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

0<br />

0<br />

0<br />

0<br />

0<br />

0<br />

0<br />

0<br />

0.2<br />

0.2<br />

0.2<br />

0.2<br />

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1<br />

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1<br />

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1<br />

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1<br />

0.1<br />

0.1<br />

0.1<br />

0.1<br />

0<br />

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1<br />

x<br />

0<br />

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1<br />

x<br />

0<br />

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1<br />

x<br />

Fig. 245<br />

0<br />

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1<br />

x<br />

“Reference solution” computed by method of lines, see Ex. 7.3.4, withh = 10 −3 ,τ = 5·10 −5 :<br />

We observe smearing of initial data due to numerical diffusion inherent in the interpolation step of the<br />

semi-Lagrangian method.<br />

7.3<br />

p. 817<br />

✸<br />

7.3<br />

p. 81<br />

1<br />

0.9<br />

0.8<br />

0.7<br />

0.6<br />

0.5<br />

0.4<br />

0.3<br />

0.2<br />

0.1<br />

implicit Euler<br />

explicit Euler<br />

Expl. Euler: h = 0.001000, τ = 0.000050, t=0.125050<br />

0<br />

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1<br />

x<br />

1<br />

0.9<br />

0.8<br />

0.7<br />

0.6<br />

0.5<br />

0.4<br />

0.3<br />

0.2<br />

0.1<br />

implicit Euler<br />

explicit Euler<br />

Expl. Euler: h = 0.001000, τ = 0.000050, t=0.250050<br />

0<br />

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1<br />

x<br />

1<br />

0.9<br />

0.8<br />

0.7<br />

0.6<br />

0.5<br />

0.4<br />

0.3<br />

0.2<br />

0.1<br />

implicit Euler<br />

explicit Euler<br />

Expl. Euler: h = 0.001000, τ = 0.000050, t=0.375050<br />

0<br />

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1<br />

x<br />

1<br />

0.9<br />

0.8<br />

0.7<br />

0.6<br />

0.5<br />

0.4<br />

0.3<br />

0.2<br />

0.1<br />

implicit Euler<br />

explicit Euler<br />

Expl. Euler: h = 0.001000, τ = 0.000050, t=0.500050<br />

Fig. 246<br />

✸<br />

0<br />

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1<br />

x<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

8<br />

<strong>Numerical</strong> <strong>Methods</strong> <strong>for</strong> Conservation<br />

Laws<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Example 7.3.45 (Semi-Lagrangian method <strong>for</strong> convection-diffusion in 2D).<br />

2nd-order scalar convection diffusion problem (7.3.2),Ω :=]0,1[ 2 ,f = 0,g = 0,<br />

velocity field<br />

v(x) :=<br />

Initial condition: “compactly supported cone shape”<br />

( ) −sin(πx1 )cos(πx 2 )<br />

.<br />

sin(πx 2 )cos(πx 1 )<br />

u0(x) = max(0,1-4*sqrt((x(:,1)-0.5).^2+(x(:,2)-0.25).^2));<br />

semi-Lagrangian finite element Galerkin discretization according to (7.3.41) on regual triangular<br />

meshes of square domainΩ, see Fig. 123.<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

7.3<br />

p. 818<br />

KEY CHAPTER<br />

Dependencies:<br />

• Discussion of transport equation, Sect. 7.3.2<br />

• Idea of 1D finite differences, Sect. 1.5.3<br />

• Spurious oscillations introduced by central differencing <strong>for</strong> transient convection problem, Ex. 7.3.4<br />

• Upwinding and artificial diffusion, Sect. 7.2.2<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

8.0<br />

p. 82


Conservation laws describe physical phenomena governed by<br />

conservation laws <strong>for</strong> certain physical quantities (e.g., mass momentum, energy, etc.),<br />

transport of conserved physical quantities.<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Focus:<br />

Cauchy problems<br />

Spatial domain Ω = R d (unbounded!)<br />

➤ Cauchy problems are pure initial value problems (no boundary values).<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

We have already examined problems of this type in connection with transient heat conduction in<br />

Sect. 7.1.4. There thermal energy was the conserved quantity and a prescribed external velocity<br />

fieldv determined the transport.<br />

A new aspect emerging <strong>for</strong> general conservation laws is that the transport velocity itself may depend<br />

on the conserved quantities themselves, which gives rise to non-linear models.<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Rationale: ➊<br />

Finite speed of propagation typical of conservation laws<br />

(Potential spatial boundaries will not affect the solution <strong>for</strong> some time in the case of<br />

compactly supported initial data, cf. situation <strong>for</strong> wave equation, where we also examined<br />

the Cauchy problem, see (6.2.15).)<br />

➋ No spatial boundary ➣ need not worry about (spatial) boundary conditions!<br />

(Issue of spatial boundary conditions can be very intricate <strong>for</strong> conservation laws)<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Supplementary and further reading:<br />

[22]: Comprehensive monograph and textbook about so-called finite volume method providing de-<br />

tailed explanations.<br />

[20]: concisely written textbook adopting a mathematical perspective and delving into technical details.<br />

[9]: mathematical monograph about the theory of initial value problems <strong>for</strong> conservation laws.<br />

8.0<br />

p. 821<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

8.1.1 Linear advection<br />

Cauchy problem <strong>for</strong> linear transport equation (advection equation) → Sect. 7.1.4, (7.1.16):<br />

∂<br />

∂t (ρu)+div(v(x,t)(ρu)) = f(x,t) in ˜Ω := R d ×]0,T[ , (8.1.1)<br />

u(x,0) = u 0 (x) <strong>for</strong> all x ∈ R d (initial conditions) . (8.1.2)<br />

8.1<br />

p. 82<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

8.1 Conservation laws: Examples<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

u = u(x,t) ˆ= temperature,ρ > 0 ˆ= heat capacity,v = v(x,t) ˆ= prescibed velocity field.<br />

(8.1.1) = linear scalar conservation law<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

OPTIONAL SECTION<br />

➤ Conserved quantity: thermal energy (density)ρu<br />

(Recall the derivation of (7.1.16) through conservation of energy, cf. (6.1.1).)<br />

8.1<br />

p. 822<br />

8.1<br />

p. 82


Simplfied problem: assume constant heat capacity ρ ≡ 1, no sources f ≡ 0, stationary velocity<br />

fieldv = v(x) ➣ rescaled initial value problem written in conserved variables<br />

Convention:<br />

Special case:<br />

∂u<br />

∂t +div(v(x)u) = 0 in ˜Ω := R d ×]0,T[ ,<br />

u(x,0) = u 0 (x) <strong>for</strong> all x ∈ R d (initial conditions) .<br />

differential operatordiv acts on spatial independent variable only,<br />

⎛<br />

(divf)(x,t) := ∂f 1<br />

+···+ ∂f f ⎞<br />

1(x,t)<br />

1<br />

, f(x,t) = ⎝ . ⎠ .<br />

∂x 1 ∂x d f d (x,t)<br />

d = 1 ➣ Ω = R,<br />

constant velocity v = const. .<br />

Constant coefficient linear advection in 1D<br />

(8.1.4)<br />

∂u<br />

∂t + ∂<br />

∂x (vu) = 0 in ˜Ω = R×]0,T[ , u(x,0) = u 0 (x) ∀x ∈ R . (8.1.5)<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

8.1<br />

p. 825<br />

made it possible to give a meaning to solutions ∈ H 1 (Ω) that are merely continuous and piecwise<br />

differentiable, see Rem. 1.3.25.<br />

Related to (8.1.6): d’Alembert solution <strong>for</strong>mula (6.2.16) <strong>for</strong> 1D wave equation (6.2.15).<br />

Remark 8.1.11 (Boundary conditions <strong>for</strong> linear advection).<br />

Recall the discussion in Sects. 7.2.1, 7.3.2, cf. solution <strong>for</strong>mula (7.3.12):<br />

For the scalar linear advection initial boundary value problem<br />

∂u<br />

∂t +div(v(x,t)u) = f(x,t) in ˜Ω := Ω×]0,T[ , (8.1.12)<br />

u(x,0) = u 0 (x) <strong>for</strong> all x ∈ Ω , (8.1.13)<br />

on a bounded domainΩ ⊂ R d , boundary conditions (e.g., prescribed temperature)<br />

u(x,t) = g(x,t) on Γ in (t)×]0,T[ ,<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

8.1<br />

p. 82<br />

This is the 1D version of the transport equation (7.3.7) ➣ solution given by (7.3.11)<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

can be imposed on the inflow boundary<br />

Γ in (t) := {x ∈ ∂Ω: v(x,t)·n(x) < 0} , 0 < t < T . (8.1.14)<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

(7.3.11)<br />

u(x,t) = u 0 (x−vt) , x ∈ R , 0 ≤ t < T . (8.1.6)<br />

Note:<br />

Bottom line:<br />

Γ in can change with time!<br />

Solutionu = u(x,t) = initial data “travelling” with velocityv.<br />

Solution <strong>for</strong>mula (8.1.6) makes perfect sense even <strong>for</strong> discontinuous initial datau 0 !<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

★<br />

✧<br />

Knowledge of local and current direction of transport<br />

needed to impose meaningful boundary conditions!<br />

✥<br />

✦<br />

△<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

➥<br />

We should not expectu = u(x,t) to be differentiable in space or time.<br />

A “weaker” concept of solution is required, see Sect. 8.2.3 below.<br />

This consideration should be familiar: <strong>for</strong> second order elliptic boundary value problems, <strong>for</strong> which<br />

classical solutions are to be twice continuously differentiable, the concept of a variational solution<br />

8.1<br />

p. 826<br />

8.1<br />

p. 82


8.1.2 Inviscid gas flow<br />

Assumption:<br />

Gas<br />

Fig. 247x<br />

Frictionless gas flow in (infinitely) long pipe<br />

Terminology:<br />

frictionless ˆ= inviscid<br />

variation of gas density negligible (“near incompressibility”)<br />

motion of fluid driven by inertia ↔ conservation of linear momentum<br />

We derive a continuum model <strong>for</strong> inviscid, nearly incompressible fluid in a straight infinitely long pipe<br />

↔Ω = R (Cauchy problem).<br />

This simple model will be based on conservation of linear momentum, whereas conservation of mass<br />

and energy will be neglected (and violated). Hence, the crucial conserved quantity will be the momentum.<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

t 1 ∫<br />

t 0<br />

1<br />

2 u 2 (x 1 ,t)− 1 2 u2 (x 0 ,t)dt = τ( 1 2 u2 (x 1 ,t 0 )− 1 2 u2 (x 0 ,t 0 ))+O(τ 2 ) <strong>for</strong> τ → 0 .<br />

Then employ Taylor expansion <strong>for</strong> the differences:<br />

u(x 0 ,t 1 )−u(x 0 ,t 0 ) = ∂u<br />

∂t (x 0,t 0 )τ +O(τ 2 ) <strong>for</strong> τ → 0 ,<br />

1<br />

2 u2 (x 1 ,t 0 )− 1 2 u2 (x 0 ,t 0 ) = ∂<br />

∂x (1 2 u2 )(x 0 ,t 0 )h+O(h 2 ) <strong>for</strong> h → 0 .<br />

Finally, divide byhandτ and take the limitτ → 0,h → 0:<br />

∂u<br />

∂t + ∂ ( 12 u 2) = 0 inΩ×]0,T[ . (8.1.16)<br />

∂x<br />

(8.1.16) = Burgers equation: a one-dimensional scalar conservation law (without sources)<br />

Remark 8.1.17 (Euler equations).<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Unkown:<br />

by near incompressibility<br />

u = u(x,t) = momentum density ∼ local velocityv = v(x,t) of fluid<br />

8.1<br />

p. 829<br />

8.1<br />

p. 83<br />

✗<br />

✖<br />

Conserved quantity:<br />

(linear) momentum of fluidu = u(x,t)<br />

✔<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

✕<br />

The above gas model blatantly ignores the fundamental laws of conservation of mass and of energy.<br />

These are taken into account in a famous more elaborate model of inviscid fluid flow:<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

➣ flux of linear momentum f ∼ v ·u (after scaling: f(u) = 1 2 u·u)<br />

(“momentumuadvected by velocityu”)<br />

Conservation of linear momentum (∼ u): <strong>for</strong> all control volumesV :=]x 0 ,x 1 [⊂ Ω:<br />

x 1<br />

∫ ∫<br />

u(x,t 1 )−u(x,t 0 )dx+<br />

1<br />

2 u 2 (x 1 ,t)− 1 2 u2 (x 0 ,t)dt = 0 ∀0 < t 0 < t 1 < T . (8.1.15)<br />

x 0 t 0<br />

} {{ }<br />

change of momentum inV<br />

t 1<br />

} {{ }<br />

outflow of momentum<br />

Temporarily assume that u = u(x,t) is smooth in both x and t and set x 1 = x 0 + h, t 1 = t 0 + τ.<br />

First approximate the integrals in (8.1.15).<br />

x 1 ∫<br />

x 0<br />

u(x,t 1 )−u(x,t 0 )dx = h(u(x 0 ,t 1 )−u(x 0 ,t 0 ))+O(h 2 ) <strong>for</strong> h → 0 ,<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Euler equations [7], a more refined model <strong>for</strong> inviscid gas flow in an infinite pipe<br />

⎛<br />

∂<br />

ρ ⎞ ⎛ ⎞<br />

⎝ρu⎠+ ∂ ρu<br />

⎝ ρu 2 +p ⎠ = 0 in R×]0,T[ , (8.1.18)<br />

∂t<br />

E<br />

∂x<br />

(E +p)u<br />

u(x,0) = u 0 (x) , ρ(x,0) = ρ 0 (x) , E(x,0) = E 0 (x) <strong>for</strong>x ∈ R ,<br />

where ρ = ρ(x,t) ˆ= fluid density,[ρ] = kgm −1 ,<br />

u = u(x,t) ˆ= fluid velocity,[u] = ms −1 ,<br />

p = p(x,t) ˆ= fluid pressure,[p] = N,<br />

E = E(x,t) ˆ= total energy density,[E] = Jm −1 .<br />

+ state equation (material specific constitutive equations), e.g., <strong>for</strong> ideal gas<br />

Conserved quantities (densities):<br />

p = (γ −1)(E − 1 2 ρu2 ) , with adiabatic index 0 < γ < 1 .<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

8.1<br />

p. 830<br />

ρ ↔ mass density , ρu ↔ momentum density , E ↔ energy density.<br />

8.1<br />

p. 83


Underlying physical conservation principles <strong>for</strong> individual densities:<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Our focus below: scalar case m = 1<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

• First equation<br />

• Second equation<br />

• Third equation<br />

∂ρ<br />

∂t + ∂<br />

∂x<br />

∂(ρu)<br />

(ρu) = 0 ↔ conservation of mass,<br />

+ ∂<br />

∂x (ρu2 +p) = 0 ↔ conservation of momentum,<br />

∂t<br />

∂E<br />

∂t + ∂ ((E +p)u) = 0 ↔ conservation of energy.<br />

∂x<br />

Conservation law <strong>for</strong> transient state distribution u : ˜Ω ↦→ U: u = u(x,t), <strong>for</strong> 0 ≤ t ≤ T<br />

∫ ∫ ∫<br />

d<br />

udx+ f(u,x)·ndS(x) = s(u,x,t)dx ∀ “control volumes”V ⊂ Ω . (8.2.1)<br />

dt<br />

V ∂V<br />

V<br />

change of amount inflow/outflow production term<br />

Euler equations (8.1.18) = non-linear system of conservation laws (in 1D)<br />

As is typical of non-linear systems of conservations laws, the analysis of the Euler equations is intrinsically<br />

difficult: hitherto not even existence and uniqueness of solutions <strong>for</strong> general initial values could<br />

be established. Moreover, solutions display a wealth of complicated structures. There<strong>for</strong>e, this course<br />

is confined to scalar conservation laws, <strong>for</strong> which there is only one unknown real-valued function of<br />

space and time.<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Terminology: ✄ flux function f : U ×Ω ↦→ R d<br />

✄ source function s : U ×Ω×]0,T[↦→ R (here usuallys = 0)<br />

For Burgers equation (8.1.16): f(u,x) = 1 2 u2 , s = 0,<br />

For linear advection (8.1.1): f(u,x) = v(x,t)u, s = f(x,t)<br />

(Note: in this case the conserved quantity is actuallyρu, which was again denoted byu)<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

8.2 Scalar conservation laws in 1D<br />

8.2.1 Integral and differential <strong>for</strong>m<br />

What we have seen so far (except <strong>for</strong> Euler’s equations in Rem. 8.1.17)<br />

∂u<br />

Burgers equation:<br />

∂t + ∂ ( 12 u 2) = 0 inΩ×]0,T[ , (8.1.16)<br />

∂x<br />

∂<br />

linear advection:<br />

∂t (ρu)+div(v(x,t)(ρu)) = f(x,t) in Rd ×]0,T[ . (8.1.1)<br />

Now, we learn about a class of Cauchy problems to which these two belong. First some notations<br />

and terminology:<br />

Ω ⊂ R d ˆ= fixed (bounded/unbounded) spatial domain (Ω = R d = Cauchy problem)<br />

△<br />

8.2<br />

p. 833<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

☞<br />

✬<br />

✫<br />

(8.2.1) has the same structure as the “conservation of energy law” (6.1.1) <strong>for</strong> heat conduction.<br />

Conservation of energy:<br />

∫ ∫ ∫<br />

d<br />

ρudx+ j·ndS = f dx <strong>for</strong> all “control volumes”V (6.1.1)<br />

dt V ∂V V<br />

energy stored inV power flux through∂V heat generation inV<br />

In this case the heat flux was given by<br />

Fourier’s law j(x) = −κ(x)gradu(x) , x ∈ Ω , (2.5.3)<br />

or its extended version (7.1.5). In Fourier’s law the flux is a linear function of derivatives ofu.<br />

Conversely, <strong>for</strong> the flux function<br />

f : U ×Ω ↦→ R d in (8.2.1) we assume<br />

f only depends on local stateu, not on derivatives ofu!<br />

8.2<br />

p. 83<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

✩<br />

✪<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

computational domain:<br />

space-time cylinder ˜Ω := Ω×]0,T[,T > 0 final time<br />

U ⊂ R m (m ∈ N) ˆ= phase space (state space) <strong>for</strong> conserved quantititiesu i (usuallyU = R m )<br />

8.2<br />

p. 834<br />

On the other hand we go far beyond Fourier’s law, since<br />

f will in general be a non-linear function ofu!<br />

8.2<br />

p. 83


Remark 8.2.3 (Diffusive flux).<br />

Taking into account the relationship with heat “diffusion”, a flux function of the <strong>for</strong>m of Fourier’s law<br />

(2.5.3)<br />

is called a diffusive flux.<br />

f(u) = −κ(x)gradu ,<br />

Now, integrate (8.2.1) over time period[t 0 ,t 1 ] ⊂ [0,T] and use fundamental theorem of calculus:<br />

△<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Remark 8.2.7 (Boundary values <strong>for</strong> conservation laws).<br />

Suitable boundary values on∂Ω×]0,T[ ?<br />

→ usually tricky question (highlyf-dependent)<br />

Reason: remember discussion in Rem. 8.1.11, meaningful boundary conditions hinge on knowledge<br />

of local (in space and time) transport direction, which, in a non-linear conservation law, will usually<br />

depend on the unknown solutionu = u(x,t).<br />

8.2.2 Characteristics<br />

△<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Space-time integral <strong>for</strong>m of (8.2.1), cf. (8.1.15),<br />

We consider Cauchy problem (Ω = R) <strong>for</strong> one-dimensional scalar conservation law (8.2.6):<br />

∫<br />

V<br />

<strong>for</strong> all<br />

∫<br />

u(x,t 1 )dx−<br />

V ∂V<br />

V ⊂ Ω,0 < t 0 < t 1 < T ,n ˆ= exterior unit normal at∂V<br />

t 1<br />

∫ ∫<br />

∫ ∫<br />

u(x,t 0 )dx+ f(u,x)·ndS(x)dt =<br />

t 0 t 0<br />

[Gauss theorem Thm. 2.4.5] (local) differential <strong>for</strong>m of (8.2.1):<br />

t 1<br />

V<br />

s(u,x,t)dxdt (8.2.4)<br />

8.2<br />

p. 837<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

∂u<br />

∂t + ∂ f(u) = 0 in R×]0,T[ ,<br />

∂x<br />

u(x,0) = u 0 (x) in R .<br />

Assumption: flux functionf : R ↦→ R smooth (f ∈ C 2 ) and convex [29, Def. 5.5.2]<br />

(8.2.9)<br />

8.2<br />

p. 83<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

∂<br />

∂t u+div xf(u,x) = s(u,x,t) in ˜Ω . (8.2.5)<br />

Recall [29, Thm. 5.5.2]: f convex ⇒ derivativef ′ increasing<br />

div acting on spatial variablexonly<br />

+ initial condition u(x,0) = u 0 (x), x ∈ Ω<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

R. Hiptmair<br />

Special cased = 1 ↔ (8.2.5) = one-dimensional scalar conservation law <strong>for</strong> “density”u : ˜Ω<br />

DRAFT<br />

↦→ R<br />

∂u<br />

∂t (x,t)+ ∂<br />

∂x (f(u(x,t),x)) = s(u(x,t),x,t) in]α,β[×]0,T[, α,β ∈ R∪{±∞} . (8.2.6)<br />

Definition 8.2.10 (Characteristic curve <strong>for</strong> one-dimensional scalar conservation law).<br />

A curve Γ := (γ(τ),τ) : [0,T] ↦→ R×]0,T[ in the (x,t)-plane is a characteristic curve of<br />

(8.2.9), if<br />

d<br />

dτ γ(τ) = f′ (u(γ(τ),τ)) , 0 ≤ τ ≤ T , (8.2.11)<br />

whereuis a continuously differentiable solution of (8.2.9).<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

8.2<br />

p. 838<br />

8.2<br />

p. 84


t<br />

γ<br />

δt<br />

fast→<br />

← slow<br />

✁ x−t-diagram<br />

d<br />

γ(τ) = speed of interfaceγ.<br />

dτ<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

So,<br />

u is constant on a characteristic curve.<br />

➣ f ′ (u) is constant on a characteristic curve.<br />

(8.2.11) ⇒ slope of characteristic curve is constant!<br />

Characteristic curve through(x 0 ,0) = straight line(x 0 +f ′ (u 0 (x 0 ))τ,τ),0 ≤ τ ≤ T !<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

δx<br />

Example 8.2.12 (Characteristics <strong>for</strong> advection).<br />

Constant linear advection (8.1.5): f(u) = vu<br />

x<br />

t<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

!? implicit solution <strong>for</strong>mula <strong>for</strong> (8.2.9) (f ′ monotone !):<br />

u(x,t) = u 0 (x−f ′ (u(x,t))t) . (8.2.14)<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

➸ characteristicsγ(τ) = vτ +c,c ∈ R.<br />

✄<br />

v<br />

DRAFT<br />

Example 8.2.15 (Breakdown of characteristic solution <strong>for</strong>mula).<br />

DRAFT<br />

solution (8.1.6)<br />

u(x,t) = u 0 (x−vt)<br />

1<br />

meaningful <strong>for</strong> any u 0 ! (cf. Sect. 7.3.2)<br />

✸<br />

x<br />

8.2<br />

p. 841<br />

8.2<br />

p. 84<br />

This example reveals a close relationship between streamlines (→ Sect. 7.1.1) and characteristic<br />

curves. That the latter are a true generalization of the <strong>for</strong>mer is also reflected by the following simple<br />

observation, which generlizes the considerations in Sect. 7.3.2, (7.3.9).<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

1<br />

0.8<br />

<strong>for</strong> Burger’s equation (8.1.16):<br />

(f(u) = 1 2 u2 smooth and strictly convex)<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

✬<br />

Lemma 8.2.13 (Classical solutions and characteristic curves).<br />

✫<br />

Proof.<br />

curve:<br />

Smooth solutions of (8.2.9) are constant along characteristic curves.<br />

Apply chain rule twice, cf. (7.3.9), and use the defining equation (8.2.11) <strong>for</strong> a characteristic<br />

d<br />

dτ<br />

chain rule<br />

u(γ(τ),τ) = ∂u<br />

∂x (γ(τ),τ) d<br />

dτ<br />

γ(τ)+<br />

∂u<br />

∂t (γ(τ),τ)<br />

(8.2.11)<br />

= ∂u<br />

∂x (γ(τ),τ)·f′ (u(γ(τ),τ))+ ∂u<br />

∂t (γ(τ),τ)<br />

chain rule<br />

= ( ∂<br />

∂x f(u)) (γ(τ),τ)+ ∂u<br />

∂t (γ(τ),τ) = 0 .<br />

✎ notation: f ′ ˆ= derivative of flux functionf : U ⊂ R ↦→ R<br />

✩<br />

✪<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

8.2<br />

p. 842<br />

t,u(x)<br />

0.6<br />

0.4<br />

0.2<br />

0<br />

u0<br />

−1.5 −1 −0.5 0 0.5 1 1.5<br />

x<br />

Fig. 248<br />

✄ f ′ (u) = u (increasing)<br />

✁ ifu 0 smooth and decreasing<br />

➤ characteristic curves intersect !<br />

➤ solution <strong>for</strong>mula (8.2.14) becomes invalid<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

8.2<br />

p. 84


1<br />

1<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Still, (8.2.18) encounters problems, if a discontinuity of u coincides with an edge of the space-time<br />

rectangle.<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

0.8<br />

0.8<br />

u(t,.)<br />

0.6<br />

0.4<br />

u(t,.)<br />

0.6<br />

0.4<br />

Idea:<br />

Obtain weak <strong>for</strong>m of (8.2.16) from (8.2.17) by integration by parts, that is,<br />

application of Green’s first <strong>for</strong>mula Thm. 2.4.7 in space-time!<br />

0.2 t = 0.00<br />

t = 0.50<br />

t = 0.80<br />

t = 1.00<br />

0 t = 1.20<br />

t = 1.30<br />

−1.5 −1 −0.5 0<br />

x<br />

0.5 1 1.5<br />

Fig. 249<br />

t < 1.3: solution by (8.2.14)<br />

0.2<br />

0<br />

t = 1.30<br />

t = 1.35<br />

t = 1.40<br />

t = 1.50<br />

t = 1.70<br />

−1.5 −1 −0.5 0<br />

x<br />

0.5 1 1.5<br />

Fig. 250<br />

the wave breaks: “multivalued solution”<br />

✸<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

STEP I:<br />

Test (8.2.17) with compactly supported smooth function Φ : ˜Ω ↦→ R, Φ(·,T) = 0, and<br />

integrate over space-time cylinder ˜Ω = R×[0,T]:<br />

∫ ( ) f(u)<br />

(8.2.17) div (x,t) Φ(x,t)dxdt = 0 .<br />

u<br />

˜Ω<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

breakdown of classical solutions & Ex. 8.2.12 ➥ new concept of solution of (8.2.9)<br />

8.2.3 Weak solutions<br />

“Space-time Gaussian theorem”<br />

t<br />

8.2<br />

p. 845<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

STEP II: Per<strong>for</strong>m integration by parts using Green’s first <strong>for</strong>mula Thm. 2.4.7 on ˜Ω:<br />

∫ ( ) f(u)<br />

div (x,t) Φ(x,t)dxdt = 0<br />

u<br />

˜Ω<br />

∫<br />

Thm. 2.4.7<br />

⇒<br />

˜Ω<br />

( ) ∫∞<br />

f(u)<br />

·grad<br />

u (x,t) Φdxdt+ u(x,0)Φ(x,0)dx = 0 ,<br />

−∞<br />

because ∂˜Ω = R × {0} ∪ R × {T} with “normals” n = ( 0<br />

−1<br />

) (t = 0 boundary) and n =<br />

( 01 )<br />

(t = T boundary), which has to be taken into account in the boundary term in Green’s <strong>for</strong>mula. The<br />

“t = T boundary part” does not enter asΦ(·,T) = 0.<br />

8.2<br />

p. 84<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

∂u<br />

∂t + ∂ f(u) = 0 (8.2.16)<br />

∂x<br />

⇕<br />

( ) f(u)<br />

div (x,t) = 0 in<br />

u<br />

˜Ω . (8.2.17)<br />

∀ “space-time control volumes”Ṽ ⊂ ˜Ω:<br />

∫ ( ) ( ) f(u(˜x)) nx (˜x)<br />

· dS(˜x) = 0 ,<br />

u(˜x) n t (˜x)<br />

∂Ṽ<br />

ñ := (n x ,n t ) T ˆ= space-time unit normal<br />

Ṽ<br />

ñ<br />

x<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Note thatu(x,0) is fixed by the initial condition:<br />

u(x,0) = u 0 (x).<br />

Definition 8.2.19 (Weak solution of Cauchy problem <strong>for</strong> scalar conservation law).<br />

Foru 0 ∈ L ∞ (R),u : R×]0,T[↦→ R is a weak solution of the Cauchy problem (8.2.9), if<br />

u ∈ L ∞ (R×]0,T[) ∧<br />

<strong>for</strong> allΦ ∈ C ∞ 0<br />

∫∞ ∫T<br />

−∞ 0<br />

(R×[0,T[),Φ(·,T) = 0.<br />

{<br />

u ∂Φ } ∫∞<br />

∂t +f(u)∂Φ dtdx+ u<br />

∂x 0 (x)Φ(x,0)dx = 0 ,<br />

−∞<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

(8.2.17) <strong>for</strong> space-time rectangle Ṽ =]x 0,x 1 [×]t 0 ,t 1 [ ➤ integral <strong>for</strong>m of (8.2.16), cf. (8.2.4):<br />

x 1<br />

x 1<br />

t 1<br />

∫ ∫ ∫ ∫<br />

u(x,t 1 )dx− u(x,t 0 )dx = f(u(x 0 ,t))dt− f(u(x 1 ,t))dt . (8.2.18)<br />

x 0 x 0 t 0 t 0<br />

t 1<br />

8.2<br />

p. 846<br />

Remark 8.2.21 (Properties of weak solutions).<br />

8.2<br />

p. 84


By reversing integration by parts, it is easy to see that<br />

✗<br />

✖<br />

u weak solution of (8.2.9) &u ∈ C 1 ⇐⇒ u classical solution of (8.2.9).<br />

✔<br />

✕<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Apply this insight to vectorfield on space-time domain ˜Ω = R×]0,T[:<br />

∂u<br />

∂t + ∂<br />

( ) f(u)<br />

∂x f(u) = 0 ⇔ div (x,t) = 0 in<br />

u<br />

˜Ω . (8.2.17)<br />

} {{ }<br />

=:j<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Arguments from mathematical integration theory confirm<br />

u ∈ L ∞ loc (R×]0,T[) weak solution of (8.2.9) ⇒ u satisfies integral <strong>for</strong>m (8.2.18)<br />

<strong>for</strong> “almost all”x 0 < x 1 ,0 < t 0 < t 1 < T .<br />

△<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Normal atC 1 -curveΓ := τ ↦→ (γ(τ),τ) in(γ(τ),τ)<br />

( )<br />

1 1<br />

ñ = √<br />

1+|ṡ| 2 −ṡ<br />

, ṡ := dγ (τ) “speed of curve” .<br />

dτ<br />

To see this, recall that the normal is orthogonal to the tangent vector ( ṡ) 1 and that in 2D the direction<br />

orthogonal to ( x ) ( 1<br />

x is given by −x2 )<br />

2 x . 1<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

8.2.4 Jump conditions<br />

For piecewise smooth vectorfieldj : Ω ⊂ R 2 :<br />

8.2<br />

p. 849<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

“normal continuity” of<br />

piecewise smooth vectorfield(f(u),u) T<br />

t<br />

Γ := (γ(τ),τ)<br />

8.2<br />

p. 85<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

“divj = 0”<br />

⇕<br />

∫<br />

j·ndS = 0 ∀ control volumesV ⊂ Ω<br />

∂V<br />

Necessary condition:<br />

★<br />

✧<br />

Continuity of normal components<br />

across discontinuities<br />

discontinuous divergence-free vectorfield<br />

✄<br />

✥<br />

✦<br />

Fig. 251<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

⇕<br />

( ) ( ) 1 [f(u)]<br />

− dγ · = 0 , (8.2.22)<br />

[u]<br />

dτ<br />

where[·] ˆ= jump acrossΓ.<br />

˜Ω ˜Ω r<br />

l<br />

( ) 1<br />

ñ ‖<br />

−ṡ<br />

Fig. 252x<br />

Terminology: (8.2.22) = Rankine-Hugoniot (jump) condition, shorthand notation:<br />

ṡ(u l −u r ) = f l −f r<br />

, ṡ := dγ<br />

dτ<br />

“propagation speed of discontinuity” (8.2.23)<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

To see this, consider a slender tiny rectangle aligned with a line of discontinuity of j. In the absence<br />

of normal continuity a net flux through its boundary will result, provided that the rectangle is small<br />

enough (“pillbox argument”).<br />

8.2<br />

p. 850<br />

Remark 8.2.26 (Discontinuity connecting constant states).<br />

8.2<br />

p. 85


The simplest situtation compliant with Rankine-Hugoniot jump condition: constant states to the left<br />

and right of the curve of discontinuity (8.2.22):<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

1<br />

1<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

t<br />

0.8<br />

0.8<br />

u l<br />

ṡ<br />

u r<br />

Fig. 253x<br />

0<br />

1<br />

u(x,t) =<br />

{<br />

ul ∈ R , <strong>for</strong> x < ṡt ,<br />

u r ∈ R , <strong>for</strong> x < ṡt ,<br />

(8.2.27)<br />

with constant speed ṡ of discontinuity, according<br />

to (8.2.23) given by (<strong>for</strong>u l ≠ u r )<br />

ṡ = f(u l)−f(u r )<br />

u l −u r<br />

.<br />

△<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

u 0<br />

(x)/ t<br />

0.6<br />

u 0<br />

char.<br />

0.4<br />

0.2<br />

0<br />

−1.5 −1 −0.5 0 0.5 1 1.5<br />

x<br />

Fig. 254<br />

intersecting characteristics<br />

u 0<br />

(x)/ t<br />

0.6<br />

u 0<br />

char.<br />

0.4<br />

0.2<br />

0<br />

−1.5 −1 −0.5 0 0.5 1 1.5<br />

x<br />

Fig. 255<br />

diverging characteristics<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

8.2.5 Riemann problem<br />

Definition 8.2.29 (Shock).<br />

If Γ is a smooth curve in the (x,t)-plane and u a weak solution of (8.2.9), a discontinuity of u<br />

acrossΓis called a shock.<br />

Rem. 8.2.26 ➤ shock speeds ↔ Rankine-Hugoniot jump conditions:<br />

8.2<br />

p. 853<br />

(x 0 ,t 0 ) ∈ Γ: ṡ = f(u l)−f(u r )<br />

u l −u r<br />

,<br />

u l := lim ǫ→0 u(x 0 −ǫ,t 0 ) ,<br />

u r := lim ǫ→0 u(x 0 +ǫ,t 0 ) .<br />

(8.2.30)<br />

8.2<br />

p. 85<br />

Rem. 8.2.26: situation of locally constant states in particularly easy.<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

✬<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

✩<br />

Consider: Cauchy-problem (8.2.9) <strong>for</strong> piecewise constant initial datau 0 .<br />

Definition 8.2.28 (Riemann problem).<br />

{<br />

ul ∈ R , ifx < 0 ,<br />

u 0 (x) =<br />

u r ∈ R , ifx > 0 .<br />

ˆ= Riemann problem <strong>for</strong> (8.2.9)<br />

Assumption, cf. Sect. 8.2.2: flux function f : R ↦→ R smooth & convex<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Lemma 8.2.31 (Shock solution of Riemann problem).<br />

{<br />

ul <strong>for</strong>x < ṡt ,<br />

u(x,t) = ṡ := f(u l)−f(u r )<br />

, x ∈ R, 0 < t < T ,<br />

u r <strong>for</strong>x > ṡt , u l −u r<br />

✫<br />

u 0<br />

(x)/ t<br />

is weak solution of Riemann problem (→ Def. 8.2.28) <strong>for</strong> (8.2.9).<br />

1<br />

0.8<br />

0.6<br />

0.4<br />

u 0<br />

characteristic<br />

shock curve<br />

Riemann problem: Burger flux<br />

u 0<br />

(x)/ t<br />

1<br />

0.8<br />

0.6<br />

0.4<br />

u 0<br />

characteristic<br />

shock curve<br />

Riemann problem: Burger flux<br />

u 0<br />

(x)/ t<br />

1<br />

0.8<br />

0.6<br />

0.4<br />

u 0<br />

characteristic<br />

shock curve<br />

Riemann problem: Burger flux<br />

✪<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

f ′ non-decreasing ➤ pattern of characteristic curves <strong>for</strong> Riemann problem:<br />

0.2<br />

0.2<br />

0.2<br />

0<br />

0<br />

0<br />

−1.5 −1 −0.5 0 0.5 1 1.5<br />

−1.5 −1 −0.5 0 0.5 1 1.5<br />

−1.5 −1 −0.5 0 0.5 1 1.5<br />

x<br />

x<br />

x<br />

Burgers fluxf(u) = 1 2 u2 ,u l > u r : characteristic curves impinge on shock<br />

Fig. 256<br />

8.2<br />

p. 854<br />

8.2<br />

p. 85


−1.5 −1 −0.5 0 0.5 1 1.5<br />

1<br />

u 0<br />

characteristic<br />

shock curve<br />

Riemann problem: Burger flux<br />

1<br />

u 0<br />

characteristic<br />

shock curve<br />

Riemann problem: Burger flux<br />

1<br />

u 0<br />

characteristic<br />

shock curve<br />

Riemann problem: Burger flux<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

1<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

u 0<br />

(x)/ t<br />

0.8<br />

0.6<br />

u 0<br />

(x)/ t<br />

0.8<br />

0.6<br />

u 0<br />

(x)/ t<br />

0.8<br />

0.6<br />

0.8<br />

u ǫ (x,t) = classical solution of (8.2.33) <strong>for</strong> allt > 0,<br />

x ∈ R (only <strong>for</strong>u l > u r !).<br />

0.4<br />

0.2<br />

0.4<br />

0.2<br />

0.4<br />

0.2<br />

u(x,1)<br />

0.6<br />

✁ u l > u r , t = 0.5<br />

0<br />

x<br />

Burgers fluxf(u) = 1 2 u2 ,u l < u r :<br />

0<br />

−1.5 −1 −0.5 0 0.5 1 1.5<br />

x<br />

Example 8.2.32 (Vanishing viscosity <strong>for</strong> Burgers equation).<br />

0<br />

−1.5 −1 −0.5 0 0.5 1 1.5<br />

x<br />

characteristic curves emanate from shock<br />

(expansion shock)<br />

Fig. 257<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

0.4<br />

0.2<br />

ε = 0.1<br />

ε = 0.05<br />

ε = 0.01<br />

ε = 0.001<br />

ε = 0.0001<br />

0<br />

−1.5 −1 −0.5 0 0.5 1 1.5<br />

x<br />

Fig. 258<br />

emerging shock <strong>for</strong>ǫ → 0<br />

u ǫ → u from Lemma 8.2.31 inL ∞ (R).<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

DRAFT<br />

There is no such material as an “invsicid” fluid in nature, because in any physical system there will be<br />

a tiny amount of friction. This leads us to the very general understanding that conservation laws can<br />

usually be regarded as limit problemsǫ = 0 <strong>for</strong> singularly perturbed transport-diffusion problems with<br />

an “ǫ-amount” of diffusion.<br />

In 1D, <strong>for</strong> anyǫ > 0 these transport-diffusion problems will possess a unique smooth solution. Studying<br />

its behavior <strong>for</strong> ǫ → 0 will tell us, what are “physically meaningful” solutions <strong>for</strong> the conservation<br />

8.2<br />

p. 857<br />

8.2<br />

p. 85<br />

law. This consideration is called the vanishing viscosity method to define solutions <strong>for</strong> conservation<br />

laws.<br />

Here we pursue this idea <strong>for</strong> Burgers equation, see Sect. 8.1.2.<br />

Viscous Burgers equation:<br />

∂u<br />

∂t + ∂<br />

∂x<br />

( 12 u 2) =<br />

ǫ ∂2 u<br />

∂x 2 . (8.2.33)<br />

dissipative (viscous) term<br />

Travelling wave solution of Riemann problem <strong>for</strong> (8.2.33) via Cole-Hopf trans<strong>for</strong>m → [12,<br />

Sect. 4.4.1]<br />

u ǫ (x,t) = w(x−ṡt) , w(ξ) = u r + 2 1(u l −u r ) ( ( ) ξ(ul −u r ) )<br />

1−tanh , ṡ = 1<br />

4ǫ 2 (u l +u r ) .<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Highly accurate numerical solution of<br />

Riemann problem <strong>for</strong> (8.2.33)<br />

u l < u r u ǫ (x,0.5)✄<br />

no shock asǫ → 0 !<br />

ε=0.0001<br />

u ǫ → a piecewise linear function! −1 −0.5 0 0.5 1 1.5<br />

Let us try to derive a (weak) solution of the homogeneous scalar conservation law (8.2.16) with the<br />

structure observed in Ex. 8.2.32.<br />

u(x,0.5)<br />

1<br />

0.8<br />

0.6<br />

0.4<br />

0.2<br />

0<br />

x<br />

ε = 0<br />

ε = 0.1<br />

ε = 0.01<br />

ε = 0.001<br />

✸<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Idea:<br />

conservation law (8.2.16) homogeneous in spatial/temporal derivatives:<br />

8.2<br />

p. 858<br />

∂u<br />

∂t + ∂<br />

∂x f(u) = 0 in R×R+ ⇒ ∂u λ<br />

∂t + ∂<br />

∂x f(u λ) = 0 in R×R + ,<br />

8.2<br />

p. 86


u λ (x,t) := u(λx,λt), λ > 0. This suggests that we look <strong>for</strong> solutions of the Riemann problem that<br />

are constant on all straight lines in thex−t-plane that cross(0,0) T .<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

because(f ′ ◦g)(x/t) = x/t and by fundamental theorem of calculus.<br />

✷<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

try similarity solution:<br />

u(x,t) = ψ(x/t)<br />

← insert in ∂u<br />

∂t + ∂<br />

∂x f(u) = 0<br />

Terminology: solution of Lemma 8.2.34 = rarefaction wave: continuous solution !<br />

1<br />

1<br />

f ′ (ψ(x/t))ψ ′ (x/t) = (x/t)ψ ′ (x/t) ∀x ∈ R, 0 < t < T .<br />

ψ ′ ≡ 0 ∨ f ′ (ψ(w)) = w ⇔ ψ(w) = (f ′ ) −1 (w) .<br />

f ′ strictly monotone !<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

u(t,x)<br />

0.5<br />

0<br />

−0.5<br />

1<br />

0.8<br />

0.6<br />

t<br />

0.4<br />

0<br />

−0.5<br />

1<br />

0.8<br />

0.6<br />

1.5<br />

1<br />

0.4<br />

0.5<br />

0<br />

0<br />

0.2<br />

−0.5<br />

0.2<br />

−0.5<br />

−1<br />

−1<br />

0 −1.5<br />

t<br />

0 −1.5<br />

x<br />

x<br />

Burger flux functionf(u) = 1 2 u2 ,u l < u r : rarefaction wave solutions<br />

u(t,x)<br />

0.5<br />

0.5<br />

1<br />

1.5<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

t<br />

ṡ = f ′ (u l ) ṡ = f ′ (u r )<br />

Fig. 259<br />

x<br />

✬<br />

Lemma 8.2.34. (Rarefaction solution of<br />

Riemann problem)<br />

Iff ∈ C 2 (R) strictly convex,u l < u r , then<br />

⎧<br />

⎪⎨ u l <strong>for</strong> x < f ′ (u l )t ,<br />

u(x,t) := g( x t ⎪⎩<br />

) <strong>for</strong> f′ (u l ) < x t < f′ (u r ) ,<br />

u r <strong>for</strong> x > f ′ (u r )t ,<br />

✫<br />

g := (f ′ ) −1 , is a weak solution of the<br />

Riemann problem (→ Def. 8.2.28).<br />

✩<br />

8.2<br />

p. 861<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

✪Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

∫∞<br />

⎫⎪<br />

∂x dx+ ∂Φ<br />

u r<br />

∂t +F(u r) ∂Φ ⎬<br />

∂x dx dt<br />

⎪<br />

f(u r )t ⎭<br />

g ′ ( x t )x t 2Φ−f′ (g( x t ))1 t g′ ( x t )Φdxdt = 0 , 8.2<br />

Proof. We show that the rarefaction solution is a weak solution according to Def. 8.2.19 ➣ <strong>for</strong><br />

Φ ∈ C0 ∞(R×]0,T[)<br />

⎧<br />

∫T f ⎪⎨ ∫<br />

′ (u l )t<br />

∂Φ<br />

u l<br />

∂t<br />

0<br />

⎪⎩<br />

+f(u l) ∂Φ<br />

f ′ ∫(u r t)<br />

∂x dx+ g( x t )∂Φ ∂t +f(g(x t ))∂Φ<br />

−∞<br />

f ′ (u l )t<br />

∫T f ′ ∫(u r )t<br />

=<br />

0 f ′ (u l )t<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

p. 862<br />

8.2.6 Entropy condition<br />

Sect 8.2.5 ➤ Non-uniqueness of weak solutions:<br />

iff ′ is increasing andu l < u r both a shock and a rarefaction wave provide valid weak solutions.<br />

u(t,x)<br />

1<br />

0.5<br />

0<br />

−0.5<br />

1<br />

0.8<br />

0.6<br />

t<br />

0.4<br />

0.2<br />

0<br />

−1.5<br />

−1<br />

−0.5<br />

x<br />

0<br />

0.5<br />

1<br />

1.5<br />

Fig. 260<br />

Riemann solution (Burgers equation):<br />

shock<br />

?<br />

←→<br />

How to select “physically meaningful” = admissible solution ?<br />

Vanishing viscosity technique<br />

u(t,x)<br />

1<br />

0.5<br />

0<br />

−0.5<br />

1<br />

0.8<br />

0.6<br />

t<br />

0.4<br />

0.2<br />

0<br />

−1.5<br />

−1<br />

−0.5<br />

x<br />

0<br />

0.5<br />

1<br />

1.5<br />

Fig. 261<br />

Riemann solution (Burgers equation):<br />

rarefaction wave<br />

(→ Ex. 8.2.32): add an “ǫ-amount” of diffusion (“friction”) and study<br />

solution <strong>for</strong>ǫ → 0.<br />

8.2<br />

p. 86<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

8.2<br />

p. 86


t<br />

t<br />

However, desirable: simple selection criteria (entropy conditions)<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Analytical solution available <strong>for</strong> Burgers eqution (8.1.16) with intial data, see [12, Sect. 3.4, Ex. 3]<br />

{<br />

0 , ifx < 0 orx > 1 ,<br />

u 0 (x) =<br />

1 , if0 ≤ x ≤ 1 .<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Definition 8.2.35 (Lax entropy condition).<br />

u ˆ= weak solution of (8.2.9), piecewise classical solution in a neigborhood of C 2 -curve Γ :=<br />

(γ(τ),τ),0 ≤ τ ≤ T , discontinuous acrossΓ.<br />

u satisfies the Lax entropy<br />

condition in(x 0 ,t 0 ) ∈ Γ<br />

:⇔ f ′ (u l ) > ṡ := f(u l)−f(u r )<br />

u l −u r<br />

> f ′ (u r ) .<br />

⇕<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

✗<br />

Gradinaru<br />

A. Chernov<br />

✔<br />

DRAFT<br />

Characteristic curves must not emanate from shock ↔ no “generation of in<strong>for</strong>mation”<br />

✖<br />

✕<br />

Parlance: shock satisfying Lax entropy condition = physical shock<br />

u(t,x)<br />

1<br />

0.8<br />

0.6<br />

0.4<br />

0.2<br />

0<br />

4<br />

3.5<br />

3<br />

2.5<br />

2<br />

1.5<br />

1<br />

0.5<br />

t<br />

0<br />

−0.5<br />

0<br />

0.5<br />

1<br />

x<br />

1.5<br />

2<br />

2.5<br />

3<br />

3.5<br />

Fig. 262<br />

4<br />

3.5<br />

3<br />

2.5<br />

2<br />

1.5<br />

u = 0<br />

1<br />

0.5<br />

u(x,t) = x/t<br />

u = 0<br />

u = 1<br />

−0.5 0 0.5 1 1.5 2 2.5 3 3.5<br />

x<br />

Fig. 263<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

8.2<br />

p. 865<br />

8.2<br />

p. 86<br />

Physically meaningful weak solution of conservation law = entropy solution<br />

For scalar conservation laws with locally Lipschitz-continuous flux functionf:<br />

Existence & uniqueness of entropy solutions<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Vector field inx−t-plane<br />

( ) f(u(x,t))<br />

u(x,t)<br />

4.5<br />

4<br />

3.5<br />

3<br />

2.5<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

<strong>for</strong> entropy solutionu = u(x,t) ✄.<br />

2<br />

Remark 8.2.36 (General entropy solution <strong>for</strong> 1D scalar Riemann problem). → [23]<br />

Entropy solution of Riemann problem (→ Def. 8.2.28) <strong>for</strong> (8.2.9) with arbitraryf ∈ C 1 (R):<br />

⎧<br />

⎪⎨ argmin(f(u)−ξu) , ifu l < u r ,<br />

u<br />

u(x,t) = ψ(x/t) , ψ(ξ) := l ≤u≤u r<br />

⎪⎩<br />

argmax(f(u)−ξu) , ifu l ≥ u r .<br />

u r ≤u≤u l<br />

(8.2.37)<br />

△<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Observe the normal continuity across the shock:<br />

the vector field is tangential to the shock curve.<br />

8.2.7 Properties of entropy solutions<br />

1.5<br />

1<br />

0.5<br />

0<br />

−0.5 0 0.5 1 1.5 2 2.5 3 3.5<br />

x<br />

Fig. 264<br />

✸<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Example 8.2.38 (Entropy solution of Burgers equation).<br />

8.2<br />

p. 866<br />

8.2<br />

p. 86


Setting:<br />

with flux function<br />

u ∈ L ∞ (R×]0,T[) weak (→ Def. 8.2.19) entropy solution of Cauchy problem<br />

∂u<br />

∂t + ∂<br />

∂x f(u) = 0 in R×]0,T[ , u(x,0) = u 0(x) , x ∈ R . (8.2.9)<br />

f ∈ C 1 (R) (not necessarily convex/concave).<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

t<br />

(¯x,¯t)<br />

ṡ<br />

t<br />

D + (I 0 )<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

1<br />

Notation: ū ∈ L ∞ (R×]0,T[) ˆ= entropy solution w.r.t. initial data ū 0 ∈ L ∞ (R).<br />

1<br />

✬<br />

Theorem 8.2.39 (Comparison principle <strong>for</strong> scalar conservation laws).<br />

Ifu 0 ≤ ū 0 a.e. on R ⇒ u ≤ ū a.e. on R×]0,T[<br />

✫<br />

✩R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

✪<br />

D − (¯x,¯t)<br />

Fig. 265x<br />

maximal domain of dependence of(¯x,¯t) ∈ ˜Ω<br />

Analoguous to Thm. 6.2.18:<br />

ṡ<br />

I<br />

Fig. 266 0 x<br />

maximal domain of influence ofI 0 ⊂ R<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

With obvious consequences:<br />

u 0 (x) ∈ [α,β] on R ⇒ u(x,t) ∈ [α,β] on R×]0,T[<br />

✬<br />

Corollary 8.2.43 (Domain of dependence <strong>for</strong> scalar conservation law). → [9, Cor. 6.2.2]<br />

The value of the entropy solution at (¯x,¯t) ∈ ˜Ω depends only on the restriction of the initial data<br />

to{x ∈ R:|x− ¯x| < ṡ¯t}.<br />

✩<br />

8.2<br />

p. 869<br />

✫<br />

✪<br />

8.2<br />

p. 87<br />

L ∞ -stability (➣ no blow-up can occur!)<br />

∀0 ≤ t ≤ T: ‖u(·,t)‖ L ∞ (R) ≤ ‖u 0‖ L ∞ (R) . (8.2.40)<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Another strand of theoretical results asserts that the solution of a 1D scalar conservation law cannot<br />

develop oscillations:<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

✗<br />

✔<br />

u solves (8.2.9) ➤ No. of local extrema (in space) ofu(·,t) decreasing with time<br />

✬<br />

✩<br />

✖<br />

✕<br />

Theorem 8.2.41 (L 1 -contractivity of evolution <strong>for</strong> scalar conservation law).<br />

∫ ∫<br />

∀t ∈]0,T[, R > 0: |u(x,t)|dx ≤ |u 0 (x)|dx ,<br />

|x|


↔ related to advection with velocityv(x,t) = u(x,t):<br />

∂u<br />

(x,t) + u(x,t)∂u<br />

∂t ∂x (x,t) = 0 in R×]0,T[ .<br />

↕ ↕<br />

∂u<br />

(x,t) + v(x,t)∂u<br />

∂t ∂x (x,t) = 0 in R×]0,T[ .<br />

Ifu 0 (x) ≥ 0, then, by Thm. 8.2.39,u(x,t) ≥ 0 <strong>for</strong> all0 < t < T , that is, positive direction of transport<br />

throughout.<br />

Heeding guideline from Sect. 7.3.1:<br />

use upwind discretization (backward differences) in space!<br />

on (infinite) equidistant grid, meshwidthh > 0,x j = hj,j ∈ Z, obtain semi-discrete problem<br />

<strong>for</strong> nodal values µ j = µ j (t) ≈ u(x j ,t)<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

MATLAB demo: run Numcourses/numhyp/matlab/1DScalarConsLaws/Burger_backward/burger_naive.m<br />

burger_naive(50);<br />

8.3.1 Semi-discrete conservation <strong>for</strong>m<br />

✸<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

∂u<br />

(x,t) + u(x,t)∂u<br />

∂t ∂x (x,t) = 0 in R×]0,T[ .<br />

↕ ↕<br />

(8.3.3)<br />

µ j −µ j−1<br />

˙µ j (t) + µ j = 0 , j ∈ Z , 0 < t < T .<br />

h<br />

<strong>Numerical</strong> experiment with Cauchy problem from Ex. 8.2.38, h = 0.08, integration of (8.3.3) with<br />

MATLAB ode45.<br />

8.3<br />

p. 873<br />

Objective: spatial semi-discretization of Cauchy problem<br />

∂u<br />

∂t + ∂<br />

∂x f(u) = 0 in R×]0,T[ , u(x,0) = u 0(x) , x ∈ R . (8.2.9)<br />

on (infinite) equidistant spatial mesh with mesh widthh > 0<br />

8.3<br />

p. 87<br />

h = 0.080000, t=1.011954<br />

h = 0.080000, t=2.050846<br />

h = 0.080000, t=3.073055<br />

h = 0.080000, t=4.000000<br />

1<br />

0.8<br />

0.6<br />

finite difference solution<br />

exact solution<br />

1<br />

0.8<br />

0.6<br />

finite difference solution<br />

exact solution<br />

1<br />

0.8<br />

0.6<br />

finite difference solution<br />

exact solution<br />

1<br />

0.8<br />

0.6<br />

finite difference solution<br />

exact solution<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

M := {]x j−1 ,x j [: x j := jh, j ∈ Z} . (8.3.4)<br />

mesh cells and dual cells<br />

✄<br />

x j−1 x j x j+1 xFig. j+2 268<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

0.4<br />

0.2<br />

0<br />

−0.5 0 0.5 1 1.5 2 2.5 3 3.5<br />

0.4<br />

0.2<br />

0<br />

−0.5 0 0.5 1 1.5 2 2.5 3 3.5<br />

0.4<br />

0.2<br />

0<br />

−0.5 0 0.5 1 1.5 2 2.5 3 3.5<br />

0.4<br />

0.2<br />

Fig. 267<br />

0<br />

−0.5 0 0.5 1 1.5 2 2.5 3 3.5<br />

Finite volume interpretation of nodal unknownsµ j (↔x j ,j ∈ Z):<br />

= conserved quantities in dual cells ]x j−1/2 ,x j+1/2 [, midpointsx j−1/2 := 1 2 (x j +x j−1 ):<br />

Observation from numerical experiment:<br />

of shock correctly!<br />

OK <strong>for</strong> rarefaction wave, but scheme cannot capture speed<br />

{<br />

1 , ifj < 0 ,<br />

Analysis: consider µ j (0) =<br />

0 , ifj ≥ 0 .<br />

↔ Riemann problem withu 0 (x) = 1 <strong>for</strong>x < 0−ǫ,u 0 (x) = 0 <strong>for</strong>x > 0−ǫ,ǫ ≪ 1.<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

⃗µ(t) := ( µ j (t) ) j∈Z ∈ RZ ←→<br />

x ∫j+1/2<br />

µ j (t) ≈ 1 u(x,t)dx . (8.3.5)<br />

h<br />

x j−1/2<br />

u N (x,t) =<br />

j∈Zµ ∑ j (t)χ ]xj−1/2 ,x j+1/2 [(x) . (8.3.6)<br />

a function !<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Entropy solution (<strong>for</strong> thisu 0 ) = travelling<br />

shock (→ Lemma 8.2.31), speed<br />

ṡ = 1 2 > 0<br />

✁✄<br />

<strong>Numerical</strong> solution:<br />

⃗µ(t) = ⃗µ 0 <strong>for</strong> allt > 0 !<br />

✎ notation: characteristic function χ ]xj−1/2 ,x j+1/2 [ (x) = {<br />

1 , ifxj−1/2 < x ≤ x j+1/2 ,<br />

0 elsewhere.<br />

➤ 3-point FDM (8.3.3) “converges” to wrong solution !<br />

8.3<br />

p. 874<br />

➥<br />

(<br />

µj (t) ) j∈Z ←→ piecewise constant approximationu N(t) ≈ u(·,t)<br />

8.3<br />

p. 87


Note: u N (t) discontinuous at dual cell boundariesx j+1/2 !<br />

By spatial integration over dual cells, which now play the role of the control volumes in (8.2.1):<br />

x ∫j+1/2<br />

d<br />

u(x,t)dx+f(u(x<br />

dt<br />

j+1/2 ,t))−f(u(x j−1/2 ,t)) = 0 , j ∈ Z , (8.3.9)<br />

x j−1/2<br />

(<br />

)<br />

f(u N (x j+1/2 ,t)) −f(u N (x j−1/2 ,t)) = 0 , j ∈ Z . (8.3.10)<br />

} {{ } } {{ }<br />

? ?<br />

(8.3.5) dµ j<br />

dt (t)+ 1 h<br />

Problem: jump of u N (t) ➣ ambiguity of values u N (x j+1/2 ,t), u N (x j−1/2 ,t)), as we encountered<br />

it in the context of upwind quadrature in Sect. 7.2.2.1.<br />

Abstract “solution”:<br />

Approximation f(u N (x j+1/2 ,t)) ≈ f j+1/2 (t) := F(µ j−ml +1(t),...,µ j+mr (t)) , j ∈ Z ,<br />

with numerical flux function F : R m l+m r<br />

↦→ R, m l ,m r ∈ N 0 .<br />

Note:<br />

the same numerical flux function is used <strong>for</strong> all dual cells!<br />

Finite volume semi-discrete evolution <strong>for</strong> (8.2.9) in conservation <strong>for</strong>m:<br />

dµ (<br />

)<br />

j<br />

dt (t) = −1 F(µ<br />

h j−ml +1(t),...,µ j+mr (t))−F(µ j−ml (t),...,µ j+mr −1(t)) , j ∈ Z .<br />

(8.3.11)<br />

numerical flux (function)F : R m l+m r ↦→ R<br />

Special case: 2-point numerical flux (m l = m r = 1): F = F(v,w)<br />

(v ˆ= left state,w ˆ= right state)<br />

dµ j<br />

(8.3.11)<br />

dt (t) = −1 ( F(µj (t),µ<br />

h j+1 (t))−F(µ j−1 (t),µ j (t)) ) , j ∈ Z . (8.3.12)<br />

Assumption on numerical flux functions: F Lipschitz-continuous in each argument.<br />

Code 8.3.13: Wrapper code <strong>for</strong> finite volume evolution with 2-point flux<br />

1 f u n c t i o n ufinal = cons<strong>for</strong>mevl(a,b,N,u0,T,F)<br />

2 % finite volume discrete evolution in conservation <strong>for</strong>m with 2-point flux, see<br />

(8.3.12)<br />

3 % Cauchy problem over time [0,T] restricted to finite interval [a,b],<br />

4 % equidistant mesh with meshwidth N cells, meshwidth h := b−a /N.<br />

5 % 2-point numerical flux function F = F(v,w) passed in handle F<br />

6 h = (b-a)/N; x = a+0.5*h:h:b-0.5*h; % centers of dual cells<br />

7 mu0 = h*u0(x)’; % vector ⃗µ 0 of initial cell averages (column vector)<br />

8 % right hand side function <strong>for</strong> MATLAB ode solvers<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

8.3<br />

p. 877<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

8.3<br />

p. 878<br />

9 odefun = @(t,mu) (-1/h*fluxdiff(mu,F));<br />

10 % timestepping by explicit Runge-Kutta method of order 5<br />

11 options = odeset(’abstol’,1E-8,’reltol’,1E-6,’stats’,’on’);<br />

12 [t,MU] = ode45(odefun,[0 T],mu0,options);<br />

13 % 3D graphical output of u(x,t) over space-time plane<br />

14 [X,T] = meshgrid(x,t);<br />

15 f i g u r e ; s u r f(X,T,MU/h); colormap(copper);<br />

16 x l a b e l (’{\bf x}’,’fontsize’,14);<br />

17 y l a b e l (’{\bf t}’,’fontsize’,14);<br />

18 z l a b e l (’{\bf u}’,’fontsize’,14);<br />

19 ufinal = MU(:,end);<br />

20 end<br />

21<br />

22 f u n c t i o n fd = fluxdiff(mu,F)<br />

23 n = l e n g t h(mu); fd = zeros(n,1);<br />

24 % constant continuation of data outside [a,b]<br />

25 fd(1) = F(mu(1),mu(2)) - F(mu(1),mu(1));<br />

26 f o r j=2:n-1<br />

27 fd(j) = F(mu(j),mu(j+1)) - F(mu(j-1),mu(j)); % see (8.3.12)<br />

28 end<br />

29 fd(n) = F(mu(n),mu(n)) - F(mu(n-1),mu(n));<br />

30 end<br />

8.3.2 Discrete conservation property<br />

An evident first property of finite volume methods in conservation <strong>for</strong>m:<br />

µ j (0) = µ 0 ∈ R ∀j ∈ Z ⇒ µ j (t) = µ 0 ∀j ∈ Z, ∀t > 0 . (8.3.15)<br />

that is, constant solutions are preserved by the method.<br />

A “telescopic sum argument” combined with the interpretation (8.3.6) shows that the conservation<br />

<strong>for</strong>m (8.3.11) of the semi-discrete conservation law involves<br />

x m+1/2 ∫<br />

d<br />

m∑ dµ j<br />

u<br />

dt N (x,t)dx = h<br />

dt (t) = −( f m+1/2 (t)−f k−1/2 (t) ) ∀k,m ∈ Z .<br />

x k−1/2<br />

l=k<br />

⇕<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

8.3<br />

p. 87<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

8.3<br />

p. 88


x m+1/2 ∫<br />

d<br />

u(x,t)dx = − ( f(u(x<br />

dt<br />

j+1/2 ,t))−f(u(x k−1/2 ,t)) ) ,<br />

x k−1/2<br />

With respect to unions of dual cells and numerical fluxes, the semidiscrete solution u N (t)<br />

satisfies a balance law of the same structure as a (weak) solution of (8.2.9).<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

approximate location of shock at timet):<br />

x ∗ (t) ∈ R:<br />

x∫<br />

∗ (t) ∫∞<br />

u l −u N (x,t)dx = u N (x,t)−u r dx<br />

−∞ x ∗ (t)<br />

u<br />

u l<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Of course, the numerical flux functionF has to fit the flux functionf of the conservation law:<br />

Definition 8.3.16 (Consistent numerical flux function).<br />

A numerical flux functionF : R m l+m r ↦→ R is consistent with the flux functionf : R ↦→ R, if<br />

F(u,...,u) = f(u) ∀u ∈ R .<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

equality of yellow areas<br />

(8.3.18)<br />

=⇒<br />

∫ xm+1/2<br />

✄<br />

u r<br />

Fig. 269<br />

x ∗ x<br />

x −m−1/2<br />

u N (x,t)dx = (x ∗ (t)+x −m−1/2 )u l +(x m+1/2 −x ∗ (t))u r .<br />

dx ∗<br />

dt (t) = 1<br />

u l −u r<br />

∑<br />

j∈Z<br />

dµ j<br />

dt (t) = f(u l)−f(u r )<br />

u l −u r<br />

(8.2.23)<br />

= ṡ .<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Focus:<br />

(8.3.11):<br />

solution of Riemann problem (→ Def. 8.2.28) by finite volume method in conservation <strong>for</strong>m<br />

Initial data “constant at±∞”: µ −j (0) = u l , µ j (0) = u r <strong>for</strong> largej.<br />

Consistency of the numerical flux function implies <strong>for</strong> largem ≫ 1<br />

8.3<br />

p. 881<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

★<br />

✧<br />

Conservation <strong>for</strong>m with consistent numerical flux yields correct “discrete shock speed”<br />

(not liable to effect of Ex. 8.3.1)<br />

8.3.3 <strong>Numerical</strong> flux functions<br />

8.3.3.1 Central flux<br />

✥<br />

✦<br />

8.3<br />

p. 88<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

x m+1/2 ∫<br />

d<br />

u<br />

dt N (x,t)dt = − ( F(u r ,...,u r )−F(u l ,...,u l ) ) = −(f(u r )−f(u l )) . (8.3.18)<br />

−x −m−1/2<br />

Exactly the same balance law holds <strong>for</strong> any weak solutions of the Riemann problem!<br />

Situation:<br />

discrete solutionu N (t) decreasing & supposed to approximate a shock<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Example 8.3.19 (Central flux <strong>for</strong> Burgers equation).<br />

Cauchy problem <strong>for</strong> Burgers equation (8.1.16) (flux functionf(u) = 1 2 u2 ) from Ex. 8.2.38 (“box”<br />

intial data)<br />

Spatial finite volume discretization in conservvation <strong>for</strong>m (8.3.11) with central numerical fluxes<br />

F 1 (v,w) := 1 2( f(v)+f(w)) , F2 (v,w) := f ( 1<br />

2 (v +w) ) . (8.3.20)<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

8.3<br />

p. 882<br />

Obviously the 2-point numerical fluxes F 1 and F 2 are consistent according to Def. 8.3.16. The<br />

resulting spatially semi-discrete scheme is given by, see (8.3.12)<br />

F 1 :<br />

F 2 :<br />

dµ j<br />

dt (t) = − 1<br />

2h (f(µ j+1(t))−f(µ j−1 (t))) ,<br />

dµ j<br />

dt (t) = −1 h (f(1 2 (µ j(t)+µ j+1 (t)))−f( 1 2 (µ j(t)+µ j−1 (t)))) .<br />

8.3<br />

p. 88


t<br />

t<br />

timestepping based on adaptive Runge-Kutta method ode45 of MATLAB<br />

(opts = odeset(’abstol’,1E-7,’reltol’,1E-6);).<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

1<br />

4<br />

3.5<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

0.8<br />

Fully discrete evolution <strong>for</strong> central numerical fluxF 1 : h = 0.03<br />

u(t,x)<br />

0.6<br />

0.4<br />

0.2<br />

3<br />

2.5<br />

0<br />

1<br />

h = 0.133333, t=1.005873<br />

finite volume solution<br />

exact solution<br />

1<br />

h = 0.133333, t=2.000926<br />

finite volume solution<br />

exact solution<br />

1<br />

h = 0.133333, t=3.000865<br />

finite volume solution<br />

exact solution<br />

1<br />

h = 0.133333, t=4.000000<br />

finite volume solution<br />

exact solution<br />

4<br />

3.5<br />

2<br />

0.8<br />

0.8<br />

0.8<br />

0.8<br />

3<br />

1.5<br />

2.5<br />

0.6<br />

0.6<br />

0.6<br />

0.6<br />

2<br />

1<br />

0.4<br />

0.2<br />

0<br />

−0.5 0 0.5 1 1.5 2 2.5 3 3.5<br />

0.4<br />

0.2<br />

0<br />

−0.5 0 0.5 1 1.5 2 2.5 3 3.5<br />

0.4<br />

0.2<br />

0<br />

−0.5 0 0.5 1 1.5 2 2.5 3 3.5<br />

0.4<br />

0.2<br />

Fig. 270<br />

0<br />

−0.5 0 0.5 1 1.5 2 2.5 3 3.5<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

t<br />

1.5<br />

1<br />

0.5<br />

0<br />

−0.5<br />

0<br />

0.5<br />

1<br />

x<br />

1.5<br />

2<br />

2.5<br />

3<br />

3.5<br />

0.5<br />

0<br />

0 0.5 1 1.5 2 2.5 3<br />

x<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Observation: massive spurious oscillations utterly pollute numerical solution<br />

✸<br />

8.3<br />

p. 885<br />

Example 8.3.21 (Central flux <strong>for</strong> linear advection).<br />

8.3<br />

p. 88<br />

u(t,x)<br />

1<br />

0.8<br />

0.6<br />

0.4<br />

0.2<br />

4<br />

3.5<br />

3<br />

2.5<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Cauchy problem (8.1.5): constant valocity scalar linear advection,v = 1, flux functionf(u) = vu<br />

∂u<br />

∂t +v∂u ∂x = 0 in ˜Ω = R×]0,T[ , u(x,0) = u 0 (x) ∀x ∈ R . (8.1.5)<br />

= Cauchy problem <strong>for</strong> 1D transport equation (7.3.7)!<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

0<br />

4<br />

2<br />

3.5<br />

3<br />

1.5<br />

2.5<br />

2<br />

1<br />

1.5<br />

1<br />

3.5 0.5<br />

3<br />

0.5<br />

2.5<br />

2<br />

t<br />

1.5<br />

1<br />

0<br />

0.5<br />

0<br />

−0.5<br />

0<br />

x<br />

0 0.5 1 1.5 2 2.5 3<br />

x<br />

Fully discrete evolution <strong>for</strong> central numerical fluxF 2 : h = 0.017<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Finite volume spatial discretization in conservation <strong>for</strong>m (8.3.11) with central numerical fluxes from<br />

(8.3.20):<br />

F 1 (v,w) := 1 2( f(v)+f(w))<br />

F 2 (v,w) := f ( 1<br />

2 (v +w) )<br />

⇒ dµ j<br />

dt (t) = − v<br />

2h (µ j+1(t)−µ j−1 (t)) , j ∈ Z .<br />

= spatial semi-discretization using linear finite element Galerkin discretization of convective term,<br />

see (7.2.15).<br />

Sect. 7.3.1: this method is prone to spurious oscillations, see Ex. 7.3.4.<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

1<br />

h = 0.133333, t=1.001531<br />

finite volume solution<br />

exact solution<br />

1<br />

h = 0.133333, t=2.004984<br />

finite volume solution<br />

exact solution<br />

1<br />

h = 0.133333, t=3.000587<br />

finite volume solution<br />

exact solution<br />

1<br />

h = 0.133333, t=4.000000<br />

finite volume solution<br />

exact solution<br />

This offers an explanation also <strong>for</strong> its failure <strong>for</strong> Burgers equation, see Ex. 8.3.19<br />

0.8<br />

0.8<br />

0.8<br />

0.8<br />

0.6<br />

0.6<br />

0.6<br />

0.6<br />

0.4<br />

0.4<br />

0.4<br />

0.4<br />

✸<br />

0.2<br />

0<br />

−0.5 0 0.5 1 1.5 2 2.5 3 3.5<br />

0.2<br />

0<br />

−0.5 0 0.5 1 1.5 2 2.5 3 3.5<br />

0.2<br />

0<br />

−0.5 0 0.5 1 1.5 2 2.5 3 3.5<br />

0.2<br />

Fig. 271<br />

0<br />

−0.5 0 0.5 1 1.5 2 2.5 3 3.5<br />

8.3<br />

p. 886<br />

8.3<br />

p. 88


t<br />

8.3.3.2 Lax-Friedrichs flux<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

1<br />

0.8<br />

h = 0.066667, t=1.002336<br />

finite volume solution<br />

exact solution<br />

1<br />

0.8<br />

h = 0.066667, t=2.000915<br />

finite volume solution<br />

exact solution<br />

1<br />

0.8<br />

h = 0.066667, t=3.000435<br />

finite volume solution<br />

exact solution<br />

1<br />

0.8<br />

h = 0.066667, t=4.000000<br />

finite volume solution<br />

exact solution<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

0.6<br />

0.6<br />

0.6<br />

0.6<br />

Sect. 7.2.2.2: artificial diffusion cures instability of central difference quotient<br />

∂u<br />

∂t<br />

↕<br />

∂u<br />

∂t + ( ch/2) −µ j−1 +2µ j −µ j+1<br />

}<br />

h<br />

{{ 2 }<br />

ˆ= difference quotient <strong>for</strong> d2 u<br />

dx 2 +<br />

+ c ∂u<br />

∂x = 0 in R×]0,T[ ,<br />

↕<br />

c µ j+1 −µ j−1<br />

2h<br />

} {{ }<br />

ˆ= difference quotient <strong>for</strong>c du<br />

dx<br />

= 0 , j ∈ Z .<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

0.4<br />

0.2<br />

0<br />

−0.5 0 0.5 1 1.5 2 2.5 3 3.5<br />

u(t,x)<br />

4<br />

1<br />

0.8<br />

0.6<br />

0.4<br />

0.2<br />

0<br />

0.4<br />

0.2<br />

0<br />

−0.5 0 0.5 1 1.5 2 2.5 3 3.5<br />

0.4<br />

0.2<br />

0<br />

−0.5 0 0.5 1 1.5 2 2.5 3 3.5<br />

4<br />

3.5<br />

3<br />

2.5<br />

2<br />

0.4<br />

0.2<br />

Fig. 272<br />

0<br />

−0.5 0 0.5 1 1.5 2 2.5 3 3.5<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

3.5<br />

3<br />

1.5<br />

Can this be rewritten in conservation <strong>for</strong>m (8.3.11)?<br />

YES!<br />

2.5<br />

2<br />

1.5<br />

1<br />

(ch/2) −µ j−1 +2µ j −µ j+1<br />

h 2<br />

central numerical flux<br />

+c µ j+1 −µ j−1<br />

2h<br />

= 1 h( F(µj ,µ j+1 )−F(µ j−1 ,µ j )) ,<br />

with F(v,w) := 2 c(v +w)− 2 c (w−v) . (8.3.24)<br />

diffusive/viscous numerical flux<br />

8.3<br />

p. 889<br />

t<br />

1<br />

0.5<br />

0<br />

−0.5<br />

0<br />

0.5<br />

1<br />

x<br />

1.5<br />

2<br />

2.5<br />

3<br />

3.5<br />

0.5<br />

0<br />

0 0.5 1 1.5 2 2.5 3<br />

x<br />

8.3<br />

p. 89<br />

Recall from Rem. 8.2.3: the flux function f(u) = − ∂u<br />

∂x<br />

models diffusion. Hence, the diffusive numerical<br />

flux amounts to a central finite difference discretization of the partial derivative in space:<br />

− ∂u<br />

∂x (x,t) ≈ − 1 (<br />

u(xj+1 ,t)−u(x<br />

|x=x j+1/2<br />

h j ,t) ) .<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Observation: spurious completely suppressed, qualitatively good resolution of both shock and rarefaction.<br />

Effect of artificial diffusion: smearing of shock, cf. discussion in Ex. 7.2.27.<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

How to adapt this to general scalar conservation laws?<br />

(local) Lax-Friedrichs flux<br />

∂u<br />

∂t + ∂ ∂u<br />

f(u) =<br />

∂x ∂t +f′ (u) ∂u<br />

∂x = 0 (8.3.25)<br />

local speed of transport↔c<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

8.3.3.3 Upwind flux<br />

✸<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

F LF (v,w) = 1 2 (f(v)+f(w))− 2<br />

1 max<br />

min{v,w}≤u≤max{v,w} |f′ (u)|(w−v) . (8.3.26)<br />

Another idea <strong>for</strong> stable spatial discretization of stationary transport in Sect. 7.2.2.1:<br />

Example 8.3.27 (Lax-Friedrichs flux <strong>for</strong> Burgers equation).<br />

“upwinding” = obtain in<strong>for</strong>mation from where transport brings it<br />

☞ same setting and conservative discretization as in Ex. 8.3.19<br />

☞ <strong>Numerical</strong> flux function: Lax-Friedrichs flux (8.3.26)<br />

8.3<br />

p. 890<br />

☞<br />

remedy <strong>for</strong> ambiguity of evaluation of discontinuous gradient in upwind quadrature<br />

8.3<br />

p. 89


t<br />

t<br />

Ambiguity also faced in the evaluation of f(u N (x j+1/2 ),t),f(u N (x j−1/2 ),t), see (8.3.10), which<br />

<strong>for</strong>ced us to introduce numerical flux functions in (8.3.11).<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

1<br />

0.8<br />

4<br />

3.5<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

(8.3.25): local velocity of transport at(x,t) ∈ ˜Ω is given by f ′ (u(x,t))<br />

u(t,x)<br />

0.6<br />

0.4<br />

0.2<br />

3<br />

2.5<br />

0<br />

➣ ambiguous local velocity of transport at discontinuity ofu N !<br />

4<br />

3.5<br />

2<br />

3<br />

1.5<br />

Idea:<br />

deduce local velocity of transport from Rankine-Hugoniot jump condition<br />

local velocity of transport =<br />

(8.2.23)<br />

{<br />

f ′ (u) <strong>for</strong> unique state, u = u l = u r<br />

f(u r )−f(u l )<br />

u r −u l<br />

(u l ,u r ˆ= states to left and right of discontinuity)<br />

at discontinuity.<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

2.5<br />

t<br />

2<br />

1.5<br />

1<br />

0.5<br />

0<br />

−0.5<br />

0<br />

0.5<br />

1<br />

x<br />

Example 8.3.30 (Upwind flux and transsonic rarefaction).<br />

1.5<br />

2<br />

2.5<br />

3<br />

3.5<br />

1<br />

0.5<br />

0<br />

0 0.5 1 1.5 2 2.5 3<br />

x<br />

✸<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

upwind flux <strong>for</strong> scalar conservation law with flux functionf:<br />

Cauchy problem (8.2.9) <strong>for</strong> Burgers equation (8.1.16), i.e.,f(u) = 1 2 u2 and initial data<br />

F uw (v,w) =<br />

{<br />

f(v) , if ṡ ≥ 0 ,<br />

f(w) , if ṡ < 0 ,<br />

ṡ :=<br />

{ f(w)−f(v)<br />

w−v <strong>for</strong>v ≠ w ,<br />

f ′ (v) <strong>for</strong>v = w .<br />

(8.3.28)<br />

u 0 (x) =<br />

{<br />

−1 <strong>for</strong> x < 0 or x > 1 ,<br />

1 <strong>for</strong> 0 < x < 1 .<br />

Example 8.3.29 (Upwind flux <strong>for</strong> Burgers equation).<br />

8.3<br />

p. 893<br />

8.3<br />

p. 89<br />

☞ same setting and conservative discretization as in Ex. 8.3.19<br />

☞ <strong>Numerical</strong> flux function: upwind flux (8.3.28)<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

4<br />

3.5<br />

3<br />

u(x,t) = x/t<br />

u = −1<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

1<br />

h = 0.066667, t=1.003076<br />

finite volume solution<br />

exact solution<br />

1<br />

h = 0.066667, t=2.000768<br />

finite volume solution<br />

exact solution<br />

1<br />

h = 0.066667, t=3.001334<br />

finite volume solution<br />

exact solution<br />

1<br />

h = 0.066667, t=4.000000<br />

finite volume solution<br />

exact solution<br />

4<br />

2.5<br />

3.5<br />

0.8<br />

0.8<br />

0.8<br />

0.8<br />

3<br />

2<br />

0.6<br />

0.4<br />

0.2<br />

0<br />

−0.5 0 0.5 1 1.5 2 2.5 3 3.5<br />

0.6<br />

0.4<br />

0.2<br />

0<br />

−0.5 0 0.5 1 1.5 2 2.5 3 3.5<br />

0.6<br />

0.4<br />

0.2<br />

0<br />

−0.5 0 0.5 1 1.5 2 2.5 3 3.5<br />

0.6<br />

0.4<br />

0.2<br />

Fig. 273<br />

0<br />

−0.5 0 0.5 1 1.5 2 2.5 3 3.5<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

u(t,x)<br />

2.5<br />

1<br />

2<br />

0.5<br />

1.5<br />

0<br />

−0.5<br />

1<br />

−1<br />

0.5 t<br />

−2.5 −2 −1.5 −1 −0.5 0<br />

0 0.5 1 1.5<br />

x<br />

Fig. 274<br />

1.5<br />

1<br />

0.5<br />

u = −1<br />

u = 1<br />

−2.5 −2 −1.5 −1 −0.5 0 0.5 1 1.5<br />

x<br />

Fig. 275<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

DRAFT<br />

The entropy solution (→ Sect. 8.2.6) of this Cauchy problem features a transsonic rarefaction fan at<br />

x = 0: this is a rarefaction solution (→ Lemma 8.2.34) whose “edges” move in opposite directions.<br />

8.3<br />

p. 894<br />

8.3<br />

p. 89


−2.5 −2 −1.5 −1 −0.5 0 0.5 1 1.5<br />

t<br />

1<br />

0.8<br />

0.6<br />

0.4<br />

0.2<br />

0<br />

−0.2<br />

−0.4<br />

−0.6<br />

−0.8<br />

−1<br />

h = 0.066667, t=1.000000<br />

finite volume solution<br />

exact solution<br />

1<br />

0.8<br />

0.6<br />

0.4<br />

0.2<br />

0<br />

−0.2<br />

−0.4<br />

−0.6<br />

−0.8<br />

−1<br />

h = 0.066667, t=2.000000<br />

finite volume solution<br />

exact solution<br />

−2.5 −2 −1.5 −1 −0.5 0 0.5 1 1.5<br />

1<br />

0.8<br />

0.6<br />

0.4<br />

0.2<br />

0<br />

−0.2<br />

−0.4<br />

−0.6<br />

−0.8<br />

−1<br />

h = 0.066667, t=3.000000<br />

finite volume solution<br />

exact solution<br />

−2.5 −2 −1.5 −1 −0.5 0 0.5 1 1.5<br />

4<br />

1<br />

0.8<br />

0.6<br />

0.4<br />

0.2<br />

0<br />

−0.2<br />

−0.4<br />

−0.6<br />

−0.8<br />

−1<br />

h = 0.066667, t=4.000000<br />

finite volume solution<br />

exact solution<br />

Fig. 276<br />

−2.5 −2 −1.5 −1 −0.5 0 0.5 1 1.5<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

➤ initial nodal values µ j (0) =<br />

➤<br />

Semi-discrete evolution equation:<br />

dµ j<br />

dt (t) = − 1<br />

2h ·<br />

{<br />

−1 <strong>for</strong>j < 0 ,<br />

1 <strong>for</strong>j ≥ 0 .<br />

{<br />

µ 2<br />

j+1 (t)−µ 2 j (t) <strong>for</strong> j ≥ 0 ,<br />

µ 2 j (t)−µ2 j−1 (t) <strong>for</strong> j < 0 .<br />

µ j (t) = µ j (0) <strong>for</strong> allt ➤ <strong>for</strong>h → 0, convergence to entropy violating expansion shock !<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

u(t,x)<br />

1<br />

0.5<br />

0<br />

−0.5<br />

3.5<br />

3<br />

2.5<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

finite volume method may converge to non-physical weak solutions !<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

−1<br />

DRAFT<br />

DRAFT<br />

4<br />

3.5<br />

2<br />

✸<br />

3<br />

1.5<br />

2.5<br />

2<br />

1<br />

t<br />

1.5<br />

1<br />

0.5<br />

0<br />

−2.5<br />

−2<br />

−1.5<br />

−1<br />

x<br />

−0.5<br />

0<br />

0.5<br />

1<br />

1.5<br />

0.5<br />

0<br />

−2 −1.5 −1 −0.5 0 0.5 1<br />

x<br />

8.3.3.4 Godunov flux<br />

Conservative finite volume discretization with upwind flux produces (stationary) expansion shock instead<br />

of transonic rarefaction!<br />

Sect. 8.2.6: this is a weak solution, but it violates the entropy condition, “non-physical shock”.<br />

8.3<br />

p. 897<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

The upwind flux (8.3.28) is a numerical flux of the <strong>for</strong>m<br />

F(v,w) = f(u ↓ (v,w)) with an intermediate state u ↓ (v,w) ∈ R .<br />

For the upwind flux the intermediate state is not really “intermediate”, but coincides with one of the<br />

statesv,w depending on the sign of the “local shock speed”ṡ := f(w)−f(v)<br />

w−v .<br />

8.3<br />

p. 89<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

✸<br />

Idea:<br />

obtain suitable intermediate state as<br />

R. Hiptmair<br />

Example 8.3.31 (Upwind flux: Convergence to expansion shock).<br />

C. Schwab,<br />

u ↓ (v,w) = ψ(0) , (8.3.32)<br />

H.<br />

Harbrecht<br />

V.<br />

whereu(x,t) = ψ(x/t) solves the Riemann problem (→ Def. 8.2.28)<br />

Cauchy problem (8.2.9) <strong>for</strong> Burgers equation (8.1.16), i.e.,f(u) = 2 1 Gradinaru<br />

u2<br />

A. Chernov<br />

DRAFT<br />

∂u<br />

∂t + ∂<br />

{<br />

v , <strong>for</strong>x < 0 ,<br />

∂x f(u) = 0 , u(x,0) = (8.3.33)<br />

w , <strong>for</strong>x ≥ 0 .<br />

u 0 (x) = 1 <strong>for</strong>x > 0, u 0 (x) = −1 <strong>for</strong>x < 0<br />

➤ entropy solution = rarefaction wave (→ Lemma 8.2.34)<br />

We focus on f : R ↦→ R strictly convex & smooth (e.g. Burgers equations (8.1.16))<br />

FV in conservation <strong>for</strong>m, upwind flux (8.3.28), on equidistant grid,x j = (j+ 2 1)h, meshwidthh > 0 ➤ Riemann problem (8.3.33) (→ Def. 8.2.28) has the entropy solution (→ Sect. 8.2.6):<br />

8.3<br />

p. 898<br />

➊ Ifv > w ➤ discontinuous solution, shock (→ Lemma 8.2.31)<br />

{<br />

v ifx < ṡt ,<br />

u(t,x) = ṡ = f(v)−f(w)<br />

w ifx > ṡt , v −w<br />

. (8.3.34)<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

8.3<br />

p. 90


t/u<br />

➋ Ifv ≤ w ➤ continuous solution, rarefaction wave (→ Lemma 8.2.34)<br />

⎧<br />

⎪⎨ v ifx < f ′ (v)t ,<br />

u(t,x) = g(x/t) iff<br />

⎪⎩<br />

(v) ≤ x/t ≤ f ′ (w) , g := (f ′ ) −1 . (8.3.35)<br />

w ifx > f ′ (w)t ,<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

t/u<br />

replacements<br />

v<br />

w<br />

➊: subsonic shock<br />

x<br />

t/u<br />

w<br />

v<br />

➋: subsonic<br />

rarefaction<br />

x<br />

t/u<br />

v<br />

w<br />

➌: supersonic<br />

shock<br />

x<br />

t/u<br />

w<br />

v<br />

➍: supersonic<br />

rarefaction<br />

x<br />

w<br />

v<br />

➎:<br />

transonic rarefaction<br />

x<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

➣<br />

All weak solutions of a Riemann problem are of the <strong>for</strong>mu(x,t) = ψ(x/t) with a suitable function<br />

ψ, which is<br />

piecewise constant with a jump atṡ := f(w)−f(v)<br />

w−v <strong>for</strong> a shock solution (8.3.34),<br />

the continuous function (in the case of strictly convex flux functionf)<br />

⎧<br />

⎪⎨ v , ifξ < f ′ (v) ,<br />

ψ(ξ) := (f<br />

⎪⎩<br />

′ ) −1 (ξ) , iff ′ (v) < ξ < f ′ (w) ,<br />

w , ifξ > f ′ (v) ,<br />

provided thatw > v = situation of a rarefaction solution (8.3.35), see Lemma 8.2.34.<br />

t<br />

u(x,t)/t<br />

x j−2 x j−1 x j x j+1 x j+2 x j+3<br />

Fig. 277<br />

−− ˆ= piecewise constant functionu(0,t)<br />

−− ˆ= shock in(t,x)-plane<br />

−− ˆ= rarefaction wave in(t,x)-plane<br />

<strong>for</strong> convex flux functionf<br />

⎧<br />

v > w ∧ ṡ < 0 (shock ➊) ,<br />

w , if<br />

⎪⎨ v < w ∧ f ′ (w) < 0 (rarefaction ➋) ,<br />

u ↓ (v,w) = v > w ∧ ṡ > 0 (shock ➌),<br />

v , if<br />

v < w ∧ f ′ (v) > 0 (rarefaction ➍) ,<br />

⎪⎩ (f ′ ) −1 (0) , ifv < w ∧ f ′ (v) ≤ 0 ≤ f ′ (w) (rarefaction ➎).<br />

(8.3.36)<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

8.3<br />

p. 901<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Detailed analysis of (8.3.36):<br />

{<br />

v > w (shock case): f(u ↓ f(w)−f(v) f(v) , if<br />

(v,w)) = w−v > 0 ⇔ f(w) < f(v) ,<br />

f(w)−f(v)<br />

f(w) , if w−v ≤ 0 ⇔ f(w) ≥ f(v) .<br />

f(u ↓ (v,w)) = max{f(v),f(w)} .<br />

For a convex flux functionf:<br />

v < w ⇒ f ′ (v) ≤ f(w)−f(v) ≤ f ′ (w) .<br />

w−v<br />

Forv < w (rarefaction case)<br />

⎧<br />

⎪⎨ f(v) , iff ′ (v) > 0 ,<br />

f(u ↓ (v,w)) = f(z) , iff<br />

⎪⎩<br />

′ (v) < 0 < f ′ (w) ,<br />

f(w) , iff ′ (w) < 0 ,<br />

wheref ′ (z) = 0⇔f has a global minimum inz.<br />

2-point numerical flux function according to (8.3.32) and (8.3.33):<br />

f<br />

v<br />

Godunov numerical flux<br />

w<br />

Fig. 278<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

8.3<br />

p. 90<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

8.3<br />

p. 902<br />

8.3<br />

p. 90


t<br />

Using general Riemann solution (8.2.37): <strong>for</strong> any<br />

flux function<br />

Godunov numerical flux function<br />

⎧<br />

⎪⎨ min f(u) , if v < w ,<br />

v≤u≤w<br />

F GD (v,w) =<br />

⎪⎩ max f(u) , if w ≤ v .<br />

w≤u≤v<br />

(8.3.37)<br />

<strong>for</strong> Burgers equation (8.1.16) ✄<br />

F(v,w)<br />

0.5<br />

0.4<br />

0.3<br />

0.2<br />

0.1<br />

0<br />

1<br />

0.8<br />

0.6<br />

Godunov numerical flux function <strong>for</strong> Burgers equation<br />

0.4 0.2 0 −0.2 −0.4 −0.6 −0.8<br />

w<br />

−1<br />

1<br />

0.5<br />

0<br />

−0.5<br />

−1 v<br />

Fig. 279<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

1<br />

0.8<br />

0.6<br />

0.4<br />

0.2<br />

0<br />

−0.2<br />

−0.4<br />

−0.6<br />

−0.8<br />

−1<br />

−2.5 −2 −1.5 −1 −0.5 0 0.5 1 1.5<br />

u(t,x)<br />

1<br />

0.5<br />

0<br />

−0.5<br />

h = 0.066667, t=1.004154<br />

finite volume solution<br />

exact solution<br />

1<br />

0.8<br />

0.6<br />

0.4<br />

0.2<br />

0<br />

−0.2<br />

−0.4<br />

−0.6<br />

−0.8<br />

−1<br />

h = 0.066667, t=2.001356<br />

finite volume solution<br />

exact solution<br />

−2.5 −2 −1.5 −1 −0.5 0 0.5 1 1.5<br />

1<br />

0.8<br />

0.6<br />

0.4<br />

0.2<br />

0<br />

−0.2<br />

−0.4<br />

−0.6<br />

−0.8<br />

−1<br />

−2.5 −2 −1.5 −1 −0.5 0 0.5 1 1.5<br />

4<br />

3.5<br />

3<br />

2.5<br />

h = 0.066667, t=3.001176<br />

finite volume solution<br />

exact solution<br />

1<br />

0.8<br />

0.6<br />

0.4<br />

0.2<br />

0<br />

−0.2<br />

−0.4<br />

−0.6<br />

−0.8<br />

−1<br />

h = 0.066667, t=4.000000<br />

finite volume solution<br />

exact solution<br />

Fig. 280<br />

−2.5 −2 −1.5 −1 −0.5 0 0.5 1 1.5<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

Remark 8.3.38 (Upwind flux and expansion shocks).<br />

DRAFT<br />

−1<br />

4<br />

2<br />

DRAFT<br />

3.5<br />

3<br />

1.5<br />

2.5<br />

2<br />

1<br />

1.5<br />

F uw (v,w) = F GD (v,w), except <strong>for</strong> the case of transsonic rarefaction!<br />

t<br />

1<br />

0.5<br />

0<br />

−2.5<br />

−2<br />

−1.5<br />

−1<br />

x<br />

−0.5<br />

0<br />

0.5<br />

1<br />

1.5<br />

0.5<br />

0<br />

−2 −1.5 −1 −0.5 0 0.5 1<br />

x<br />

(transsonic rarefaction = rarefaction fan with edges moving in opposite direction, see Ex. 8.3.30)<br />

What does the upwind fluxF uw (v,w) from (8.3.28) yield in the case of transsonic rarefaction?<br />

Iff convex,v < w,f ′ (v) < 0 < f ′ (w),<br />

F uw (v,w) = f(ψ(0)) ,<br />

whereu(x,t) = ψ(x/t) is a non-physical entropy-condition violating (→ Def. 8.2.35) expansion shock<br />

weak solution of (8.3.33).<br />

8.3<br />

p. 905<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Observation: Transonic rarefaction captured by discretization, but small remnants of an expansion<br />

shock still observed.<br />

✸<br />

8.3<br />

p. 90<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Upwind flux treats transsonic rarefaction as expansion shock!<br />

➣ Explanation <strong>for</strong> observation made in Ex. 8.3.30.<br />

Example 8.3.39 (Godunov flux <strong>for</strong> Burgers equation).<br />

△<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

8.3.4 Montone schemes<br />

Observations made <strong>for</strong> some piecewise constant solutions u N (t) of semi-discrete evolutions arising<br />

from spatial finite volume discretization in conservation <strong>for</strong>m (8.3.12):<br />

Ex. 8.3.27 (Lax-Friedrichs numerical flux (8.3.26))<br />

Ex. 8.3.39 (Godunov numerical flux (8.3.37))<br />

:<br />

min u 0(x) ≤ u N (x,t) ≤ max u 0(x)<br />

x∈R x∈R<br />

no new local extrema in numerical solution<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

☞ same setting and conservative discretization as in Ex. 8.3.30<br />

☞ <strong>Numerical</strong> flux function: Godunov numerical flux (8.3.37)<br />

8.3<br />

p. 906<br />

In these respects the conservative finite volume discretizations based on either the Lax-Friedrichs<br />

numerical flux or the Godunov numerical flux inherit crucial structural properties of the exact solution,<br />

8.3<br />

p. 90


see Sect. 8.2.7, in particular, Thm. 8.2.39 and the final remark: they display structure preservation,<br />

cf. (5.7).<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Assumption:<br />

⃗µ = ⃗µ(t) and⃗η = ⃗η(t) solve (8.3.40) and satisfy <strong>for</strong> somet ∈ [0,T]<br />

η k (t) ≤ µ k (t) ∀k ∈ Z , ξ := η j (t) = µ j (t) <strong>for</strong> some j ∈ Z .<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Is this coincidence <strong>for</strong> the special settings exmained in Ex. 8.3.27 and Ex. 8.3.39?<br />

Focus: semi-discrete evolution (8.3.12) resulting from finite volume discretization in conservation <strong>for</strong>m<br />

on an equidistant infinite mesh<br />

(8.3.11)<br />

<strong>for</strong> Cauchy problem<br />

dµ j<br />

dt (t) = −1 ( F(µj (t),µ<br />

h j+1 (t))−F(µ j−1 (t),µ j (t)) ) , j ∈ Z , (8.3.12)<br />

∂u<br />

∂t + ∂<br />

∂x f(u) = 0 in R×]0,T[ , u(x,0) = u 0(x) , x ∈ R , (8.2.9)<br />

induced by Lax-Friedrichs numerical flux (8.3.26)<br />

F LF (v,w) = 1 2 (f(v)+f(w))− 2<br />

1 max<br />

min{v,w}≤u≤max{v,w} |f′ (u)|(w−v) . (8.3.26)<br />

dµ j<br />

dt = − 1 (<br />

f(µ<br />

2h j+1 )−f(µ j−1 )−<br />

)<br />

max<br />

u∈[µ j ,µ j+1 ] |f′ (u)|(µ j+1 −µ j )+ max<br />

u∈[µ j−1 ,µ j ] |f′ (u)|(µ j −µ j−1 ) .<br />

(8.3.40)<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

8.3<br />

p. 909<br />

Canη j raise aboveµ j ?<br />

d µj −η j ) = −<br />

dt( 1 (<br />

)<br />

F<br />

h LF (ξ,µ j+1 )−F LF (ξ,η j+1 )+F LF (η j−1 ,ξ)−F LF (µ j−1 ,ξ) .<br />

d( To show: µj −η<br />

dt j ) ≥ 0 ➣ µ j (t) will stay aboveη j (t).<br />

This can be concluded, if<br />

F LF (ξ,µ j+1 )−F LF (ξ,η j+1 ) ≤ 0 and F LF (η j−1 ,ξ)−F LF (µ j−1 ,ξ) ≤ 0 . (8.3.42)<br />

The only piece of in<strong>for</strong>mation we are allowed to use is<br />

µ j+1 ≥ η j+1 and µ j−1 ≥ η j−1 .<br />

This would imply (8.3.42), if F LF was increasing in the first argument and decreasing in the second<br />

argument.<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

8.3<br />

p. 91<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Definition 8.3.43 (Monotone numerical flux function).<br />

A 2-point numerical flux functionF = F(v,w) is called monotone, if<br />

F is an increasing function of its first argument<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Goal: show thatu N (t) linked to⃗µ(t) from (8.3.40) through piecewise constant reconstruction (8.3.6)<br />

satisfies<br />

and<br />

F is a decreasing function of its second argument.<br />

min u N(x,0) ≤ u N (x,t) ≤ max u N(x,0) ∀x ∈ R , ∀t ∈ [0,T] . (8.3.41)<br />

x∈R x∈R<br />

Recall from Sect. 8.2.7: estimate (8.3.41) <strong>for</strong> the exact solution u(x,t) of (8.2.9) is a consequence<br />

of the comparison principle of Thm. 8.2.39 and the fact that constant initial data are preserved during<br />

the evolution. The latter property is straight<strong>for</strong>ward <strong>for</strong> conservative finite volume spatial semidiscretization,<br />

see (8.3.15).<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

✬<br />

Simple criterion: A continuously differentiable 2-point numerical flux function F = F(v,w) is<br />

montone, if and only if<br />

✫<br />

∂F<br />

(v,w) ≥ 0 and<br />

∂F<br />

∂v<br />

(v,w) ≤ 0 ∀(v,w) . (8.3.44)<br />

∂w<br />

✩R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

✪<br />

DRAFT<br />

➣ Goal: Establish comparison principle <strong>for</strong> finite volume semi-discrete solutions based on Lax-<br />

Friedrichs numerical flux:<br />

{ }<br />

⃗µ(t),⃗η(t) solve (8.3.40) ,<br />

η j (0) ≤ µ j (0) ∀j ∈ Z<br />

⇒ η j (t) ≤ µ j (t) ∀j ∈ Z , ∀0 ≤ t ≤ T .<br />

8.3<br />

p. 910<br />

✬<br />

Lemma 8.3.45 (Monotonicity of Lax-Friedrichs numerical flux and Godunov flux).<br />

For any continuously differentiable flux function f the associated Lax-Friedrichs flux (8.3.26)<br />

and Godunov flux (8.3.37) are monotone.<br />

✫<br />

✩<br />

✪<br />

8.3<br />

p. 91


Proof.<br />

➊<br />

Lax-Friedrichs numerical flux:<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Proof (of Lemma 8.3.46, following the above considerations <strong>for</strong> the Lax-Friedrichs flux).<br />

The two sequences of nodal values satisfy (8.3.12)<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

F LF (v,w) = 1 2 (f(v)+f(w))− 2<br />

1 max<br />

min{v,w}≤u≤max{v,w} |f′ (u)|(w−v) . (8.3.26)<br />

Application of the criterion (8.3.44) is straight<strong>for</strong>ward:<br />

➋<br />

∂F LF<br />

∂v (v,w) = f′ (v)+ max<br />

min{v,w}≤u≤max{v,w} |f′ (u)| ≥ 0 ,<br />

∂F LF<br />

∂w (v,w) = f′ (w)− max<br />

min{v,w}≤u≤max{v,w} |f′ (u)| ≤ 0 .<br />

Godunov numerical flux<br />

⎧<br />

⎪⎨ min f(u) , if v < w ,<br />

v≤u≤w<br />

F GD (v,w) =<br />

⎪⎩ max f(u) w≤u≤v , if w ≤ v . (8.3.37)<br />

v < w: If v increases, then the range of values over which the minimum is taken will shrink, which<br />

makesF GD (v,w) increase.<br />

If w is raised, then the minimum is taken over a larger interval, which causes F GD (v,w) to<br />

become smaller.<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

8.3<br />

p. 913<br />

dµ j<br />

dt (t) = −1 ( F(µj (t),µ<br />

h j+1 (t))−F(µ j−1 (t),µ j (t)) ) , j ∈ Z , (8.3.47)<br />

dη j<br />

dt (t) = −1 ( F(ηj (t),η<br />

h j+1 (t))−F(η j−1 (t),η j (t)) ) , j ∈ Z . (8.3.48)<br />

Let t 0 be the earliest time, at which ⃗η “catches up” with ⃗µ in at least one node x j , j ∈ Z, of the<br />

mesh, that is<br />

η k (t 0 ) ≤ µ k (t 0 ) ∀k ∈ Z , ξ := η j (t 0 ) = µ j (t 0 ) .<br />

By subtracting (8.3.47) and (8.3.48) we get<br />

d<br />

dt (µ j −η j )(t 0 ) = − 1 (<br />

)<br />

F(ξ,µ<br />

h j+1 (t 0 ))−F(ξ,η j+1 (t 0 ))+F(η j−1 (t 0 ),ξ)−F(µ j−1 (t 0 ),ξ) ≥ 0 ,<br />

because <strong>for</strong> a monotone numerical flux function (→ Def. 8.3.43)<br />

η j−1 (t 0 ) ≤ µ j−1 (t 0 )<br />

η j+1 (t 0 ) ≤ µ j+1 (t 0 )<br />

increasing in first argument<br />

⇒ F(η j−1 (t 0 ),ξ)−F(µ j−1 (t 0 ),ξ) ≤ 0 ,<br />

decreasing in second argument<br />

⇒ F(ξ,µ j+1 (t 0 ))−F(ξ,η j+1 (t 0 )) ≤ 0 .<br />

This means that “η j cannot overtakeµ j ”: no valueη j can ever raise aboveµ j .<br />

✷<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

8.3<br />

p. 91<br />

v ≥ w: If v increases, then the range of values over which the maximum is taken will grow, which<br />

makesF GD (v,w) increase.<br />

If w is raised, then the maximum is taken over a smaller interval, which causes F GD (v,w)<br />

to decrease.<br />

✷<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Now we want to study the “preservation of the number of local extrema” during a semi-discrete evolution,<br />

another structural property of exact solutions of conservations laws, see Sect. 8.2.7.<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

✬<br />

Lemma 8.3.46 (Comparison principle <strong>for</strong> monotone semi-discrete conservative evolutions).<br />

Let the 2-point numerical flux function F = F(v,w) be monotone (→ Def. 8.3.43) and ⃗µ =<br />

⃗µ(t),⃗η = ⃗η(t) solve (8.3.12). Then<br />

✫<br />

η k (0) ≤ µ k (0) ∀k ∈ Z ⇒ η k (t) ≤ µ k (t) ∀k ∈ Z , ∀ 0 ≤ t ≤ T .<br />

✩<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

✪<br />

Intuitive terminology: ⃗µ has a local maximumu m ∈ R, if<br />

∃j ∈ Z: µ j = u m and ∃k l < j < k r ∈ N: max<br />

k l


local maximum<br />

local maximum<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

8.4 Timestepping<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Counting local extrema of ⃗µ<br />

and the associated piecewise<br />

constant reconstruction.<br />

Focus: Explicit Runge-Kutta timestepping methods (→ Def. 6.1.26)<br />

✬<br />

Lemma 8.3.49 (Non-oscillatory monotone semi-discrete evolutions).<br />

If ⃗µ = ⃗µ(t) solves (8.3.12) with a monotone numerical flux functionF = F(v,w) and ⃗µ(0) has<br />

finitely many local extrema, then the number of local extrema of ⃗µ(t) cannot be larger than that<br />

of ⃗µ(0).<br />

j /u N<br />

R. Hiptmair<br />

local minimumµ<br />

local minimum<br />

local minimum Fig. 281<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

✩<br />

DRAFT<br />

x<br />

Recall [18, Def. 12.4.9]: <strong>for</strong> explicit s-stage Runge-Kutta single step methods the coefficients a ij<br />

vanish <strong>for</strong> j ≥ i, 1 ≤ i,j ≤ s ➣ the incrementsK i can be computed in turns (without solving a<br />

non-linear system of equations).<br />

Initial value problem <strong>for</strong> abstract semi-discrete evolution in R Z :<br />

d⃗µ<br />

dt (t) = L h(⃗µ(t)) , 0 ≤ t ≤ T , ⃗µ(0) = ⃗µ 0 ∈ R Z . (8.4.1)<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

✫<br />

✪<br />

Here: L h : R Z ↦→ R Z ˆ= (non-linear) finite difference operator, e.g. <strong>for</strong> finite volume semidiscretization<br />

in conservation <strong>for</strong>m with 2-point numerical flux:<br />

8.3<br />

p. 917<br />

(8.3.12) ➣ (L h ⃗µ) j := − 1 h( F(µj ,µ j+1 )−F(µ j−1 ,µ j ) ) . (8.4.2)<br />

8.4<br />

p. 91<br />

Proof.<br />

i ˆ= index of local maximum of ⃗µ(t),tfixed<br />

µ i−1 (t) ≤ µ i (t) ,<br />

µ i+1 (t) ≤ µ i (t)<br />

monotone flux<br />

=⇒ F(µ i ,µ i+1 ) ≥ F(µ i ,µ i ) ≥ F(µ i−1 ,µ i ) ,<br />

⇒ d dt µ i(t) = − 1 h( F(µi ,µ i+1 )−F(µ i−1 ,µ i ) ) ≤ 0 .<br />

➣ maxima of⃗µ subside, (minima of⃗µ rise !)<br />

Idea of proof:<br />

No new (local) extrema can arise !<br />

Adjacent values cannot “overtake”:<br />

local maximum: cannot move up<br />

local minmum: cannot move down<br />

u<br />

µ j−2<br />

µ j−1 µ j<br />

µ j+1<br />

x j− 3/2 x j− 1/2 x j+ 1/2 x j+ 3/2 x j+<br />

Fig. 282x<br />

5/2<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

L h is local: (L h (⃗µ)) j depends only on “neighboring values”µ j−nl ,...,µ j+nr .<br />

Explicits-stage Runge-Kutta single step method <strong>for</strong> (8.4.1), timestepτ > 0:<br />

⃗κ 1 = L h (⃗µ (k) ) ,<br />

⃗κ 2 = L h (⃗µ (k) +τa 21 ⃗κ 1 ) ,<br />

⃗κ 3 = L h (⃗µ (k) +τa 31 ⃗κ 1 +τa 32 ⃗κ 2 ) ,<br />

.<br />

⃗κ s = L h (⃗µ (k) s−1 ∑<br />

+τ a sj ⃗κ j ) ,<br />

j=1<br />

s∑<br />

⃗µ (k+1) = ⃗µ (k) +τ b l ⃗κ j . (8.4.3)<br />

l=1<br />

Here, a ij ∈ R and b l ∈ R are the coefficients from the Butcher scheme (6.1.27). For explicit RKmethods<br />

the coefficient matrixAis strictly lower triangular.<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

8.4<br />

p. 918<br />

8.4<br />

p. 92


t<br />

Setting:<br />

equidistant spatial mesh M, meshwidth<br />

h > 0, nodesx j := hj,j ∈ Z,<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

8.4.1 CFL-condition<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

t 5<br />

0 x 1 x 2 x 3 x 4 x 5 x 6 x 7<br />

x<br />

t 4<br />

t 3<br />

t 2<br />

t 1<br />

uni<strong>for</strong>m timestep τ > 0, t k := τk, k ∈<br />

N 0 .<br />

Single step ( timestepping <strong>for</strong> (8.4.1) produces a sequence<br />

⃗µ (k)) k∈N 0<br />

µ (k)<br />

j ≈ u(x j ,t k ) , j ∈ Z, k ∈ N 0 .<br />

Fully discrete evolution<br />

⃗µ (k+1) = H h (⃗µ (k−1) ) , k ∈ N 0 .<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Remark 8.4.7 (Difference stencils).<br />

Stencil notation: Visualization of flow of in<strong>for</strong>mation in fully discrete explicit evolution (action ofH h ),<br />

cf. Fig. 201.<br />

t<br />

t<br />

t<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

t k−1<br />

t k<br />

Fig. 283<br />

t k−1<br />

x j−2 x j−1 x j x j+1 x j+2<br />

x<br />

t k<br />

Fig. 284<br />

t k−1<br />

x j−2 x j−1 x j x j+1 x j+2 x<br />

t k<br />

Fig. 285<br />

x j−2 x j−1 x j x j+1 x j+2 x<br />

H h : R Z ↦→ R Z :<br />

fully discrete evolution operator, arising from applying single step timestepping<br />

(8.4.3) to (8.4.1).<br />

2-point numerical flux &<br />

explicit Euler timestepping<br />

upwinding &<br />

explicit trapezoidal rule<br />

2-point numerical flux &<br />

explicit trapezoidal rule<br />

△<br />

Example 8.4.4 (Fully discrete evolutions).<br />

8.4<br />

p. 921<br />

8.4<br />

p. 92<br />

Fully discrete evolution arising from finite volume semi-discretization in conservation <strong>for</strong>m with 2-point<br />

numerical fluxF = F(v,w)<br />

(8.3.12) ➣ (L h ⃗µ) j := − 1 h( F(µj ,µ j+1 )−F(µ j−1 ,µ j ) ) . (8.4.2)<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

A consequence of explicit timestepping:<br />

locality of fully discrete evolution operator:<br />

∃m l ,m r ∈ N 0 : (H(⃗µ)) j = H j (µ j−ml ,...,µ j+mr ) . (8.4.8)<br />

If flux functionf does not depend onx,f = f(u) as in (8.2.9), we can expect<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

in combination with explicit Euler timestepping (ˆ= 1-stage explicit RK-method)<br />

⃗µ (k+1) = ⃗µ (k) +τL h (⃗µ (k) ) .<br />

(H h (⃗µ)) j = µ (k)<br />

j − τ ( (k) F(µ<br />

h j ,µ (k)<br />

j+1 )−F(µ(k) j−1 ,µ(k) j ) ) . (8.4.5)<br />

In the case of explicit trapezoidal rule timestepping [18, Eq. 12.4.6] (method of Heun)<br />

⃗κ = µ (k) + τ 2 L h(⃗µ (k) ) , ⃗µ (k+1) = µ (k) +τL h (⃗κ) .<br />

κ j := (⃗κ) j = µ (k)<br />

j − τ ( (k) F(µ<br />

h j ,µ (k)<br />

j+1 )−F(µ(k) j−1 ,µ(k) j ) ) ,<br />

(H h (⃗µ)) j = µ (k)<br />

j −<br />

h( τ F(κj ,κ j+1 )−F(κ j−1 ,κ j ) ) .<br />

(8.4.6)<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

This is the case <strong>for</strong> (8.4.5) and (8.4.6).<br />

H h is translation-invariant: H j = H ∀j ∈ Z .<br />

By inspection of (8.4.3): ifL h is translation-invariant<br />

(L h (⃗µ)) j = L(µ j−nl ,...µ j+nr ) , j ∈ Z ,<br />

and timestepping relies on an s-stage explicit Runge-Kutta method, then we conclude <strong>for</strong> m l ,m r in<br />

(8.4.8)<br />

m l ≤ s·n l , m r ≤ s·n r .<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

✸<br />

8.4<br />

p. 922<br />

8.4<br />

p. 92


Now we revisit a concept from Sect. 6.2.5, see, in particular, Rem. 6.2.41:<br />

✬<br />

Definition 8.4.9 (<strong>Numerical</strong> domain of dependence).<br />

Consider explicit translation-invariant fully discrete evolution ⃗µ (k+1) := H(⃗µ (k) ) on uni<strong>for</strong>m<br />

spatio-temporal mesh (x j = hj,j ∈ Z,t k = kτ,k ∈ N 0 ) with<br />

✩<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Definition 8.4.13 (Courant-Friedrichs-Lewy (CFL-)condition). → Rem. 6.2.41<br />

An explicit translation-invariant local fully discrete evolution ⃗µ (k+1) := H(⃗µ (k) ) on uni<strong>for</strong>m<br />

spatio-temporal mesh (x j = hj, j ∈ Z, t k = kτ, k ∈ N 0 ) as in Def. 8.4.9 satisfies the<br />

Courant-Friedrichs-Lewy (CFL-)condition, if the convex hull of its numerical domain of dependence<br />

contains the maximal analytical domain of dependence:<br />

D − (x j ,t k ) ⊂ convex(Dh − (x j,t k ))<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

∃m ∈ N 0 : (H(⃗µ)) j = H(µ j−m ,...,µ j+m ) , j ∈ Z . (8.4.10)<br />

Then the numerical domain of dependence is given by<br />

Dh − (x j,t k ) := {(x m ,t l ) ∈ R×[0,t k ]: j −m(k −l) ≤ m ≤ j +m(k −l)} .<br />

✫<br />

From Thm. 8.2.41 recall the maximal analytical domain of dependence <strong>for</strong> a solution of (8.2.9)<br />

D − (x,t) := {(x,t) ∈ R×[0,t]: ṡ min (t−t) ≤ x−x ≤ ṡ max (t−t)} .<br />

with maximals speeds of propagation<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

✪DRAFT<br />

By definition ofD − (x,t) andD − h (x j,t k ) sufficient <strong>for</strong> the CFL-condition is<br />

τ<br />

h ≤ ṁ s<br />

←→ timestep constraint! . (8.4.14)<br />

This is a timestep constraint similar to the one encountered in Sect. 6.2.5 in the context of leapfrog<br />

timestepping <strong>for</strong> the semi-discrete wave equation.<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

ṡ min := min{f ′ (ξ): inf 0(x) ≤ ξ ≤ sup u 0 (x)} ,<br />

x∈R x∈R<br />

(8.4.11)<br />

ṡ max := max{f ′ (ξ): inf 0(x) ≤ ξ ≤ sup u 0 (x)} .<br />

x∈R x∈R<br />

(8.4.12)<br />

8.4<br />

p. 925<br />

8.4<br />

p. 92<br />

t<br />

t<br />

(¯x,¯t)<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

As discussed in Rem. 6.2.41,<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

(¯x,¯t)<br />

We cannot expect convergence <strong>for</strong> fixed ratio τ : h, <strong>for</strong>h → 0 in case the CFL-condition is violated.<br />

ṡ<br />

Refer to Fig. 204 <strong>for</strong> a “graphical argument”:<br />

D − (¯x,¯t)<br />

D − (¯x,¯t) ⊂ R×[0,T]<br />

1<br />

Fig. 286<br />

x<br />

D − h (¯x,¯t) <strong>for</strong> 3-point stencil<br />

Fig. 287<br />

x<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

t<br />

(x j ,t k )<br />

h<br />

x<br />

τ<br />

u 0<br />

Fig. 288<br />

(• ˆ= coarse grid, ■ ˆ= fine grid,<br />

ˆ= d.o.d)<br />

✁ Sequence of equidistant space-time grids of<br />

R×[0,T] withτ = γh (τ/h = meshwidth in time/space)<br />

Ifγ > CFL-constraint (8.4.14) then<br />

analytical domain<br />

of dependence<br />

numerical domain<br />

⊄<br />

of dependence<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

8.4<br />

p. 926<br />

8.4<br />

p. 92


8.4.2 Linear stability<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

As in Sect. 6.1.4.2 and Sect. 6.2.5:<br />

diagonalization technique (with a new twist)<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

OPTIONAL SECTION<br />

The new twist is thatL h acts on the sequence spaceR Z !<br />

In Sect. 6.1.4.2 and Sect. 6.2.5 we found that <strong>for</strong> explicit timestepping<br />

timestep constraints τ ≤ O(h r ) , r ∈ {1,2}, necessary to avoid exponential blow-up<br />

(instability)<br />

Is the timestep constraint (8.4.14) suggested by the CFL-condition also stipulated by stability requirements?<br />

We are going to investigate the question only <strong>for</strong> the Cauchy problem <strong>for</strong> scalar linear advection in<br />

1D with constant velocityv > 0:<br />

∂u<br />

∂t +v∂u ∂x = 0 in R×]0,T[ , u(x,0) = u 0(x) ∀x ∈ R . (8.1.5)<br />

Semi-discretization in space on equidistant mesh with meshwidthh > 0<br />

➣ linear, local, and translation-invariant semi-discrete evolution<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

8.4<br />

p. 929<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Idea: trial expression <strong>for</strong> “eigenvectors”<br />

( ) ⃗ξ ζ := exp(ıξj) , j ∈ Z , −π < ξ ≤ π . (8.4.18)<br />

j<br />

By straight<strong>for</strong>ward computations:<br />

Terminology:<br />

m∑<br />

(L h (⃗µ)) j =<br />

l=−m<br />

c l µ j+l ⇒ L h ζ ξ ( ∑ m<br />

=<br />

)<br />

c l exp(iξl) ζ ξ .<br />

l=−m<br />

} {{ }<br />

“eigenvalue”ĉ h (ξ)<br />

m∑<br />

spectrum ofL h : σ(L h ) = {ĉ h (ξ) := c l exp(ıξl): −π < ξ ≤ π} . (8.4.19)<br />

l=−m<br />

The function ĉ h (ξ) is known as the symbol of the difference operator L h , cf. the<br />

concept of symbol of a differential operator.<br />

Example 8.4.20 (Spectrum of upwind difference operator).<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

8.4<br />

p. 93<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

d⃗µ<br />

m∑<br />

dt (t) = L h(⃗µ(t)) , with (L h (⃗µ)) j = c l µ j+l , j ∈ Z , (8.4.15)<br />

l=−m<br />

<strong>for</strong> suitable weightsc l ∈ R.<br />

Apply <strong>for</strong>mula (8.4.19) withc 0 = −h v ,c −1 = h v (from (8.4.17)):<br />

{ v<br />

}<br />

For L h from (8.4.17): σ(L h ) =<br />

h (exp(−ıξ)−1): −π < ξ ≤ π<br />

Example 8.4.16 (Upwind difference operator <strong>for</strong> linear advection).<br />

Finite volume semi-discretization of (8.1.5) in conservation <strong>for</strong>m with Godunov numerical flux (8.3.37)<br />

(= upwind flux (8.3.28))<br />

(L h (⃗µ)) j = − v h (µ j −µ j−1 ) . (8.4.17)<br />

In (8.4.15): c 0 = − v h , c −1 = v h .<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Spectrum of upwind finite difference operator <strong>for</strong><br />

linear advection with velocity v > 0 (meshwidth<br />

h > 0)<br />

✄<br />

σ(L h )<br />

− v h<br />

v<br />

h<br />

C<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Note: Lax-Friedrichs numerical flux (8.3.26) yields the sameL h .<br />

Fig. 289<br />

✸<br />

✸<br />

8.4<br />

p. 930<br />

8.4<br />

p. 93


Also here:<br />

diagonalization of semi-discrete evolution leads to decoupled scalar linear ODEs. However,<br />

now we have uncountably many “eigenvectors” ⃗ ζ ξ , so that linear combination becomes integration:<br />

∫π<br />

∫π<br />

⃗µ(t) = ˆµ(t,ξ) ⃗ ζ ξ dξ ⇔ µ j (t) = ˆµ(t,ξ) exp(ıξj)dξ . (8.4.21)<br />

−π<br />

−π<br />

d⃗µ<br />

dt (t) = L h(⃗µ(t)) ⇒ ∂ˆµ<br />

∂t (t,ξ) = ĉ h(ξ)ˆµ(t,ξ) . (8.4.22)<br />

This is a family of scalar, linear ODEs parameterized byξ ∈]−π,π].<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Example 8.4.25 (Explicit Euler in Fourier domain).<br />

Explicit Euler timestepping [18, Eq. 12.2.4] <strong>for</strong> semi-discrete evolution (8.4.15), see also (8.4.5),<br />

⃗µ (k+1) = ⃗µ (k) +τL h ⃗µ (k) .<br />

∫π<br />

∫π ∫π<br />

ˆµ (k+1) (ξ) ⃗ ζ ξ dξ = (Id+τL h ) ˆµ (k) (ξ) ⃗ ζ ξ dξ = ˆµ (k) (ξ)(1+τĉ h (ξ)) dξ .<br />

−π<br />

−π<br />

−π<br />

ˆµ (k+1) (ξ) = ˆµ (k) (ξ)(1+τĉ h (ξ)) .<br />

In Fourier domain a single explicit Euler timestep corresponds to a multiplication of ˆµ :]−π,π] ↦→ C<br />

with the function(1+τĉ h ) :]−π,π] ↦→ C.<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Remark 8.4.23 (Fourier series).<br />

Up to normalization the relationship<br />

⃗µ (0) ∈ R Z ↔ ˆµ (0) :]−π,π] ↦→ C<br />

8.4<br />

p. 933<br />

Relate this to an explicit Euler step <strong>for</strong> the ODE ∂ˆµ<br />

∂t (t,ξ) = ĉ h(ξ)ˆµ(t,ξ) from (8.4.22) with paramter<br />

ξ:<br />

ˆµ (k+1) (ξ) = (1+τĉ h (ξ))ˆµ (k) (ξ) .<br />

✸<br />

8.4<br />

p. 93<br />

from (8.4.21) is the Fourier series trans<strong>for</strong>m, which maps a sequence to a2π-periodic function. It has<br />

the important isometry property<br />

➣<br />

∞∑<br />

∫π<br />

|µ j | 2 = 2π |ˆµ(ξ)| 2 dξ .<br />

j=−∞ −π<br />

The symbolĉ h can be viewed as the representation of a difference operator in Fourier domain.<br />

△<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Generalize the observation made in the previous example:<br />

∫π<br />

⃗µ (k) = ˆµ (k) (ξ) ⃗ ζ ξ dξ ,<br />

−π<br />

( )<br />

where η (k) (ξ) is the sequence of approximations created by the Runge-Kutta method when<br />

k∈N 0<br />

applied to the scalar linear initial value problem<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

ẏ = ĉ(ξ)y , y(0) = ˆµ (0) (ξ) .<br />

Clearly, timestepping can only be stable, if blowup|ˆµ (k) (ξ)| → ∞ <strong>for</strong> k → ∞ can be avoided <strong>for</strong> all<br />

−π < ξ ≤ π.<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

The decoupling manifest in (8.4.22) carries over to Runge-Kutta timestepping in the sense of the<br />

commuting diagram (6.1.54).<br />

We introduce the Fourier trans<strong>for</strong>ms of the members of the sequence<br />

(<br />

⃗µ (k)) created by timestep-<br />

k<br />

ping<br />

∫π<br />

⃗µ (k) =<br />

−π<br />

∫π<br />

ˆµ (k) (ξ) ⃗ ζ ξ dξ ⇔ µ (k)<br />

j =<br />

−π<br />

ˆµ (k) (ξ) exp(ıξj)dξ . (8.4.24)<br />

8.4<br />

p. 934<br />

From [18, Thm. 13.1.18] we know:<br />

8.4<br />

p. 93


✬<br />

Theorem 8.4.26 (Stability function of explicit Runge-Kutta methods).<br />

The execution of one step of size τ > 0 of an explicit s-stage Runge-Kutta single step method<br />

(→ Def. 6.1.26) with Butcher scheme c A bT (see (6.1.27)) <strong>for</strong> the scalar linear ODE ẏ = λy,<br />

λ ∈ C, amounts to a multiplication with the number<br />

✫<br />

Ψ τ λ = 1+zbT (I−zA) −1 1 = det(I−zA+z1b T ) , z := λτ , 1 = (1,...,1) T ∈ R s .<br />

} {{ }<br />

stability function S(z)<br />

Example 8.4.27 (Stability functions of explicit RK-methods).<br />

• Explicit Euler method (8.4.5) :<br />

0 0<br />

1<br />

➣ S(z) = 1+z .<br />

✩<br />

✪<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

✤<br />

✣<br />

Stability of RK-timestepping of linear semi-discrete evolution ⇐⇒ max<br />

−π


➣<br />

symbol of difference operator (→ Ex. 8.4.20): ĉ h (ξ) = v h (exp(−ıξ)−1),<br />

stability function:<br />

S(z) = 1+z.<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

To see this note that the explicit trapezoidal rule is a 2-stage Runge-Kutta method. Hence, the spatial<br />

stencil has width 2 in upwind direction, see Fig. 284.<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

C<br />

✸<br />

Locus of<br />

Σ := S(τĉ(ξ)) , −π < ξ ≤ π ,<br />

in the complex plane<br />

✄<br />

Σ<br />

1− τv<br />

h<br />

v<br />

h<br />

1<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

8.4.3 Convergence<br />

Example 8.4.30 (Convergence of fully discrete finite volume methods <strong>for</strong> Burgers equation).<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

= CFL-condition of Def. 8.4.13!<br />

|S(τĉ(ξ))| ≤ 1 ∀−π < ξ ≤ π ⇐⇒ v τ h ≤ 1 .<br />

Fig. 293<br />

Cauchy problem <strong>for</strong> Burgers equation (8.1.16)<br />

∂u<br />

∂t + ∂<br />

∂x (1 2 u2 ) = 0 in R×]0,T[ , u(x,0) = u 0 (x) , x ∈ R .<br />

Note that the maximal analytic region of dependence <strong>for</strong> constant velocityv linear advection is merely<br />

a line with slopev in thex−t-plane, see Ex. 8.2.12.<br />

Consider: upwind spatial discretization (8.4.17) & explicit trapezoidal rule: stability function S(z) =<br />

1+z + 1 2 z2<br />

Plots <strong>for</strong>v = 1,τ = 1<br />

8.4<br />

p. 941<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

smooth, non-smooth and discontinuous initial data, supported in[0,1]:<br />

u 0 (x) = 1−cos 2 (πx) , 0 ≤ x ≤ 1 , 0 elsewhere ,<br />

u 0 (x) = 1−2∗|x− 2 1| , 0 ≤ x ≤ 1 , 0 elsewhere ,<br />

u 0 (x) = 1 , 0 ≤ x ≤ 1 , 0 elsewhere .<br />

(BUMP)<br />

(WEDGE)<br />

(BOX)<br />

8.4<br />

p. 94<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

0.8<br />

0.6<br />

Loci Σ <strong>for</strong> Heun method & upwind finite differencing<br />

vτ/h = 1.111111<br />

vτ/h = 1.000000<br />

vτ/h = 0.833333<br />

5<br />

4.5<br />

Stability <strong>for</strong> Heun method & upwind finite differencing<br />

➣ maximum speed of propagationṡ = 1.<br />

Bump shaped initial data<br />

1<br />

1<br />

Edge shaped initial data<br />

1<br />

Box shaped initial data<br />

4<br />

0.4<br />

0.8<br />

0.8<br />

0.8<br />

Im<br />

0.2<br />

0<br />

−0.2<br />

max|S(c(ξ))|<br />

3.5<br />

3<br />

2.5<br />

2<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

u 0<br />

0.6<br />

0.4<br />

0.2<br />

u 0<br />

0.6<br />

0.4<br />

0.2<br />

u 0<br />

0.6<br />

0.4<br />

0.2<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

1.5<br />

0<br />

0<br />

0<br />

−0.4<br />

−0.6<br />

−0.8<br />

−0.2 0 0.2 0.4 0.6 0.8 1 1.2 1.4<br />

Re<br />

1<br />

0.5<br />

0<br />

0.5 0.6 0.7 0.8 0.9 1 1.1 1.2 1.3 1.4 1.5<br />

h/τ v<br />

|S(τĉ(ξ))| ≤ 1 ∀−π < ξ ≤ π ⇐⇒ v τ h ≤ 1 .<br />

= tighter timestep constraint than stipulated by mere CFL-condition (8.4.14).<br />

8.4<br />

p. 942<br />

Fig. 294<br />

−2 −1.5 −1 −0.5 0 0.5 1 1.5 2<br />

x<br />

(BUMP)<br />

Fig. 295<br />

−2 −1.5 −1 −0.5 0 0.5 1 1.5 2<br />

x<br />

(WEDGE)<br />

Fig. 296<br />

−2 −1.5 −1 −0.5 0 0.5 1 1.5 2<br />

x<br />

(BOX)<br />

Spatial discretization on equidistant mesh with meshwidthh > 0 based on finite volume method<br />

in conservation <strong>for</strong>m with<br />

➊ (local) Lax-Friedrichs numerical flux (8.3.26),<br />

➋ Godunov numerical flux (8.3.37).<br />

Initial values ⃗µ (0) obtained from dual cell averages.<br />

8.4<br />

p. 94


Explicit Runge-Kutta (order 4) timestepping with uni<strong>for</strong>m timestepτ > 0.<br />

Fixed ratio: τ : h = 1 (➣ CFL-condition satisfied)<br />

Monitored: error norms (log-log plots)<br />

err 1 (h) := max h ∑ |µ (k)<br />

∥<br />

k>0<br />

j −u(x j ,t k )| ≈ max∥u (k)<br />

k>0<br />

N −u(·,t k) ∥ L<br />

j<br />

1 (R) , (8.4.31)<br />

err ∞ (h) := max max k>0 j∈Z |µ(k) ∥<br />

j −u(x j ,t k )| ≈ max∥u (k)<br />

k>0<br />

N −u(·,t k) ∥ L ∞ (R) . (8.4.32)<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

<strong>for</strong> different final timesT = 0.3,4,h ∈ { 1<br />

20 , 1<br />

40 , 1<br />

80 , 1<br />

160 , 1<br />

320 , 1<br />

640 , 1<br />

1280 }. R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Why do we study the particular error norms (8.4.31) and (8.4.32)?<br />

From Thm. 8.2.39 and Thm. 8.2.41 we know that the evolution <strong>for</strong> a scalar conservation law in 1D<br />

enjoys stability on the norms ‖·‖ L 1 (R) and ‖·‖ L ∞ (R). Hence, these norms are the natural norms<br />

<strong>for</strong> measuring discretization errors, cf. the use of the energy norm <strong>for</strong> measuring the finite element<br />

discretization error <strong>for</strong> 2nd order elliptic BVP.<br />

T = 4, errorerr 1<br />

Burgers 1D: smooth initial data, t=4<br />

Burgers 1D: C 0 initial data, t=4<br />

Burgers 1D: box initial data, t=4<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Lax−Friedrichs<br />

Godunov flux<br />

O(h)<br />

err 1<br />

8.4<br />

p. 945<br />

10 −1<br />

10 −2<br />

10 2 10 3<br />

3.5h −1<br />

Fig. 299<br />

10 −1<br />

10 −2<br />

3.5h −1<br />

Lax−Friedrichs<br />

Godunov flux<br />

O(h)<br />

Lax−Friedrichs<br />

Godunov flux<br />

O(h)<br />

err 1<br />

Fig. 300<br />

10 2 10 3<br />

10 −1<br />

10 −2<br />

3.5h −1<br />

err 1<br />

T = 0.3: errorerr ∞<br />

Fig. 301<br />

10 2 10 3<br />

8.4<br />

p. 94<br />

1<br />

0.9<br />

t=0.3<br />

t=4<br />

1<br />

0.9<br />

t=0.3<br />

t=4<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Burgers 1D: smooth initial data, t=0.3<br />

Lax−Friedrichs<br />

Godunov flux<br />

O(h)<br />

Burgers 1D: C 0 initial data, t=0.3<br />

Lax−Friedrichs<br />

Godunov flux<br />

O(h)<br />

Burgers 1D: box initial data, t=0.3<br />

Lax−Friedrichs<br />

Godunov flux<br />

O(h)<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

0.8<br />

0.8<br />

10 −0.4<br />

0.4<br />

0.3<br />

0.4<br />

0.3<br />

10 −1 3.5h −1<br />

Fig. 302<br />

10 2 10 3<br />

10 −1<br />

10 −2<br />

10 2 10 3<br />

3.5h −1<br />

Fig. 303<br />

10 −0.8<br />

Fig. 304<br />

10 2 10 3<br />

0.7<br />

0.7<br />

err ∞<br />

err ∞<br />

err ∞<br />

10 −0.3 3.5h −1<br />

10 −0.5<br />

0.6<br />

0.6<br />

10 −0.6<br />

0.5<br />

0.5<br />

10 −0.7<br />

0.2<br />

0.1<br />

0<br />

−1 −0.5 0 0.5 1 1.5 2 2.5 3<br />

u(x,t)<br />

Fig. 297<br />

“Exact solution”: Initial data (WEDGE)<br />

0.2<br />

0.1<br />

0<br />

−1 −0.5 0 0.5 1 1.5 2 2.5 3<br />

u(x,t)<br />

Fig. 298<br />

“Exact solution”: Initial data (BUMP)<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

T = 4: errorerr ∞<br />

10 −0.6<br />

Burgers 1D: smooth initial data, t=4<br />

Lax−Friedrichs<br />

Godunov flux<br />

O(h)<br />

Burgers 1D: C 0 initial data, t=4<br />

Lax−Friedrichs<br />

Godunov flux<br />

O(h)<br />

Burgers 1D: box initial data, t=4<br />

Lax−Friedrichs<br />

Godunov flux<br />

O(h)<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

10 −0.3<br />

10 −0.7<br />

These “exact solutions’ were computed with a MUSCL scheme (→ Sect. 8.5.3) on an equidistant<br />

mesh withh = 10 −4<br />

10 −0.8<br />

10 −0.9<br />

10 −0.5 3.5h −1<br />

err ∞<br />

err ∞<br />

10 2 10 3<br />

10 −1 3.5h −1<br />

10<br />

Fig. 305 2 10<br />

Fig. 306<br />

3<br />

10 −0.4<br />

10 −0.5<br />

10 −0.2 3.5h −1<br />

err ∞<br />

Fig. 307<br />

10 2 10 3<br />

Note: <strong>for</strong> bump initial data (BUMP) we can still expect u(·,0.3) to be smoot, because characteristics<br />

will not intersect be<strong>for</strong>e that time, cf. (8.2.14) and Ex. 8.2.15.<br />

8.4<br />

p. 946<br />

8.4<br />

p. 94


Error obtained by comparison with numerical “reference solution” obtained on a very fine spatiotemporal<br />

grid.<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Example 8.4.35 (Consistency error of upwind numerical flux).<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Oberservations: <strong>for</strong> either numerical flux function<br />

Assumption: f continuously differentiable u 0 ≥ 0 and f ′ (u) ≥ 0 <strong>for</strong> u ≥ 0 ➣ no transsonic<br />

rarefactions!<br />

(near) first order algebraic convergence (→ Def. 1.6.20) w.r.t. mesh widthhinerr 1 ,<br />

algebraic convergence w.r.t. mesh width h in err ∞ be<strong>for</strong>e the solution develops discontinuities<br />

(shocks),<br />

no covergence in normerr ∞ after shock <strong>for</strong>mation.<br />

✸<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

In this case the upwind numerical flux (8.3.28) agrees with the Godunov flux (8.3.37), see Rem. 8.3.38<br />

and<br />

F uw (u(x j ,t),u(x j+1 ,t)) = f(u(x j ),t) , j ∈ Z .<br />

(<br />

⃗τFuw (t) ) j = f(u(x j,t))−f(u(x j+1/2 ,t))<br />

= f ′ (u(x j+1/2 ,t))(u(x j ,t)−u(x j+1/2 ,t))+O(|u(x j ,t)−u(x j+1/2 ,t)| 2 )<br />

= −f ′ (u(x j+1/2 ,t)) ∂u<br />

∂x (x j+1/2 ,t)1 2 h+O(h2 ) <strong>for</strong>h → 0 ,<br />

by Taylor expansion off andu.<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Best we get:<br />

merely first order algebraic convergenceO(h)<br />

This means that the upwind/Godunov numerical flux is (only) first order consistent.<br />

Heuristic explanation <strong>for</strong> limited order:<br />

u = u(x,t) ˆ= smooth entropy solution of Cauchy problem<br />

∂u<br />

∂t + ∂<br />

∂x f(u) = 0 in R×]0,T[ , u(x,0) = u 0(x) , x ∈ R . (8.2.9)<br />

We study the so-called consistency error of the numerical fluxF = F(v,w)<br />

(⃗τ F (t)) j = F(u(x j ),u(x j+1 ,t))−f(u(x j+1/2 ,t)) ,j ∈ Z ,<br />

which measures the deviation of the approximate flux and the true flux, when the approximate solution<br />

agreed with the exact solution at the nodes of the mesh.<br />

What we are interested in<br />

where an equidistant spatial mesh is assumed.<br />

Terminology:<br />

behavior of(⃗τ F (t)) j as mesh widthh → 0,<br />

max<br />

j∈Z (⃗τ F(t)) j = O(h q ) <strong>for</strong>h → 0 ↔ numerical flux consistent of orderq ∈ N . (8.4.34)<br />

Rule of thumb:<br />

Order of consistency of numerical flux function limits (algebraic) order of convergence<br />

of (semi-discrete and fully discrete) finite volume schemes.<br />

8.4<br />

p. 949<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

8.4<br />

p. 950<br />

Example 8.4.36 (Consistency error of Lax-Friedrichs numerical flux).<br />

Assumption:<br />

smooth flux function<br />

Recall: The (local) Lax-Friedrichs numerical flux<br />

F LF (v,w) = 2 1(f(v)+f(w))− 2<br />

1 max<br />

min{v,w}≤u≤max{v,w} |f′ (u)|(w−v) , (8.3.26)<br />

is composed of the central flux and a<br />

diffusive flux.<br />

We examine the consistency error <strong>for</strong> both parts separately, using Taylor expansion<br />

➊<br />

central flux:<br />

1<br />

2 (f(u(x j,t))+f(u(x j+1 ,t)))−f(u(x j+1/2 ,t))<br />

= 1 2 f′ (u(x j+1/2 ,t))(u(x j ,t)−u(x j+1/2 ,t)+u(x j+1 ,t)−u(x j+1/2 ,t))+O(h 2 ) (8.4.37)<br />

= 2 1f′ (u(x j+1/2 ,t)) (∂u<br />

∂x (x j+1/2 ,t)(−1 2 h+ 1 2 h)+O(h2 ) ) +O(h 2 )<br />

= O(h 2 ) <strong>for</strong>h → 0 .<br />

➣<br />

The central flux is second order consistent.<br />

✸<br />

8.4<br />

p. 95<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

8.4<br />

p. 95


However, due to instability the central flux is useless, see Sect. 8.3.3.1.<br />

➋<br />

diffusive flux part:<br />

u(x j+1 ,t)−u(x j ,t) = ∂u<br />

∂x (x j+1/2 ,t)h+O(h2 ) <strong>for</strong>h → 0 .<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

<strong>for</strong> the same spatial resolution. high-order methods frequently provide more accurate solutions in<br />

the sense of global error norms as first-order methods,<br />

high-order methods often provide better resolution of local features of the solution (shocks, etc.).<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

F LF (u(x j ,t),u(x j+1 ,t))−f(u(x j+1/2 ,t)) = O(h) <strong>for</strong>h → 0 ,<br />

because the consistency error is dominated by the diffusive flux.<br />

The observations made in the above examples are linked to a general fact:<br />

✗<br />

✖<br />

Monotone numerical fluxes (→ Def. 8.3.43) are at most first order consistent.<br />

8.5 Higher-order conservative schemes<br />

✸<br />

✔<br />

✕<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

8.5<br />

p. 953<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

In standard semi-discrete finite volume schemes in conservation <strong>for</strong>m <strong>for</strong> 2-point numerical flux function,<br />

dµ j<br />

dt (t) = −1 ( F(µj (t),µ<br />

h j+1 (t))−F(µ j−1 (t),µ j (t)) ) , j ∈ Z , (8.3.12)<br />

the numerical flux function is evaluated <strong>for</strong> the cell averages µ j , which can be read as approximate<br />

values of a projection of the exact solution onto piecewise constant functions (on dual cells)<br />

By Taylor expansion we find <strong>for</strong>u ∈ C 1<br />

x ∫j+1/2<br />

µ j (t) ≈ 1 u(x,t)dx . (8.3.5)<br />

h<br />

x j−1/2<br />

x ∫j+1/2<br />

u(x j+1/2 ,t)− 1 u(x,t)dx = O(h) <strong>for</strong>h → 0 ,<br />

h<br />

x j−1/2<br />

h<br />

u<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

8.5<br />

p. 95<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

OPTIONAL SECTION<br />

and, unless some lucky cancellation occurs as in<br />

the case of the central flux, see Ex. 8.4.36, this<br />

does not allow more than first order consistency.<br />

O(h)<br />

µ j<br />

O(h)<br />

Formally, high-order conservative finite volume methods are distinguished by numerical flux functions<br />

that are consistent of order≥ 2, see (8.4.34).<br />

However, solutions of (systems of) conservation laws will usually not even be continuous (because of<br />

shocks emerging even in the case of smooth u 0 , see (8.2.15)), let alone smooth, so that the <strong>for</strong>mal<br />

order of consistency may not have any bearing <strong>for</strong> the (rate of) convergence observed <strong>for</strong> the method<br />

<strong>for</strong> a concrete Cauchy problem.<br />

There<strong>for</strong>e in the field of numerics of conservation laws “high-order” is desired not so much <strong>for</strong> the<br />

promise of higher rates of convergence, but <strong>for</strong> the following advantages:<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

8.5<br />

p. 954<br />

8.5.1 Piecewise linear reconstruction<br />

x j x<br />

Fig. 308x<br />

j+1<br />

Idea: Plug “better” approximations of u(x j±1/2 ,t) into numerical flux function in<br />

(8.3.12)<br />

dµ j<br />

dt (t) = −1 ( F(ν<br />

+<br />

h j (t),νj+1 − (t))−F(ν+ j−1 (t),ν− j (t))) , j ∈ Z , (8.5.1)<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

where ν j ± are obtained by piecewise linear reconstruction from the (dual) cell values 8.5<br />

µ j .<br />

p. 95<br />

DRAFT


ν − j (t) := µ j(t)− 1 2 hσ j(t) ,<br />

ν + j (t) := µ j(t)+ 1 2 hσ j(t) ,<br />

with suitable slopesσ j (t) = σ(⃗µ(t)).<br />

j ∈ Z , (8.5.2)<br />

mu0<br />

ν − j<br />

ν + j−1<br />

µ j<br />

ν j<br />

+ µ j+1<br />

ν − j+1<br />

x j−1 x j x j+1<br />

Fig. 309<br />

Analogy: piecewise cubic Hermite interpolation with reconstructed slopes, discussed in the context<br />

of shape preserving interpolation in [18, Sect. 3.6.2]. However, we do not aim <strong>for</strong> smooth functions<br />

now.<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

13 odefun = @(t,mu) (-1/h*fluxdiff(h,mu,F,slopes));<br />

14 % timestepping by explicity Runge-Kutta method of order 5<br />

15 options = odeset(’abstol’,1E-8,’reltol’,1E-6,’stats’,’on’);<br />

16 [t,MU] = ode45(odefun,[0 T],mu0,options);<br />

17 % Graphical output<br />

18 [X,T] = meshgrid(x,t);<br />

19 f i g u r e ; s u r f(X,T,MU/h); colormap(copper);<br />

20 x l a b e l (’{\bf x}’,’fontsize’,14);<br />

21 y l a b e l (’{\bf t}’,’fontsize’,14);<br />

22 z l a b e l (’{\bf u}’,’fontsize’,14);<br />

23 ufinal = MU(end,:)’;<br />

24 end<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Definition 8.5.5 (Linear reconstruction).<br />

Given an (infinite) mesh M := {]x j−1 ,x j [} j∈Z (x j−1 < x j ), a linear reconstruction operator<br />

R M is a mapping<br />

R M : R Z ↦→ {v ∈ L ∞ (R): v linear on]x j−1/2 ,x j+1/2 [ ∀j ∈ Z} ,<br />

taking a sequence ⃗µ ∈ R Z of cell averages to a possibly discontinuous function R M ⃗µ that is<br />

piecewise linear on dual cells.<br />

Linear reconstruction & (8.5.1) ➣ semi-discrete evolution in conservation <strong>for</strong>m, cf. (8.3.11)<br />

For 2-point numerical flux F = F(u,w)<br />

dµ j<br />

(F(ν<br />

dt (t) = −1 + )<br />

h j (t),ν− j+1 (t))−F(ν+ j−1 (t),ν− j (t)) , j ∈ Z . (8.5.6)<br />

Code 8.5.8: Conservative FV with linear reconstruction: ode45 timestepping<br />

1 f u n c t i o n ufinal = highresevl(a,b,N,u0,T,F,slopes)<br />

2 % finite volume discrete evolution in conservation <strong>for</strong>m with linear<br />

3 % reconstruction, see (8.5.6)<br />

4 % Cauchy problem over time [0,T] restricted to finite interval [a,b],<br />

5 % equidistant mesh with meshwidth N cells, meshwidth h := b−a /N.<br />

6 % 2-point numerical flux function F = F(v,w) passed in handle F<br />

7 % 3-point slope recostruction rule passed as handle slopes = @(v,u,w) ...<br />

8 % (Note: no division by h must be done in slope computation)<br />

9 % returns cell averages <strong>for</strong> approximate solution at final time in a row vector<br />

10 h = (b-a)/N; x = a+0.5*h:h:b-0.5*h; % cell centers<br />

11 mu0 = h*u0(x)’; % vector of initial cell averages (column vector)<br />

12 % right hand side function <strong>for</strong> MATLAB ode solvers<br />

8.5<br />

p. 957<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

8.5<br />

p. 958<br />

Code 8.5.10: Operator L h <strong>for</strong> spatial semidiscretization with conservative FV with linear reconstruction<br />

and 2-point numerical flux<br />

1 f u n c t i o n fd = fluxdiff(h,mu,F,slopes)<br />

2 % MATLAB function that realizes the right hand side operator L h <strong>for</strong> the ODE<br />

3 % (8.4.1) arising from conservative finite volume semidiscretization of the<br />

4 % Cauchy problem <strong>for</strong> a 1D scalar conservation law (8.2.9).<br />

5 % h: meshwidth of equidistant spatial grid<br />

6 % mu: (finite) vector ⃗µ of cell averages<br />

7 % F: handle to 2-point numerical flux function F = F(v,w)<br />

8 % slope: handle to slope function σ j = slopes(µ j−1 ,µ j ,µ j+1 )<br />

9 n = l e n g t h(mu); sigma = zeros(n,1); fd = zeros(n,1);<br />

10 % Computation of slopes σ j , uses µ 0 = µ 1 ,<br />

11 % m N+1 = µ N , which amounts to constant extension of state beyond domain of<br />

12 % influence [a,b] of non-constant intial data.<br />

13 sigma(1) = slopes(mu(1),mu(1),mu(2));<br />

14 f o r j=2:n-1, sigma(j) = slopes(mu(j-1),mu(j),mu(j+1)); end<br />

15 sigma(n) = slopes(mu(n-1),mu(n),mu(n));<br />

16 % Compute linear reconstruction at endpoints of dual cells<br />

17 nup = mu+0.5*sigma; % ν j + at right endpoint<br />

18 num = mu-0.5*sigma; % nu − j at left endpoint<br />

19 % Also here: constant continuation of data outside [a,b] !<br />

20 fd(1) = F(nup(1),num(2)) - F(mu(1),num(1));<br />

21 f o r j=2:n-1<br />

22 fd(j) = F(nup(j),num(j+1)) - F(nup(j-1),num(j)); % see (8.5.6)<br />

23 end<br />

24 fd(n) = F(nup(n),mu(n)) - F(nup(n-1),num(n));<br />

25 end<br />

“Natural” choice: central slope (averaged slope)<br />

σ j (t) = 1 ( µj+1 (t)−µ j (t)<br />

+ µ )<br />

j(t)−µ j−1 (t)<br />

= 1 µ j+1 (t)−µ j−1 (t)<br />

. (8.5.11)<br />

2 h h 2 h<br />

8.5<br />

p. 95<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

8.5<br />

p. 96


t<br />

By Taylor expansion: <strong>for</strong> u ∈ C 2 (that is, u sufficiently smooth), central slope (8.5.11), ν ± j according<br />

to (8.5.2)<br />

|ν − j (t)−u(x j−1/2 ,t)|,|ν+ j (t)−u(x j+1/2 ,t)| = O(h2 ) .<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Example 8.5.13 (Linear reconstruction with central slope).<br />

Cauchy problem of Ex. 8.3.19:<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Example 8.5.12 (Convergence of FV with linear reconstruction).<br />

Cauchy problem <strong>for</strong> Burgers equation (8.1.16) (flux function f(u) = 1 2 u2 ) from Ex. 8.2.38 with<br />

C 1 bump initial data (BUMP)<br />

Equidistant spatial mesh with meshwidthh =<br />

Linear reconstruction with central slope (8.5.11)<br />

Godunov numerical flux (8.3.37):<br />

F = F GD<br />

2n-order Runge-Kutta timestepping (method of Heun), timestepτ = 0.5h (“CFL = 0.5”)<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

1<br />

0.8<br />

Cauchy problem <strong>for</strong> Burgers equation (8.1.16) (flux functionf(u) = 1 2 u2 ) from Ex. 8.2.38 (“box”<br />

intial data)<br />

Equidistant spatial mesh with meshwidthh =<br />

Linear reconstruction with central slope (8.5.11)<br />

Godunov numerical flux (8.3.37):<br />

F = F GD<br />

timestepping based on adaptive Runge-Kutta method ode45 of MATLAB<br />

(opts = odeset(’abstol’,1E-7,’reltol’,1E-6);).<br />

h = 0.066667, t=1.002437<br />

finite volume solution<br />

exact solution<br />

1<br />

0.8<br />

h = 0.066667, t=2.002624<br />

finite volume solution<br />

exact solution<br />

1<br />

0.8<br />

h = 0.066667, t=3.001343<br />

finite volume solution<br />

exact solution<br />

1<br />

0.8<br />

h = 0.066667, t=4.000000<br />

finite volume solution<br />

exact solution<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

0.6<br />

0.6<br />

0.6<br />

0.6<br />

Monitored: ApproximateL 1 - andL ∞ -norms of error at final timeT = 0.3 (exact solution still smooth<br />

at this time, see Ex. 8.4.30)<br />

8.5<br />

p. 961<br />

0.4<br />

0.2<br />

0<br />

−0.5 0 0.5 1 1.5 2 2.5 3 3.5<br />

0.4<br />

0.2<br />

0<br />

−0.5 0 0.5 1 1.5 2 2.5 3 3.5<br />

0.4<br />

0.2<br />

0<br />

−0.5 0 0.5 1 1.5 2 2.5 3 3.5<br />

0.4<br />

0.2<br />

Fig. 311<br />

0<br />

−0.5 0 0.5 1 1.5 2 2.5 3 3.5<br />

8.5<br />

p. 96<br />

1<br />

0.8<br />

Burgers equation, BUMP initial data<br />

t = 0<br />

t=0.1<br />

t=0.2<br />

t=0.3<br />

✁ “exact solution”<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

u(t,x)<br />

1<br />

0.8<br />

0.6<br />

0.4<br />

4<br />

3.5<br />

3<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

0.6<br />

0.2<br />

0<br />

2.5<br />

u<br />

0.4<br />

0.2<br />

0<br />

−0.5 0 0.5<br />

x<br />

1 1.5<br />

Fig. 310<br />

computed by means of a high-order finite volume<br />

method (WENO) on a equidistant mesh with 2 14<br />

points., U. Fjordholm (<strong>SAM</strong>)<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

4<br />

3.5<br />

3<br />

2.5<br />

t<br />

2<br />

1.5<br />

1<br />

0.5<br />

0<br />

−0.5<br />

0<br />

0.5<br />

1<br />

x<br />

1.5<br />

2<br />

2.5<br />

3<br />

2<br />

1.5<br />

1<br />

3.5 0.5<br />

0<br />

0 0.5 1 1.5 2 2.5 3<br />

x<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Error plots<br />

Emergence of spurious oscillations in the vicinity of shock (in violation of structural properties of the<br />

exact solution, see (8.2.40).)<br />

Observation: 2nd-order convergence in both norms<br />

Compare: Oscillations occurring in FV schemes relying on central flux, see Ex. 8.3.19.<br />

✸<br />

8.5<br />

p. 962<br />

✸<br />

8.5<br />

p. 96


In Ex. 8.3.19, 7.2.17, the spurious oscillations can be blamed on the unstable central flux/central<br />

finite differences. Maybe, this time the central slope <strong>for</strong>mula is the culprit. Thus, we investigate slope<br />

reconstruction connected with backward and <strong>for</strong>ward difference quotients.<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

It seems to be the very process of linear reconstruction that triggers oscillations near shocks. Theses<br />

oscillations can be traced back to “overshooting” of linear reconstruction at jumps.<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Example 8.5.14 (Linear reconstruction with one-sided slopes).<br />

1.4<br />

Centered slope selection<br />

One-sided slopes <strong>for</strong> use in (8.5.2)<br />

Right slope:<br />

Left slope:<br />

σ j (t) = µ j+1(t)−µ j (t)<br />

h<br />

σ j (t) = µ j(t)−µ j−1 (t)<br />

h<br />

, (8.5.15)<br />

. (8.5.16)<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Slope from central differencing:<br />

σ j = 1<br />

2h (µ j+1 −µ j−1 ) . (8.5.11)<br />

u<br />

1.2<br />

1<br />

0.8<br />

0.6<br />

0.4<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Same setting as in Ex. 8.5.13, with central slope replaced with one-sided slopes.<br />

Left slope:<br />

0.2<br />

0<br />

−0.2<br />

function<br />

averages<br />

reconstruction<br />

−2 −1.5 −1 −0.5 0 0.5 1 1.5 2<br />

x<br />

Fig. 314<br />

8.5<br />

p. 965<br />

8.5<br />

p. 96<br />

1<br />

0.8<br />

h = 0.066667, t=1.001099<br />

finite volume solution<br />

exact solution<br />

1<br />

0.8<br />

h = 0.066667, t=2.001189<br />

finite volume solution<br />

exact solution<br />

1<br />

0.8<br />

h = 0.066667, t=3.000629<br />

finite volume solution<br />

exact solution<br />

1<br />

0.8<br />

h = 0.066667, t=4.000000<br />

finite volume solution<br />

exact solution<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

1.6<br />

Right slope selection<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

0.6<br />

0.6<br />

0.6<br />

0.6<br />

1.4<br />

0.4<br />

0.4<br />

0.4<br />

0.4<br />

1.2<br />

0.2<br />

0<br />

−0.5 0 0.5 1 1.5 2 2.5 3 3.5<br />

Right slope:<br />

0.2<br />

0<br />

−0.5 0 0.5 1 1.5 2 2.5 3 3.5<br />

0.2<br />

0<br />

−0.5 0 0.5 1 1.5 2 2.5 3 3.5<br />

0.2<br />

Fig. 312<br />

0<br />

−0.5 0 0.5 1 1.5 2 2.5 3 3.5<br />

Slope from <strong>for</strong>ward differencing:<br />

σ j = 1 h (µ j+1 −µ j ) . (8.5.15)<br />

u<br />

1<br />

0.8<br />

0.6<br />

1<br />

0.8<br />

0.6<br />

0.4<br />

h = 0.066667, t=1.002046<br />

finite volume solution<br />

exact solution<br />

1<br />

0.8<br />

0.6<br />

0.4<br />

h = 0.066667, t=2.000722<br />

finite volume solution<br />

exact solution<br />

1<br />

0.8<br />

0.6<br />

0.4<br />

h = 0.066667, t=3.000618<br />

finite volume solution<br />

exact solution<br />

1<br />

0.8<br />

0.6<br />

0.4<br />

h = 0.066667, t=4.000000<br />

finite volume solution<br />

exact solution<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

0.4<br />

0.2<br />

0<br />

−0.2<br />

function<br />

averages<br />

reconstruction<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

0.2<br />

0<br />

−0.5 0 0.5 1 1.5 2 2.5 3 3.5<br />

0.2<br />

0<br />

−0.5 0 0.5 1 1.5 2 2.5 3 3.5<br />

0.2<br />

0<br />

−0.5 0 0.5 1 1.5 2 2.5 3 3.5<br />

0.2<br />

Fig. 313<br />

0<br />

−0.5 0 0.5 1 1.5 2 2.5 3 3.5<br />

−2 −1.5 −1 −0.5 0 0.5 1 1.5 2<br />

x<br />

Fig. 315<br />

Observation: spurious oscillations/overshoots, massive and global <strong>for</strong> (8.5.15), moderate close to<br />

shock <strong>for</strong> (8.5.16).<br />

✸<br />

8.5<br />

p. 966<br />

8.5<br />

p. 96


1.2<br />

Left slope selection<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Related:<br />

shape preserving Hermite interpolation, see [18, Sect. 3.6.2], achieved by using<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

1<br />

Slope from backward differencing:<br />

0.8<br />

0.6<br />

zero slope, in case of local slopes with opposite sign, see [18, (3.6.7)],<br />

harmonic averaging of local slopes, see [18, (3.6.9)].<br />

σ j = 1 h (µ j −µ j−1 ) . (8.5.16)<br />

u<br />

0.4<br />

0.2<br />

0<br />

−0.2<br />

−0.4<br />

function<br />

averages<br />

reconstruction<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Remark 8.5.22 (Consequence of monotonicity preservation).<br />

A monotonicity preserving linear reconstruction operatorR M (→ Def. 8.5.18)<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

−2 −1.5 −1 −0.5 0 0.5 1 1.5 2<br />

x<br />

Fig. 316<br />

• respects the range of cell averages<br />

8.5.2 Slope limiting<br />

min{µ k µ k+1 ,...,µ m } ≤ (R⃗µ)(x) ≤ max{µ k ,µ k+1 ,...,µ m } , x k < x < x m . (8.5.23)<br />

↔ “range preservation” by entropy solutions, see Thm. 8.2.39.<br />

• does not allow the creation of new extrema<br />

8.5<br />

p. 969<br />

♯{extrema of R M ⃗µ} ≤ ♯{extrema of ⃗µ} . (8.5.24)<br />

↔ preservation of number of extrema in entropy solution, Sect. 8.2.7.<br />

8.5<br />

p. 97<br />

Guarantee <strong>for</strong> suppression of “overshoots” (→ Figs. 314, 315, 316)<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

△<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

local monotonicity preservation of linear reconstruction<br />

Definition 8.5.18 (Monotonicity preserving linear interpolation).<br />

An linear reconstruction operatorR M (→ Def. 8.5.5) is monotonicity preserving, if<br />

(R M ⃗µ)(x j ) = µ j ∧ µ j ≤ µ j+1 ⇒ R M ⃗µ non-decreasing in ]x j ,x j+1 [ ,<br />

µ j ≥ µ j+1 ⇒ R M ⃗µ non-increasing in ]x j ,x j+1 [ .<br />

Monotonicity preserving linear<br />

reconstruction:<br />

constant at plateaus<br />

constant at (local) extrema<br />

x j−1 x j x j+1 x j+2 Fig. 317<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

8.5<br />

p. 970<br />

Remark 8.5.28 (Linearity and monotonicity preservation).<br />

The linear reconstruction operators (→ Def. 8.5.5) based on the slope <strong>for</strong>mulas (8.5.11) (central<br />

slope), (8.5.15) (<strong>for</strong>ward slope), (8.5.16) (backward slope) are linear in the sense that<br />

✬<br />

✫<br />

R M (α⃗µ+β⃗ν) = αR M (⃗µ)+βR M ⃗ν) ∀⃗µ,⃗ν ∈ R Z , α,β ∈ R . (8.5.29)<br />

Lemma 8.5.30 (Linear monotonicity preserving reconstruction trivial).<br />

Every linear, monotonicity preserving (→ Def. 8.5.18) linear reconstruction yields piecewise<br />

constant functions.<br />

Proof. Define⃗ǫ k ∈ R Z ,k ∈ Z, by<br />

ǫ k j = {<br />

1 <strong>for</strong>k = j ,<br />

0 else.<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

✩<br />

DRAFT<br />

✪<br />

8.5<br />

p. 97


The⃗ǫ k <strong>for</strong>m a basis of R Z . Thus, { due to linearity, R M is fixed by its action on the basis vectors⃗ǫ k<br />

and its image is spanned by R M ⃗ǫ k} k∈Z .<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

✬<br />

Lemma 8.5.34 (Monotonicity preservation of minmod reconstruction).<br />

Minmod reconstruction (→ Def. 8.5.33) is monotonicity preserving (→ Def. 8.5.18)<br />

✩<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

However, monotonicity preservation entails thatR M ⃗ǫ k is piecewise constant, see Fig. 317.<br />

✷<br />

✫<br />

✪<br />

Necessary (<strong>for</strong> monotonicity preservation):<br />

Non-linear linear reconstruction<br />

!?<br />

△<br />

Proof. w.l.o.g. assumeµ j+1 ≥ µ j ⇒ σ j ≥ 0 ∧σ j+1 ≥ 0<br />

⇒ µ j + 1 2 hσ j ≤ 1 2 (µ j +µ j+1 ) ≤ µ j+1 − 1 2 hσ j+1<br />

✷<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Terminology: effect ofminmod-function inR mm : slope limiting: minmod = slope limiter<br />

Example 8.5.35 (Linear reconstruction with minmod limiter).<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

What is a non-linear linear reconstruction in the context of high-order finite volume methods <strong>for</strong> 1D<br />

conservation laws?<br />

Same setting as in Ex. 8.5.13, Cauchy problem as in Ex. 8.3.19:<br />

A simple consideration, see Fig. 317<br />

µ j−1 ≤ µ j and µ j ≥ mu j+1 ⇒ R M ⃗µ ≡ const on ]x j−1/2 ,x j+1/2 [ , (8.5.32)<br />

8.5<br />

p. 973<br />

Cauchy problem <strong>for</strong> Burgers equation (8.1.16) (flux functionf(u) = 1 2 u2 ) from Ex. 8.2.38 (“box”<br />

intial data)<br />

Equidistant spatial mesh with meshwidthh = 1<br />

15<br />

8.5<br />

p. 97<br />

<strong>for</strong> any monotonicity preserving (→ Def. 8.5.18) linear reconstruction operatorR M (→ Def. 8.5.5).<br />

➣ monotonicity preserving linear reconstructionR M ⃗µ must be constant at local extrema of ⃗µ!<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Linear reconstruction with minmod limited slope (→ Def. 8.5.33)<br />

( µj −µ j−1<br />

σ j := minmod , µ )<br />

j+1 −µ j<br />

.<br />

h h<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Definition 8.5.33 (Minmod reconstruction).<br />

The minmod reconstruction R mm is a piecewise<br />

linear reconstruction (→ Def. 8.5.5) defined<br />

by<br />

(R mm ⃗µ)(x) = µ j +σ j (x−x j )<br />

<strong>for</strong> x j−1/2 < x < x j+1/2 ,j ∈ Z ,<br />

(<br />

µj+1 −µ j<br />

σ j := minmod , µ )<br />

j −µ j−1<br />

,<br />

x j+1 −x j x j −x j−1<br />

⎧<br />

⎪⎨ v ,vw > 0, |v| < |w| ,<br />

minmod(v,w) := w ,vw > 0, |w| < |v| ,<br />

⎪⎩<br />

0 ,vw ≤ 0 .<br />

u<br />

Minmod monotonicity preserving linear interpolation<br />

1<br />

0.8<br />

0.6<br />

0.4<br />

0.2<br />

µ j<br />

0 const. reconst.<br />

reconstruction<br />

−2 −1.5 −1 −0.5 0 0.5 1 1.5 2<br />

x<br />

Fig. 318<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

1<br />

0.8<br />

0.6<br />

0.4<br />

0.2<br />

Godunov numerical flux (8.3.37):<br />

F = F GD<br />

timestepping based on adaptive Runge-Kutta method ode45 of MATLAB<br />

(opts = odeset(’abstol’,1E-7,’reltol’,1E-6);).<br />

h = 0.066667, t=1.003384<br />

finite volume solution<br />

exact solution<br />

0<br />

−0.5 0 0.5 1 1.5 2 2.5 3 3.5<br />

1<br />

0.8<br />

0.6<br />

0.4<br />

0.2<br />

h = 0.066667, t=2.001321<br />

finite volume solution<br />

exact solution<br />

0<br />

−0.5 0 0.5 1 1.5 2 2.5 3 3.5<br />

1<br />

0.8<br />

0.6<br />

0.4<br />

0.2<br />

h = 0.066667, t=3.000543<br />

finite volume solution<br />

exact solution<br />

0<br />

−0.5 0 0.5 1 1.5 2 2.5 3 3.5<br />

1<br />

0.8<br />

0.6<br />

0.4<br />

0.2<br />

h = 0.066667, t=4.000000<br />

finite volume solution<br />

exact solution<br />

Fig. 319<br />

0<br />

−0.5 0 0.5 1 1.5 2 2.5 3 3.5<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

8.5<br />

p. 974<br />

8.5<br />

p. 97


t<br />

1<br />

0.8<br />

4<br />

3.5<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

1<br />

0.8<br />

Burgers equation (transsonic rarefaction), N = 60<br />

u<br />

low order: Godunov<br />

high order: minmod<br />

1<br />

0.8<br />

Burgers equation (transsonic rarefaction), N = 60<br />

u<br />

low order: Godunov<br />

high order: minmod<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

u(t,x)<br />

0.6<br />

0.4<br />

0.2<br />

0<br />

4<br />

3.5<br />

3<br />

3<br />

2.5<br />

2<br />

1.5<br />

µ j<br />

(0.50)<br />

0.6<br />

0.4<br />

0.2<br />

0<br />

−0.2<br />

µ j<br />

(2.00)<br />

0.6<br />

0.4<br />

0.2<br />

0<br />

−0.2<br />

2.5<br />

−0.4<br />

−0.4<br />

2<br />

1.5<br />

1<br />

0.5<br />

t<br />

0<br />

−0.5<br />

0<br />

0.5<br />

1<br />

x<br />

1.5<br />

2<br />

2.5<br />

3<br />

3.5<br />

1<br />

0.5<br />

0<br />

0 0.5 1 1.5 2 2.5 3<br />

x<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

−0.6<br />

−0.8<br />

−1<br />

−2.5 −2 −1.5 −1 −0.5<br />

x<br />

0 0.5 1 1.5<br />

Fig. 320<br />

−0.6<br />

−0.8<br />

−1<br />

−2.5 −2 −1.5 −1 −0.5<br />

x<br />

0 0.5 1 1.5<br />

Fig. 321<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Observation: spurious oscillations successfully suppressed!<br />

Observation: Better resolution of rarefaction fan compared with the conservative finite volume method<br />

based on of Godunov numerical flux without linear reconstruction. Good resolution of shock.<br />

✸<br />

This improved resolution is the main rationale <strong>for</strong> the use of piecewise linear reconstruction.<br />

Example 8.5.36 (Improved resolution by limited linear reconstruction).<br />

Same setting as in Ex. 8.3.30: Cauchy problem <strong>for</strong> Burgers equation (8.1.16) (flux function<br />

f(u) = 1 2 u2 ) from Ex. 8.2.38 (shifted “box” intial data, u 0 (x) = −1 <strong>for</strong> x ∉ [0,1], u 0 (x) = 1 <strong>for</strong><br />

x ∈ [0,1])<br />

Equidistant spatial mesh with meshwidthh = 1<br />

15<br />

“High-order” method based on linear reconstruction with minmod limited slope (→ Def. 8.5.33)<br />

( µj −µ j−1<br />

σ j := minmod , µ )<br />

j+1 −µ j<br />

.<br />

h h<br />

Godunov numerical flux (8.3.37):<br />

F = F GD<br />

timestepping based on adaptive Runge-Kutta method ode45 of MATLAB<br />

(opts = odeset(’abstol’,1E-10,’reltol’,1E-8);).<br />

8.5<br />

p. 977<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

8.5.3 MUSCL scheme<br />

= Monotone Upwind Scheme <strong>for</strong> Conservation Laws<br />

Case of equidistant spatial mesh with meshwidthh > 0:<br />

Conservative finite volume spatial discretization (8.5.1) with monotone consistent 2-point flux, e.g.,<br />

Godunov numerical flux (8.3.37)<br />

Piecewise linear reconstruction (→ Def. 8.5.5) withminmod slope limiting (→ Def. 8.5.33):<br />

ν ± j := µ j ± 1 2 minmod( µ j+1 −µ j ,µ j −µ j−1<br />

) . (8.5.39)<br />

✸<br />

8.5<br />

p. 97<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

2nd-order Runge-Kutta timestepping <strong>for</strong> (8.5.1): method of Heun, cf. (8.4.6):<br />

If the right hand side of (8.5.1) is abbreviated by<br />

8.5<br />

p. 978<br />

L h (⃗µ) := − 1 h( F(ν<br />

+<br />

j (t),ν − j+1 (t))−F(ν+ j−1 (t),ν− j (t))) ,<br />

8.5<br />

p. 98


then the fully discrete scheme (uni<strong>for</strong>m timestepτ > 0) reads (8.5.1)<br />

⃗κ := ⃗µ (k) + 1 2 τL h(⃗µ (k) ) ,<br />

⃗µ (k+1) := ⃗µ (k) +τhL h (⃗κ) .<br />

Example 8.5.41 (Adequacy of 2nd-order timestepping).<br />

(8.5.40)<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Observation: 2nd-order Runge-Kutta method (8.5.40) provides same accuracy as “overkill integration”<br />

by means of ode45 with tigth tolerances.<br />

➣<br />

For the sake of efficiency balance order of spatial and temporal discretizations and use Heun<br />

timestepping.<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair Example 8.5.42 (Convergence of MUSCL scheme).<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

Same setting as in Ex. 8.3.30: Cauchy problem <strong>for</strong> Burgers equation (8.1.16) (flux function A. Chernov<br />

f(u) = 1 2 u2 DRAFT<br />

) from Ex. 8.2.38 (shifted “box” intial data, u 0 (x) = −1 <strong>for</strong> x ∉ [0,1], u 0 (x) = 1 <strong>for</strong><br />

x ∈ [0,1])<br />

<strong>Numerical</strong> experiments of Ex. 8.4.30 repeated <strong>for</strong><br />

Equidistant spatial mesh with meshwidthh = 15<br />

1<br />

conservative finite volume discretization with Godunov numerical flux andminmod-limited linear<br />

Linear reconstruction with minmod limited slope (→ Def. 8.5.33)<br />

( µj −µ j−1<br />

σ j := minmod , µ )<br />

reconstruction, see Ex. 8.5.35 (ode45 timestepping),<br />

j+1 −µ j<br />

.<br />

MUSCL scheme as introduced above with fixed timestepτ = 0.5h.<br />

h h<br />

8.5<br />

Godunov numerical flux (8.3.37): F = F Monitored: “discrete” error norms (8.4.31), (8.4.32)<br />

GD<br />

p. 981<br />

✸<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

8.5<br />

p. 98<br />

Two options <strong>for</strong> timestepping<br />

1. timestepping based on adaptive Runge-Kutta method ode45 of MATLAB<br />

(opts = odeset(’abstol’,1E-10,’reltol’,1E-8);).<br />

2. Heun timestepping (8.5.40) with uni<strong>for</strong>m timestepτ = h<br />

Burgers equation (transsonic rarefaction), N = 60<br />

Burgers equation (transsonic rarefaction), N = 60<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

L 1 −norm of error at t=0.3<br />

10 −2<br />

L ∞ −norm of error at t=0.3<br />

10 −1<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

µ j<br />

(0.50)<br />

1<br />

0.8<br />

0.6<br />

0.4<br />

0.2<br />

0<br />

u<br />

ode45, 157 timesteps<br />

Heun timestepping, cfl = 1.0<br />

µ j<br />

(2.00)<br />

1<br />

0.8<br />

0.6<br />

0.4<br />

0.2<br />

0<br />

u<br />

ode45, 725 timesteps<br />

Heun timestepping, cfl = 1.0<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

10 −3<br />

10 −1 meshwidth h<br />

BUMP initial data<br />

WEDGE initial data<br />

BOX initial data<br />

O(h 3/2 )<br />

10 −1<br />

10 −2<br />

Fig. 324<br />

10 0 meshwidth h<br />

10 −2<br />

10 −1<br />

BUMP initial data<br />

WEDGE initial data<br />

BOX initial data<br />

O(h)<br />

10 −2<br />

Fig. 325<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

−0.2<br />

−0.2<br />

−0.4<br />

−0.4<br />

−0.6<br />

−0.6<br />

−0.8<br />

−0.8<br />

−1<br />

−1<br />

−2.5 −2 −1.5 −1 −0.5 0 0.5 1 1.5<br />

x<br />

Fig. 322<br />

−2.5 −2 −1.5 −1 −0.5 0 0.5 1 1.5<br />

x<br />

Fig. 323<br />

8.5<br />

p. 982<br />

8.5<br />

p. 98


<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

L 1 −norm of error at t=4<br />

10 −1 meshwidth h<br />

10 −2<br />

L ∞ −norm of error at t=4<br />

10 0<br />

10 −1<br />

meshwidth h<br />

9<br />

Finite Elements <strong>for</strong> the Stokes<br />

Equations<br />

10 −3<br />

BUMP initial data<br />

WEDGE initial data<br />

BOX initial data<br />

O(h)<br />

10 −1<br />

10 −2<br />

Fig. 326<br />

10 −2<br />

10 −1<br />

BUMP initial data<br />

WEDGE initial data<br />

BOX initial data<br />

10 −2<br />

Fig. 327<br />

Observation: 2nd-order Heun method produces solutions whose convergence and accuracy matches<br />

those of solutions obtained by highly accurate high-order Runge-Kutta timestepping.<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

OPTIONAL CHAPTER<br />

Dependencies:<br />

• Modelling of fluid flow Sect. 7.1.1<br />

• Variational calculus <strong>for</strong> equilibrium problems, entire Ch. 2<br />

• Basic concepts and algorithms <strong>for</strong> finite elements, Sects. 3.1, 3.3, 3.4<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

• Finite differences Sect. 4.1<br />

➣<br />

• MATLAB FEM library [6], Sect. 3.5<br />

8.6 Outlook: systems of conservation laws<br />

✸<br />

8.6<br />

p. 985<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

This chapter has a strong modelling component, similar to Ch. 1.<br />

9.0<br />

p. 98<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Supplementary and further reading:<br />

Books (chapters) dealing with the (mathematical foundations of) discretization of the Stokes boundary<br />

value problem:<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

[15, Ch. 12]: Concise introduction to the Stokes PDEs and Galerkin discretization. Modelling is not<br />

discussed.<br />

[5, Ch. 12]: <strong>Numerical</strong> analysis of variational saddle point problems<br />

[3, III.§5]: Concise presentation of principles of finite element discretization of the Stokes problem<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

9.1 Viscous fluid flow<br />

8.6<br />

p. 986<br />

9.1<br />

p. 98


Task:<br />

simulation of stationary fluid flow<br />

computation of the velocityv = v(x) of a fluid moving in a containerΩ ⊂ R d ,d = 2,3, under<br />

the influence of an external <strong>for</strong>ce fieldf : Ω ↦→ R d .<br />

(d = 2? ↔ translational symmetry ➥ dimensionally reduced model)<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

In this case acceptably accurate modelling can neglect inertia <strong>for</strong>ces ➣ creeping flow<br />

Viscous fluids “stick to the walls of the container”<br />

no-slip boundary conditions: v = 0 on ∂Ω . (9.1.5)<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

✎ notation: as be<strong>for</strong>e, bold typeface <strong>for</strong> vector valued functions<br />

Recall: description of fluid motion through a velocity field → Sect. 7.1.1<br />

We restrict ourselves to incompressible fluids → Def. 7.1.7<br />

Thm. 7.1.12 Constraint divv = 0 . (9.1.2)<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

configuration space <strong>for</strong> viscous incompressible fluid<br />

{<br />

v : Ω ↦→ R<br />

V :=<br />

d }<br />

continuous,<br />

. (9.1.6)<br />

divv = 0 , v |∂Ω = 0<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

configuration space <strong>for</strong> incompressible fluid<br />

{<br />

V := v : Ω ↦→ R d }<br />

continuous , divv = 0 . (9.1.3)<br />

9.1<br />

p. 989<br />

We appeal to an extremal principle to derive governing equations <strong>for</strong> incompressible creeping flow:<br />

the state of the system renders a physical quantity minimal.<br />

For the elastic string (→ Sect. 1.2), taut membrane (→ Sect. 2.1.1), electrostatic field (→ Sect. 2.1.2)<br />

this quantity was the total potential energy. For stationary viscous fluid flow, this role is played by the<br />

energy dissipation:<br />

9.1<br />

p. 99<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

energy dissipation = conversion of kinetic energy into internal energy (heat)<br />

(↔ entropy production)<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Flow regimes of an incompressible Newtonian fluid (a fluid, <strong>for</strong> which stress is linearly proportional to<br />

strain) are distinguished by the size of a fundamental non-dimensional quantity, the<br />

Reynolds number<br />

Re := ρVL<br />

µ ,<br />

where (<strong>for</strong>d = 3) ρ ˆ= density ([ρ] = kgm −3 )<br />

V ˆ= mean velocity ([V] = ms −1 )<br />

L ˆ= characteristic length of region of interest ([L] = m)<br />

µ ˆ= dynamic viscosity ([µ] = kgm −1 s −1 )<br />

Reynolds number = ratio of inertia <strong>for</strong>ces:viscous (friction) <strong>for</strong>ces<br />

The Reynolds number becomes small, if<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

AXIOM: energy dissipation functional <strong>for</strong> viscous fluid ([P diss ] = W)<br />

∫<br />

P diss (v) = µ‖curlv(x)‖ 2 dx (9.1.7)<br />

Ω<br />

rotation/curl ˆ= first-order differential operator<br />

⎛<br />

∂v 2<br />

− ∂v ⎞<br />

3<br />

∂x 3 ∂x 2<br />

curlv :=<br />

∂v 3<br />

− ∂v 1<br />

⎜∂x 1 ∂x 3<br />

⎝∂v 1<br />

− ∂v ⎟<br />

2⎠<br />

∂x 2 ∂x 1<br />

<strong>for</strong> d = 3 , curlv := ∂v 1<br />

− ∂v 2<br />

<strong>for</strong><br />

∂x 2 ∂x 1<br />

d = 2 . (9.1.8)<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

• the speed of the flow is very small (slowly flowing fluids), or<br />

• the flow is studied at tiny length scales (micro flows), or<br />

• the fluid is highly viscous (“sticky”).<br />

9.1<br />

p. 990<br />

9.1<br />

p. 99


0<br />

0.1<br />

0.2<br />

0.3<br />

45<br />

40<br />

35<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

To that end we study a related problem in finite dimensional context R n :<br />

x ∗ = argmax x T Ax , (9.1.15)<br />

x T Ax=b T x<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

x 2<br />

0.4<br />

0.5<br />

30<br />

25<br />

with s.p.d. A ∈ R n,n , b ∈ R n . With the trans<strong>for</strong>mationy = A −1/2 x (→ [18, Rem. 5.3.2]) we arrive<br />

at the equivalent maximization problem<br />

0.6<br />

0.7<br />

20<br />

15<br />

y ∗ = argmax ‖y‖ 2 .<br />

‖y‖ 2 =(A −1/2 b) T y<br />

0.8<br />

10<br />

Fig. 328<br />

0.9<br />

5<br />

1<br />

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1<br />

x 1<br />

Fig. 329<br />

“eddy field”,divv = 0<br />

Plot of‖curlv‖ <strong>for</strong> eddy field<br />

curlv = “density of eddies/vortices in flow field”<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

A −1 b<br />

The set {y : ‖y‖<br />

2 = (A −1/2 b) T y} is a sphere through<br />

0 around 1 2 A−1/2 b and we are looking <strong>for</strong> its point farthest<br />

away from 0. By “geometric considerations” this will be the<br />

pointy ∗ = A −1/2 b ➣ x ∗ = A −1 b.<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Thus, in viscous fluid flow the conversion of kinetic energy into heat due to friction presumably happens<br />

in vortical flow patterns (eddies).<br />

9.1<br />

p. 993<br />

Recall: relationship between linear systems of equations and quadratic minimization problems, see<br />

[18, Sect. 5.1.1] and Sect. 2.1.3.<br />

9.1<br />

p. 99<br />

Second law of thermodynamics <strong>for</strong> creeping flow:<br />

Maximization of energy dissipation in flow (9.1.9)<br />

entropy production<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

x ∗ = A −1 b can be obtained as solution of<br />

x ∗ = argmin<br />

x∈R n 1<br />

2 x T Ax−b T x . (9.1.16)<br />

To have faith that this reasoning applies to (9.1.14) as well, the bilinear <strong>for</strong>m (u,v) ↦→ ∫ Ω curlu ·<br />

curlvdx should be positive definite (→ Def. 2.1.25) ➤ see Lemma 9.2.1 below.<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

First law of thermodynamics: conservation of energy/power balance<br />

∫<br />

∫<br />

µ‖curlv(x)‖ 2 dx = f ·vdx . (9.1.10)<br />

Ω<br />

Ω<br />

dissipated energy<br />

energy injected through <strong>for</strong>ces<br />

First equilibrium condition <strong>for</strong> viscous stationary flow:<br />

{∫<br />

}<br />

v ∗ = argmax µ‖curlv(x)‖ 2 dx: v ∈ V , v satisfies (9.1.10)<br />

Ω<br />

ˆ= constrained optimization problem with constraint (9.1.10).<br />

Goal:<br />

Convert (9.1.14) into a “more standard” optimization problem.<br />

(9.1.14)<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

9.1<br />

p. 994<br />

Another issue, of course, is, whether the above arguments remain true <strong>for</strong> (infinite dimensional) function<br />

spaces ➤ theory of variational calculus [30, Ch. 49], not elaborated here.<br />

Second equilibrium condition <strong>for</strong> viscous stationary flow, cf. (2.1.4), (2.1.14):<br />

∫<br />

∫<br />

v ∗ = argmin 1<br />

2 µ‖curlv(x)‖ 2 dx− f ·vdx . (9.1.17)<br />

v∈V Ω<br />

Ω<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

9.2<br />

p. 99


9.2 The Stokes equations<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

ˆ= quadratic minimization problem (→ Def. 2.1.21) on function spaceV.<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

9.2.1 Constrained variational <strong>for</strong>mulation<br />

✬<br />

Lemma 9.2.1 (−∆ = curlcurl−graddiv).<br />

Forv ∈ C 2 (Ω),v |∂Ω = 0, holds<br />

∫ ∫ ∫<br />

‖curlv‖ 2 dx+ |divv| 2 dx = ‖Dv‖ 2 F dx .<br />

Ω Ω Ω<br />

✫<br />

✩<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

✪<br />

Rewrite quadratic <strong>for</strong>m (µ ≡ const)<br />

v = (v 1 ,...,v d ) T :<br />

∫<br />

d∑<br />

µ‖Dv‖ 2 F dx = µ ‖gradv i ‖ 2 dx .<br />

Ω<br />

i=1<br />

By the first Poincaré-Friedrichs inequality of Thm. 2.2.16<br />

∫<br />

‖v‖ 2 L 2 (Ω) ≤ diam(Ω)2 ‖Dv‖ 2 F dx ∀v ∈ V ⊂ (H1 0 (Ω))3 .<br />

Ω<br />

Bilinear <strong>for</strong>mafrom (9.2.4) is positive definite (→ Def. 2.1.25).<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

( ) d ∂vi<br />

✎ notations: Dv := : Ω ↦→ R d,d Jacobian,<br />

∂x j<br />

i,j=1<br />

‖M‖ F ˆ= Frobenius matrix norm (→ [18, Def. 6.5.24])<br />

9.2<br />

p. 997<br />

Remark 9.2.7 (Decoupling of velocity components ?).<br />

Rewrite (9.2.4) in terms of componentsv i of velocity (with <strong>for</strong>ce fieldf = (f 1 ,f 2 ,f 3 ) T ):<br />

(9.2.4) ⇔ argmin<br />

v∈V<br />

3∑ ( ∫<br />

12<br />

i=1<br />

Ω<br />

∫<br />

µ‖gradv i ‖ 2 )<br />

dx− f i v i dx . (9.2.8)<br />

Ω<br />

9.2<br />

p. 99<br />

Proof (of Lemma 9.2.1)<br />

Use the variant of Green’s first <strong>for</strong>mula Thm. 2.4.7<br />

∫ ∫<br />

∂u ∂v<br />

vdx = − udx ∀u,v ∈ C 1 (Ω) , u,v = 0 on∂Ω , (9.2.3)<br />

∂x j ∂x j<br />

Ω Ω<br />

and the fact that different partial derivatives can be interchanged, which implies<br />

∫ ∫<br />

∂u ∂v ∂u ∂v<br />

dx = dx , k,j = 1,...,d .<br />

∂x j ∂x k ∂x k ∂x j<br />

Ω Ω<br />

Then use the definitions ofcurl anddiv.<br />

✷<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Well, three copies of (2.1.14) ?!<br />

NO!<br />

divv = 0 constraint (9.1.2) links components of velocity fieldv.<br />

This constraint in the space V represents the crucial difference compared to minimization problems<br />

(2.1.4), (2.1.14) underlying scalar 2nd-order elliptic variational equations.<br />

As in Sect. 2.2: put (9.2.4) into Hilbert space (more precisely, Sobolev space) framework, where we<br />

have existence and uniqueness of solutions.<br />

△<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

In light of the propertiesdivv = 0,v = 0 on∂Ω, <strong>for</strong> eligible fluid velocity fields, see (9.1.6), we have<br />

the equivalence:<br />

(9.1.17)<br />

Lemma 9.2.1<br />

⇐⇒<br />

v ∗ = argmin<br />

v∈V<br />

∫<br />

1<br />

2 µ‖Dv‖ 2 F dx<br />

Ω<br />

} {{ }<br />

=:a(v,v)<br />

∫<br />

−<br />

f ·vdx . (9.2.4)<br />

Ω<br />

} {{ }<br />

=:l(v)<br />

9.2<br />

p. 998<br />

(9.2.8) offers hint on how to choose suitable Sobolev spaces.<br />

Remember: function spaces <strong>for</strong> a (linear) variational problem are chosen as the largest (Hilbert)<br />

spaces on which the involved bilinear <strong>for</strong>ms and linear <strong>for</strong>ms are still continuous, cf.<br />

(2.2.1), (3.1.2).<br />

appropriate Sobolev space <strong>for</strong> (9.2.4):<br />

(9.2.8), (9.1.5)<br />

H 1 0<br />

{v (div0,Ω) := ∈ (H0 1 }<br />

(Ω))3 : divv = 0<br />

9.2<br />

p. 100


((H 1 0 (Ω))3 ˆ= space of vector fields with components inH 1 0 (Ω), alternative notationH1 0 (Ω)).<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

This remark motivates an approach that removes the constraint from trial and test space (and incorporates<br />

it into the variational <strong>for</strong>mulation).<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

As in Sect. 2.3.1 derive the linear variational problem<br />

v ∈ H 1 0 (div0,Ω): a(v,w) = l(w) ∀w ∈ H1 0 (div0,Ω) ,<br />

from (9.2.8), which reads in concrete terms:<br />

9.2.2 Saddle point problem<br />

}<br />

Seekv ∈ H 1 0<br />

{v (div0,Ω) := ∈ (H0 1(Ω))3 : divv = 0 such that<br />

∫<br />

Ω<br />

∫<br />

gradv i·gradw i dx =<br />

∫<br />

Ω<br />

Ω<br />

∫<br />

Dv : Dwdx =<br />

f i w i dx ∀w ∈ H 1 0 (div0,Ω) , i = 1,2,3 ,<br />

Ω<br />

⇕<br />

f ·wdx ∀w ∈ H 1 0 (div0,Ω) . (9.2.9)<br />

✎ notation: A : B := ∑ a ij b ij <strong>for</strong> matricesA,B ∈ R m,n (“componentwise dot product”).<br />

i,j<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Idea: weak en<strong>for</strong>cement of divergence constraint (9.1.2)<br />

Remark 9.2.20 (Heuristics behind Lagrangian multipliers).<br />

Setting:<br />

through Lagrange multiplier<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

9.2<br />

p. 1001<br />

U,Q ˆ= real Hilbert spaces with inner products(·,·) U ,(·,·) Q ,<br />

J : U ↦→ R convex and differentiable functional,<br />

B : U ↦→ Q linear operator (defining constraint)<br />

9.2<br />

p. 100<br />

For this linear variational problem we verify<br />

• Assumption 5.1.1 from Poincaré-Friedrichs inequality, see above,<br />

• Assumption 5.1.2 <strong>for</strong>f ∈ (L 2 (Ω)) d by Cauchy-Schwarz inequality, see (2.2.15), (2.3.13),<br />

• Assumption 5.1.3, sinceH 1 0 (div0,Ω) is a closed subspace ofH1 (Ω).<br />

Thm. 5.1.4 ➡ existence & uniqueness of solutions of (9.2.9)<br />

Remark 9.2.11 (H 1 0 (div0,Ω)-con<strong>for</strong>ming finite elements).<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Linearly constrained minimization problem<br />

Introduce Lagrangian functional:<br />

L(v,p) := J(v)+(p,Bv) Q<br />

v ∗ = argmin J(v) . (9.2.21)<br />

v∈U,Bv=0<br />

v ∗ = argmin<br />

v∈U<br />

supL(v,p) , (9.2.22)<br />

p∈Q<br />

because, ifBv ≠ 0, the value of the inner supremum will be+∞, and, thus, such av can never be a<br />

candidate <strong>for</strong> a minimizer.<br />

Terminology:<br />

Terminology:<br />

p is called a Lagrange multiplier,Qthe multiplier space.<br />

a min-max problem like (9.2.22) = saddle point problem<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

In principle, the linear variational problem could be tackled by means of a finite element Galerkin<br />

discretization.<br />

However, finding finite element spaces ⊂H 1 0 (div0,Ω) is complicated [27]: Continuous, piecewise<br />

polynomial, locally supported, and divergence free basis fields exist only <strong>for</strong> polynomial degree≥ 4!<br />

△<br />

9.2<br />

p. 1002<br />

✬<br />

Lemma 9.2.23 (Necessary conditions <strong>for</strong> solution of saddle point problem). → [30, Ch. 50]<br />

Any solution v ∗ of (9.2.22) will be the first component of a zero (v ∗ ,p ∗ ) of the derivative (“gradient”)<br />

of the Lagrangian functionalL.<br />

✫<br />

✩<br />

✪<br />

9.2<br />

p. 100


(v ∗ ,p ∗ ) will satisfy<br />

L(v ∗ +tw,p ∗ )−L(v ∗ ,p ∗ )<br />

lim<br />

= 0 ∀w ∈ U ,<br />

t→0 t<br />

L(v ∗ ,p ∗ +tq)−L(v ∗ ,p ∗ )<br />

lim<br />

= 0 ∀q ∈ Q .<br />

t→0 t<br />

because by the very structure of the saddle point problem, see Fig. 330 <strong>for</strong> illustration,<br />

(9.2.24)<br />

L(v ∗ ,p) ≤ L(v ∗ ,p ∗ ) ≤ L(v,p ∗ ) ∀v ∈ U, p ∈ Q . (9.2.25)<br />

Computing these “directional derivatives” as in Sect. 1.3.1 (<strong>for</strong> the elastic string energy functional<br />

there), we obtain<br />

〈DJ(v ∗ ),w〉 + (p ∗ ,Bw) Q = 0 ∀w ∈ U ,<br />

(q,Bv ∗ ) Q = 0 ∀q ∈ Q .<br />

(9.2.26)<br />

This is a variational saddle point problem .<br />

Special case: quadratic functionalJ : U ↦→ R → Def. 2.1.17<br />

J(v) := 1 2 a(v,v)−l(v) ,<br />

with a positive definite, symmetric bilinear <strong>for</strong>ma : U ×U ↦→ R (→ Defs. 1.3.13, 2.1.25), continuous<br />

linear <strong>for</strong>ml : U ↦→ R.<br />

(2.3.6)<br />

In this special case (9.2.26) becomes a<br />

Seekv ∗ ∈ U,p ∗ ∈ Q<br />

〈DJ(v ∗ ),w〉 = a(v ∗ ,w)−l(w) , w ∈ U .<br />

linear variational saddle point problem:<br />

a(v ∗ ,w) + (p ∗ ,Bw) Q = l(w) ∀w ∈ U ,<br />

(q,Bv ∗ ) Q = 0 ∀q ∈ Q .<br />

(9.2.27)<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

9.2<br />

p. 1005<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Solution of min-max problem:<br />

saddle point<br />

(non-extremal critical point)<br />

The saddle point is a minimum when approached<br />

from the “U-direction”, and a maximum, when approached<br />

from the “Q-direction”.<br />

Adapt abstract approach outline in Rem. 9.2.20 to (9.2.9):<br />

Hilbert spaces:<br />

U = H 1 0 (Ω),Q = L2 (Ω),<br />

3<br />

2.5<br />

2<br />

1.5<br />

1<br />

0.5<br />

0<br />

−0.5<br />

−1<br />

1<br />

p<br />

0<br />

−1<br />

−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1<br />

v<br />

Fig. 330<br />

Constraintdivv = 0 ➣ B := div : U ↦→ Q continuous,<br />

J ↔v ↦→ 1 ∫<br />

2 µ‖Dv‖ 2 dx− ∫ f ·vdx, a strictly convex quadratic functional (→ Def. 2.1.17)<br />

Ω Ω<br />

Lagrangian functional <strong>for</strong> (9.2.9)<br />

∫ ∫ ∫<br />

L(v,p) = 2<br />

1 µ‖Dv‖ 2 F dx− f ·vdx+ divvpdx , v ∈ H 1 0 (Ω), p ∈ L2 (Ω) . (9.2.28)<br />

Ω Ω Ω<br />

Next use <strong>for</strong>mula <strong>for</strong> derivative of quadratic functionals, see Sect. 2.3.1, (2.3.6), which yields a concrete<br />

specimen of (9.2.27).<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

9.2<br />

p. 100<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

For rigorous mathematical treatment of constrained optimization in Banach spaces refer to [30, Ch. 49<br />

& Ch. 50]. A discussion in finite-dimensional setting is given in [18, Sect. 7.4.1].<br />

△<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Stokes problem:<br />

Linear variational saddle point problem <strong>for</strong> viscous flow (preliminary version)<br />

seek velocityv ∈ H 1 0 (Ω), Lagrange multiplierp ∈ L2 (Ω)<br />

∫<br />

µDv : Dwdx + ∫ divwpdx = ∫ f ·wdx ∀w ∈ H 1 0 (Ω) ,<br />

Ω ∫ Ω Ω<br />

divvqdx = 0 ∀q ∈ L 2 (Ω) .<br />

Ω<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Lagrange multiplierp = pressure ([p] = Nm −2 )<br />

9.2<br />

p. 1006<br />

No differential constraints in test/trial spaces <strong>for</strong> (9.2.33)!<br />

9.2<br />

p. 100


Exercise 9.2.1. Also <strong>for</strong> stationary heat conduction derive the variational model from the two laws of<br />

thermodynamics:<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Proof. (crude outline; this sketch of the proof is included, because its ideas carry over to the discrete<br />

setting.)<br />

Preparatory considerations: a(v,w) := ∫ Ω µDv : Dwdx is an inner product onH1 0 (Ω).<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

• maximization of dissipation with dissipation functional given byJ D (j) = ∫ σ‖j‖ 2 dx,<br />

Ω<br />

• power balancedivj = f.<br />

Then temperature turns out to be a Lagrangian multiplier to ensure the conservation of energy.<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

a-orthogonal decomposition<br />

H 1 0 (Ω) = H1 0 (div0,Ω)⊕V⊥<br />

➊ Unique solutionv ∈ H 1 0 (div0,Ω) of (9.2.9) ➣ uniquev-solution <strong>for</strong> (9.2.33)<br />

(first test withw ∈ H 1 0 (div0,Ω), then withw ∈ V ⊥ .)<br />

➋ Use the following profound result from functional analysis [3, Thm. 5.3]:<br />

✬<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

✩<br />

Remark 9.2.31 (Ensuring uniqueness of pressure).<br />

∫ ∫<br />

Notice: divvdx = v·ndS = 0, sincev |∂Ω = 0.<br />

Ω ∂Ω<br />

Pressure solutionpin (9.2.33) can be unique only up to an constant!<br />

Compare: Non-uniqueness of solution of 2nd-order elliptic Neumann problem, Rem. 2.8.13.<br />

Theorem 9.2.36 (Existence of stable velocity potentials).<br />

∃C = C(Ω) > 0: ∀q ∈ L 2 ∗(Ω): ∃v ∈ H 1 0 (Ω): q = divv ∧ ‖v‖ H 1 (Ω) ≤ C‖q‖ L 2 (Ω) .<br />

✫<br />

✪<br />

Idea: Assume f = 0, test first equation with w ∈ V ⊥ satisfying divw = p ➤ ‖p‖ L 2 (Ω) = 0 ⇔<br />

p = 0, <strong>for</strong> any pressure solutionp ∈ L 2 ∗(Ω).<br />

9.2<br />

9.2<br />

p. 1009<br />

uniqueness of pressure solution<br />

p. 101<br />

Remedy, cf. (2.8.14)<br />

←→<br />

Choose<br />

∫<br />

p ∈ L 2 ∗(Ω) := {q ∈ L 2 (Ω): qdx = 0} . (9.2.32)<br />

Ω<br />

constraint on trial/test spaceL 2 (Ω)<br />

△<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

➌ Existence of pressure solution from Riesz representation theorem (→ functional analysis) and<br />

Thm. 9.2.36, not elaborated here.<br />

✷<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Remaining issue: (9.2.32) introduces another constraint into (9.2.33)!<br />

Stokes problem: Variational saddle point problem <strong>for</strong> viscous flow<br />

seek velocityv ∈ H 1 0 (Ω), Lagrange multiplierp ∈ L2 ∗(Ω)<br />

∫<br />

µDv : Dwdx + ∫ divwpdx = ∫ f ·wdx ∀w ∈ H 1 0 (Ω) ,<br />

Ω ∫ Ω Ω<br />

divvqdx = 0 ∀q ∈ L 2 ∗(Ω) .<br />

Ω<br />

(9.2.33)<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Relax, Lagrangian multipliers can deal with this, too. Now we study their use to en<strong>for</strong>ce a zero mean<br />

constraint in the simpler setting of 2nd-order elliptic Neumann BVPs.<br />

Remark 9.2.39 (En<strong>for</strong>cing zero mean). → [2]<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

✬<br />

Theorem 9.2.34 (Existence and uniqueness of weak solutions of Stokes problem).<br />

The linear variational saddle point problem (9.2.33) (“Stokes problem”) has a unique solution.<br />

✫<br />

✩<br />

✪<br />

9.2<br />

p. 1010<br />

As in Sect. 2.4, Rem. 2.8.13, we consider a 2nd-order linear Neumann BVP (with zero<br />

Neumann boundary conditions,h = 0), cf. (2.8.15),<br />

∫<br />

∫<br />

u ∈ H∗(Ω):<br />

1 κ(x)gradu·gradvdx = fvdx ∀v ∈ H∗(Ω) 1 .<br />

Ω<br />

Ω<br />

9.2<br />

p. 101


with the constrained trial/test space<br />

∫<br />

H∗(Ω) 1 := {v ∈ H 1 (Ω): v(x)dx = 0} . (2.8.14)<br />

Ω<br />

The related quadratic minimization problem reads (→ Sect. 2.1.3)<br />

∫<br />

∫<br />

u = argmin J(v) , J(v) := 1<br />

v∈H∗(Ω)<br />

1 2 κ(x)‖gradv‖ 2 dx− fvdx .<br />

Ω<br />

Ω<br />

Idea:<br />

en<strong>for</strong>ce linear constraint ∫ Ωv(x)dx = 0 by means of Lagrangian multiplier,<br />

see Rem. 9.2.20<br />

Here: scalar constraint (Q = R) ➤ scalar multiplierp ∈ R<br />

Lagrangian functional:<br />

∫<br />

L(v,p) = J(v)+p v(x)dx , v ∈ H 1 (Ω) , p ∈ R .<br />

Ω<br />

related (augmented) linear variational saddle point problem, specialization of (9.2.27):<br />

seeku ∈ H 1 (Ω),p ∈ R<br />

∫<br />

∫ ∫<br />

κ(x)gradu·gradvdx + p vdx = fvdx ∀v ∈ H 1 (Ω) ,<br />

Ω ∫<br />

Ω Ω<br />

vdx = 0 .<br />

Ω<br />

(9.2.40)<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

9.2<br />

p. 1013<br />

As in Sect. 2.4: derivation of the BVP in PDE <strong>for</strong>m corresponding to (9.2.41).<br />

Approach: Remove spatial derivatives from test functions by integration by parts (1.3.22)<br />

Assuming sufficient smoothness of solution (v,p), constant µ and (9.2.41) and taking into account<br />

boundary conditions, apply Green’s <strong>for</strong>mula of Thm 2.4.7:<br />

∫<br />

d∑<br />

∫<br />

d∑<br />

∫<br />

µ∇v : ∇wdx = µ gradv i·gradw i dx = −µ ∆v i w i dx ,<br />

Ω<br />

i=1 Ω<br />

i=1<br />

∫ ∫<br />

Ω<br />

divwpdx = − gradp·wdx .<br />

Ω<br />

Ω<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

9.2<br />

p. 101<br />

The same technique can be applied to (9.2.33).<br />

Stokes variational saddle point problem with pressure normalization:<br />

△<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

(9.2.41) ⇒<br />

−µ∆v−gradp = f<br />

∫ divv = 0 in Ω ,<br />

pdx = 0<br />

Ω<br />

v = 0 on ∂Ω .<br />

(9.2.42)<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

seek velocityv ∈ H 1 0 (Ω), pressurep ∈ L2 (Ω), multiplierλ ∈ R<br />

∫ ∫<br />

∫<br />

µ∇v : ∇wdx + divwpdx = f ·wdx ∀w ∈ H 1 0 (Ω) ,<br />

Ω ∫ Ω ∫ Ω<br />

divvqdx + λ qdx = 0 ∀q ∈ L 2 (Ω) ,<br />

Ω ∫ Ω<br />

pdx = 0 .<br />

Ω<br />

(9.2.41)<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

✎ notation: ∆ ˆ= componentwise Laplacian, see (2.4.13) (“vector Laplacian”)<br />

Remark 9.2.44 (Pressure Poisson equation).<br />

Manipulating the PDEs in (9.2.42):<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

9.2.3 Stokes system<br />

div· (9.2.42) −µdiv∆v+divgradp = divf inΩ ,<br />

−µ∆(divv)+∆p = divf inΩ ,<br />

divv=0<br />

∆p = divf .<br />

9.2<br />

p. 1014<br />

9.2<br />

p. 101


Appearance:<br />

Problems<br />

(9.2.42) can be solved by solvingd+1Poisson equations,<br />

☛<br />

☛<br />

first solve pressure Poisson equation∆p = divf<br />

then solve Dirichlet boundary value problems <strong>for</strong> velocity components<br />

−∆v i = f i + ∂p<br />

∂x i<br />

in Ω , v i = 0 on ∂Ω .<br />

above manipulations only valid <strong>for</strong> sufficiently smooth u (not guaranteed).<br />

we cannot solve a “Poisson equation”, we also need boundary conditions <strong>for</strong>p:<br />

not available!<br />

9.3 Saddle point problems: Galerkin discretization<br />

Example 9.3.1 (Naive finite difference discretization of Stokes system).<br />

BVP (9.2.42) onΩ =]0,1[ 2 ,µ ≡ 1,f = cos(πx 1 ) ( 0<br />

1<br />

)<br />

,<br />

Finite difference discretization on (→ Sect. 4.1) equidistant tensor product grid ✄<br />

Unknowns: v 1,ij ,v 2,ij ,p ij ˆ= approximations ofv 1 (ih,jh),v 2 (ih,jh),p(ih,jh),0 < i,j < N.<br />

Zero boundary values <strong>for</strong>v 1 ,v 2 , andp<br />

5-point stencil discretization of−∆, see (4.1.1)<br />

Central finite difference approximation ofgradp, e.g.,<br />

∂p<br />

≈ 1 ( )<br />

pi+1,j −p<br />

∂x 1|(ih,jh) 2h i−1,j , 1 ≤ i,j < N .<br />

x 2<br />

1<br />

0.8<br />

0.6<br />

0.4<br />

0.2<br />

0<br />

Stirring <strong>for</strong>ce field<br />

△<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

15<br />

16 % Build matrix representation of gradp. Note the efficient assembly based on<br />

the<br />

17 % special structure of the matrices.<br />

18 % Auxiliary 1D central finite difference matrix<br />

19 e = ones(unk, 1); CD = spdiags ([-h/2*e h/2*e], [-1 1], unk,unk);<br />

20 % Central difference matrix <strong>for</strong> ∂ : ∂x This matrix is a block<br />

21<br />

1<br />

% diagonal matrix with N −1 diagonal blocks corresponding to the grid rows.<br />

Its diagonal<br />

22 % blocks are skew-symmetric and bidiagonal with non-zero first off-diagonals<br />

9.3 only.<br />

23 P1 = kron(speye(unk),CD);<br />

p. 1017<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Code 9.3.3: Central finite difference discretization of Stokes system<br />

1 f u n c t i o n [u1,u2,p] = StokesFD(N,f)<br />

2 % Naive finite difference discretization of the Stokes system (9.2.42)<br />

3 % N: number of grid cells in each direction.<br />

4 % f: handle to a (vector valued!) function implementing the <strong>for</strong>ce field f<br />

5 % Return values u1, u2 give the velocity components v = (v 1 ,v 2 ) T<br />

6 % in a matrix whose entries correspond to the vertices of the mesh,<br />

7 % p returns the preassure.<br />

8 h = 1/N; % mesh width<br />

9 x = h:h:1-h; % coordinates of interior grid points<br />

10 unk = N-1; % number of interior points in each direction<br />

11 n = 3 * unk^2; % total number of unknowns <strong>for</strong> v and p<br />

12 % A line-by-line numbering (lexikographic numbering) of the grid points is<br />

assumed,<br />

13 % see Sect. 4.1, Fig. 335.<br />

14 A = g a l l e r y (’poisson’, unk); % Matrix <strong>for</strong> 5-point stencil discretization of −∆<br />

24 % Central difference matrix <strong>for</strong> ∂<br />

∂x : This matrix is<br />

25<br />

2<br />

% a block matrix with non-zero first off-diagonal blocks only. Each non-zero<br />

block is<br />

26 % a multiple of the identity.<br />

27 P2 = kron(CD,speye(unk));<br />

28 % Build the complete n×n system matrix and make sure that it is a sparse<br />

matrix.<br />

29 Z = sparse (unk^2, unk^2); % Major mistake would be z = zeros(unk^2,unk^2);<br />

30 H = [A Z P1; Z A P2; P1’ P2’ Z];<br />

31<br />

32 % Assemble the right hand side (sampling of f at interior grid points)<br />

33 F = zeros(n,1);<br />

34 pidx1 = 1; pidx2 = n/3+1;<br />

35 f o r j = 1: s i z e (x), f o r i = 1: s i z e (x)<br />

36 frc = h^2*f(x(i),x(j));<br />

37 F(pidx1) = frc(1); F(pidx2) = frc(2);<br />

38 pidx1 = pidx1+1; pidx2 = pidx2 + 1;<br />

39 end, end<br />

40 % Direct solution of sparse indefinite symmetric system<br />

41 X = H\F;<br />

42<br />

43 % Convert vectors of nodal values into matrix representations of grid functions<br />

44 u1 = r o t 9 0 (reshape(X(1:unk^2),unk,unk));<br />

45 u2 = r o t 9 0 (reshape(X(unk^2+1:2*unk^2),unk,unk));<br />

46 p = r o t 9 0 (reshape(X(2*unk^2+1:end),unk,unk));<br />

47<br />

48 end<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

9.3<br />

p. 101<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

finite difference grid<br />

Fig. 331<br />

0 0.2 0.4 0.6 0.8 1<br />

x 1<br />

<strong>for</strong>ce fieldf<br />

Fig. 332<br />

9.3<br />

p. 1018<br />

9.3<br />

p. 102


0 0.2 0.4 0.6 0.8 1<br />

1<br />

0.8<br />

0.02<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Discrete linear variational saddle point problem:<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

x 2<br />

0.6<br />

0.015<br />

0.01<br />

0.005<br />

0<br />

v N ∈ U N<br />

p N ∈ Q N<br />

:<br />

a(v N ,w N ) + b(w N ,p N ) = l(w N ) ∀w N ∈ U N ,<br />

b(v N ,q N ) = 0 ∀q N ∈ Q N .<br />

(9.3.15)<br />

0.4<br />

0.2<br />

0<br />

x 1<br />

Fig. 333<br />

−0.005<br />

−0.01<br />

−0.015<br />

1<br />

0.8<br />

0.6<br />

0.4<br />

0.6<br />

0.4<br />

0.2<br />

0.2<br />

0 0<br />

pressure<br />

velocity solution,N = 50<br />

solution,N = 50<br />

Physically meaningless solution marred by massive spurious oscillations of the pressure.<br />

0.8<br />

1<br />

Fig. 334<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Second step of Galerkin discretization:<br />

Introduce ordered bases<br />

B U := {b 1 N ,...,bN N },<br />

B Q := {β 1 N ,...,βM N } of<br />

U N , N := dimU N ,<br />

Q N , M := dimQ N .<br />

(N +M)×(N +M) linear system of equations symmetric indefinite matrix!<br />

(<br />

A B T<br />

B 0<br />

)( ( ⃗ν ⃗ϕ<br />

=<br />

⃗π)<br />

0)<br />

, (9.3.16)<br />

(9.3.17)<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

9.3.1 Pressure instability<br />

Lesson learned:<br />

discretizing saddle point problems can be tricky!<br />

Now, we examine the Galerkin discretization (→ Sect. 3.1) of the linear variational problem (9.2.33)<br />

(Practical schemes will rely on (9.2.41), but here, <strong>for</strong> the sake of simplicity, we skirt the treatment of<br />

zero mean constraint.)<br />

Shorthand notation <strong>for</strong> (9.2.33) (↔ abstract linear variational saddle point problem, see (9.2.27))<br />

v ∈ U := H 1 0 (Ω) ,<br />

p ∈ Q := L 2 ∗(Ω)<br />

:<br />

a(v,w) + b(w,p) = l(w) ∀w ∈ U ,<br />

b(v,q) = 0 ∀q ∈ Q .<br />

✸<br />

(9.3.13)<br />

with concrete bilinear <strong>for</strong>ms<br />

∫<br />

∫<br />

a(v,w) := µDv : Dwdx , b(v,q) := divvqdx . (9.3.14)<br />

Ω<br />

Ω<br />

First step of Galerkin discretization:<br />

Replace<br />

H 1 0 (Ω)<br />

L 2 ∗(Ω)<br />

with finite dimensional subspaces<br />

U N ⊂ H 1 0 (Ω)<br />

Q N ⊂ L 2 ∗(Ω)<br />

with Galerkin matrices, right hand side vectors<br />

9.3 A :=<br />

(a(b j ) (∫<br />

) N N<br />

N ,bi N ) p. 1021<br />

i,j=1 = ΩµDb j N (x) : Dbi N (x)dx ∈ R N,N , (9.3.18) 9.3<br />

i,j=1<br />

p. 102<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

9.3<br />

p. 1022<br />

B :=<br />

(b(b j ) (∫<br />

N ,βi N ) 1≤i≤M<br />

=<br />

1≤j≤N Ω<br />

⃗ϕ :=<br />

(l(b j ) (∫ N<br />

N ) j=1 = Ω<br />

and basis expansions<br />

divb j N (x)βi N (x)dx )<br />

1≤i≤M<br />

1≤j≤N<br />

∈ R M,N , (9.3.19)<br />

f(x)·b j N (x)dx ) N<br />

j=1<br />

∈ R N , (9.3.20)<br />

N∑<br />

v N = ν j b j M∑<br />

N , p N = π j β j N . (9.3.21)<br />

j=1 j=1<br />

Issue: existence, uniqueness and stability of solutions of (9.3.15)<br />

!<br />

Existence, uniqueness and stability of solutions of discrete variational saddle point problems<br />

cannot be inferred from these properties <strong>for</strong> the continuous saddle point problem<br />

(→ Thm. 9.2.34).<br />

(Unlike in the case of linear variational problems with s.p.d.<br />

Thm. 3.1.5)<br />

bilinear <strong>for</strong>ms, cf.<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

9.3<br />

p. 102


A simple consideration:<br />

M > N ⇒ Ker(B) ≠ {0} ⇒ non-uniquenesss of p N .<br />

➣ dimU N ≥ dimQ N is a necessary condition <strong>for</strong> uniqueness of solutionp N of (9.3.15)<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

But dimU N ≥ dimQ N is not enough: even if this condition is satisfied, the pressure may not be<br />

unique:<br />

Example 9.3.23 (Checkerboard instability <strong>for</strong> quadrilateral P1-P0 pair). (→ [3, § 6])<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Some “natural” finite element Galerkin schemes <strong>for</strong> (9.2.33)↔(9.3.13) fail to meet this condition:<br />

Example 9.3.22 (Unstable P1-P0 finite element pair on triangular mesh).<br />

Notation: (cf. S 0 p(M)):<br />

S −1 p (M)<br />

discontinuous functions<br />

locally polynomials of degreep,cf. P p (R d )<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

M = uni<strong>for</strong>m tensor product mesh of]0,1[ 2 ✄<br />

velocity spaceU N = (S 0 1,0 (M))2<br />

pressure spaceQ N = S −1<br />

0 (M)∩L2 ∗(Ω)<br />

IfK ∈ N mesh cells in one coordinate direction,<br />

dimU N = 2(K −1) 2 , dimQ N = K 2 −1 .<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

The spaces S −1 p (M) are the natural finite element spaces <strong>for</strong> test/trial functions ∈ L 2 (Ω), because<br />

this function space does not en<strong>for</strong>ce any continuity conditions on piecewise smooth functions. Conversely,H<br />

1 (Ω) does, see Thm. 2.2.17.<br />

Regular triangular mesh of]0,1[ 2<br />

Finite element spaces <strong>for</strong> (9.2.33)<br />

9.3<br />

p. 1025<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

dimQ N < dimU N <strong>for</strong>K ≥ 4 .<br />

C 1 C 2<br />

9.3<br />

p. 102<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

U N := (S1,0 0 (M))2 ,<br />

e 1<br />

Q N := S0 −1 (M)∩L2 ∗(Ω) (M-piecewise constants) .<br />

Consider interior grid pointp = (ih,jh),1 ≤ i,j ≤ K, with<br />

e 4 p e 2 adjacent quadratic cellsC<br />

K ∈ N ˆ= 1 ,C 2 ,C 3 ,C 4 , see figure.<br />

no. of mesh cells in one coordinate<br />

Denote by p i the piecewise constant values of p<br />

direction,<br />

N on C i ,<br />

i = 1,2,3,4.<br />

dimU N = 2(K −1) 2 , dimQ N = 2K 2 −1 .<br />

e<br />

R. Hiptmair<br />

3<br />

R. Hiptm<br />

C. Schwab,<br />

C. Schwa<br />

H.<br />

H.<br />

Harbrecht<br />

Harbrech<br />

V. C4 C<br />

Gradinaru<br />

3<br />

V.<br />

Gradinar<br />

A. Chernov<br />

Fig. 336<br />

A. Chern<br />

DRAFT<br />

DRAFT<br />

dimQ N > dimU N (<br />

Fig. 335<br />

b p N,1 ˆ= nodal basis function <strong>for</strong> x 1 velocity component at vertex p: b p 1<br />

N,1 = bp N · , where b<br />

0)<br />

p N<br />

is the 2D “tent function” (→ Fig. 87) associated withp.<br />

In this case we end up with a singular linear system (9.3.16), which will make the linear solver bail<br />

out or produce a pressure solution, which is polluted by “noise” fromKer(B).<br />

supp(b p N,1 ) = C 1∪C 2 ∪C 3 ∪C 4<br />

9.3<br />

Apply Gauss’ theorem Thm. 2.4.5 on C<br />

✸ p. 1026<br />

i taking into account that b p N ⊥ normals at e 2, e 4 , and b p N ‖ 9.3<br />

p. 102


normals ate 1 ,e 3 ,<br />

∫<br />

∫ ∫ ∫<br />

divb p N,1 p N dx = p 1 b<br />

∫e p N dx−p 2 b p N dx+p 3 b p N dx−p 4 b p N dx<br />

1 e 1 e 3 e 3<br />

Ω<br />

= 1 2 (p 1−p 2 +p 3 −p 4 ) .<br />

Similarly, ifb p N,2 is the nodal basis function atp<strong>for</strong> thex 2-component of the velocityv N , then<br />

∫<br />

divb p N,2 p N dx = 1 2 (p 1+p 2 −p 3 −p 4 ) .<br />

p 1 = 1,p 2 = −1,p 3 = 1,p 4 = −1 ⇒<br />

Now, realize that the setting is translation invariant!<br />

Ω<br />

∫<br />

Ω<br />

∫<br />

divb p N,1 p N dx =<br />

Ω<br />

divb p N,2 p N dx = 0 . (9.3.25)<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

BVP (9.2.42) onΩ =]0,1[ 2 ,µ ≡ 1,f = cos(πx 1 ) ( 0<br />

1<br />

)<br />

, see Ex. 9.3.1<br />

P1-P0 finite element Galerkin discretization on equidistant tensor product quadrilateral mesh,<br />

as in Ex. 9.3.23<br />

Code 9.3.28: P1-P0 finite difference discretization of augmented Stokes problem<br />

1 f u n c t i o n [v1,v2,p] = stokesP1P0FD(N,frc)<br />

2 % P1-P0 finite element discretization of Stokes problem (9.2.41) on a<br />

3 % quadrilateral tensor product mesh, see Ex. 9.3.23.<br />

DRAFT<br />

4 % N: number of mesh cells in one coordinate direction.<br />

5 % f: function handle of type symbol64(x1,x2) to right hand side<br />

6 % <strong>for</strong>ce field f<br />

7 h = 1/N; nv = (N-1)^2; nc = N^2; % meshwidth, ♯V(M), ♯M<br />

8 % Assemble system matrix from Kronecker products of 1D Galerkin matrices<br />

9 % Tridiagonal 1D mass matrix <strong>for</strong> linear finite elements<br />

10 M = h*spdiags (ones(N-1,3)*diag([1/6 2/3 1/6]),[-1 0 1],N-1,N-1);<br />

11 % Tridiagonal 1D Galerkin matrix <strong>for</strong> d2<br />

, see (1.5.60)<br />

dx 2<br />

12 D = spdiags (ones(N-1,3)*diag([-1 2 -1]),[-1 0 1],N-1,N-1)/h;<br />

13 % 1D Galerkin matrix <strong>for</strong> p.w. linear/p.w. constant finite elements and the<br />

bilinear<br />

9.3<br />

∫ 1<br />

du<br />

14 % <strong>for</strong>m dx qdx<br />

p. 1029<br />

0<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

9.3<br />

p. 103<br />

+1<br />

−1 +1<br />

+1<br />

−1 +1<br />

+1<br />

−1 +1<br />

+1<br />

−1 +1<br />

+1<br />

−1<br />

−1<br />

−1<br />

−1<br />

−1<br />

−1 +1<br />

+1<br />

−1 +1<br />

+1<br />

−1 +1<br />

+1<br />

−1 +1<br />

+1<br />

−1 +1<br />

+1<br />

−1<br />

−1<br />

−1<br />

−1<br />

−1<br />

−1 +1<br />

+1<br />

−1 +1<br />

+1<br />

−1 +1<br />

+1<br />

−1 +1<br />

+1<br />

−1 +1<br />

+1<br />

−1<br />

−1<br />

−1<br />

−1<br />

−1<br />

−1 +1<br />

+1 −1<br />

−1 +1<br />

+1 −1<br />

−1 +1<br />

+1 −1<br />

−1 +1<br />

+1 −1<br />

−1 +1<br />

+1 −1<br />

−1 +1<br />

+1 −1<br />

−1 +1<br />

+1 −1<br />

−1 +1<br />

+1 −1<br />

−1 +1<br />

+1 −1<br />

−1 +1<br />

+1 −1<br />

−1 +1<br />

Fig. 337<br />

By (9.3.25) the discrete pressure with alternating<br />

values ±1 in checkerboard fashion will belong to<br />

Ker(B) <strong>for</strong> this finite element Galerkin method (<strong>for</strong><br />

oddK).<br />

Observation:<br />

{p N ∈ Q N : b(v N ,p N ) = 0 ∀v N ∈ U N } ≠ ∅ .<br />

= 1-dimensional space of checkerboard modes<br />

✁ p.w. constant checkerboard mode<br />

Example 9.3.26 (P1-P0 quadrilateral finite elements <strong>for</strong> Stokes problem).<br />

✸<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

15 G = spdiags (ones(N,2)*diag([-1 1]),[-1 0],N,N-1);<br />

16 % 1D mass matrix <strong>for</strong> p.w. linear and p.w. constant finite elements<br />

17 C = 0.5*h*spdiags (ones(N,2),[-1 0],N,N-1);<br />

18 % constraint on pressure, see Rem. 9.2.39<br />

19 Delta = kron(M,D)+kron(D,M); % 9-point stencil matrix <strong>for</strong> discrete Laplacian<br />

20 divx = kron(C,G); divy = kron(G,C); % discrete divergence<br />

21 % Complete saddle point system matrix including Lagrangian multiplier <strong>for</strong><br />

en<strong>for</strong>cing mean zero<br />

22 A = [ Delta , sparse (nv,nv) , divx’ , sparse (nv,1) ;...<br />

23 sparse (nv,nv) , Delta , divy’ , sparse (nv,1) ;...<br />

24 divx , divy , sparse (nc,nc) , ones(nc,1); ...<br />

25 sparse (1,nv) , sparse (1,nv) , ones(1,nc) , 0 ];<br />

26 % Assembly of right hand side<br />

27 phi = zeros(2*nv+nc+1,1); x = h:h:1-h; idx = 1;<br />

28 f o r j=1:N-1, f o r i=1:N-1,<br />

29 phi([idx idx+nv]) = h*h*frc(x(i),x(j)); idx = idx+1;<br />

30 end, end;<br />

31 % Direct solve of (singular <strong>for</strong> even N) linear saddle point system<br />

32 u = A\phi;<br />

33 % Recover velocity and pressure values on the grid<br />

34 v1 = r o t 9 0 (reshape(u(1:nv),N-1,N-1));<br />

35 v2 = r o t 9 0 (reshape(u(nv+1:2*nv),N-1,N-1));<br />

36 p = r o t 9 0 (reshape(u(2*nv+1:end-1),N,N));<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

9.3<br />

p. 1030<br />

9.3<br />

p. 103


0 0.2 0.4 0.6 0.8 1<br />

1<br />

P1−P0 velocity vector field, N=50<br />

P1−P0 pressure field, N=50<br />

0.3<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Example 9.3.29 (P2-P0 finite element scheme <strong>for</strong> the Stokes problem).<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

0.8<br />

0.4<br />

0.3<br />

0.2<br />

x 2<br />

0.6<br />

p N<br />

(x 1<br />

,x 2<br />

)<br />

0.2<br />

0.1<br />

0<br />

−0.1<br />

0.1<br />

0<br />

Ω =]0,1[ 2 , u(x) = (cos(π/2(x 1 +x 2 )),−cos(π/2(x 1 +x 2 ))) T , p(x) = sin(π/2(x 1 −x 2 )), f and<br />

inhomogeneous Dirichlet boundary values <strong>for</strong>uaccordingly<br />

0.4<br />

0.2<br />

0<br />

x 1<br />

Fig. 338<br />

−0.2<br />

−0.3<br />

−0.4<br />

1<br />

0.8<br />

0.6<br />

0.4<br />

x 2<br />

0.2<br />

0<br />

0<br />

0.2<br />

0.4<br />

x 1<br />

0.6<br />

0.8<br />

−0.1<br />

−0.2<br />

1<br />

−0.3<br />

Fig. 339<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

Sequence of (a) uni<strong>for</strong>m triangular meshes, created by regular refinement,<br />

(b) randomly perturbed meshes from (a) (still uni<strong>for</strong>mly shape-regular & quasiuni<strong>for</strong>m).<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

Observation: ☞<br />

☞<br />

pressure solution marred by checkerboard mode<br />

computed velocity field ok!<br />

DRAFT<br />

“P2-P0-scheme” velocity finite element space U N = (S 0 2,0 (M))2 (continuous, piecewise<br />

quadratic→Sect. 3.4.1, Ex. 3.4.2),<br />

pressure finite element spaceQ N = S −1<br />

0 (M)∩L2 ∗(Ω) (piecewise constant)<br />

DRAFT<br />

9.3.2 Stable Galerkin discretization<br />

In the previous examples we found a subspace ofQ N , which dodgesdivv N in the bilinear <strong>for</strong>mb.<br />

We arrive at the important heuristic insight:<br />

✗<br />

✖<br />

Idea:<br />

divv N must be “large enough to fix the pressure”p N ∈ Q N<br />

How to get a larger trial space <strong>for</strong> the velocity?<br />

Use larger velocity trial/test spacesv N<br />

➣ larger spacedivv N<br />

➣ more control ofp N<br />

Raise polynomial degree!<br />

✔<br />

✕<br />

✸<br />

9.3<br />

p. 1033<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab, 10<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Monitored: Error norms‖u−u N ‖ 1 ,‖u−u N ‖ 0 ,‖p−p N ‖ 0<br />

Code 9.3.31: LehrFEM driver script P2-P0 finite element method <strong>for</strong> Stokes problem<br />

1 % LehrFEm driver script <strong>for</strong> computing solutions of the steady Stokes problem on<br />

the unit square<br />

2 % using piecewise quadratic finite elements <strong>for</strong> the velocity and piecewise<br />

constants <strong>for</strong> the<br />

3 % pressure.<br />

4 NREFS = 4; % Number of red refinements<br />

5 NU = 1; % Viscosity<br />

6 % Dirichlet boundary data<br />

7 GD_HANDLE = @(x,varargin)[cos( p i /2*(x(:,1)+x(:,2)))<br />

-cos( p i /2*(x(:,1)+x(:,2)))];<br />

8 % Right hand side source (<strong>for</strong>ce field)<br />

9 F_HANDLE = @(x,varargin)[ sin ( p i *x(:,1)) zeros( s i z e (x(:,1))) ];<br />

11 % Initialize mesh<br />

12 Mesh = load_Mesh(’Coord_Sqr.dat’,’Elem_Sqr.dat’);<br />

13 Mesh.ElemFlag = ones( s i z e (Mesh.Elements,1),1);<br />

14 Mesh = add_Edges(Mesh);<br />

15 Loc = get_BdEdges(Mesh);<br />

16 Mesh.BdFlags = zeros( s i z e (Mesh.Edges,1),1);<br />

17 Mesh.BdFlags(Loc) = -1;<br />

18 f o r i = 1:NREFS, Mesh = refine_REG(Mesh); end<br />

19<br />

20 % Assemble Galerkin matrix and load vector<br />

21 A = assemMat_Stokes_P2P0(Mesh,@STIMA_Stokes_P2P0,NU,P7O6());<br />

22 L = assemLoad_Stokes_P2P0(Mesh,P7O6(),F_HANDLE);<br />

23<br />

24 % Incorporate Dirichlet boundary data<br />

9.3 25 [U,FreeDofs] = assemDir_Stokes_P2P0(Mesh,-1,GD_HANDLE); L = L - A*U;<br />

26<br />

p. 1034<br />

9.3<br />

p. 103<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

9.3<br />

p. 103


27 % Solve the linear system (direct solver)<br />

28 U(FreeDofs) = A(FreeDofs,FreeDofs)\L(FreeDofs);<br />

29<br />

30 % Plot and print solution<br />

31 plot_Stokes(U,Mesh,’P2P0’);<br />

32 t i t l e (’{\bf Steady Stokes equation (P2 elements)}’);<br />

33 x l a b e l ([’{\bf # Dofs : ’ i n t 2 s t r ( s i z e (U,1)) ’}’]);<br />

34 c o l o r b a r ;<br />

35 p r i n t (’-depsc’,’func_P2P0.eps’)<br />

Code 9.3.35: Assembly of global Galerkin matrix <strong>for</strong> P2-P0 finite element method <strong>for</strong> Stokes problem<br />

1 f u n c t i o n varargout = assemMat_Stokes_P2P0(Mesh,EHandle,varargin)<br />

2 % Assemble Galerking matrix <strong>for</strong> P2-P0 finite element discretization of Stokes<br />

problem<br />

3 % (9.2.41): piecewise quadratic continuous velocity components and piecewise<br />

4 % constant pressure approximation.<br />

5 %mesh LehrFEM mesh data structure, complete with edge in<strong>for</strong>mation,<br />

6 %Sect. 3.5.2 The struct MESH must at least contain the following fields:<br />

7 % COORDINATES M-by-2 matrix specifying the vertices of the mesh.<br />

8 % ELEMENTS N-by-3 or matrix specifying the elements of the mesh.<br />

9 % EDGES P-by-2 matrix specifying the edges of the mesh.<br />

10 % ELEMFLAG N-by-1 matrix specifying additional elementin<strong>for</strong>mation.<br />

11 % EHandle passes function <strong>for</strong> computation of element matrix.<br />

12 % See Sect. 3.5.3 <strong>for</strong> a discussion of the generic assembly algorithm<br />

13 nCoordinates = s i z e (Mesh.Coordinates,1);<br />

14 nElements = s i z e (Mesh.Elements,1);<br />

15 nEdges = s i z e (Mesh.Edges,1);<br />

16 % Preallocate memory <strong>for</strong> the efficient initialization of sparse matrix,<br />

Ex. 3.5.18<br />

17 I = zeros(196*nElements,1); J = zeros(196*nElements,1); A =<br />

zeros(196*nElements,1);<br />

18 % Local assembly: loop over all cells of the mesh<br />

19 loc = 1:196;<br />

20 f o r i = 1:nElements<br />

21 % Extract vertex coordinates<br />

22 vidx = Mesh.Elements(i,:);<br />

23 Vertices = Mesh.Coordinates(vidx,:);<br />

24 % Compute 14×14 element matrix: there are 6 local shape functions <strong>for</strong> the<br />

finite<br />

25 % element space S2 0 (M), and 1 (constant) local shape function <strong>for</strong><br />

26 % S0 −1 (M): 6+6+1 = 13 local shape functions <strong>for</strong> the P2-P0 scheme<br />

27 Aloc = EHandle(Vertices,Mesh.ElemFlag(i),varargin{:});<br />

28 % Add contributions to global Galerkin matrix: the numbering convention is a<br />

follows:<br />

29 % d.o.f. <strong>for</strong> x 1 -components of the velocity are numbered first, then<br />

30 % x 2 -components of the velocity, then the pressure d.o.f.<br />

31 eidx = [Mesh.Vert2Edge(vidx(1),vidx(2)) ...<br />

32 Mesh.Vert2Edge(vidx(2),vidx(3)) ...<br />

33 Mesh.Vert2Edge(vidx(3),vidx(1))];<br />

34 % Note: entries of an extra last row/column of the Galerkin matrix<br />

corresponding to<br />

35 % pressure d.o.f. are filled with one to en<strong>for</strong>e zero mean pressure, see<br />

36 % Ex. 9.2.39<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

9.3<br />

p. 1037<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

37 idx = [vidx,eidx+nCoordinates,... % ↔ v 1<br />

38 vidx+nCoordinates+nEdges,eidx+2*nCoordinates+nEdges, % ↔ v 2<br />

39<br />

40<br />

i+2*(nEdges+nCoordinates), % ↔ p<br />

2*(nEdges+nCoordinates)+nElements+1]; % ↔ zero mean multiplier<br />

41 I(loc) = set_Rows(idx,14); J(loc) = set_Cols(idx,14); A(loc) = Aloc(:);<br />

42 loc = loc+196;<br />

43 end<br />

44<br />

45 % Assign output arguments <strong>for</strong> creation of sparse matrix<br />

46 i f (nargout > 1), varargout{1} = I; varargout{2} = J; varargout{3} = A;<br />

47 else , varargout{1} = sparse (I,J,A); end<br />

48 r e t u r n<br />

Code 9.3.37: Computation of element matrix <strong>for</strong> P2-P0 finite element method <strong>for</strong> Stokes problem<br />

1 f u n c t i o n Aloc = STIMA_Stokes_P2P0(Vertices,ElemInfo,nu,QuadRule,varargin)<br />

2 % Computation of element matrix <strong>for</strong> P2-P0 finite element discretization of 2D<br />

Stokes problem<br />

3 % Vertices passes the location of the vertices of the triangle<br />

4 % nu is the viscosity parameter<br />

5 % QuadRule specifies local quadrature rule, see Rem. 3.5.39<br />

6 % The function returns a 14×14 dense matrix<br />

7 Aloc = zeros(14,14); % Preallocate memory<br />

8 % Compute element mapping<br />

9 bK = Vertices(1,:); BK = [Vertices(2,:)-bK; Vertices(3,:)-bK];<br />

10 inv_BK_t = transpose(inv (BK)); det_BK = abs(det(BK));<br />

11 % Compute gradients element shape functions and their values at quadrature<br />

points<br />

12 grad_N = grad_shap_QFE(QuadRule.x);<br />

13 grad_N(:,1:2) = grad_N(:,1:2)*inv_BK_t;<br />

14 grad_N(:,3:4) = grad_N(:,3:4)*inv_BK_t;<br />

15 grad_N(:,5:6) = grad_N(:,5:6)*inv_BK_t;<br />

16 grad_N(:,7:8) = grad_N(:,7:8)*inv_BK_t;<br />

17 grad_N(:,9:10) = grad_N(:,9:10)*inv_BK_t;<br />

18<br />

19<br />

grad_N(:,11:12) = grad_N(:,11:12)*inv_BK_t;<br />

% The first 6 rows/columns of the element matrix correspond to the x 1 -component<br />

of the<br />

20 % velocity. the corresponding block of the element matrix agrees with that <strong>for</strong><br />

−∆<br />

21 % discretized by means of quadratic Lagrangian finite elements. The local<br />

shape functions are<br />

22 % described in Ex. 3.4.2.<br />

DRAFT<br />

23<br />

24<br />

25<br />

Aloc(1,1) = nu*sum(QuadRule.w.*sum(grad_N(:,1:2).*grad_N(:,1:2),2))*det_BK;<br />

Aloc(1,2) = nu*sum(QuadRule.w.*sum(grad_N(:,1:2).*grad_N(:,3:4),2))*det_BK;<br />

Aloc(1,3) = nu*sum(QuadRule.w.*sum(grad_N(:,1:2).*grad_N(:,5:6),2))*det_BK;<br />

26 Aloc(1,4) = nu*sum(QuadRule.w.*sum(grad_N(:,1:2).*grad_N(:,7:8),2))*det_BK;<br />

27 Aloc(1,5) = nu*sum(QuadRule.w.*sum(grad_N(:,1:2).*grad_N(:,9:10),2))*det_BK;<br />

28 Aloc(1,6) = nu*sum(QuadRule.w.*sum(grad_N(:,1:2).*grad_N(:,11:12),2))*det_BK;<br />

29 Aloc(2,2) = nu*sum(QuadRule.w.*sum(grad_N(:,3:4).*grad_N(:,3:4),2))*det_BK;<br />

30 Aloc(2,3) = nu*sum(QuadRule.w.*sum(grad_N(:,3:4).*grad_N(:,5:6),2))*det_BK;<br />

31 Aloc(2,4) = nu*sum(QuadRule.w.*sum(grad_N(:,3:4).*grad_N(:,7:8),2))*det_BK;<br />

32 Aloc(2,5) = nu*sum(QuadRule.w.*sum(grad_N(:,3:4).*grad_N(:,9:10),2))*det_BK;<br />

33 Aloc(2,6) = nu*sum(QuadRule.w.*sum(grad_N(:,3:4).*grad_N(:,11:12),2))*det_BK;<br />

9.3<br />

34<br />

35<br />

Aloc(3,3) = nu*sum(QuadRule.w.*sum(grad_N(:,5:6).*grad_N(:,5:6),2))*det_BK;<br />

Aloc(3,4) = nu*sum(QuadRule.w.*sum(grad_N(:,5:6).*grad_N(:,7:8),2))*det_BK;<br />

36<br />

p. 1038<br />

Aloc(3,5) = nu*sum(QuadRule.w.*sum(grad_N(:,5:6).*grad_N(:,9:10),2))*det_BK;<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

9.3<br />

p. 103<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

9.3<br />

p. 104


37 Aloc(3,6) = nu*sum(QuadRule.w.*sum(grad_N(:,5:6).*grad_N(:,11:12),2))*det_BK;<br />

38 Aloc(4,4) = nu*sum(QuadRule.w.*sum(grad_N(:,7:8).*grad_N(:,7:8),2))*det_BK;<br />

39 Aloc(4,5) = nu*sum(QuadRule.w.*sum(grad_N(:,7:8).*grad_N(:,9:10),2))*det_BK;<br />

40 Aloc(4,6) = nu*sum(QuadRule.w.*sum(grad_N(:,7:8).*grad_N(:,11:12),2))*det_BK;<br />

41 Aloc(5,5) = nu*sum(QuadRule.w.*sum(grad_N(:,9:10).*grad_N(:,9:10),2))*det_BK;<br />

42 Aloc(5,6) = nu*sum(QuadRule.w.*sum(grad_N(:,9:10).*grad_N(:,11:12),2))*det_BK;<br />

43<br />

44<br />

Aloc(6,6) = nu*sum(QuadRule.w.*sum(grad_N(:,11:12).*grad_N(:,11:12),2))*det_BK;<br />

% the same <strong>for</strong> the x 2 -component of the velocity<br />

45 Aloc(7,7) = Aloc(1,1); Aloc(7,8) = Aloc(1,2); Aloc(7,9) = Aloc(1,3);<br />

46 Aloc(7,10) = Aloc(1,4); Aloc(7,11) = Aloc(1,5); Aloc(7,12) = Aloc(1,6);<br />

47 Aloc(8,8) = Aloc(2,2); Aloc(8,9) = Aloc(2,3); Aloc(8,10) = Aloc(2,4);<br />

48 Aloc(8,11) = Aloc(2,5); Aloc(8,12) = Aloc(2,6); Aloc(9,9) = Aloc(3,3);<br />

49 Aloc(9,10) = Aloc(3,4); Aloc(9,11) = Aloc(3,5); Aloc(9,12) = Aloc(3,6);<br />

50 Aloc(10,10) = Aloc(4,4); Aloc(10,11) = Aloc(4,5); Aloc(10,12) = Aloc(4,6);<br />

51 Aloc(11,11) = Aloc(5,5); Aloc(11,12) = Aloc(5,6); Aloc(12,12) = Aloc(6,6);<br />

52 % Interaction of pressure shape functon (constant ≡ 1) with velocity:<br />

evaluation of<br />

53 % local bilinear <strong>for</strong>m b K .<br />

54 % First <strong>for</strong> x 1 -components, then <strong>for</strong><br />

55 Aloc(1,13) = sum(QuadRule.w.*grad_N(:,1))*det_BK;<br />

56 Aloc(2,13) = sum(QuadRule.w.*grad_N(:,3))*det_BK;<br />

57 Aloc(3,13) = sum(QuadRule.w.*grad_N(:,5))*det_BK;<br />

58 Aloc(4,13) = sum(QuadRule.w.*grad_N(:,7))*det_BK;<br />

59 Aloc(5,13) = sum(QuadRule.w.*grad_N(:,9))*det_BK;<br />

60<br />

61<br />

Aloc(6,13) = sum(QuadRule.w.*grad_N(:,11))*det_BK;<br />

% Next <strong>for</strong> x 2 -components of velocity<br />

62 Aloc(7,13) = sum(QuadRule.w.*grad_N(:,2))*det_BK;<br />

63 Aloc(8,13) = sum(QuadRule.w.*grad_N(:,4))*det_BK;<br />

64 Aloc(9,13) = sum(QuadRule.w.*grad_N(:,6))*det_BK;<br />

65 Aloc(10,13) = sum(QuadRule.w.*grad_N(:,8))*det_BK;<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

9.3<br />

p. 1041<br />

Raising the polynomial degree has cured the instability!<br />

Oberservation: algebraic convergence ‖u−u N ‖ 1 = O(h M ),<br />

‖u−u N ‖ 0 = O(h 2 M ),<br />

‖p−p N ‖ 0 = O(h M ).<br />

The pair U N = S2,0 0 (M), Q N = S0 −1 (M) is the first combination of finite element spaces that we<br />

find to provide a stable Galerkin discretization of the variational Stokes problem (9.2.33)↔(9.2.26).<br />

Recall the concept of stability/well-posedness <strong>for</strong> linear problems, see Sect. 2.3.2, “stability estimate”<br />

of Thm. 3.1.5,<br />

∥ solution<br />

∥ ∥ ≤ C ∥ ∥ right hand side<br />

∥ ∥ <strong>for</strong> all data,<br />

✸<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

9.3<br />

p. 104<br />

66 Aloc(11,13) = sum(QuadRule.w.*grad_N(:,10))*det_BK;<br />

67 Aloc(12,13) = sum(QuadRule.w.*grad_N(:,12))*det_BK;<br />

68 % Entry corresponding to zero mean multiplier<br />

69 Aloc(13,14) = det_BK;<br />

70 % Fill in lower triangular part<br />

71 tri = t r i u (Aloc); Aloc = tri+ t r i l (tri’,-1);<br />

72 r e t u r n<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

where relevant norms have to be considered.<br />

For the Stokes problem: relevant norms = norms of Sobolev spaces fitting (9.2.33)<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

For velocityv : use “energy norm” ‖·‖ a := a(·,·) 1/2 ∼ ‖·‖ H 1 (Ω)<br />

, cf. Def. 2.1.27<br />

For pressurep : use‖·‖ L 2 (Ω) .<br />

Convergence rate of discretization error <strong>for</strong> P2P0 elements<br />

Convergence rate of discretization error <strong>for</strong> P2P0 elements<br />

10 −1 p = 1.97<br />

Discretization error [log]<br />

10 −2<br />

10 −3<br />

10 −4<br />

10 −5<br />

10 0<br />

10 −1<br />

Mesh width [log]<br />

V, L2 Norm<br />

V, H1 Semi−norm<br />

P, L2 Norm<br />

p = 1.00<br />

10 −2<br />

Fig. 340<br />

Discretization error [log]<br />

10 −1 p = 2.06<br />

10 −2<br />

10 −3<br />

10 −4<br />

10 −5<br />

10 0<br />

10 −1<br />

Mesh width [log]<br />

V, L2 Norm<br />

V, H1 Semi−norm<br />

P, L2 Norm<br />

p = 1.05<br />

10 −2<br />

Fig. 341<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Definition 9.3.38 (Stable finite element pair).<br />

A pair of finite element spacesU N ⊂ H 1 0 (Ω),Q N ⊂ L 2 ∗(Ω) is a stable finite element pair, if the<br />

solution(v N ,p N ) of the discrete saddle point problem (9.3.15) satisfies<br />

|l(w N )| ≤ C l ‖w N ‖ a ∀w N =⇒ ∃C > 0: ‖v N ‖ a +‖p N ‖ L 2 (Ω) ≤ CC l ,<br />

where C > 0 may depend only on Ω, the coefficient µ, and the shape regularity measure (→<br />

Def. 5.3.26) ofM.<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Structured meshes<br />

Randomly perturbed meshes<br />

9.3<br />

p. 1042<br />

9.3<br />

p. 104


We have already encountered an estimate like<br />

|l(w N )| ≤ C l ‖w N ‖ a ∀w N ∈ U N , (9.3.40)<br />

when finding that the existence of solutions of quadratic minimization problems (→ Def. 2.1.21)<br />

hinges on the continuity of the involved linear <strong>for</strong>m, see (2.2.1).<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

✬<br />

Theorem 9.3.53 (inf-sup condition).<br />

The finite element spacesU N ⊂ H 1 0 (Ω),Q N ⊂ L 2 ∗(Ω) provide a stable finite element pair (→<br />

Def. 9.3.38) <strong>for</strong> the Stokes problem (9.2.33)/ (9.2.26) if there is a constantβ > 0 depending only<br />

onΩand the shape regularity measure (→ Def. 5.3.26) ofMsuch that<br />

|b(w<br />

sup N ,q N )|<br />

≥ β‖q<br />

w N ∈U N<br />

‖w N ‖ N ‖ L 2 (Ω) ∀q N ∈ Q N . (9.3.54)<br />

a<br />

✩<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Let us embark on a mathematical analysis of the stability issue, which turns out to be much simpler<br />

than expected.<br />

Remark 9.3.43 (Stable velocity solution).<br />

Consider (9.2.33)↔(9.2.26), and Galerkin discretization (9.3.15), define the subspace<br />

N(b N ) := {w N ∈ U N : b(w N ,q N ) = 0 ∀q N ∈ Q N } ⊂ U N . (9.3.44)<br />

From 2nd equaton ➣ <strong>for</strong> any solution(v N ,p N ) of (9.3.15): v N ∈ N(b N )<br />

Test the first equation of (9.3.15) withw N ∈ N(b N )<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

✫<br />

The estimate (9.3.54) is kown as<br />

inf-sup condition<br />

LBB (Ladyzhenskaya-Babuska-Brezzi) condition<br />

It is the linchpin of the numerical analysis of finite element methods <strong>for</strong> the Stokes problem, see [13].<br />

△<br />

✪<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

a(v N ,w N ) = l(w N )<br />

w N :=v N<br />

=⇒ ‖v N ‖ 2 a ≤ l(v N) (9.3.40)<br />

≤ C l ‖v N ‖ a .<br />

perfect stability of any velocity Galerkin solution<br />

9.3<br />

p. 1045<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

9.3.3 Convergence<br />

9.3<br />

p. 104<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

This explains the observation made in Ex. 9.3.26: reasonable approximation <strong>for</strong> velocity v despite<br />

pressure instability.<br />

△<br />

Abstract considerations (easier this way!):<br />

Remark 9.3.50 (Stability of pressure solution: inf-sup condition).<br />

Goal: stability of pressure solutionp N ∈ Q N of (9.3.15)<br />

From the first equation of (9.3.15)<br />

‖p N ‖ L 2 (Ω) ≤ C sup<br />

w N ∈U N<br />

l(w N )<br />

‖w N ‖ a<br />

(9.3.51)<br />

best constant in (9.3.40)<br />

a(v N ,w N )+b(w N ,p N ) = l(w N ) ∀w N ∈ U N ,<br />

and the stability of the velocity solution (→ Rem. 9.3.43) we conclude (9.3.51), once we know<br />

b(w N ,p N ) = g(w N ) ∀w N ∈ U N ⇒ ‖p N ‖ L 2 (Ω) ≤ C sup<br />

w N ∈U N<br />

|g(w N )|<br />

‖w N ‖ a<br />

. (9.3.52)<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

9.3<br />

p. 1046<br />

H ˆ= normed vector space, norm‖·‖ (think of a function space),<br />

c : H ×H ↦→ R bilinear <strong>for</strong>m onH, not necessarily s.p.d. (→ Def. 2.1.25),<br />

l : H ↦→ R linear <strong>for</strong>m onH,<br />

Assumption: c is continuous, cf. Rem. 7.2.2, (3.1.2)<br />

∃C c > 0: |c(u,v)| ≤ C c ‖u‖‖v‖ ∀u,v ∈ H . (9.3.61)<br />

We consider the linear variational problem (→ Rem. 1.4.5)<br />

u ∈ H: c(u,v) = l(v) ∀v ∈ H , (9.3.62)<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

9.3<br />

p. 104


and its Galerkin discretization, based on finite-dimensional subspaceH N ⊂ H, cf. (3.1.4),<br />

Assumption:<br />

Trick!<br />

”Trick”<br />

stability<br />

u N ∈ H N : c(u N ,v N ) = l(v N ) ∀v N ∈ H N . (9.3.63)<br />

u N solves (9.3.63)<br />

=⇒ ∃C s > 0: ‖u N ‖ ≤ sup<br />

w N ∈H N<br />

|l(w N )|<br />

‖w N ‖ . (9.3.64)<br />

For any v N ∈ H N the differenceu N −v N (u N solution of (9.3.63)) solves<br />

Triangle inequality<br />

c(u N −v N ,w N ) = l(w N )−c(v N ,w N ) ∀w N ∈ H N .<br />

(9.3.64)<br />

|l(w<br />

=⇒ ‖u N −v N ‖ ≤ C s sup N )−c(v N ,w N )|<br />

w N ∈H N<br />

‖w N ‖<br />

(9.3.62) |c(u−v<br />

= C s sup N ,w N )|<br />

w N ∈H N<br />

‖w N ‖<br />

(9.3.61)<br />

≤ C c C s ‖u−v N ‖ .<br />

‖u−u N ‖ ≤ ‖u−v N ‖+‖u N −v N ‖ (9.3.65)<br />

≤ (1+C c C s )‖u−v N ‖ ∀v N ∈ H N .<br />

(9.3.65)<br />

‖u−u N ‖ ≤ (1+C c C s ) inf<br />

v N ∈H N<br />

‖u−v N ‖ . (9.3.66)<br />

(9.3.66) is a fundamental insight into the properties of Galerkin discretizations, cf. Thm. 5.1.10 that<br />

was confined to s.p.d. bilinear <strong>for</strong>ms:<br />

For the Galerkin discretization of linear variational problems:<br />

Stability ⇒ Quasi-optimality(∗)<br />

Terminology: Quasi-optimality of Galerkin solutions: withC > 0 independent of data and discretization<br />

parameters<br />

‖u−u N ‖<br />

} {{ }<br />

↑<br />

(norm of) discretization error<br />

≤ C inf ‖u−v N ‖ , (9.3.67)<br />

v N ∈H N<br />

} {{ }<br />

↑<br />

best approximation error<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

9.3<br />

p. 1049<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

H := H 1 0 (Ω)×L2 (Ω) (combination of two function spaces!)<br />

Role ofcplayed by<br />

c<br />

(( (<br />

v w<br />

p)<br />

q))<br />

Right hand side functional ”l (( w<br />

q<br />

)) = l(w)”<br />

Galerkin trial/test space H N := U N ×Q N .<br />

,<br />

:= a(v,w)+b(w,p)+b(v,q) . (9.3.69)<br />

Then, along the lines of the above abstract considerations, one can show the following a priori error<br />

estimate:<br />

✬<br />

Theorem 9.3.70 (Convergence of stable FE <strong>for</strong> Stokes problem).<br />

If U N , Q N is a stable finite element pair (→ Def. 9.3.38) <strong>for</strong> the Stokes problem (9.2.33), then<br />

the corresponding finite element Galerkin solution(v N ,p N ) satisfies<br />

(<br />

)<br />

‖v−v N ‖ H 1 (Ω) +‖p−p N‖ L 2 (Ω) ≤ C inf ‖v−w N ‖<br />

w N ∈U H 1 (Ω) + inf ‖p−q N ‖<br />

N q N ∈Q L 2 (Ω) ,<br />

N<br />

with a constantC > 0 that depends only onΩ,µ, and the shape regularity of the finite element<br />

mesh.<br />

✫<br />

Note: the a priori error bound of Thm. 9.3.70 involves the sum of the best approximation errors <strong>for</strong><br />

both the velocity and pressure trial/test spaces.<br />

Example 9.3.72 (Convergence of P2-P0 scheme <strong>for</strong> Stokes equation).<br />

✩<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

9.3<br />

p. 105<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

✪<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Interpretation of error curves observed in Ex. 9.3.29:<br />

Application of abstract theory to finite element discretization of Stokes problem (9.2.33):<br />

9.3<br />

p. 1050<br />

Smooth solutions <strong>for</strong> bothvandp:<br />

9.3<br />

p. 105


Sect. 5.3.5<br />

➣<br />

inf<br />

w N ∈S 0 2,0 (M) ‖v−w N ‖ H 1 (Ω) ≤ Ch2 M ‖v‖ H 3 (Ω) (Thm. 5.3.42),<br />

inf<br />

q N ∈S −1<br />

0 (M) ‖p−q N ‖ L 2 (Ω) ≤ Ch M‖p‖ H 1 (Ω) ,<br />

with constants depending only on the shape regularity measure (→ Def. 5.3.26) of triangulationM.<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

➣ Excellent approximation of eithervorpalone may not lead to an accurate solution.<br />

Recall similar situation <strong>for</strong> method of lines, where errors of spatial discretization and timestepping add<br />

up, see “Meta-Thms.” 6.1.63, 6.2.42.<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

The observed O(h) algebraic convergence in the H 1 (Ω)-norm (<strong>for</strong> v N ) and L 2 (Ω)-norm (<strong>for</strong> p N )<br />

results, because<br />

the larger best aproximation error ofS −1<br />

0 (M) dominates. ✸<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

For the sake of efficiency<br />

balance<br />

inf ‖v−w N ‖<br />

w N ∈U H 1 (Ω) and+ inf ‖p−q N ‖<br />

N q N ∈Q L 2 (Ω) N<br />

Too ambitious: we have no chance of guessing the best approximation errors a priori.<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Thus we settle <strong>for</strong> a more modest asymptotic balance condition, cf. the considerations in Sect. 6.1.5.<br />

△<br />

9.4 The Taylor-Hood element<br />

A: The ultimate cure <strong>for</strong> instability<br />

chose trial/test space <strong>for</strong> velocity large enough→very large (to play safe).<br />

9.4<br />

p. 1053<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Guideline <strong>for</strong> viable and efficient choice of Galerkin finite element spaces <strong>for</strong> Stokes problem:<br />

➊ The pair(U N ,Q N ) of finite element spaces must be stable (→ Def. 9.3.38)<br />

➋ The velocity finite element spaceU N should provide the same rate of algebraic convergence<br />

of theH 1 (Ω)-best approximation error w.r.t. h M → 0 as the pressure space inL 2 (Ω).<br />

➌ The velocity finite element spaceU N should guarantee ➊ and ➋ with as few degrees of<br />

freedom as possible.<br />

9.4<br />

p. 105<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

B: Well, but a large finite element space leads to a large system of linear equations, that is, high<br />

computational cost.<br />

A: Never mind, a large space buys good accuracy, which is what we also want!<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Note that the stable finite element pair (S2,0 0 (M),S−1 0 (M)) does not meet the efficiency criterion,<br />

because the velocity space offers a better asymptoic rate of convergence than the pressure space,<br />

see Ex. 9.3.72.<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Remark 9.4.2 (Efficient finite element discretization of Stokes problem).<br />

There is a stable, perfectly balanced pair of spaces:<br />

Thm. 9.3.70, cf. discussion in Ex. 9.3.72: the finite element discretization error <strong>for</strong> a stable finite<br />

element pair(U N ,Q N ) (→ Def. 9.3.38) <strong>for</strong> the Stokes problem (9.2.33) is the sum of approximation<br />

errors <strong>for</strong> the velocityvinU N and the pressurepinQ N .<br />

9.4<br />

p. 1054<br />

9.4<br />

p. 105


Taylor-Hood finite element method <strong>for</strong> Stokes problem:<br />

M: triangular/tetrahedral or rectangular/hexahedral mesh of Ω, may be hybrid, see<br />

Sect. 3.3.1<br />

Velocity space:<br />

Pressure space:<br />

U N := S 0 2,0 (M) ⊂ H1 0 (Ω)<br />

Q N := S1 0 (M) (continuous pressure)<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Monitored: Error norms‖u−u N ‖ H 1 (Ω) ,<br />

‖u−u N ‖ L 2 (Ω) ,‖p−p N‖ L 2 (Ω)<br />

Observation: algebraic convergence<br />

‖u−u N ‖ H 1 (Ω) = O(h2 M ) ,<br />

‖u−u N ‖ L 2 (Ω) = O(h3 M ) ,<br />

Discretization error [log]<br />

10 −2<br />

10 −3<br />

10 −4<br />

10 −5<br />

Convergence rate of discretization error <strong>for</strong> Taylor−Hood elements<br />

V, L2 Norm<br />

V, H1 Semi−norm<br />

P, L2 Norm<br />

p = 2.15<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

10 −1 p = 3.11<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

‖p−p N ‖ L 2 (Ω) = O(h2 M ) .<br />

10 −6<br />

10 −7<br />

10 0<br />

10 −1<br />

Mesh width [log]<br />

10 −2<br />

Fig. 344<br />

✸<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Fig. 342<br />

sites of velocity local shape functions<br />

Fig. 343<br />

sites of pressure local shape functions<br />

Balanced approximation properties of finite element spaces (<strong>for</strong> sufficiently smooth velocity and pressure<br />

solution):<br />

9.4<br />

p. 1057<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

9.4<br />

p. 105<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

velocity:<br />

pressure:<br />

inf ‖v−w N ‖<br />

w N ∈U H 1 (Ω) ≤ Ch2 M ‖v‖ H 3 (Ω) by Thm. 5.3.42,<br />

N<br />

inf ‖p−q N ‖<br />

q N ∈S0 −1 L 2 (M) (Ω) ≤ Ch2 M ‖p‖ H 2 (Ω) by Thm. 5.3.27.<br />

✬<br />

Theorem 9.4.3 (Stability and convergence of Taylor-Hood finite element). → [28]<br />

The Taylor-Hood element provides a stable finite element pair <strong>for</strong> the Stokes problem (→<br />

Def. 9.3.38) and <strong>for</strong> sufficiently smooth velocity and pressure solution<br />

( )<br />

‖v−v N ‖ H 1 (Ω) +‖p−p N‖ L 2 (Ω) ≤ Ch2 M ‖v‖ H 3 (Ω) +‖p‖ H 2 (Ω) ,<br />

with a constantC > 0 that depends only onΩ,µ, and the shape regularity of the finite element<br />

mesh.<br />

✫<br />

Example 9.4.4 (Convergence of Taylor-Hood method <strong>for</strong> Stokes problem).<br />

✩<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

✪<br />

DRAFT<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Stokes problem (9.2.41) as in Ex. 9.3.29<br />

perturbed triangular meshes as in Ex. 9.3.29<br />

Taylor-Hood finite element Galerkin discretization<br />

9.4<br />

p. 1058<br />

10.4<br />

p. 106


10<br />

Adaptive Finite Element<br />

Discretization<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

11 Multilevel iterative solvers<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

10.1 Concept of adaptivity<br />

11.1 Solving finite element linear systems<br />

10.2 A priori hp-adaptivity<br />

10.2.1 Graded meshes in 1D<br />

10.2.2 Triangular graded meshes<br />

10.2.3 hp-approximation in 1D<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

10.4<br />

p. 1061<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

11.2 Subspace correction<br />

11.2.1 Successive subspace correction algorithm (SSC)<br />

11.2.2 Gauss-Seidel iteration<br />

11.2.3 Hierarchical basis multigrid<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

11.5<br />

p. 106<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

11.5<br />

p. 1062<br />

12.5<br />

p. 106


12 Sparse Grids Galerkin <strong>Methods</strong><br />

12.1 The curse of dimension<br />

12.2 Hierarchical basis<br />

12.3 Sparse grids<br />

12.4 Approximation on sparse grids<br />

12.5 Sparse grids algorithms<br />

Index<br />

H 1 -semi-norm, 147<br />

L 2 -norm, 144<br />

2-regularity<br />

of Dirichlet problem, 580<br />

convergence<br />

exponential, 156<br />

a priori estimates, 483<br />

a-orthogonal, 462<br />

affine linear function<br />

in 2D, 287<br />

affine trans<strong>for</strong>mation, 378<br />

algebraic convergence, 156<br />

algorithm<br />

numerical, 73<br />

analytic solution, 72<br />

angle condition<br />

<strong>for</strong> Delaunay mesh, 448<br />

anisotropic diffusion, 750<br />

artificial diffusion, 745<br />

artificial viscosity, 745<br />

assembly, 299<br />

cell oriented, 365<br />

in FEM, 358<br />

linear finite elements, 306<br />

barycentric coordinate representation<br />

of local shape functions, 371<br />

barycentric coordinates, 300<br />

basis<br />

change of, 280<br />

best approximation error, 464<br />

beta function, 375<br />

bilinear <strong>for</strong>m, 51, 66<br />

continuous, 717<br />

positive definite, 186<br />

bilinear trans<strong>for</strong>mation, 406<br />

boundary conditions, 26, 69, 234<br />

Dirichlet, 234, 245<br />

homogeneous, 247<br />

Neumann, 237, 246<br />

no slip, 981<br />

radiation, 246<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

12.5<br />

p. 1065<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

12.5<br />

p. 1066<br />

boundary fitting, 417<br />

parabolic, 417<br />

boundary flux<br />

compuation of, 564<br />

boundary layer, 720<br />

boundary value, 167<br />

boundary value problem<br />

elliptic, 248<br />

boundary value problem (BVP), 167<br />

bounding box, 351<br />

Burger’s equation, 849<br />

Burgers equation, 823<br />

calculus of variations, 45<br />

Cauchy problem, 815, 826, 840<br />

<strong>for</strong> one-dimensional conservation law, 831<br />

<strong>for</strong> wave equation, 665<br />

cell, 315<br />

cell contributions, 359<br />

central flux, 876<br />

central slope, 952<br />

CFL-condition, 691, 919<br />

characteristic curve, 832<br />

characteristic method, 779<br />

Chebychev nodes, 130<br />

checkerboard mode, 1020<br />

circumcenter, 447<br />

classical solution, 61, 257<br />

coefficient vector, 278<br />

collocation, 124, 125<br />

spline, 133<br />

compatibility condition, 258<br />

convective terms, 708<br />

convergence, 140, 468<br />

algebraic , 156<br />

asymptotic, 150<br />

convex function, 189<br />

corner singular function, 539<br />

Courant-Friedrichs-Levy condition (CFL), 691<br />

Crank-Nicolson method, 621<br />

creeping flow, 981<br />

curve, 26, 27<br />

length, 28<br />

parametrization, 27<br />

cut-off function, 571<br />

d’Alembert solution, 666<br />

Delaunay mesh<br />

angle condition, 448<br />

delta distribution, 222<br />

dielectric tensor, 178<br />

difference quotient, 137<br />

differential operator, 129, 167<br />

diffusion tensor, 750<br />

diffusive flux, 829<br />

diffusive terms, 708<br />

Dirac delta function, 222<br />

Dirichlet boundary conditions, 234, 245<br />

<strong>for</strong> linear FE, 390<br />

Dirichlet data, 215, 262<br />

Dirichlet problem, 234<br />

variational <strong>for</strong>mulation, 214<br />

discrete maximum principle, 590<br />

discrete model, 33<br />

compatibility conditions<br />

<strong>for</strong>H 1 (Ω), 208<br />

complete space, 459<br />

composite midpoint rule, 114<br />

composite trapezoidal rule, 114<br />

computational domain, 239<br />

computational ef<strong>for</strong>t, 527<br />

condition number, 99<br />

conditionally stable, 654<br />

configuration space, 26<br />

<strong>for</strong> incompressible fluid, 979<br />

<strong>for</strong> taut membrane, 174<br />

congruent matrices, 281<br />

conservation<br />

of energy, 675<br />

conservation <strong>for</strong>m, 869<br />

conservation law, 827<br />

differential <strong>for</strong>m, 830<br />

integral <strong>for</strong>m, 829<br />

one-dimensional, 830<br />

scalar, 830<br />

conservation of energy, 240<br />

consistency<br />

of a variational problem, 751<br />

consistency error, 942<br />

continuity<br />

of a linear <strong>for</strong>m, 205<br />

of linear functional, 557<br />

control volume, 443, 827<br />

convection-diffusion equation, 708<br />

convective cooling, 246<br />

discrete variational problem, 274, 278<br />

discretization, 73, 272<br />

discretization error, 140, 464<br />

discretization parameter, 468<br />

displacement, 69<br />

displacement function, 69<br />

dissipation, 614<br />

in fluid, 984<br />

DistMesh, 351<br />

divergence<br />

of a vectorfield, 228<br />

domain, 167<br />

computational, 239<br />

spatial, 71, 172<br />

domain of dependence, 668<br />

domain of influence, 668<br />

dual mesh, 446<br />

dual problem, 561<br />

duality estimate, 561<br />

dynamic viscosity, 980<br />

eddy<br />

in a fluid, 983<br />

edge, 315<br />

elastic energy, 32<br />

mass-spring model, 33<br />

elastic string, 24<br />

electric field, 177<br />

electric scalar potential, 178<br />

electromagnetic field energy, 178<br />

electrostatic field energy, 178<br />

electrostatics, 177<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

12.5<br />

p. 106<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

12.5<br />

p. 106


element, 315<br />

element load vector, 361<br />

element stiffness matrix, 361<br />

elliptic<br />

linear scalar second order PDE, 244<br />

elliptic boundary value problem, 248<br />

energy<br />

conservation, 240<br />

of electrostatic field, 178<br />

energy conservation<br />

<strong>for</strong> wave equation, 671<br />

energy norm, 187<br />

entropy, 982<br />

equidistant mesh, 107, 137, 323<br />

equilibrium length<br />

of spring, 32<br />

equilibrium principle, 34<br />

equivalence<br />

of norms, 504<br />

Euler equations, 823<br />

Euler method, 619<br />

evolution operator<br />

fully discrete, 913<br />

semi-discrete, 911<br />

evolution problem, 600<br />

semi-discrete, 617<br />

spatial variational <strong>for</strong>mulation, 608<br />

expansion shock, 849<br />

explicit Euler method, 619<br />

exponential convergence, 156<br />

face, 315<br />

General entropy solution <strong>for</strong> 1D scalar Riemann problem,<br />

858<br />

generic constants, 525<br />

global shape functions, 322<br />

Godunov numerical flux, 896<br />

gradient, 174<br />

of a function, 175<br />

gravitational <strong>for</strong>ce, 30<br />

Green’s first <strong>for</strong>mula, 229<br />

grid<br />

1D, 107, 137<br />

grid function, 141<br />

h-refinement, 533<br />

hanging node, 318<br />

hat function, 211, 290<br />

heat capacity, 603<br />

heat conductivity, 242<br />

heat equation, 603<br />

heat flux, 239, 242<br />

computation of, 564<br />

convective, 707<br />

diffusive, 707<br />

heat source, 241<br />

Hessian, 495<br />

Heun method, 914<br />

Hilbert space, 459<br />

homogeneous boundary conditions, 247<br />

Hooke’s law, 31<br />

hyperbolic evolution problem, 662<br />

discrete case, 672<br />

field energy<br />

electromagnetic, 178<br />

finite difference methods, 430<br />

finite differences<br />

1D, 136<br />

in 2D, 430<br />

finite elements<br />

parametric, 410<br />

finite volume methods, 442<br />

flow field, 701<br />

flow map, 704<br />

flux function, 827, 832<br />

<strong>for</strong>ce density, 175<br />

Fourier’s law, 241<br />

if fluid, 707<br />

Frobenius norm, 499<br />

functional, 555<br />

linear, 557<br />

fundamental lemma of calculus of variations, 232<br />

Galerkin discretization, 76, 273<br />

Galerkin matrix, 359<br />

Galerkin orthogonality, 462<br />

Galerkin solution, 78<br />

quasi-optimality, 464<br />

Galerkin test space, 78<br />

Galerkin trial space, 78<br />

Gamma function, 375<br />

Gauss’ theorem, 229, 243, 706, 838<br />

Gauss-Legendre quadrature, 385<br />

Gauss-Lobatto quadrature, 385<br />

implicit Euler method, 619<br />

implicit midpoint rule, 621<br />

increments<br />

Runge-Kutta, 622<br />

index mapping matrix, 363<br />

inf-sup condition, 1037<br />

inflow, 827<br />

inflow boundary, 722<br />

initial conditions, 600<br />

initial value problem<br />

stiff, 631<br />

initial-boundary value problems (IBVP), 601<br />

parabolic, 605<br />

integrated Legendre polynomials, 88<br />

integration by parts<br />

in 1D, 58<br />

multidimensional, 229<br />

intermediate state, 892<br />

interpolant<br />

piecewise linear, 451<br />

interpolation error, 494<br />

interpolation error estimates<br />

anisotropic, 510<br />

in 1D, 485<br />

interpolation nodes, 330<br />

inviscid, 821<br />

kinetic energy, 671<br />

L(π)-stability, 645<br />

L-shaped domain, 475<br />

L-stability, 645<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

12.5<br />

p. 1069<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

12.5<br />

p. 1070<br />

Lagrange functional<br />

<strong>for</strong> zero mean constraint, 1003<br />

Lagrange multiplier, 993<br />

Lagrangian finite elements, 329, 367<br />

on quadrilaterals, 404<br />

Lagrangian functional, 994<br />

Lagrangian method, 779<br />

<strong>for</strong> advecti0n, 771<br />

Laplace equation, 233<br />

Lax entropy condition, 857<br />

Lax-Friedrichs flux, 882<br />

LBB condition, 1037<br />

leapfrog, 681<br />

Legendre polynomials, 89<br />

integrated, 88<br />

LehrFEM, 345<br />

lexikographic ordering, 431<br />

lifting theorem, 537, 544<br />

linear boundary fitting, 551<br />

linear <strong>for</strong>m, 51<br />

continuity, 205<br />

linear function<br />

in 2D, 287<br />

linear functional, 51<br />

linear interpolation<br />

in 1D, 485<br />

in 2D, 493, 494<br />

linear variational problem, 65<br />

Linearity, 248<br />

linearization<br />

of variational problems, 418<br />

simplicial, 318<br />

triangular, 316<br />

mesh data structure, 352<br />

mesh file <strong>for</strong>mat, 346<br />

triangular mesh, 347<br />

mesh generation, 351<br />

mesh generator, 346<br />

mesh width, 471<br />

method of characteristics, 721<br />

method of lines, 617<br />

midpoint rule<br />

composite, 114<br />

minmod, 966<br />

mixed boundary conditions, 247<br />

Mixed Neumann–Dirichlet problem, 238<br />

model<br />

continuous, 73<br />

discrete, 33, 73<br />

monomial basis, 87<br />

monotonicity preserving linear interpolation, 962<br />

multi-index notation, 319<br />

multiplicative trace inequality, 266<br />

MUSCL scheme, 971<br />

NETGEN, 351<br />

Neumann boundary conditions, 237, 246<br />

Neumann data<br />

admissibilty conditions, 264<br />

Neumann problem, 257<br />

compatibility condition, 258<br />

variational <strong>for</strong>m, 257<br />

Newton update, 426<br />

load vector, 278, 359<br />

local linearization, 423<br />

local operations, 366<br />

local shape function, 325<br />

barycentric representation, 402<br />

local shape functions<br />

quadratic, 331<br />

mass lumping, 683<br />

mass-spring model, 31<br />

elastic energy, 33<br />

material coordinate, 29<br />

material derivative, 801<br />

material tensor, 215<br />

mathematical modelling, 22<br />

maximu principle<br />

discrete, 590<br />

maximum principle, 586, 713<br />

Maxwell’s equations<br />

static case, 178<br />

mean value <strong>for</strong>mula, 495<br />

membrane, 170<br />

potential energy, 174, 175<br />

membrane problem<br />

variational <strong>for</strong>mulation, 214<br />

mesh, 315<br />

1D, 107, 137<br />

data structures, 352<br />

equidistant, 107, 137<br />

node, 284<br />

non-con<strong>for</strong>ming, 318<br />

quadrilateral, 316<br />

Newton’s method, 422<br />

in function space, 422<br />

termination, 427<br />

Newton’s second law of motion, 659<br />

Newton-Cotes <strong>for</strong>mula, 385<br />

Newton-Galerkin iteration, 426<br />

nodal basis, 290<br />

nodal interpolation operators, 521<br />

nodal value, 290<br />

node, 284<br />

1D, 107, 137<br />

quadrature, 94<br />

norm, 142<br />

on function space, 143<br />

numerical domain of dependence, 917<br />

numerical flux, 444, 869<br />

numerical flux function, 444<br />

numerical quadrature, 93<br />

nodex, 376<br />

weights, 376<br />

offset function, 52, 387<br />

<strong>for</strong> linear FE, 388<br />

order of quadrature rule, 377<br />

outflow, 827<br />

outflow boundary, 722<br />

output functional, 555<br />

p-refinement, 533<br />

parametric finite elements, 410, 411<br />

parametric quadrature rule, 376<br />

parametrization<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

12.5<br />

p. 107<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

12.5<br />

p. 107


of curve, 27<br />

particle method, 779<br />

PDE<br />

lLinear scalar second order elliptic, 244<br />

perpendicular bisector, 447<br />

phase space, 826<br />

Phythagoras’ theorem, 463<br />

piecewise linear interpolant, 451<br />

piecewise linear reconstruction, 948<br />

piecewise quadratic interpolation, 522<br />

Poincaré-Friedrichs inequality, 203, 264<br />

point <strong>for</strong>ce, 57<br />

Poisson equation, 233, 469<br />

Poisson matrix, 434<br />

polar coordinates, 223<br />

polynomials<br />

degree, 319<br />

multivariate, 319<br />

univariate, 85<br />

positive definite<br />

bilinear <strong>for</strong>m, 186<br />

uni<strong>for</strong>mly, 180<br />

postprocessing, 141<br />

potential energy, 671<br />

of taut membrane, 174<br />

pressure, 998<br />

pressure Poissson equation, 1006<br />

problem parameters<br />

<strong>for</strong> elastic string, 30<br />

problem size, 527<br />

procedural <strong>for</strong>m<br />

reaction term<br />

in 2nd-order BVP, 282<br />

reference elements, 411<br />

regular refinement, 466<br />

reversibility, 675<br />

Reynolds number, 980<br />

Riemann problem, 846<br />

Riesz representation theorem, 459<br />

right hand side vector, 359<br />

Robin boundary conditions, 246<br />

rubber band, 24<br />

Runge-Kutta<br />

increments, 622<br />

Runge-Kutta method, 622<br />

Runge-Kutta methods<br />

stability function, 929<br />

saddle point problem, 994<br />

linear, 996, 1012<br />

variational, 995<br />

SDIRK timestepping, 645<br />

semi-discrete evolution problem, 617<br />

semi-norm, 147<br />

sensitivity<br />

of a problem, 218<br />

shape functions<br />

global, 322<br />

shape regularity measure, 502<br />

shock, 847<br />

physical, 857<br />

subsonic, 895<br />

supersonic, 895<br />

of functions, 271<br />

product rule, 612<br />

in higher dimensions, 228<br />

production term, 827<br />

pullback, 396<br />

quadratic functional, 183<br />

quadratic local shape functions, 331<br />

quadratic minimization problem, 64<br />

quadratic minimization problems, 182<br />

quadrature <strong>for</strong>mula, 94<br />

quadrature node, 94<br />

quadrature nodes, 376<br />

quadrature rule, 376<br />

on triangle, 381<br />

order, 377<br />

parametric, 376<br />

quadrature rules<br />

Gauss-Legendre, 385<br />

Gauss-Lobatto, 385<br />

quadrature weight, 94<br />

quadrature weights, 376<br />

quadrilateral mesh, 316<br />

quasi-optimality, 464, 1040<br />

Radau timestepping, 645<br />

radiation boundary conditions, 246, 255<br />

rarefaction<br />

subsonic, 895<br />

supersonic, 895<br />

transonic, 895<br />

rarefaction wave/fan, 855<br />

shock speed, 847<br />

similarity solution, 853<br />

simplicial mesh, 318<br />

singular perturbation, 724<br />

slope limiter, 967<br />

slope limiting, 961<br />

Sobolev norms, 506<br />

Sobolev semi-norms, 508<br />

Sobolev space H 1 (Ω), 201<br />

Sobolev space H0 1 (Ω), 199<br />

Sobolev spaces, 193, 506<br />

solution<br />

analytic, 72<br />

approximate, 73<br />

source term, 167<br />

space-time-cylinder, 600<br />

sparsity pattern, 297<br />

spatial domain, 172<br />

spectrum, 923<br />

spline<br />

cubic, 134<br />

spline collocation, 133<br />

spring constant, 32<br />

Störmer scheme, 680<br />

stability, 1033<br />

of linear variational problem, 218<br />

stability domain, 931<br />

stability function<br />

of explicit Runge-Kutta methods, 929<br />

of RK-SSM, 645<br />

Stable finite element pair, 1034<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

12.5<br />

p. 1073<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

12.5<br />

p. 1074<br />

stiff IVP, 631<br />

stiffness<br />

of spring, 32<br />

stiffness matrix, 278, 359<br />

sparsity, 325<br />

Stokes problem<br />

variational <strong>for</strong>m, 999<br />

Strang splitting, 771<br />

streamline, 702<br />

streamline diffusion, 745<br />

strong <strong>for</strong>m, 61<br />

subsonic rarefaction, 895<br />

subsonic shock, 895<br />

supersonic rarefaction, 895<br />

supersonic shock, 895<br />

supremum norm, 143<br />

symbol<br />

of a difference operator, 923<br />

T-matrix, 363<br />

Taylor expansion, 47<br />

Taylor-Hood finite element, 1046<br />

tensor product polynomials, 321<br />

tensor-product grid, 431<br />

tent function, 108, 290<br />

test function, 52<br />

test space, 52<br />

TETGEN, 351<br />

thermodynamics<br />

2nd law, 984<br />

trace theorem, 266<br />

trajectory, 702<br />

vertex, 315<br />

virtual work principle, 50<br />

von Neumann stability analysis, 931<br />

Voronoi cell, 446<br />

Voronoi dual mesh, 446<br />

vortex, 983<br />

wave equation, 662<br />

weak <strong>for</strong>m, 61<br />

weak solution, 840<br />

weight<br />

quadrature, 94<br />

well-posedness, 1033<br />

width<br />

of a mesh, 471<br />

trans<strong>for</strong>mation of functions, 396<br />

trans<strong>for</strong>mation techniques, 410<br />

translation-invariant, 916<br />

transonic rarefaction, 895<br />

transport equation, 767<br />

transsonic rarefaction fan, 888<br />

trapezoidal rule<br />

composite, 113, 114<br />

trial space, 52, 125<br />

triangle inequality, 142<br />

triangular mesh, 316<br />

triangular mesh: file <strong>for</strong>mat, 347<br />

triangulation, 315<br />

two-point boundary value problem, 61<br />

two-step method, 680<br />

uni<strong>for</strong>mly positive, 243<br />

upwind quadrature, 738, 741<br />

upwinding, 734<br />

variational crime, 545<br />

variational equation<br />

linear, 65<br />

non-linear, 49<br />

variational <strong>for</strong>mulation<br />

spatial, 608<br />

variational problem<br />

discrete, 274, 278<br />

linear, 65<br />

non-linear, 419<br />

perturbed, 546<br />

vector Laplacian, 1005<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

12.5<br />

p. 107<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

12.5<br />

p. 107


Examples and Remarks<br />

L 2 interpolation error, 583<br />

L 2 -convergence of FE solutions, 580<br />

L 2 -estimates on non-convex domain, 587<br />

L ∞ interpolation error estimate in 1D, 525<br />

H 1 0(div0,Ω)-con<strong>for</strong>ming finite elements, 1002<br />

|·| H1 (Ω)-semi-norm, 205<br />

(Bi)-linear Lagrangian finite elements on hybrid meshes,<br />

346<br />

[Membrane with free boundary values, 238<br />

ode45 <strong>for</strong> discrete parabolic evolution, 634<br />

“PDEs” <strong>for</strong> univariate functions, 25<br />

“Physics based” discretization, 76<br />

1D convection-diffusion boundary value problem, 726<br />

Adequacy of 2nd-order timestepping, 981<br />

Admissible Dirichlet data, 265<br />

Admissible Neumann data, 267<br />

Affine trans<strong>for</strong>mation of triangles, 380<br />

Approximate computation of norms, 152<br />

Approximate Dirichlet boundary conditions, 392<br />

Approximate sub-steps <strong>for</strong> Strang splitting time, 783<br />

Boundary conditions inH 1 0(Ω), 203<br />

Boundary value problems, 170<br />

Boundary values <strong>for</strong> conservation laws, 839<br />

Breakdown of characteristic solution <strong>for</strong>mula, 843<br />

Causes <strong>for</strong> non-smoothness of solutions of elliptic BVPs,<br />

549<br />

Central flux <strong>for</strong> Burgers equation, 884<br />

Central flux <strong>for</strong> linear advection, 887<br />

Characteristics <strong>for</strong> advection, 841<br />

Checkerboard instability <strong>for</strong> quadrilateral P1-P0 pair, 1027<br />

Choice of basis <strong>for</strong> polynomial spectral Galerkin methods,<br />

89<br />

Choice of timestepping <strong>for</strong> m.o.l. <strong>for</strong> transient convectiondiffusion,<br />

773<br />

Coefficients/data in procedural <strong>for</strong>m, 77<br />

Collocation approach on “complicated” domains, 433<br />

Collocation points <strong>for</strong> polynomial spectral collocation, 133<br />

Collocation: smoothness requirements <strong>for</strong> coefficients, 131<br />

Compatible boundary and initial data, 611<br />

Computation of heat flux, 570, 577<br />

Conditioning of linear variational problems, 221<br />

Conditioning of spectral Galerkin system matrices, 100<br />

Conrner singular functions, 543<br />

Consequence of monotonicity preservation, 971<br />

Consistency error of Lax-Friedrichs numerical flux, 952<br />

Consistency error of upwind numerical flux, 951<br />

Continuity of interpolation operators, 513<br />

Convective cooling, 249<br />

Convergence of Euler timestepping, 629<br />

Convergence of fully discrete finite volume methods <strong>for</strong><br />

Burgers equation, 943<br />

Approximation of mean temperature, 563, 566<br />

Arrays storing 2D triangular mesh, 357<br />

Assembly algorithm <strong>for</strong> linear Lagrangian finite elements,<br />

309<br />

Assembly <strong>for</strong> linear Lagrangian finite elements on triangular<br />

mes, 367<br />

Assembly <strong>for</strong> quadratic Lagrangian FEM, 370<br />

Assembly of right hand side vector <strong>for</strong> linear finite elements,<br />

315<br />

Asymptotic nature of a priori estimates, 530<br />

Barycentric representation of local shape functions, 405<br />

Bases <strong>for</strong> polynomial spectral collocation, 133<br />

Behavior of generalized eigenvalues ofA⃗µ = λM⃗µ, 640<br />

Benefit of variational <strong>for</strong>mulation of BVPs, 111<br />

Bilinear Lagrangian finite elements, 339<br />

Blow-up <strong>for</strong> leapfrog timestepping, 694<br />

Boundary conditions andL 2 (Ω), 200<br />

Boundary conditions <strong>for</strong> 2nd-order parabolic IBVPs, 612<br />

Boundary conditions <strong>for</strong> linear advection, 827<br />

Boundary conditions <strong>for</strong> wave equation, 669<br />

Convergence of fully discrete timestepping in one spatial<br />

dimension, 653<br />

Convergence of FV with linear reconstruction, 961<br />

Convergence of Lagrangian FEM <strong>for</strong>p-refinement, 484<br />

Convergence of linear and quadratic Lagrangian finite elements<br />

inL 2 -norm, 477<br />

Convergence of linear and quadratic Lagrangian finite elements<br />

in energy norm, 473<br />

Convergence of MUSCL scheme, 983<br />

Convergence of P2-P0 scheme <strong>for</strong> Stokes equation, 1052<br />

Convergence of SUPG and upwind quadrature FEM, 765<br />

Convergence of Taylor-Hood method <strong>for</strong> Stokes problem,<br />

1058<br />

Crank-Nicolson timestepping, 627<br />

Decoupling of velocity components ?, 999<br />

Delaunay-remeshing in 2D, 796<br />

Derivative of non-linear u ↦→ a(u;·), 428<br />

Difference stencils, 923<br />

Differentiating a functional on a space of curves, 51<br />

Differentiating bilinear <strong>for</strong>ms with time-dependent arguments,<br />

618<br />

Diffusive flux, 837<br />

Dimensionless equations, 31<br />

Dimensions of Lagrangian finite element spaces on triangular<br />

meshes, 534<br />

Discontinuity connecting constant states, 852<br />

Domain of dependence/influence <strong>for</strong> 1D wave equation,<br />

constant coefficient case, 673<br />

Effect of added diffusion, 753<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

12.5<br />

p. 1077<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

12.5<br />

p. 1078<br />

Efficient finite element discretization of Stokes problem,<br />

1054<br />

Efficient implementation of assembly, 373<br />

Elastic string shape by finite element discretization, 125<br />

Elliptic lifting result in 1D, 541<br />

Energy conservation <strong>for</strong> leapfrog, 690<br />

Energy norm, 148<br />

Energy norm and H 1 (Ω)-norm, 508<br />

En<strong>for</strong>cing zero mean, 1012<br />

Ensuring uniqueness of pressure, 1009<br />

Entropy solution of Burgers equation, 866<br />

Euler equations, 831<br />

Euler timestepping, 625<br />

Euler timestepping <strong>for</strong> 1st-order <strong>for</strong>m of semi-discrete wave<br />

equation, 681<br />

Evaluation of local shape functions at quadrature points,<br />

404<br />

Explicit Euler in Fourier domain, 935<br />

Exploring convergence experimentally, 163<br />

Extended MATLAB mesh data structure, 358<br />

Extra regularity requirements, 64<br />

Extra smoothness requirement <strong>for</strong> PDE <strong>for</strong>mulation, 237<br />

Finding continuous replacement functionals, 579<br />

Finite differences <strong>for</strong> convection-diffusion equation in 1D,<br />

732<br />

First-order semidiscrete hyperbolic evolution problem, 680<br />

Fourier series, 933<br />

Fully discrete evolutions, 921<br />

Gap between interpolation error and best approximation<br />

error, 523<br />

Interpolation nodes <strong>for</strong> cubic and quartic Lagrangian FE in<br />

2D, 337<br />

L(π)-stable Runge-Kutta single step methods, 651<br />

Lagrangian finite elements on hybrid meshes, 348<br />

Lagrangian method <strong>for</strong> convection-diffusion in 1D, 799<br />

Lagrangian method <strong>for</strong> convection-diffusion in 2D, 803<br />

Laplace operator, 236<br />

Lax-Friedrichs flux <strong>for</strong> Burgers equation, 890<br />

Leapfrog timestepping, 687<br />

Linear FE discretization of 1D convection-diffusion problem,<br />

733<br />

Linear finite element Galerkin discretization <strong>for</strong> elastic string<br />

model, 119<br />

Linear finite element space <strong>for</strong> homogeneous Dirichlet problem,<br />

294<br />

Linear reconstruction with central slope, 963<br />

Linear reconstruction with minmod limiter, 975<br />

Linear reconstruction with one-sided slopes, 965<br />

Linear variational problems, 67<br />

Linearity and monotonicity preservation, 972<br />

Local interpolation onto higher degree Lagrangian finite<br />

element spaces, 526<br />

Local quadrature rules on quadrilaterals, 387<br />

Local quadrature rules on triangles, 384<br />

Mass lumping, 689<br />

Material coordinate, 31<br />

Mathematical modelling, 24<br />

Maximum principle <strong>for</strong> finite difference discretization, 595<br />

Maximum principle <strong>for</strong> higher order Lagrangian FEM, 603<br />

General asymptotic estimates, 537<br />

Generic constants, 529<br />

Geometric interpretation of CFL condition in 1D, 697<br />

Geometric obstruction to Voronoi dual meshes, 451<br />

Godunov flux <strong>for</strong> Burgers equation, 906<br />

Good accuracy on “bad” meshes, 520<br />

Graph description of string shape, 71<br />

Grid functions, 144<br />

heat conduction, 251<br />

Heat conduction with radiation boundary conditions, 424<br />

Heuristics behind Lagrangian multipliers, 1003<br />

Higher order timestepping <strong>for</strong> 1D heat equation, 656<br />

Impact of choice of basis, 282<br />

Impact of linear boundary fitting on FE convergence, 556<br />

Impact of numerical quadrature on finite element discretization<br />

error, 553<br />

Implementation of non-homogeneous Dirichlet b.c. <strong>for</strong> linear<br />

FE, 393<br />

Implementation of spectral Galerkin discretization <strong>for</strong> elastic<br />

string problem, 103<br />

Implementation of spectral Galerkin discretization <strong>for</strong> linear<br />

2nd-order two-point BVP, 97<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Implicit Euler method of lines <strong>for</strong> transient convection-diffusion,<br />

770<br />

Imposing homogeneous Dirichlet boundary conditions, 345<br />

Improved resolution by limited linear reconstruction, 977<br />

Inefficiency of conditionally stable single step methods,<br />

660<br />

12.5<br />

Initial time, 607<br />

Internal layers, 754<br />

p. 107<br />

Maximum principle <strong>for</strong> linear FE <strong>for</strong> 2nd-order elliptic BVPs,<br />

602<br />

Mesh file <strong>for</strong>mat <strong>for</strong> MATLAB code, 352<br />

Minimal regularity of membrane displacement, 179<br />

Mixed boundary conditions, 250<br />

Naive finite difference discretization of Stokes system, 1017<br />

Naive finite difference scheme, 872<br />

Non-continuity of boundary flux functional, 574<br />

Non-differentiable function inH 1 0(]0,1[), 213<br />

Non-existence of solutions of positive definite quadratic<br />

minimization problem, 194<br />

Non-homogeneous Dirichlet boundary conditions in LehrFEM,<br />

395<br />

Non-linear variational equation, 52<br />

Non-polynomial “bilinear” local shape functions, 413<br />

Non-smooth external <strong>for</strong>cing, 58<br />

Norms on grid function spaces, 151<br />

<strong>Numerical</strong> quadrature in LehrFEM, 386<br />

Offset function <strong>for</strong> finite element Galerkin discretization,<br />

118<br />

Offset functions and Galerkin discretizatio, 82<br />

offset functions <strong>for</strong> linear Lagrangian FE, 391<br />

One-sided difference approximation of convective terms,<br />

737<br />

Ordered basis of test space, 84<br />

Output functionals, 561<br />

P1-P0 quadrilateral finite elements <strong>for</strong> Stokes problem,<br />

1030<br />

P2-P0 finite element scheme <strong>for</strong> the Stokes problem, 1035<br />

Parametrization of a curve, 29<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

12.5<br />

p. 108


Piecewise gradient, 291<br />

Piecewise linear functions (not) inH 1 , 211<br />

Piecewise quadratic interpolation, 527<br />

Point charge, 225<br />

Point particle method <strong>for</strong> pure advection, 787<br />

Pressure Poisson equation, 1016<br />

Properties of weak solutions, 848<br />

Pullback of functions, 399<br />

Quadratic functionals with positive definite bilinear <strong>for</strong>m in<br />

2D, 191<br />

Quadratic minimization problem, 66<br />

Quadratic minimization problems on Hilbert spaces, 201<br />

Quadratic tensor product Lagrangian finite elements, 343<br />

Quasi-locality of solution of scalar elliptic boundary value<br />

problem, 254<br />

Radiative cooling, 250<br />

Relationship between discrete minimization problem and<br />

discrete variational problem, 80<br />

Scalar elliptic boundary value problem in one space dimension,<br />

253<br />

Scaling of entries of element matrix <strong>for</strong>−∆, 306<br />

Semi-Lagrangian method <strong>for</strong> convection-diffusion in 1D,<br />

814<br />

Semi-Lagrangian method <strong>for</strong> convection-diffusion in 2D,<br />

818<br />

Smoothness of solution of scalar elliptic boundary value<br />

problem, 253<br />

Smoothness requirements <strong>for</strong> collocation trial space, 130<br />

Solution <strong>for</strong>mula <strong>for</strong> sourceless transport, 775<br />

Space of square integrable functions, 198<br />

Unstable P1-P0 finite element pair on triangular mesh,<br />

1025<br />

Upwind flux and expansion shocks, 905<br />

Upwind flux and transsonic rarefaction, 895<br />

Upwind flux <strong>for</strong> Burgers equation, 893<br />

Upwind quadrature discretization, 749<br />

Vanishing viscosity <strong>for</strong> Burgers equation, 857<br />

Variational <strong>for</strong>mulation <strong>for</strong> convection-diffusion BVP, 723<br />

Variational <strong>for</strong>mulation <strong>for</strong> heat conduction with Dirichlet<br />

boundary conditions, 257<br />

Variational <strong>for</strong>mulation <strong>for</strong> pure Neumann problem, 260<br />

Variational <strong>for</strong>mulation: heat conduction with general radiation<br />

boundary conditions, 258<br />

Virtual work principle, 52<br />

Wave equation as first order system in time, 670<br />

Well-posed 2nd-order linear elliptic variational problems,<br />

464<br />

Sparse sitffness matrices, 299<br />

<strong>Numerical</strong><br />

Spatial difference operators <strong>for</strong> linear advection, 930 <strong>Methods</strong><br />

Spatial discretization options, 623<br />

<strong>for</strong> PDEs<br />

Spatial domains, 175<br />

Specification of local quadrature rules, 383<br />

Spectral Galerkin discretization of non-linear variational<br />

problem, 107<br />

Spectral Galerkin discretization with quadrature, 95<br />

Spectrum of elliptic operators, 645<br />

Spectrum of upwind difference operator, 932<br />

Spurious Galerking solution <strong>for</strong> 2D convection-diffusion BVP,<br />

740<br />

Stability and CFL condition, 940<br />

Stability domains, 939<br />

Stability functions of explicit RK-methods, 937<br />

Stability of pressure solution: inf-sup condition, 1046<br />

Stable velocity solution, 1045<br />

Streamline-diffusion discretization, 760<br />

Streamlines, 728<br />

Supports of global shape functions in 1D, 326<br />

Supports of global shape functions on triangular mesh,<br />

326<br />

Tense string without external <strong>for</strong>cing, 44<br />

Timestepping <strong>for</strong> ODEs, 77<br />

Trans<strong>for</strong>mation of basis functions, 94<br />

Trans<strong>for</strong>mation techniques <strong>for</strong> bilinear trans<strong>for</strong>mations, 419<br />

Triangular mesh: file <strong>for</strong>mat, 350<br />

Triangular quadratic Lagrangian finite elements, 332<br />

Uniqueness of solutions of Neumann problem, 261<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

12.5 Imcompressible flow field, 715<br />

p. 1081 L(π)-stability, 651<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

Definitions<br />

H 1 -semi-norm, 150<br />

Affine trans<strong>for</strong>mation, 381<br />

Characteristic curve <strong>for</strong> one-dimensional scalar conservation<br />

law, 840<br />

congruent matrices, 284<br />

Consistent modifications of variational problems, 758<br />

Consistent numerical flux function, 881<br />

Courant-Friedrichs=Levy (CFL-)condition, 927<br />

Cubic spline, 138<br />

element load vector, 364<br />

element stiffness matrix, 364<br />

Energy norm, 190<br />

Higher order Lagrangian finite element spaces, 332<br />

Higher order Sobolev norms, 510<br />

Higher order Sobolev semi-norms, 512<br />

Higher order Sobolev spaces, 510<br />

Quadratic minimization problem, 187<br />

Riemann problem, 854<br />

Runge-Kutta method, 628<br />

Shape regularity measure <strong>for</strong> simplex, 506<br />

shock, 855<br />

Singularly perturbed problem, 730<br />

Sobolev space H 1 (Ω), 204<br />

Sobolev space H 1 0(Ω), 202<br />

Space L 2 (Ω), 199<br />

sparse matrix, 299<br />

Stable finite element pair, 1044<br />

Support of a function, 113<br />

Supremum norm, 146<br />

Tensor product Langrangian finite element spaces, 343<br />

tensor product polynomials, 324<br />

Uni<strong>for</strong>mly positive definite tensor field, 183<br />

Lax entropy condition, 865<br />

Legendre polynomials, 91<br />

Linear interpolation in 2D, 498<br />

Linear reconstruction, 957<br />

Local shape functions, 329<br />

Material derivative, 808<br />

Mean square norm/L 2 -norm, 147<br />

mesh, 318<br />

mesh width, 475<br />

Minmod reconstruction, 974<br />

Monotone numerical flux function, 912<br />

Monotonicity preserving linear interpolation, 970<br />

multivariate polynomials, 322<br />

norm, 145<br />

<strong>Numerical</strong> domain of dependence, 925<br />

parametric finite elements, 415<br />

Positive definite bilinear <strong>for</strong>m, 189<br />

pullback, 399<br />

Quadratic functional, 186<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

12.5<br />

p. 108<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

Weak solution of Cauchy problem <strong>for</strong> conservation law,<br />

848<br />

12.5<br />

p. 1082<br />

12.5<br />

p. 108


MATLAB codes<br />

assemMat_QFE, 371<br />

sparse (MATLAB-function), 371<br />

add_Edge2Elem, 358<br />

add_Edges, 358<br />

init_Mesh, 358<br />

Loading a mesh from file, 353<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

12.5<br />

p. 1085<br />

‖·‖ 0 ˆ= norm onL 2 (Ω), 199<br />

‖·‖ ∞ ˆ= supremum norm of a function/maximum norm of<br />

a vector, 146<br />

‖u‖ Hm (Ω) ˆ=m-th order Sobolev norm, 510<br />

‖u‖ L∞ (Ω) ˆ= supremum norm ofu : Ω ↦→ Rn , 146<br />

‖·‖ L2 (Ω) ˆ=L2 -norm of a function, 147<br />

‖·‖ L2 (Ω) ˆ= norm on L2 (Ω), 199<br />

‖·‖ 0 ˆ=L 2 -norm of a function, 147<br />

V(M), 318<br />

Ω, 170<br />

Ω ˆ= spatial domain or parameter domain, 29<br />

Φ ∗ , 399<br />

|u| Hm (Ω) m-th order Sobolev semi-norm, 512<br />

|·| H1 (Ω) ˆ=H1 -semi-norm of a function, 150<br />

A,B,C,... (matrices), 281<br />

A : B ˆ= componentwise dot product of matrices, 1001<br />

M −T hat= inverse transposed of matrix, 418<br />

a K ˆ= restriction of bilinear <strong>for</strong>m a to cell K, 302<br />

· ˆ= inner product of vectors in R n , 36<br />

χ I ˆ= characteristic function of an interval I ⊂ R, 876<br />

curl ˆ= rotation/curl of a vector field, 992<br />

ü := ∂u<br />

∂t , 666<br />

˙u(t) ˆ= 2 (partial) derivative w.r.t. time, 615<br />

l K restriction of linear <strong>for</strong>m l to cell K, 312<br />

Df<br />

(t) ˆ= material derivative w.r.t. velocity field v, 808<br />

Dv<br />

grad ˆ= gradient of a scalar valued function, 177<br />

ĉ(ξ) ˆ= symbol of a finite difference operator, 931<br />

1 = (1,...,1) T , 937<br />

dS ˆ= integration over a surface, 232<br />

M, 318<br />

∇F(x) := gradF(x) ˆ= nabla nontation <strong>for</strong> gradient,<br />

178<br />

diam(Ω) ˆ= diameter ofΩ ⊂ R d , 176<br />

nnz, 299<br />

∂Ω ˆ= boundary of domain Ω, 176<br />

ρ K ˆ= shape regularity measure of cellK, 506<br />

ρ M ˆ= shape regularity measure of a meshM, 506<br />

⃗µ,⃗ϕ, ⃗ ξ,... (coefficient vectors), 281<br />

S 0 p,0(M) ˆ= DegreepLagrangian finite element space with<br />

zero Dirichlet boundary conditions., 345<br />

S 0 1,0 (M) ˆ= space of p.w. linear C0 -finite elements, 110<br />

H 1 0(Ω) Sobolev space, 202<br />

H 1 0(Ω) ˆ= componentwise H 1 0(Ω)-vectorfields, 1001<br />

h M ˆ= mesh width of meshM, 475<br />

h M ˆ= meshwidth of a grid, 109<br />

x j−1 /2<br />

:= 1 2 (x j +x j−1 ) ˆ= midpoint of cell in 1D, 876<br />

‖·‖ ˆ= Euclidean norm of a vector ∈ R n , 30<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

12.5<br />

p. 108<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

List of Symbols<br />

C0([0,1]) 2 := {v ∈ C 2 ([0,1]):v(0) = v(1) = 0}, 48<br />

C0 ∞ (Ω) ˆ= smooth functions with support inside Ω, 207<br />

C k ([a,b]) ˆ= k-times continuously differentiable functions<br />

on[a,b] ⊂ R, 29<br />

Cpw([a,b]), k 58<br />

D − (x,t) ˆ= maximal analytical domain of dependence of<br />

(x,t), 926<br />

D α u ˆ= multiple partial derivatives, 510<br />

L 2 ∗ (Ω) := {q ∈ L2 (Ω): ∫ Ωqdx = 0}, 1010<br />

M i ˆ=i-th integrated Legendre polynomial, 90<br />

O(f(N)) ˆ= Landau-O <strong>for</strong>N → ∞, 159<br />

S(z) ˆ= stability function of Runge-Kutta method, 937<br />

n, 248<br />

n ˆ= exterior unit normal vectorfield, 232<br />

H h ˆ= fully discrete evolution operator, 921<br />

L h ˆ= semi-discrete evolution operator doe 1D conservation<br />

law, 919<br />

P p (R) ˆ= space of univariate polynomials of degree ≤ p,<br />

87<br />

P p (R d ), 322<br />

P p (R d ) ˆ= space ofd-variate polynomials, 322<br />

Q p (R d ), 324<br />

V(M) ˆ= set of vertices of a mesh, 287<br />

R. Hiptmair<br />

∆ ˆ= Laplace operator, 236<br />

C. Schwab,<br />

H.<br />

∆ ˆ= vector Laplacian, 1016<br />

Harbrecht<br />

V.<br />

divj ˆ= divergence of a vectorfield, 231<br />

Gradinaru<br />

A. Chernov<br />

E(M), 359<br />

DRAFT<br />

I 1 , 498<br />

Γ in ˆ= inflow boundary <strong>for</strong> advection BVP, 728<br />

H m (Ω) ˆ=m-th order Sobolev space, 510<br />

H 1 0(div0,Ω) ˆ= componentwise H0(Ω)-vectorfields 1 with<br />

vanishing divergence., 1001<br />

S 0 1<br />

(M), 289<br />

I 1 ˆ= piecewise linear interpolation on finite element mesh,<br />

455<br />

P n ˆ=n-th Legendre polynomial, 91<br />

Sp 0(M) ˆ=H1 (Ω)-con<strong>for</strong>ming Lagrangian FE space, 332<br />

L ∞ (Ω) ˆ= space of (essentially) bounded functions on Ω,<br />

146<br />

12.5<br />

L 2 (Ω) ˆ= space of square-integrable functions onΩ, 199 p. 1086<br />

Bibliography<br />

[1] I. Babuška and M. Suri. The optimal convergence rate of the p-version of the finite element<br />

method. SIAM J. Numer. Anal., 24(4):750–769, 1987.<br />

[2] P. Bochev and R. B. Lehoucq. On the finite element solution of the pure neumann problem. SIAM<br />

Review, 47(1):50–66, 2005.<br />

[3] D. Braess. Finite Elements. Cambridge University Press, 2nd edition, 2001.<br />

[4] S. Brenner and R. Scott. Mathematical theory of finite element methods. Texts in Applied Mathematics.<br />

Springer–Verlag, New York, 1994.<br />

[5] S. Brenner and R. Scott. Mathematical theory of finite element methods. Texts in Applied Mathematics.<br />

Springer–Verlag, New York, 2nd edition, 2002.<br />

[6] A. Burtscher, E. Fonn, P. Meury, and C. Wiesmayr. LehrFEM - A 2D Finite Element Toolbox. <strong>SAM</strong>,<br />

<strong>ETH</strong> Zürich, Zürich, Switzerland, 2010. http://www.sam.math.ethz.ch/ hiptmair/tmp/LehrFEM-<br />

Manual.pdf.<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

12.5<br />

p. 108


[7] D. Christodoulou. The Euler equations of compressible fluid flow. Bull. American Math. Soc.,<br />

44(4):581–602, 2007.<br />

[8] P.G. Ciarlet. The Finite Element Method <strong>for</strong> Elliptic Problems, volume 4 of Studies in Mathematics<br />

and its Applications. North-Holland, Amsterdam, 1978.<br />

[9] C.M. Dafermos. Hyperboloic conservation laws in continuum physics, volume 325 of Grundlehren<br />

der mathematischen Wissenschaften. Springer, Berlin, 2000.<br />

[10] D.A. Dunavant. High degree efficient symmetrical Gaussian quadrature rules <strong>for</strong> the triangle. Int.<br />

J. Numer. Meth. Engr., 21:1129–1148, 1985.<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

[27] L.R. Scrott and M. Vogelius. Con<strong>for</strong>ming finite element methods <strong>for</strong> incompressible and nearly<br />

incompressible continua. In B. Engquist, S. Osher, and R. Sommerville, editors, Large-scale<br />

computations in fluid mechanics. Proc. 15th AMS-SIAM Summer Semin. Appl. Math., La Jolla/-<br />

Calif. 1983, volume 22 of Lect. Appl. Math., pages 221–243. AMS, Providence, RI, 1985.<br />

[28] R. Stenberg. Error analysis of some finite element methods <strong>for</strong> the stokes problem. Math. Comp.,<br />

54(190):495–508, 1990.<br />

[29] M. Struwe. Analysis für in<strong>for</strong>matiker. Lecture notes, <strong>ETH</strong> Zürich, 2009. https://moodleapp1.net.ethz.ch/lms/mod/resource/index.php?id=145.<br />

Numerica<br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

[11] A. Ern and J.-L. Guermond. Theory and Practice of Finite Elements, volume 159 of Applied<br />

Mathematical Sciences. Springer, New York, 2004.<br />

[12] L.C. Evans. <strong>Partial</strong> differential equations, volume 19 of Graduate Studies in Mathematics. American<br />

Mathematical Society, Providence, RI, 1998.<br />

[13] V. Girault and P.A. Raviart. Finite element methods <strong>for</strong> Navier–Stokes equations. Springer, Berlin,<br />

1986.<br />

[14] Ch. Großmann and H.-G. Roos. Numerik partieller <strong>Differential</strong>gleichungen. Teubner, Stuttgart,<br />

3rd edition, 2005.<br />

[15] W. Hackbusch. Elliptic <strong>Differential</strong> Equations. Theory and <strong>Numerical</strong> Treatment, volume 18 of<br />

Springer Series in Computational Mathematics. Springer, Berlin, 1992.<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

[30] E. Zeidler. Nonlinear Functional Analysis and its Applications. III: Variational <strong>Methods</strong> and Optimization.<br />

Springer–Verlag, New York, Berlin, Heidelberg, 1990.<br />

[31] S. Zlotnik and P. DÃŇez. Assembling sparse matrices in MATLAB. Communications in <strong>Numerical</strong><br />

<strong>Methods</strong> in Engineering, 2008. Published Online: 1 Sep 2008.<br />

R. Hiptm<br />

C. Schwa<br />

H.<br />

Harbrech<br />

V.<br />

Gradinar<br />

A. Chern<br />

DRAFT<br />

[16] W. Hackbusch. Integral equations. Theory and numerical treatment., volume 120 of International<br />

Series of <strong>Numerical</strong> Mathematics. Birkhäuser, Basel, 1995.<br />

[17] E. Hairer, C. Lubich, and G. Wanner. Geometric numerical integration, volume 31 of Springer<br />

Series in Computational Mathematics. Springer, Heidelberg, 2002.<br />

12.5<br />

p. 1089<br />

<strong>Numerical</strong><br />

<strong>Methods</strong><br />

<strong>for</strong> PDEs<br />

12.5<br />

p. 109<br />

[18] R. Hiptmair. Numerische mathematik für studiengang rechnergestützte wissenschaften. Lecture<br />

Slides, 2005. http://www.sam.math.ethz.ch/~hiptmair/tmp/NCSE.pdf.<br />

[19] P. Knabner and L. Angermann. <strong>Numerical</strong> <strong>Methods</strong> <strong>for</strong> Elliptic and Parabolic <strong>Partial</strong> <strong>Differential</strong><br />

Equations, volume 44 of Texts in Applied Mathematics. Springer, Heidelberg, 2003.<br />

[20] D. Kröner. <strong>Numerical</strong> Schemes <strong>for</strong> Conservation Laws. Wiley-Teubner, Chichester, 1997.<br />

[21] S. Larsson and V. Thomée. <strong>Partial</strong> <strong>Differential</strong> Equations with <strong>Numerical</strong> <strong>Methods</strong>, volume 45 of<br />

Texts in Applied Mathematics. Springer, Heidelberg, 2003.<br />

[22] R. LeVeque. Finite Volume <strong>Methods</strong> <strong>for</strong> Hyperbolic Problems. Cambridge Texts in Applied Mathematics.<br />

Cambridge University Press, Cambridge, UK, 2002.<br />

[23] S. Osher. Riemann solvers, the entropy condition, and difference approximations. SIAM J.<br />

Numer. Anal., 21(2):217–235, 1984.<br />

[24] P.-O. Persson and G. Strang. A simple mesh generator in matlab. SIAM Review, 46(2):329–345,<br />

2004.<br />

[25] H.-G. Roos, M. Stynes, and L. Tobiska. <strong>Numerical</strong> methods <strong>for</strong> singularly perturbed differential<br />

equations. Convection-diffusion-reaction and flow problems, volume 24 of Springer Series in<br />

Computational Mathematics. Springer, Berlin, 2nd edition, 2008.<br />

R. Hiptmair<br />

C. Schwab,<br />

H.<br />

Harbrecht<br />

V.<br />

Gradinaru<br />

A. Chernov<br />

DRAFT<br />

[26] C. Schwab. p- and hp-Finite Element <strong>Methods</strong>. Theory and Applications in Solid and Fluid Mechanics.<br />

<strong>Numerical</strong> Mathematics and Scientific Computation. Clarendon Press, Ox<strong>for</strong>d, 1998.<br />

12.5<br />

p. 1090

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!