From ff19aedf46218d9d36328a163e8ad1873311f603 Mon Sep 17 00:00:00 2001 From: kronbichler Date: Fri, 23 Aug 2013 18:11:06 +0000 Subject: [PATCH] Adjust output, mention change git-svn-id: https://svn.dealii.org/trunk@30451 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/doc/news/changes.h | 10 ++ deal.II/examples/step-10/doc/results.dox | 153 +++++++++++------------ 2 files changed, 85 insertions(+), 78 deletions(-) diff --git a/deal.II/doc/news/changes.h b/deal.II/doc/news/changes.h index 6f9e1513db..95099c18b9 100644 --- a/deal.II/doc/news/changes.h +++ b/deal.II/doc/news/changes.h @@ -68,6 +68,16 @@ inconvenience this causes.

Specific improvements

    +
  1. + Improved: MappingQ now uses the points of the Gauss-Lobatto quadrature + formula as support points instead of equispaced ones. This allows its use + for high polynomial orders and also gives better interpolation of circular + boundaries. Beware that mappings of order three and higher will behave + slightly differently now (usually better). +
    + (Martin Kronbichler, 2013/08/23) +
  2. +
  3. Improved: Several .cc files in the deal.II directory have been split in order to better utilize multiple processors when compiling in parallel and diff --git a/deal.II/examples/step-10/doc/results.dox b/deal.II/examples/step-10/doc/results.dox index 2e25ba40fa..dcc5dac011 100644 --- a/deal.II/examples/step-10/doc/results.dox +++ b/deal.II/examples/step-10/doc/results.dox @@ -9,7 +9,7 @@ the commands @code set style data lines set size 0.721, 1 -set nokey +unset key plot [-1:1][-1:1] "ball0_mapping_q1.dat" @endcode or using one of the other filenames. The second line makes sure that @@ -90,104 +90,101 @@ good accuracy. This is the output of this part of the program: Computation of Pi by the area: ============================== Degree = 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 +cells eval.pi error + 5 1.9999999999999993 1.1416e+00 - + 20 2.8284271247461894 3.1317e-01 1.87 + 80 3.0614674589207178 8.0125e-02 1.97 + 320 3.1214451522580520 2.0148e-02 1.99 + 1280 3.1365484905459393 5.0442e-03 2.00 + 5120 3.1403311569547534 1.2615e-03 2.00 Degree = 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 +cells eval.pi error + 5 3.1045694996615865 3.7023e-02 - + 20 3.1391475703122271 2.4451e-03 3.92 + 80 3.1414377167038303 1.5494e-04 3.98 + 320 3.1415829366419015 9.7169e-06 4.00 + 1280 3.1415920457576911 6.0783e-07 4.00 + 5120 3.1415926155921139 3.7998e-08 4.00 Degree = 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 +cells eval.pi error + 5 3.1410033851499310 5.8927e-04 - + 20 3.1415830393583861 9.6142e-06 5.94 + 80 3.1415925017363837 1.5185e-07 5.98 + 320 3.1415926512106722 2.3791e-09 6.00 + 1280 3.1415926535525962 3.7197e-11 6.00 + 5120 3.1415926535892140 5.7923e-13 6.00 Degree = 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 - +cells eval.pi error + 5 3.1415871927401127 5.4608e-06 - + 20 3.1415926314742437 2.2116e-08 7.95 + 80 3.1415926535026228 8.7170e-11 7.99 + 320 3.1415926535894529 3.4036e-13 8.00 + 1280 3.1415926535897927 2.9187e-16 10.19 + 5120 3.1415926535897944 1.3509e-15 -2.21 Computation of Pi by the perimeter: =================================== Degree = 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 +cells eval.pi error + 5 2.8284271247461898 3.1317e-01 - + 20 3.0614674589207178 8.0125e-02 1.97 + 80 3.1214451522580520 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 Degree = 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 +cells eval.pi error + 5 3.1248930668550594 1.6700e-02 - + 20 3.1404050605605449 1.1876e-03 3.81 + 80 3.1415157631807014 7.6890e-05 3.95 + 320 3.1415878042798617 4.8493e-06 3.99 + 1280 3.1415923498174534 3.0377e-07 4.00 + 5120 3.1415926345932004 1.8997e-08 4.00 Degree = 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 +cells eval.pi error + 5 3.1414940401456057 9.8613e-05 - + 20 3.1415913432549156 1.3103e-06 6.23 + 80 3.1415926341726914 1.9417e-08 6.08 + 320 3.1415926532906893 2.9910e-10 6.02 + 1280 3.1415926535851360 4.6571e-12 6.01 + 5120 3.1415926535897203 7.2845e-14 6.00 Degree = 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 +cells eval.pi error + 5 3.1415921029432576 5.5065e-07 - + 20 3.1415926513737600 2.2160e-09 7.96 + 80 3.1415926535810712 8.7218e-12 7.99 + 320 3.1415926535897594 3.3668e-14 8.02 + 1280 3.1415926535897922 1.0617e-15 4.99 + 5120 3.1415926535897931 1.0061e-16 3.40 @endcode -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 the $Q_4$ mapping, the last -number is correct to 13 digits in both computations, which is already -quite a lot. However, also note that for the $Q_1$ mapping, even on the -finest grid the accuracy is significantly worse than on the coarse -grid for a $Q_4$ mapping! +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 the $Q_4$ mapping, we are +already in the regime of roundoff errors and the convergence rate levels off, +which is already quite a lot. However, also note that for the $Q_1$ mapping, +even on the finest grid the accuracy is significantly worse than on the coarse +grid for a $Q_3$ mapping! -The last column of the output shows the convergence order, in powers -of the mesh width $h$. In the introduction, we had stated that -the convergence order for a $Q_p$ mapping should be -$h^{p+1}$. However, in the example shown, the $Q_2$ and $Q_4$ -mappings show a convergence order of $h^{p+2}$! This at -first surprising fact is readily explained by the particular boundary -we have chosen in this example. In fact, the circle is described by the function -$\sqrt{1-x^2}$, which has the series expansion -$1-x^2/2-x^4/8-x^6/16+\ldots$ -around $x=0$. 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 $Q_4$ mapping. +The last column of the output shows the convergence order, in powers of the +mesh width $h$. In the introduction, we had stated that the convergence order +for a $Q_p$ mapping should be $h^{p+1}$. However, in the example shown, the +order is rather $h^{2p}$! This at first surprising fact is explained by the +properties of the $Q_p$ mapping. At order p, it uses support points +that are based on the p+1 point Gauss-Lobatto quadrature rule that +selects the support points in such a way that the quadrature rule converges at +order 2p. Even though these points are here only used for interpolation +of a pth order polynomial, we get a superconvergence effect when +numerically evaluating the integral that actually gives this high order of +convergence. -- 2.39.5