From: bangerth Date: Sun, 25 Mar 2012 15:41:30 +0000 (+0000) Subject: Add. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9b89eb1976e5c250e3bb2850df880cb2db88a169;p=dealii-svn.git Add. git-svn-id: https://svn.dealii.org/trunk@25329 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/doc/news/changes.h b/deal.II/doc/news/changes.h index 090b99eea9..6a78d5c444 100644 --- a/deal.II/doc/news/changes.h +++ b/deal.II/doc/news/changes.h @@ -47,6 +47,13 @@ used for boundary indicators.
    +
  1. +New: We have added a brief section to the step-12 tutorial programs that +compares the DG solution computed there with one that one would obtain by +using a continuous finite element. +
    +(Wolfgang Bangerth, 2012/03/25) +
  2. New: Added support for codimension 2, i.e. for dim-dimensional objects embedded into spacedim=dim+2 dimensional space. @@ -58,7 +65,7 @@ type unsigned char. Throughout the library, we changed their datatype to types::material_id_t resp. types::boundary_id_t, both typedefs of unsigned char. Internal faces are now characterized by -types::internal_face_boundary_id(=static_cast(-1)) +types::internal_face_boundary_id(=static_cast@(-1)) instead of 255, so we get rid of that mysterious number in the source code. Material_ids are also assumed to lie in the range from 0 to types::invalid_material_id-1 (where types::invalid_material_id = diff --git a/deal.II/examples/step-12/doc/results.dox b/deal.II/examples/step-12/doc/results.dox index ec60b8a491..5b7aa841a3 100644 --- a/deal.II/examples/step-12/doc/results.dox +++ b/deal.II/examples/step-12/doc/results.dox @@ -71,6 +71,88 @@ And finally we show a plot of a 3d computation. @image html step-12.sol-5-3d.png + +

    Why use discontinuous elements

    + +In this program we have used discontinuous elements. It is a legitimate +question to ask why not simply use the normal, continuous ones. Of course, to +everyone with a background in numerical methods, the answer is obvious: the +continuous Galerkin (cG) method is not stable for the transport equation, +unless one specifically adds stabilization terms. The DG method, however, +is stable. Illustrating this with the current program is not very +difficult; in fact, only the following minor modifications are necessary: +- Change the element to FE_Q instead of FE_DGQ. +- Add handling of hanging node constraints in exactly the same way as step-6. +- We need a different solver; the direct solver in step-29 is a convenient + choice. +An experienced deal.II user will be able to do this in less than 10 minutes. + +While the 2d solution has been shown above, containing a number of small +spikes at the interface that are, however, stable in height under mesh +refinement, results look much different when using a continuous element: + + + + + + + + + + + + + + + + + + + + + + + + + +
    + 0   + + @image html step-12.cg.sol-0.png + + 1   + + @image html step-12.cg.sol-1.png +
    + 2   + + @image html step-12.cg.sol-2.png + + 3   + + @image html step-12.cg.sol-3.png +
    + 4   + + @image html step-12.cg.sol-4.png + + 5   + + @image html step-12.cg.sol-4.png +
    + +In refinement iteration 5, the image can't be plotted in a reasonable way any +more as a 3d plot. We thus show a color plot with a range of $[-1,2]$ (the +solution values of the exact solution lie in $[0,1]$, of course). In any case, +it is clear that the continuous Galerkin solution exhibits oscillatory +behavior that gets worse and worse as the mesh is refined more and more. + +There are a number of strategies to stabilize the cG method, if one wants to +use continuous elements for some reason. Discussing these methods is beyond +the scope of this tutorial program; an interested reader could, for example, +take a look at step-31. + +

    Possibilities for extensions

    diff --git a/deal.II/examples/step-12/doc/step-12.cg.sol-0.png b/deal.II/examples/step-12/doc/step-12.cg.sol-0.png new file mode 100644 index 0000000000..e7c7afc81b Binary files /dev/null and b/deal.II/examples/step-12/doc/step-12.cg.sol-0.png differ diff --git a/deal.II/examples/step-12/doc/step-12.cg.sol-1.png b/deal.II/examples/step-12/doc/step-12.cg.sol-1.png new file mode 100644 index 0000000000..5be106b50a Binary files /dev/null and b/deal.II/examples/step-12/doc/step-12.cg.sol-1.png differ diff --git a/deal.II/examples/step-12/doc/step-12.cg.sol-2.png b/deal.II/examples/step-12/doc/step-12.cg.sol-2.png new file mode 100644 index 0000000000..39c8fc4f42 Binary files /dev/null and b/deal.II/examples/step-12/doc/step-12.cg.sol-2.png differ diff --git a/deal.II/examples/step-12/doc/step-12.cg.sol-3.png b/deal.II/examples/step-12/doc/step-12.cg.sol-3.png new file mode 100644 index 0000000000..d52f8e8bab Binary files /dev/null and b/deal.II/examples/step-12/doc/step-12.cg.sol-3.png differ diff --git a/deal.II/examples/step-12/doc/step-12.cg.sol-4.png b/deal.II/examples/step-12/doc/step-12.cg.sol-4.png new file mode 100644 index 0000000000..f5c3079a46 Binary files /dev/null and b/deal.II/examples/step-12/doc/step-12.cg.sol-4.png differ diff --git a/deal.II/examples/step-12/doc/step-12.cg.sol-5.png b/deal.II/examples/step-12/doc/step-12.cg.sol-5.png new file mode 100644 index 0000000000..5e6472808b Binary files /dev/null and b/deal.II/examples/step-12/doc/step-12.cg.sol-5.png differ