From: wolf Date: Thu, 2 May 2002 17:05:38 +0000 (+0000) Subject: . X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a52c64c2c8eeb99038e87806cd9373e8e101b9dd;p=dealii-svn.git . git-svn-id: https://svn.dealii.org/trunk@5798 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro.html b/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro.html index c59cfdf609..b1e39e70a3 100644 --- a/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro.html +++ b/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro.html @@ -1,2 +1,550 @@

Introduction

+ + +

+The maths +

+ +

+The Heidelberg group of Professor Rolf Rannacher, to which the three main +authors of the deal.II library belonged for the PhD time and partly also +afterwards, has been involved with adaptivity and error estimation for finite +element discretizations since the mid-90ies. The main achievement is the +development of error estimates for arbitrary functionals of the solution, and +of optimal mesh refinement for its computation. + +

+We will not discuss the derivation of these concepts in too great detail, but +will implement the main ideas in the present example program. For a thorough +introduction into the general idea, we refer to the seminal work of Becker and +Rannacher [9,8], and the overview article of the same authors in +Acta Numerica [5]; the first introduces the concept of error +estimation and adaptivity for general functional output for the Laplace +equation, while the second gives many examples of applications of these +concepts to a large number of other, more complicated equations. For +applications to individual types of equations, see also the publications by +Becker [6,7], Kanschat [15,11], Suttmeier +[19,16,17,18], Bangerth [3,1,4,2], and +Hartmann [12,14,13]. + +

+The basic idea is the following: in applications, one is not usually +interested in the solution per se, but rather in certain aspects of it. For +example, in simulations of flow problems, one may want to know the lift or +drag of a body immersed in the fluid; it is this quantity that we want to know +to best accuracy, and whether the rest of the solution of the describing +equations is well resolved is not of primary interest. Likewise, in elasticity +one might want to know about values of the stress at certain points to guess +whether maximal load values of joints are safe, for example. Or, in radiative +transfer problems, mean flux intensities are of interest. + +

+In all the cases just listed, it is the evaluation of a functional J(u) of +the solution which we are interested in, rather than the values of ueverywhere. Since the exact solution u is not available, but only its +numerical approximation uh, it is sensible to ask whether the computed +value J(uh) is within certain limits of the exact value J(u), i.e. we +want to bound the error with respect to this functional, + +J(u)-J(uh). + +

+For simplicity of exposition, we henceforth assume that both the quantity of +interest J, as well as the equation are linear, and we will in particular +show the derivation for the Laplace equation with homogeneous Dirichlet +boundary conditions, although the concept is much more general. For this +general case, we refer to the references listed above. The goal is to obtain +bounds on the error, + +J(e)=J(u)-J(uh). For this, let us denote by z the +solution of a dual problem, defined as follows: +
+\begin{gather}a(\varphi,z) = J(\varphi) \qquad \forall \varphi,
+\end{gather} +
+where + +$a(\cdot,\cdot)$ +is the bilinear form associated with the differential +equation, and the test functions are chosen from the corresponding solution +space. Then, taking as special test function $\varphi=e$ +the error, we have +that +
+\begin{gather}J(e) = a(e,z)
+\end{gather} +
+and we can, by Galerkin orthogonality, rewrite this as +
+\begin{gather}J(e) = a(e,z-\varphi_h)
+\end{gather} +
+for all possible functions $\varphi_h$ +from the discrete test space. + +

+Concretely, for Laplace's equation, the error identity reads +
+\begin{gather}J(e) = (\nabla e, \nabla(z-\varphi_h)).
+\end{gather} +
+For reasons that we will not explain, we do not want to use this formula as +is, but rather split the scalar products into terms on all cells, and +integrate by parts on each of them: +
+\begin{align*}J(e)
+&=
+\sum_K (\nabla (u-u_h), \nabla (z-\varphi_h))_K
+\\
+&=...
+...u-u_h), z-\varphi_h)_K
++ (\partial_n (u-u_h), z-z_h)_{\partial K}.
+\end{align*} +
+Next we use that + +$-\Delta u=f$, +and that + +$\partial_n u$ +is a quantity that is +continuous almost everywhere, so the terms involving + +$\partial_n u$ +on one +cell cancels with that on its neighbor, where the normal vector has the +opposite sign. At the boundary of the domain, where there is no neighbor cell +with which this term could cancel, the weight + +$z-\varphi_h$ +can be chosen as +zero, since z has zero boundary values, and $\varphi_h$ +can be chosen to +have the same. + +

+Thus, we have +
+\begin{align*}J(e)
+&=
+\sum_K (f+u_h), z-\varphi_h)_K
+- (\partial_n u_h, z-\varphi_h)_{\partial K\backslash \partial\Omega}.
+\end{align*} +
+In a final step, note that when taking the normal derivative of uh, we mean +the value of this quantity as taken from this side of the cell (for the usual +Lagrange elements, derivatives are not continuous across edges). We then +rewrite the above formula by exchanging half of the edge integral of cell Kwith the neighbor cell K', to obtain +
+\begin{align*}J(e)
+&=
+\sum_K (f+u_h), z-\varphi_h)_K
+- \frac 12 (\partial_n u...
+...h\vert _{K'},
+z-\varphi_h)_{\partial K\backslash \partial\Omega}.
+\end{align*} +
+Using that for the normal vectors n'=-n holds, we define the jump of the +normal derivative by +
+\begin{gather*}[\partial_n u_h]:= \partial_n u_h\vert _K + \partial_{n'} u_h\vert _{K'}
+=
+\partial_n u_h\vert _K - \partial_n u_h\vert _{K'},
+\end{gather*} +
+and get the final form after setting the discrete function $\varphi_h$, +which +is by now still arbitrary, to the point interpolation of the dual solution, + + +$\varphi_h=I_h z$: +
+\begin{align*}J(e)
+&=
+\sum_K (f+u_h), z-I_h z)_K
+- \frac 12 ([\partial_n u_h],
+z-I_h z)_{\partial K\backslash \partial\Omega}.
+\end{align*} +
+

+With this, we have obtained an exact representation of the error of the finite +element discretization with respect to arbitrary (linear) functionals +$J(\cdot)$. +Its structure is a weighted form of a residual estimator, as both + + +$f+\Delta u_h$ +and + +$[\partial_n u_h]$ +are cell and edge residuals that vanish +on the exact solution, and z-Ih z are weights indicating how important the +residuals on a certain cell is for the evaluation of the given functional. +Furthermore, it is a cell-wise quantity, so we can use it as a mesh refinement +criterion. The question, is: how to evaluate it? After all, the evaluation +requires knowledge of the dual solution z, which carries the information +about the quantity we want to know to best accuracy. + +

+In some, very special cases, this dual solution is known. For example, if the +functional $J(\cdot)$ +is the point evaluation, + +$J(\varphi)=\varphi(x_0)$, +then +the dual solution has to satisfy +
+\begin{gather*}-\Delta z = \delta(x-x_0),
+\end{gather*} +
+with the Dirac delta function on the right hand side, and the dual solution is +the Green's function with respect to the point x0. For simple geometries, +this function is analytically known, and we could insert it into the error +representation formula. + +

+However, we do not want to restrict ourselves to such special cases. Rather, +we will compute the dual solution numerically, and approximate z by some +numerically obtained $\tilde z$. +We note that it is not sufficient to compute +this approximation $\tilde z$ +using the same method as used for the primal +solution uh, since then + +$\tilde z-I_h \tilde z=0$, +and the overall error +estimate would be zero. Rather, the approximation $\tilde z$ +has to be from a +larger space than the primal finite element space. There are various ways to +obtain such an approximation (see the cited literature), and we will choose to +compute it with a higher order finite element space. While this is certainly +not the most efficient way, it is simple since we already have all we need to +do that in place, and it also allows for simple experimenting. For more +efficient methods, again refer to the given literature, in particular +[9,8,5]. + +

+With this, we end the discussion of the mathematical side of this program and +turn to the actual implementation. + + + +

+The software +

+ +

+The step-14 example program builds heavily on the techniques already used in +the step-13 program. Its implementation of the dual weighted residual error +estimator explained above is done by deriving a second class, properly called +DualSolver, from the Solver base class, and having a class +(WeightedResidual) that joins the two again and controls the solution +of the primal and dual problem, and then uses both to compute the error +indicator for mesh refinement. + +

+The program continues the modular concept of the previous example, by +implementing the dual functional, describing quantity of interest, by an +abstract base class, and providing two different functionals which implement +this interface. Adding a different quantity of interest is thus simple. + +

+One of the more fundamental differences is the handling of data. A common case +is that you develop a program that solves a certain equation, and test it with +different right hand sides, different domains, different coefficients and +boundary values, etc. Usually, these have to match, so that exact solutions +are known, or that their combination makes sense at all. + +

+We demonstrate a way how this can be achieved in a simple, yet very flexible +way. We will put everything that belongs to a certain setup into one class, +and provide a little C++ mortar around it, so that entire setups (domains, +coefficients, right hand sides, etc.) can be exchanged by only changing +something in one place. + +

+Going this way a little further, we have also centralized all the other +parameters that describe how the program is to work in one place, such as the +order of the finite element, the maximal number of degrees of freedom, the +evaluation objects that shall be executed on the computed solutions, and so +on. This allows for simpler configuration of the program, and we will show in +a later program how to use a library class that can handle setting these +parameters by reading an input file. The general aim is to reduce the places +within a program where one may have to look when wanting to change some +parameter, as it has turned out in practice that one forgets where they are as +programs grow. Furthermore, putting all options describing what the program +does in a certain run into a file (that can be stored with the results) helps +repeatability of results more than if the various flags were set somewhere in +the program, where their exact values are forgotten after the next change to +this place. + +

+Unfortunately, the program has become rather long. While this admittedly +reduces its usefulness as an example program, we think that it is a very good +starting point for development of a program for other kinds of problems, +involving different equations than the Laplace equation treated here. +Furthermore, it shows everything that we can show you about our way of a +posteriori error estimation, and its structure should make it simple for you +to adjust this method to other problems, other functionals, other geometries, +coefficients, etc. + +

+The author believes that the present program is his masterpiece among the +example programs, regarding the mathematical complexity, as well as the +simplicity to add extensions. If you use this program as a basis for your own +programs, we would kindly like to ask you to state this fact and the name of +the author of the example program, Wolfgang Bangerth, in publications that +arise from that, of your program consists in a considerable part of the +example program. + + +

Bibliography +

+
+

+

1 +
+Wolfgang Bangerth. +
Mesh adaptivity and error control for a finite element approximation + of the elastic wave equation. +
In Alfredo Bermúdez, Dolores Gómez, Christophe Hazard, Patrick + Joly, and Jean E. Roberts, editors, Proceedings of the Fifth + International Conference on Mathematical and Numerical Aspects of Wave + Propagation (Waves2000), Santiago de Compostela, Spain, 2000, pages + 725-729. SIAM, 2000. + +

+

2 +
+Wolfgang Bangerth. +
Adaptive Finite Element Methods for the Identification of + Distributed Coefficient in Partial Differential Equations. +
PhD thesis, University of Heidelberg, 2002. + +

+

3 +
+Wolfgang Bangerth and Rolf Rannacher. +
Finite element approximation of the acoustic wave equation: Error + control and mesh adaptation. +
East-West J. Numer. Math., 7(4):263-282, 1999. + +

+

4 +
+Wolfgang Bangerth and Rolf Rannacher. +
Adaptive finite element techniques for the acoustic wave equation. +
J. Comput. Acoustics, 9(2):575-591, 2001. + +

+

5 +
+R. Becker and R. Rannacher. +
An optimal control approach to error estimation and mesh adaptation + in finite element methods. +
Acta Numerica, 10:1-102, 2001. + +

+

6 +
+Roland Becker. +
An Adaptive Finite Element Method for the Incompressible + Navier-Stokes Equations on Time-dependent Domains. +
Dissertation, Universität Heidelberg, 1995. + +

+

7 +
+Roland Becker. +
Weighted error estimators for finite element approximations of the + incompressible Navier-Stokes equations. +
Preprint 98-20, SFB 359, Universität Heidelberg, 1998. + +

+

8 +
+Roland Becker and Rolf Rannacher. +
A feed-back approach to error control in finite element methods: + Basic analysis and examples. +
East-West J. Numer. Math., 4:237-264, 1996. + +

+

9 +
+Roland Becker and Rolf Rannacher. +
Weighted a posteriori error control in FE methods. +
In et al. H. G. Bock, editor, ENUMATH 95, pages 621-637, + Paris, September 1998. World Scientific Publ., Singapure. +
in [10]. + +

+

10 +
+Hans Georg Bock, Franco Brezzi, Roland Glowinsky, Guido Kanschat, Yuri A. + Kuznetsov, Jacques Périaux, and Rolf Rannacher, editors. +
ENUMATH 97, Proceedings of the 2nd European Conference on + Numerical Mathematics and Advanced Applications, Singapore, 1998. World + Scientific. + +

+

11 +
+Christian Führer and Guido Kanschat. +
A posteriori error control in radiative transfer. +
Computing, 58(4):317-334, 1997. + +

+

12 +
+Ralf Hartmann and Paul Houston. +
Adaptive discontinuous Galerkin finite element methods for + nonlinear hyperbolic conservation laws. +
Preprint 2001-20, (SFB 359), IWR Heidelberg, Mai 2001. +
submitted. + +

+

13 +
+Ralf Hartmann and Paul Houston. +
Adaptive discontinuous Galerkin finite element methods for the + compressible Euler equations. +
Preprint 2001-42, (SFB 359), IWR Heidelberg, Dez 2001. +
submitted. + +

+

14 +
+Paul Houston and Ralf Hartmann. +
Goal-oriented a posteriori error estimation for compressible fluid + flows. +
In Proceedings of ENUMATH 2001, 2001. +
submitted. + +

+

15 +
+Guido Kanschat. +
Parallel and Adaptive Galerkin Methods for Radiative Transfer + Problems. +
Dissertation, Universität Heidelberg, 1996. + +

+

16 +
+Rolf Rannacher and Franz-Theo Suttmeier. +
A feed-back approach to error control in finite element methods: + Application to linear elasticity. +
Comp. Mech., 19(5):434-446, 1997. + +

+

17 +
+Rolf Rannacher and Franz-Theo Suttmeier. +
A posteriori error control in finite element methods via duality + techniques: Application to perfect plasticity. +
Comp. Mech., 21(2):123-133, 1998. + +

+

18 +
+Rolf Rannacher and Franz-Theo Suttmeier. +
A posteriori error control and mesh adaptation for finite element + models in elasticity and elasto-plasticity. +
Comput. Methods Appl. Mech. Engrg., pages 333-361, 1999. + +

+

19 +
+Franz-Theo Suttmeier. +
Adaptive Finite Element Approximation of Problems in + Elasto-Plasticity Theory. +
Dissertation, Universität Heidelberg, 1996. +
\ No newline at end of file diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img1.gif b/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img1.gif new file mode 100644 index 0000000000..d479f14ba8 Binary files /dev/null and b/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img1.gif differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img10.gif b/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img10.gif new file mode 100644 index 0000000000..a4f588abc7 Binary files /dev/null and b/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img10.gif differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img11.gif b/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img11.gif new file mode 100644 index 0000000000..cc30587ff3 Binary files /dev/null and b/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img11.gif differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img12.gif b/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img12.gif new file mode 100644 index 0000000000..654eaa2b09 Binary files /dev/null and b/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img12.gif differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img13.gif b/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img13.gif new file mode 100644 index 0000000000..214a261c21 Binary files /dev/null and b/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img13.gif differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img14.gif b/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img14.gif new file mode 100644 index 0000000000..6a7f083fec Binary files /dev/null and b/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img14.gif differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img15.gif b/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img15.gif new file mode 100644 index 0000000000..c941877565 Binary files /dev/null and b/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img15.gif differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img16.gif b/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img16.gif new file mode 100644 index 0000000000..77f06705a8 Binary files /dev/null and b/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img16.gif differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img17.gif b/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img17.gif new file mode 100644 index 0000000000..27aabd1162 Binary files /dev/null and b/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img17.gif differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img18.gif b/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img18.gif new file mode 100644 index 0000000000..b4312f9d64 Binary files /dev/null and b/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img18.gif differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img19.gif b/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img19.gif new file mode 100644 index 0000000000..1964985414 Binary files /dev/null and b/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img19.gif differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img2.gif b/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img2.gif new file mode 100644 index 0000000000..5ca4788c96 Binary files /dev/null and b/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img2.gif differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img20.gif b/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img20.gif new file mode 100644 index 0000000000..54eb60a024 Binary files /dev/null and b/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img20.gif differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img21.gif b/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img21.gif new file mode 100644 index 0000000000..8999b42028 Binary files /dev/null and b/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img21.gif differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img22.gif b/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img22.gif new file mode 100644 index 0000000000..00cdfb2a96 Binary files /dev/null and b/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img22.gif differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img23.gif b/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img23.gif new file mode 100644 index 0000000000..8b22a65e33 Binary files /dev/null and b/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img23.gif differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img3.gif b/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img3.gif new file mode 100644 index 0000000000..5fc88ec3eb Binary files /dev/null and b/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img3.gif differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img4.gif b/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img4.gif new file mode 100644 index 0000000000..c53c7a2bb1 Binary files /dev/null and b/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img4.gif differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img5.gif b/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img5.gif new file mode 100644 index 0000000000..0ce62cc485 Binary files /dev/null and b/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img5.gif differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img6.gif b/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img6.gif new file mode 100644 index 0000000000..2d2875cccd Binary files /dev/null and b/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img6.gif differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img7.gif b/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img7.gif new file mode 100644 index 0000000000..490e328593 Binary files /dev/null and b/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img7.gif differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img8.gif b/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img8.gif new file mode 100644 index 0000000000..8dfe7759c6 Binary files /dev/null and b/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img8.gif differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img9.gif b/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img9.gif new file mode 100644 index 0000000000..3fc9ef287b Binary files /dev/null and b/deal.II/doc/tutorial/chapter-2.step-by-step/step-14.data/intro/img9.gif differ