From: wolf Date: Tue, 28 Mar 2006 02:06:15 +0000 (+0000) Subject: Generate intro with doxygen, not latex. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2faca8df85861ea2531b9766e2bea844b72f892b;p=dealii-svn.git Generate intro with doxygen, not latex. git-svn-id: https://svn.dealii.org/trunk@12694 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img1.png b/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img1.png deleted file mode 100644 index e6db7d6b76..0000000000 Binary files a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img1.png and /dev/null differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img10.png b/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img10.png deleted file mode 100644 index 37e6f62972..0000000000 Binary files a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img10.png and /dev/null differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img11.png b/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img11.png deleted file mode 100644 index fd26cda480..0000000000 Binary files a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img11.png and /dev/null differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img12.png b/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img12.png deleted file mode 100644 index 2897e02957..0000000000 Binary files a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img12.png and /dev/null differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img13.png b/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img13.png deleted file mode 100644 index d18458567c..0000000000 Binary files a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img13.png and /dev/null differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img14.png b/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img14.png deleted file mode 100644 index d9ddcfae09..0000000000 Binary files a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img14.png and /dev/null differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img15.png b/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img15.png deleted file mode 100644 index 7f2dcb522f..0000000000 Binary files a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img15.png and /dev/null differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img16.png b/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img16.png deleted file mode 100644 index 585db79830..0000000000 Binary files a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img16.png and /dev/null differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img17.png b/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img17.png deleted file mode 100644 index bee1cb9d26..0000000000 Binary files a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img17.png and /dev/null differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img18.png b/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img18.png deleted file mode 100644 index 164f1fb830..0000000000 Binary files a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img18.png and /dev/null differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img19.png b/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img19.png deleted file mode 100644 index c27b80c24c..0000000000 Binary files a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img19.png and /dev/null differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img2.png b/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img2.png deleted file mode 100644 index ef048b4e31..0000000000 Binary files a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img2.png and /dev/null differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img20.png b/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img20.png deleted file mode 100644 index bf4729e605..0000000000 Binary files a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img20.png and /dev/null differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img21.png b/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img21.png deleted file mode 100644 index 94ab460880..0000000000 Binary files a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img21.png and /dev/null differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img22.png b/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img22.png deleted file mode 100644 index 3059c7957a..0000000000 Binary files a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img22.png and /dev/null differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img23.png b/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img23.png deleted file mode 100644 index 1f400dc0da..0000000000 Binary files a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img23.png and /dev/null differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img24.png b/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img24.png deleted file mode 100644 index 07dabc405e..0000000000 Binary files a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img24.png and /dev/null differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img25.png b/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img25.png deleted file mode 100644 index 72c8ce2e07..0000000000 Binary files a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img25.png and /dev/null differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img26.png b/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img26.png deleted file mode 100644 index 6b665212c1..0000000000 Binary files a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img26.png and /dev/null differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img27.png b/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img27.png deleted file mode 100644 index f23e1e4514..0000000000 Binary files a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img27.png and /dev/null differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img28.png b/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img28.png deleted file mode 100644 index 199c57b105..0000000000 Binary files a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img28.png and /dev/null differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img29.png b/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img29.png deleted file mode 100644 index be6ae921d9..0000000000 Binary files a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img29.png and /dev/null differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img3.png b/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img3.png deleted file mode 100644 index 650d8546f7..0000000000 Binary files a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img3.png and /dev/null differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img30.png b/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img30.png deleted file mode 100644 index dffebefcf2..0000000000 Binary files a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img30.png and /dev/null differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img31.png b/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img31.png deleted file mode 100644 index 7a9d8adf2d..0000000000 Binary files a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img31.png and /dev/null differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img32.png b/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img32.png deleted file mode 100644 index 4c816a1618..0000000000 Binary files a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img32.png and /dev/null differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img33.png b/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img33.png deleted file mode 100644 index 8e7ec5e2fc..0000000000 Binary files a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img33.png and /dev/null differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img34.png b/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img34.png deleted file mode 100644 index 6330db9c56..0000000000 Binary files a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img34.png and /dev/null differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img35.png b/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img35.png deleted file mode 100644 index 4627668a96..0000000000 Binary files a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img35.png and /dev/null differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img36.png b/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img36.png deleted file mode 100644 index 5cde8c1a70..0000000000 Binary files a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img36.png and /dev/null differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img37.png b/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img37.png deleted file mode 100644 index bd7cccc70b..0000000000 Binary files a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img37.png and /dev/null differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img38.png b/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img38.png deleted file mode 100644 index 7c36f1cda3..0000000000 Binary files a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img38.png and /dev/null differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img39.png b/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img39.png deleted file mode 100644 index 8746850361..0000000000 Binary files a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img39.png and /dev/null differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img4.png b/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img4.png deleted file mode 100644 index 631a46c224..0000000000 Binary files a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img4.png and /dev/null differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img40.png b/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img40.png deleted file mode 100644 index c395b14fcf..0000000000 Binary files a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img40.png and /dev/null differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img41.png b/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img41.png deleted file mode 100644 index 7c3840ab41..0000000000 Binary files a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img41.png and /dev/null differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img42.png b/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img42.png deleted file mode 100644 index dbe787d95c..0000000000 Binary files a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img42.png and /dev/null differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img43.png b/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img43.png deleted file mode 100644 index 2729440573..0000000000 Binary files a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img43.png and /dev/null differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img44.png b/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img44.png deleted file mode 100644 index 2c729c1f90..0000000000 Binary files a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img44.png and /dev/null differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img45.png b/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img45.png deleted file mode 100644 index 8ab2827851..0000000000 Binary files a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img45.png and /dev/null differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img46.png b/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img46.png deleted file mode 100644 index 68555286af..0000000000 Binary files a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img46.png and /dev/null differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img47.png b/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img47.png deleted file mode 100644 index 0f977006df..0000000000 Binary files a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img47.png and /dev/null differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img48.png b/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img48.png deleted file mode 100644 index 0dd0f4f945..0000000000 Binary files a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img48.png and /dev/null differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img49.png b/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img49.png deleted file mode 100644 index fc726e34d2..0000000000 Binary files a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img49.png and /dev/null differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img5.png b/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img5.png deleted file mode 100644 index 9aa66194e9..0000000000 Binary files a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img5.png and /dev/null differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img50.png b/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img50.png deleted file mode 100644 index 9b39b65e3f..0000000000 Binary files a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img50.png and /dev/null differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img51.png b/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img51.png deleted file mode 100644 index 5c53327c3e..0000000000 Binary files a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img51.png and /dev/null differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img52.png b/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img52.png deleted file mode 100644 index f4bf86e619..0000000000 Binary files a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img52.png and /dev/null differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img53.png b/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img53.png deleted file mode 100644 index 9f9242463b..0000000000 Binary files a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img53.png and /dev/null differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img54.png b/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img54.png deleted file mode 100644 index c54a364cb9..0000000000 Binary files a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img54.png and /dev/null differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img55.png b/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img55.png deleted file mode 100644 index fb30b98b83..0000000000 Binary files a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img55.png and /dev/null differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img6.png b/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img6.png deleted file mode 100644 index f1a6d470c5..0000000000 Binary files a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img6.png and /dev/null differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img7.png b/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img7.png deleted file mode 100644 index 4cd4f689b0..0000000000 Binary files a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img7.png and /dev/null differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img8.png b/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img8.png deleted file mode 100644 index 7769cd5622..0000000000 Binary files a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img8.png and /dev/null differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img9.png b/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img9.png deleted file mode 100644 index 3781f68634..0000000000 Binary files a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/img9.png and /dev/null differ diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/intro.tex b/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/intro.dox similarity index 92% rename from deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/intro.tex rename to deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/intro.dox index 4d712e5f54..2c899f6cef 100644 --- a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/intro.tex +++ b/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/intro.dox @@ -1,9 +1,4 @@ -\documentclass{article} -\usepackage{amsmath} - -\begin{document} - -\section{Foreword} +

Foreword

This program demonstrates a number of techniques that have not been shown in previous example programs. In particular, it shows how to program for @@ -26,43 +21,53 @@ to demonstrate techniques of programming with deal.II, which is indeed the focus here. -\section{The problem} +

The problem

Now for a description of the problem. In the book by Dacorogna on the Calculus of Variations, I found the following statement, which confused me tremendously at first (see Section 3.4.3, ``Lavrentiev Phenomenon'', very slightly edited): -\begin{quote} - \textbf{Theorem 4.6:} Let - $$I(u)=\int_0^1 (x-u^3)^2 (u')^6\; dx.$$ +@par Theorem 4.6: + + Let + @f[ + I(u)=\int_0^1 (x-u^3)^2 (u')^6\; dx. + @f] Let - $$ + @f[ {\cal W}_1 = \{ u\in W^{1,\infty}(0,1) : u(0)=0, u(1)=1 \} - $$ $$ + @f] + @f[ {\cal W}_2 = \{ u\in W^{1,1}(0,1) : u(0)=0, u(1)=1 \} - $$ + @f] + +@par + Then - $$ + @f[ \inf_{u\in {\cal W}_1} I(u) \ge c_0 > 0 = \inf_{u\in {\cal W}_2} I(u). - $$ + @f] Moreover the minimum of $I(u)$ over ${\cal W}_2$ is attained by $u(x)=x^{1/3}$. + - \textsc{Remarks.} - - [\ldots] +@par Remarks. + [...] +@par + ii) it is interesting to note that if one uses the usual finite element methods (by taking piecewise affine functions, which are in $W^{1,\infty}$) one will not be able to detect the minimum of some integrals such as the one in the theorem. -\end{quote} + + In other words: minimizing the energy functional over one space ($W^{1,\infty}$) does not give the same value as when minimizing over a larger space ($W^{1,1}$). Furthermore, they give a rough estimate of the value of the -constant $c_0$, which is $c_0=\tfrac{7^23^5}{2^{18}5^5}\approx 1.61\cdot +constant $c_0$, which is $c_0=\frac{7^23^5}{2^{18}5^5}\approx 1.61\cdot 10^{-6}$ (although by their calculation it is obvious that this estimate is far too small, but the point of course is just to show that it is strictly larger than zero). @@ -81,8 +86,8 @@ oscillate at cell frequency; these, however, do not converge in any reasonable measure.) So it took me a while to see where the problem lies. Here it is: While we are -able to approximate functions to arbitrary accuracies in \textit{Sobolev - norms}, this does not necessarily also hold with respect to the functional +able to approximate functions to arbitrary accuracies in Sobolev + norms, this does not necessarily also hold with respect to the functional $I(u)$! After all, this functional was made to show exactly these pathologies. @@ -92,7 +97,7 @@ interpolant $i_hu$ of the optimal solution $u=x^{1/3}$ into the functional $I(u)$: on the leftmost cell, the left end of $i_hu$ is tagged to zero by the boundary condition, and the right end has the value $i_hu(h)=u(h)=h^{1/3}$. So let us only consider the contribution of this single cell to $I(u)$: -\begin{eqnarray*} +@f{eqnarray*} \int_0^h (x-(i_hu)^3)^2 ((i_hu)')^6 dx &=& \int_0^h (x-(h^{1/3}x)^3)^2 ((h^{1/3}/h)')^6 dx @@ -104,7 +109,7 @@ let us only consider the contribution of this single cell to $I(u)$: h^{-4} (h^3/3-2h^5/5+h^9/7) \\ &=& {\cal O}(h^{-1}). -\end{eqnarray*} +@f} Ups, even the contribution of the first cell blows up under mesh refinement, and we have not even summed up the contributions of the other cells! @@ -136,29 +141,28 @@ would, then its energy would have to blow up. And we will see exactly this in the results section below. -\section{What to do?} +

What to do?

After this somewhat theoretical introduction, let us just once in our life have fun with pure mathematics, and actually see what happens in this problem when we run the finite element method on it. So here it goes: to find the minimum of $I(u)$, we have to find its stationary point. The condition for this reads -\begin{equation*} +@f[ I'(u,\varphi) = \int_0^1 6 (x-u^3) (u')^5 \{ (x-u^3)\varphi' - u^2 u' \varphi\}\ dx, -\end{equation*} +@f] for all test functions $\varphi$ from the same space as that from which we take $u$, but with zero boundary conditions. If this space allows us to integrate by parts, then we could associate this with a two point boundary value problem -\begin{equation} - \label{eq:equation} +@f{eqnarray*} -(x-u^3) u^2(u')^6 - \frac{d}{dx} \left\{(x-u^3)^2 (u')^5\right\} = 0, \qquad\qquad u(0)=0, \quad u(1)=1. -\end{equation} +@f} Note that this equation degenerates wherever $u^3=x$, which is at least the case at $x\in\{0,1\}$ due to the prescribed boundary values for $u$, but possibly at other places as well. However, for finite elements, we will want @@ -166,20 +170,20 @@ to have the equation in weak form anyway. Since the equation is still nonlinear, one may be tempted to compute iterates $u_{k+1}=u_k+\alpha_k\delta u_k$ using a Newton method for updates $\delta u_k$, like in -\begin{equation*} +@f[ I''(u_k,\delta u_k,\varphi) = -I'(u_k, \varphi). -\end{equation*} +@f] However, since $I''(u_k,\cdot,\cdot)$ may be an indefinite operator (and, as numerical experiments indicate, is in fact during typical computations), we don't want to use this. Instead, we use a gradient method, for which we compute updates according to the following scheme: -\begin{equation} +@f{eqnarray*} \left<\delta u_k,\varphi\right> = -I'(u_k, \varphi). -\end{equation} +@f} For the scalar product on the left hand side, there are multiple valid ways; we choose the mesh dependent definition $\left = \int_\Omega (uv + h(x)^2 \nabla u\cdot \nabla v)\; dx$, where the weight $h(x)^2$, i.e. using @@ -191,10 +195,9 @@ Laplace matrix. The step length $\alpha_k$ is then computed using a one-dimensional line search finding -\begin{equation} - \label{eq:linesearch} +@f{eqnarray*} \alpha_k = \arg\min_\alpha I(u_k+\alpha\delta u_k), -\end{equation} +@f} or at least an approximation to this using a one-dimensional Newton method which itself has a line search. The details of this can be found in the code. We iterate the updates and line searches until the change in energy $I(u_k)$ @@ -209,19 +212,17 @@ As for mesh refinement, it is instructional to recall how residual based error estimates like the one used in the Kelly et al.~error estimator are usually derived (the Kelly estimator is the one that we have used in most of the previous example programs). In a similar way, by looking at the residual of -the strong form of the nonlinear equation we attempt here to solve, see -equation \eqref{eq:equation}, we may be tempted to consider the following -expression for refinement of cell $K$: -\begin{eqnarray} - \label{eq:error-estimate} +the strong form of the nonlinear equation we attempt here to solve, we may be +tempted to consider the following expression for refinement of cell $K$: +@f{eqnarray*} \eta_K^2 &=& h^2 \left\| (x-u_h^3) (u_h')^4 \left\{ u_h^2 (u_h')^2 + 5(x-u_h^3)u_h'' + 2u_h'(1-3u_h^2u_h') \right\} \right\|^2_K - \notag \\ + \\ && + h \left| (x-u_h^3)^2 [(u_h')^5] \right|^2_{\partial K}, -\end{eqnarray} +@f} where $[\cdot]$ is the jump of a quantity across an intercell boundary, and $|\cdot|_{\partial K}$ is the sum of the quantity evaluated at the two end points of a cell. Note that in the evaluation of the jump, we have made use of @@ -248,7 +249,7 @@ contrived and pathological problem. Consider it an example in programming with deal.II then, and not an example in solving this particular problem. -\section{Implementation} +

Implementation

The program implements all the steps mentioned above, and we will discuss them in the commented code below. In general, however, note that formulating the @@ -257,7 +258,7 @@ consequences: we have to linearize around $u_k$ when we want to compute $\delta u_k$, and we have to sum up these two functions afterwards. However, they may be living on different grids, if we have refined the grid before this step, so we will have to present a way to actually get a function from one -grid to another. The \textrm{SolutionTransfer} class will help us here. On the +grid to another. The SolutionTransfer class will help us here. On the other hand, discretizing every nonlinear step separately has the advantage that we can do the initial steps, when we are still far away from the solution, on a coarse mesh, and only go on to more expensive computations when @@ -272,7 +273,7 @@ does not contain much new stuff, but if it explains a few of the techniques that are available for nonlinear problems and in particular 1d problems, then this is not so bad, after all. -\textbf{Note:} As shown below, the program starts the nonlinear solver from 10 different +Note: As shown below, the program starts the nonlinear solver from 10 different initial values, and outputs the results. This is not actually too many, but we did so to keep run-time short (around 1:30 minutes on my laptop). If you want to increase the number of realizations, you may want to switch to optimized mode @@ -293,5 +294,3 @@ should be done in optimized mode anyway. A slowdown of a factor of 7-8 is unusual, however. For 2d and 3d applications, a typical value is around 4. - -\end{document} diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/intro.html b/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/intro.html deleted file mode 100644 index 7abd38213e..0000000000 --- a/deal.II/doc/tutorial/chapter-2.step-by-step/step-15.data/intro.html +++ /dev/null @@ -1,795 +0,0 @@ - -

Introduction

- -

-Foreword -

- -

-This program demonstrates a number of techniques that have not been shown in -previous example programs. In particular, it shows how to program for -one-dimensional problems, and some aspects of what to do with nonlinear -problems, in particular how to transfer the solution from one grid to the next -finer one. Apart from this, however, the program does not attempt to do much -more than to entertain those who sometimes like to play with maths. - -

-The application we chose is, as you will see, not even very well suited for -anything, since it is rather impossible to solve. When I started to write the -program, I was not aware of this, and it only turned out later that the -optimization problem we are looking at here is severely plagued by many, -likely even degenerate minima, and that we cannot really hope to find a global -one. What we do instead is to rather start the optimization from many initial -guesses (which is cheap since the problem is 1d), and hope that we can get a -reasonable best solution for some of them. While the whole thing, as an -application, is not very satisfactory, keep in mind that solving particular -applications is not the goal of the tutorial programs; rather, we would like -to demonstrate techniques of programming with deal.II, which is indeed the -focus here. - -

- -

-The problem -

- -

-Now for a description of the problem. In the book by Dacorogna on the -Calculus of Variations, I found the following statement, which confused me -tremendously at first (see Section 3.4.3, ``Lavrentiev Phenomenon'', very -slightly edited): - -

-

-Theorem 4.6: Let -

-

-
-$\displaystyle I(u)=\int_0^1 (x-u^3)^2 (u')^6\; dx.$ -

-

- Let -

-

-
-$\displaystyle {\cal W}_1 = \{ u\in W^{1,\infty}(0,1) : u(0)=0, u(1)=1 \}
-$ -

-

-

-
-$\displaystyle {\cal W}_2 = \{ u\in W^{1,1}(0,1) : u(0)=0, u(1)=1 \}
-$ -

-

-

-

Then -

-

-
-$\displaystyle \inf_{u\in {\cal W}_1} I(u) \ge c_0 > 0 = \inf_{u\in {\cal W}_2} I(u).
-$ -

-

- Moreover the minimum of $ I(u)$ - over -$ {\cal W}_2$ - is attained by - -$ u(x)=x^{1/3}$ -. -
-

-

REMARKS. -
-

-

[...] -
-

-

ii) it is interesting to note that if one uses the usual finite element - methods (by taking piecewise affine functions, which are in -$ W^{1,\infty}$ -) - one will not be able to detect the minimum of some integrals such as the one - in the theorem. - -
-In other words: minimizing the energy functional over one space -( -$ W^{1,\infty}$ -) does not give the same value as when minimizing over a larger -space ($ W^{1,1}$ -). Furthermore, they give a rough estimate of the value of the -constant $ c_0$ -, which is -$ c_0=\tfrac{7^23^5}{2^{18}5^5}\approx 1.61\cdot
-10^{-6}$ - (although by their calculation it is obvious that this estimate is -far too small, but the point of course is just to show that it is strictly -larger than zero). - -

-While the theorem was not surprising, the remark stunned me at first. After -all, we know that we can approximate functions in $ W^{1,1}$ - to arbitrary -accuracy. Also, although it is true that finite element functions are in - -$ W^{1,\infty}$ -, this statement is not really accurate: if the function itself -is bounded pointwise by, say, a constant $ C$ -, then its gradient is bounded by -$ 2C/h$ -, and thus -$ \Vert u_h\Vert _{1,\infty} \le 2C/h$ -. That means that we should be -able to lift this limit just by mesh refinement. Finite element functions are -therefore only in -$ W^{1,\infty}$ - if one considers them on a fixed grid, not on -a sequence of successively finer grids. (Note, we can only lift the -boundedness in $ W^{1,1}$ - in the same way by considering functions that -oscillate at cell frequency; these, however, do not converge in any reasonable -measure.) - -

-So it took me a while to see where the problem lies. Here it is: While we are -able to approximate functions to arbitrary accuracies in Sobolev - norms, this does not necessarily also hold with respect to the functional -$ I(u)$ -! After all, this functional was made to show exactly these -pathologies. - -

-What happens in this case is actually not so difficult to understand. Let us -look at what happens if we plug the lowest-order (piecewise linear) -interpolant $ i_hu$ - of the optimal solution $ u=x^{1/3}$ - into the functional -$ I(u)$ -: on the leftmost cell, the left end of $ i_hu$ - is tagged to zero by the -boundary condition, and the right end has the value -$ i_hu(h)=u(h)=h^{1/3}$ -. So -let us only consider the contribution of this single cell to $ I(u)$ -: -
-

- - - - - - - - - - - - - - - - - - -
$\displaystyle \int_0^h (x-(i_hu)^3)^2 ((i_hu)')^6 dx$$\displaystyle =$$\displaystyle \int_0^h (x-(h^{1/3}x)^3)^2 ((h^{1/3}/h)')^6 dx$
 $\displaystyle =$$\displaystyle h^{-4} \int_0^h (x^2-2hx^4+h^2x^6) dx$
 $\displaystyle =$$\displaystyle h^{-4} (h^3/3-2h^5/5+h^9/7)$
 $\displaystyle =$$\displaystyle {\cal O}(h^{-1}).$
-
- -Ups, even the contribution of the first cell blows up under mesh refinement, -and we have not even summed up the contributions of the other cells! - -

-It turns out, that the other cells are not really problematic (since the -gradient is bounded there by a constant independent of $ h$ -), but we cannot -really avoid the trouble with the first cell: if instead of the interpolant we -choose some other finite element function that is closer on average to -$ x^{1/3}$ - than the interpolant above, then we have to increase the slope of -this function, since we have to obey the boundary condition at the left -end. But then we are hit by the weight $ (u')^6$ -. This weight is simply too -strong! - -

-On the other hand, the interpolation of the linear function -$ \varphi(x)=x$ - -connecting the boundary values has the finite energy -$ I(i_h\varphi)=1/10$ -, -independent of the mesh size. Thus, -$ i_hx^{1/3}$ - cannot be the minimizer of the -energy as -$ h\rightarrow 0$ -. This is also easy to see by noting that -the minimal value of $ I$ - cannot increase under mesh -refinement: if it is finite for some function on some mesh, then it must be -smaller or equal to that value on a finer mesh, since the original function is -still in the space spanned by the shape functions on the finer grid, as finite -element spaces are nested. However, the computation above shows that we should -not be surprised if the value of the functional does not converge to zero, but -rather some finite value. - -

-There is one more conclusion to be drawn from the blow-up lesson above: we -cannot expect the finite dimensional approximation to be close to the root -function at the left end of the domain, for any mesh we choose! Because, if it -would, then its energy would have to blow up. And we will see exactly this -in the results section below. - -

- -

-What to do? -

- -

-After this somewhat theoretical introduction, let us just once in our life -have fun with pure mathematics, and actually see what happens in this problem -when we run the finite element method on it. So here it goes: to find the -minimum of $ I(u)$ -, we have to find its stationary point. The condition for -this reads -

-
- - - - -
$\displaystyle I'(u,\varphi) = \int_0^1 6 (x-u^3) (u')^5 \{ (x-u^3)\varphi' - u^2 u' \varphi\}\ dx,$ -   
-

-for all test functions $ \varphi$ - from the same space as that from which we -take $ u$ -, but with zero boundary conditions. If this space allows us to -integrate by parts, then we could associate this with a two point boundary -value problem -

-
- - - - -
$\displaystyle -(x-u^3) u^2(u')^6 - \frac{d}{dx} \left\{(x-u^3)^2 (u')^5\right\} = 0, \qquad\qquad u(0)=0, \quad u(1)=1.$ -(1)
-

-Note that this equation degenerates wherever $ u^3=x$ -, which is at least the -case at -$ x\in\{0,1\}$ - due to the prescribed boundary values for $ u$ -, but -possibly at other places as well. However, for finite elements, we will want -to have the equation in weak form anyway. Since the equation is still -nonlinear, one may be tempted to compute iterates - -$ u_{k+1}=u_k+\alpha_k\delta u_k$ - using a Newton method for updates -$ \delta
-u_k$ -, like in -

-
- - - - -
$\displaystyle I''(u_k,\delta u_k,\varphi) = -I'(u_k, \varphi).$ -   
-

-However, since -$ I''(u_k,\cdot,\cdot)$ - may be an indefinite operator (and, as -numerical experiments indicate, is in fact during typical computations), we -don't want to use this. Instead, we use a gradient method, for which we -compute updates according to the following scheme: -

-
- - - - -
$\displaystyle \left<\delta u_k,\varphi\right> = -I'(u_k, \varphi).$ -(2)
-

-For the scalar product on the left hand side, there are multiple valid ways; -we choose the mesh dependent definition -$ \left<u,v\right> = \int_\Omega (uv +
-h(x)^2 \nabla u\cdot \nabla v)\; dx$ -, where the weight $ h(x)^2$ -, i.e. using -the local mesh width, is chosen so that the definition is dimensionally -consistent. It also yields a matrix on the left hand side that is simple to -invert, as it is the sum of the well-conditioned mass matrix, and a Laplace -matrix times a factor that counters the growth of condition number of the -Laplace matrix. - -

-The step length $ \alpha_k$ - is then computed using a one-dimensional line search -finding -

-
- - - - -
$\displaystyle \alpha_k = \arg\min_\alpha I(u_k+\alpha\delta u_k),$ -(3)
-

-or at least an approximation to this using a one-dimensional Newton method -which itself has a line search. The details of this can be found in the code. -We iterate the updates and line searches until the change in energy $ I(u_k)$ - -becomes too small to warrant any further iterations. - -

-The basic idea that you should get in all this is that we formulate the -optimization method in a function space, and will only discretize each step -separately. A number of subsequent steps will be done on the same mesh, before -we refine it and go on to do the same on the next finer mesh. - -

-As for mesh refinement, it is instructional to recall how residual based error -estimates like the one used in the Kelly et al. error estimator are usually -derived (the Kelly estimator is the one that we have used in most of the -previous example programs). In a similar way, by looking at the residual of -the strong form of the nonlinear equation we attempt here to solve, see -equation (1), we may be tempted to consider the following -expression for refinement of cell $ K$ -: -
-

- - - - - - - - - -
$\displaystyle \eta_K^2$$\displaystyle =$$\displaystyle h^2 \left\Vert
-(x-u_h^3) (u_h')^4 \left\{ u_h^2 (u_h')^2 + 5(x-u_h^3)u_h'' + 2u_h'(1-3u_h^2u_h') \right\}
-\right\Vert^2_K
-\notag$ -(4)
  $\displaystyle +
-h \left\vert (x-u_h^3)^2 [(u_h')^5] \right\vert^2_{\partial K},$ -(5)
-
- -where $ [\cdot]$ - is the jump of a quantity across an intercell boundary, and - -$ \vert\cdot\vert _{\partial K}$ - is the sum of the quantity evaluated at the two end -points of a cell. Note that in the evaluation of the jump, we have made use of -the fact that $ x-u_h^3$ - is a continuous quantity, and can therefore be taken -out of the jump operator. - -

-All these details actually matter - while writing the program I have played -around with many settings and different versions of the code, and the result -is that if you don't have a good line search, good stopping criteria, the -right metric (scalar product) for the gradient method, good initial values, -and a good refinement criterion, then the nonlinear solver gets stuck quite -readily for this highly nonlinear problem. Initially, I was hardly able to -find solutions for which the energy dropped below 0.005, while the energy -after the final iteration of the program as it is is usually around 0.0003, -and occasionally down to less than 3e-5. - -

-However, this is not enough. In the program, we start the solver on the coarse -mesh many times, with randomly perturbed starting values, and while it -converges it yields a different solution, with a different energy every -time. One can therefore not say that the solver converges to a certain energy, -and we can't answer the question what the smallest value of $ I(u)$ - might be in - -$ W^{1,\infty}$ -. This is unsatisfactory, but maybe to be expected for such a -contrived and pathological problem. Consider it an example in programming with -deal.II then, and not an example in solving this particular problem. - -

- -

-Implementation -

- -

-The program implements all the steps mentioned above, and we will discuss them -in the commented code below. In general, however, note that formulating the -Newton method in function spaces, and only discretizing afterwards has -consequences: we have to linearize around $ u_k$ - when we want to compute - -$ \delta
-u_k$ -, and we have to sum up these two functions afterwards. However, -they may be living on different grids, if we have refined the grid before this -step, so we will have to present a way to actually get a function from one -grid to another. The SolutionTransfer class will help us here. On the -other hand, discretizing every nonlinear step separately has the advantage -that we can do the initial steps, when we are still far away from the -solution, on a coarse mesh, and only go on to more expensive computations when -we home in on an solution. We will use a -very simplistic strategy for when we refine the mesh (every fifth nonlinear -step), though. Realistic programs solving nonlinear problems will have to be more -clever in this respect, but it suffices for the purposes of this program. - -

-We will show some of the things that are really simple in 1d (but sometimes -different from what we are used to in 2d or 3d). Apart from this, the program -does not contain much new stuff, but if it explains a few of the techniques -that are available for nonlinear problems and in particular 1d problems, then -this is not so bad, after all. - -

-Note: As shown below, the program starts the nonlinear solver from 10 different -initial values, and outputs the results. This is not actually too many, but we -did so to keep run-time short (around 1:30 minutes on my laptop). If you want to -increase the number of realizations, you may want to switch to optimized mode -(by setting the ``debug-mode'' flag in the Makefile to ``off''), and increase -the number of realizations to a larger value. On the same machine as above, I -can compute 100 realizations in optimized mode in about 2 minutes. For -this particular program, the difference between debug and optimized mode is -thus about a factor of 7-8, which can be explained by the fact that we ask the -compiler to do optimizations on the code only in the latter mode, but in most -part due to the fact that in optimized mode all the ``Assert'' checks are -thrown out that make sure that function arguments are correct, and that check -the internal consistency of the library. The library contains several -thousands of these checks, and they significantly slow down debug -computations, but we feel that the benefit of finding programming errors -earlier and including where the problem exactly appeared to be of significantly -greater value than faster run-time. After all, all production runs of programs -should be done in optimized mode anyway. - -

-A slowdown of a factor of 7-8 is unusual, however. For 2d and 3d applications, -a typical value is around 4. -