--- /dev/null
+<a name="Intro"></a>
+<h1>Introduction</h1>
+
+<p>
+This is a rather short example which only shows some aspects of using
+higher order mappings. By <it>mapping</it> we mean the transformation
+between the unit cell (i.e. the unit line, square, or cube) to the
+cells in real space. In all the previous examples, we have implicitly
+used linear or d-linear mappings; you will not have notices this at
+all, since this is what happens if you do not do anything
+special. However, if your domain has curved boundaries, there are
+cases where the piecewise linear approximation of the boundary
+(i.e. by straight line segments) is not sufficient, and you want that
+your computational domain is an approximation to the real domain using
+curved boundaries as well. If the boundary approximation uses
+piecewise quadratic parabolas to approximate the true boundary, then
+we say that this is a quadratic or <em>Q2</em> approximation. If we
+use piecewise graphs of cubic polynomials, then this is a <em>Q3</em>
+approximation, and so on.
+</p>
+
+<p>
+For some differential equations, it is known that piecewise linear
+approximations of the boundary, i.e. Q1 mappings, are not
+sufficient if the boundary of the domain is curved. Examples are the
+biharmonic equation using C<sup>1</sup> elements, or the Euler
+equation. In these cases, it is necessary to compute the integrals
+using a higher order mapping. The reason, of course, is that if we do
+not use a higher order mapping, the order of approximation of the
+boundary dominates the order of convergence of the entire numerical
+scheme, irrespective of the order of convergence of the discretization
+in the interior of the domain.
+</p>
+
+<p>
+Rather than demonstrating the use of higher order mappings with one of
+these more complicated mappings, we do only a brief computation:
+calculating the value of pi=3.141592653589793238462643... by two
+different methods.
+</p>
+
+<p>
+The first method uses a triangulated approximation of the circle with
+unit radius and integrates the unit function over it. Of course, if
+the domain were the exact unit circle, then the area would be pi, but
+since we only use an approximation by piecewise polynomial segments,
+the value of the area is not exactly pi. However, it is known that as
+we refine the triangulation, a Qp mapping approximates the boundary
+with an order <it>h<sup>p+1</sup></it>, where <it>h</it> is the mesh
+width. We will check the values of the computed area of the circle and
+their convergence towards pi under mesh refinement for different
+mappings. We will also find a convergence behavior that is surprising
+at first, but has a good explanation.
+</p>
+
+<p>
+The second method works similarly, but this time does not use the area
+of the triangulated unit circle, but rather its perimeter. Pi is then
+approximated by half of the perimeter, as the radius is equal to one.
+</p>
--- /dev/null
+<a name="Results"></a>
+<h1>Results</h1>
+
+<p>
+The program performs two tasks, the first being to generate a
+visualization of the mapped domain, the second to compute pi by the
+two methods described. Let us first take a look at the generated
+graphics. They are generated in Gnuplot format, and can be viewed with
+the commands
+<pre>
+set data style lines
+set size 0.721, 1
+set nokey
+plot [-1:1][-1:1] "ball0_mapping_q1.dat"
+</pre>
+or using one of the other filenames. The second line makes sure that
+the aspect ratio of the generated output is actually 1:1, i.e. a
+circle is drawn as a circle on your screen, rather than as an
+ellipse. The third line switches off the key in the graphic, as that
+will only print information (the filename) which is not that important
+right now.
+</p>
+
+<p>
+The following table shows the triangulated computational domain for
+Q1, Q2, and Q3 mappings, for the original coarse grid (left), and a
+once uniformly refined grid (right). If your browser does not display
+these pictures in acceptable quality, view them one by one.
+<table "width=80%" align="center">
+ <tr>
+ <td>
+ <img src="step-10.data/ball_mapping_q1_ref0.jpg" alt="Q1 mapping, coarse grid" height="300">
+ </td>
+ <td>
+ <img src="step-10.data/ball_mapping_q1_ref1.jpg" alt="Q1 mapping, once refined grid" height="300">
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <img src="step-10.data/ball_mapping_q2_ref0.jpg" alt="Q2 mapping, coarse grid" height="300">
+ </td>
+ <td>
+ <img src="step-10.data/ball_mapping_q2_ref1.jpg" alt="Q2 mapping, once refined grid" height="300">
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <img src="step-10.data/ball_mapping_q3_ref0.jpg" alt="Q3 mapping, coarse grid" height="300">
+ </td>
+ <td>
+ <img src="step-10.data/ball_mapping_q3_ref1.jpg" alt="Q3 mapping, once refined grid" height="300">
+ </td>
+ </tr>
+</table>
+These pictures show the obvious advantage of higher order mappings:
+they approximate the true boundary quite well also on rather coarse
+meshes. To demonstrate this a little further, the following table
+shows the upper right quarter of the circle of the coarse mesh, and
+with dashed lines the exact circle:
+<table "width=80%" align="center">
+ <tr>
+ <td>
+ <img src="step-10.data/quarter-q1.jpg" alt="Q1 mapping, coarse grid" height="300">
+ </td>
+ <td>
+ <img src="step-10.data/quarter-q2.jpg" alt="Q2 mapping, coarse grid" height="300">
+ </td>
+ <td>
+ <img src="step-10.data/quarter-q3.jpg" alt="Q3 mapping, coarse grid" height="300">
+ </td>
+ </tr>
+</table>
+The quadratic mapping obviously quite well approximates the
+boundary, while for the cubic mapping the difference between
+approximated domain and true one is hardly visible already for the
+coarse grid.
+</p>
+
+<p>
+The second purpose of the program was to compute the value of pi to
+good accuracy. This is the output of this part of the program:
+<pre>
+Computation of Pi by the area:
+==============================
+Order = 1
+cells eval.pi error
+5 1.9999999999999998 1.1416e+00 -
+20 2.8284271247461898 3.1317e-01 1.87
+80 3.0614674589207178 8.0125e-02 1.97
+320 3.1214451522580520 2.0148e-02 1.99
+1280 3.1365484905459389 5.0442e-03 2.00
+5120 3.1403311569547521 1.2615e-03 2.00
+
+Order = 2
+cells eval.pi error
+5 3.1045694996615869 3.7023e-02 -
+20 3.1391475703122276 2.4451e-03 3.92
+80 3.1414377167038303 1.5494e-04 3.98
+320 3.1415829366419019 9.7169e-06 4.00
+1280 3.1415920457576907 6.0783e-07 4.00
+5120 3.1415926155921126 3.7998e-08 4.00
+
+Order = 3
+cells eval.pi error
+5 3.1465390309173475 4.9464e-03 -
+20 3.1419461263297386 3.5347e-04 3.81
+80 3.1416154689089382 2.2815e-05 3.95
+320 3.1415940909713274 1.4374e-06 3.99
+1280 3.1415927436051230 9.0015e-08 4.00
+5120 3.1415926592185492 5.6288e-09 4.00
+
+Order = 4
+cells eval.pi error
+5 3.1418185737113964 2.2592e-04 -
+20 3.1415963919525050 3.7384e-06 5.92
+80 3.1415927128397780 5.9250e-08 5.98
+320 3.1415926545188264 9.2903e-10 5.99
+1280 3.1415926536042722 1.4479e-11 6.00
+5120 3.1415926535899668 1.7343e-13 6.38
+
+
+Computation of Pi by the perimeter:
+===================================
+Order = 1
+cells eval.pi error
+5 2.8284271247461903 3.1317e-01 -
+20 3.0614674589207183 8.0125e-02 1.97
+80 3.1214451522580524 2.0148e-02 1.99
+320 3.1365484905459393 5.0442e-03 2.00
+1280 3.1403311569547525 1.2615e-03 2.00
+5120 3.1412772509327729 3.1540e-04 2.00
+
+Order = 2
+cells eval.pi error
+5 3.1248930668550599 1.6700e-02 -
+20 3.1404050605605454 1.1876e-03 3.81
+80 3.1415157631807014 7.6890e-05 3.95
+320 3.1415878042798613 4.8493e-06 3.99
+1280 3.1415923498174538 3.0377e-07 4.00
+5120 3.1415926345932004 1.8997e-08 4.00
+
+Order = 3
+cells eval.pi error
+5 3.1442603311164286 2.6677e-03 -
+20 3.1417729561193588 1.8030e-04 3.89
+80 3.1416041192612365 1.1466e-05 3.98
+320 3.1415933731961760 7.1961e-07 3.99
+1280 3.1415926986118001 4.5022e-08 4.00
+5120 3.1415926564043946 2.8146e-09 4.00
+
+Order = 4
+cells eval.pi error
+5 3.1417078926581086 1.1524e-04 -
+20 3.1415945317216001 1.8781e-06 5.94
+80 3.1415926832497720 2.9660e-08 5.98
+320 3.1415926540544636 4.6467e-10 6.00
+1280 3.1415926535970535 7.2602e-12 6.00
+5120 3.1415926535899010 1.0805e-13 6.07
+</pre>
+</p>
+
+<p>
+One of the immediate observations from the output is that in all cases
+the values converge quickly to the true value of
+pi=3.141592653589793238462643. Note that for for Q4 mapping, the last
+number is correct to 13 digits in both computations, which is already
+quite a lot. However, also note that for the Q1 mapping, even on the
+finest grid the accuracy is significantly worse than on the coarse
+grid for a Q4 mapping!
+</p>
+
+<p>
+The last column of the output shows the convergence order, in powers
+of the mesh width <it>h</it>. In the introduction, we had stated that
+the convergence order for a <it>Qp</it> mapping should be
+<it>h<sup>p+1</sup></it>. However, in the example shown, the Q2 and Q4
+mappings show a convergence order of <it>h<sup>p+2</sup></it>! This at
+first surprising fact is readily explained by the particular boundary
+we have here. In fact, the circle is described by the function
+<it>sqrt(1-x<sup>2</sup>)</it>, which has the series expansion
+<it>1-x<sup>2</sup>/2-x<sup>4</sup>/8-x<sup>6</sup>/16+...</it>
+around <it>x=0</it>. Thus, for the quadratic mapping where the
+truncation error of the quadratic approximation should be cubic, there
+is no such term but only a quartic one, which raises the convergence
+order to 4, instead of 3. The same happens for the Q4 mapping.
+</p>