<h1>Results</h1>

The program has, after having been run, produced two sparsity
patterns. We can visualize them using <a
href="http://www.gnuplot.info/">GNUPLOT</a> (one of the simpler visualization
programs; maybe not the easiest to use since it is command line driven, but
also universally available on all Linux and other Unix-like systems):
@code
examples/\step-2> gnuplot

        G N U P L O T
        Version 3.7 patchlevel 3
        last modified Thu Dec 12 13:00:00 GMT 2002
        System: Linux 2.6.11.4-21.10-default

        Copyright(C) 1986 - 1993, 1998 - 2002
        Thomas Williams, Colin Kelley and many others

        Type `help` to access the on-line reference manual
        The gnuplot FAQ is available from
        http://www.gnuplot.info/gnuplot-faq.html

        Send comments and requests for help to <info-gnuplot@dartmouth.edu>
        Send bugs, suggestions and mods to <bug-gnuplot@dartmouth.edu>


Terminal type set to 'x11'
gnuplot> set style data points
gnuplot> plot "sparsity_pattern.1"
@endcode

The results then look like this (every point denotes an entry which
might be nonzero; of course the fact whether the entry actually is
zero or not depends on the equation under consideration, but the
indicated positions in the matrix tell us which shape functions can
and which can't couple when discretizing a local, i.e. differential,
equation):
<TABLE WIDTH="60%" ALIGN="center">
  <tr>
    <td ALIGN="center">
      <img src="http://www.dealii.org/images/steps/developer/step-2.sparsity-1.png" alt="">
    </td>

    <td ALIGN="center">
      <img src="http://www.dealii.org/images/steps/developer/step-2.sparsity-2.png" alt="">
    </td>
  </tr>
</table>

The different regions in the left picture, indicated by kinks in the lines and
single dots on the left and top, represent the degrees of
freedom on the different refinement levels of the triangulation.  As
can be seen in the right picture, the sparsity pattern is much better
clustered around the main diagonal of the matrix after
renumbering. Although this might not be apparent, the number of
nonzero entries is the same in both pictures, of course.



<h3> Possible extensions </h3>

Just as with step-1, you may want to play with the program a bit to
familiarize yourself with deal.II. For example, in the
<code>distribute_dofs</code> function, we use linear finite elements
(that's what the argument "1" to the FE_Q object is). Explore how the
sparsity pattern changes if you use higher order elements, for example
cubic or quintic ones (by using 3 and 5 as the respective arguments).

Or, you could see how the sparsity pattern changes with more
refinements. You will see that not only the size of the matrix
changes, but also its bandwidth (the distance from the diagonal of
those nonzero elements of the matrix that are farthest away from the
diagonal), though the ratio of bandwidth to size typically shrinks,
i.e. the matrix clusters more around the diagonal.

Another idea of experiments would be to try other renumbering
strategies than Cuthill-McKee from the DoFRenumbering namespace and see how
they affect the sparsity pattern.
