]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Add step-6, updates for (preliminary) SGML output, and other small changes.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 2 Jan 2000 20:46:35 +0000 (20:46 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 2 Jan 2000 20:46:35 +0000 (20:46 +0000)
git-svn-id: https://svn.dealii.org/trunk@2143 0785d39b-7218-0410-832d-ea1e28bc413d

26 files changed:
deal.II/doc/tutorial/chapter-2.step-by-step/Makefile
deal.II/doc/tutorial/chapter-2.step-by-step/navbar.html
deal.II/doc/tutorial/chapter-2.step-by-step/program2html
deal.II/doc/tutorial/chapter-2.step-by-step/program2plain
deal.II/doc/tutorial/chapter-2.step-by-step/step-1.intro
deal.II/doc/tutorial/chapter-2.step-by-step/step-1.results
deal.II/doc/tutorial/chapter-2.step-by-step/step-2.intro
deal.II/doc/tutorial/chapter-2.step-by-step/step-2.results
deal.II/doc/tutorial/chapter-2.step-by-step/step-3.intro
deal.II/doc/tutorial/chapter-2.step-by-step/step-3.results
deal.II/doc/tutorial/chapter-2.step-by-step/step-4.intro
deal.II/doc/tutorial/chapter-2.step-by-step/step-4.results
deal.II/doc/tutorial/chapter-2.step-by-step/step-5.intro
deal.II/doc/tutorial/chapter-2.step-by-step/step-5.results
deal.II/doc/tutorial/chapter-2.step-by-step/step-6.data/final-solution.jpg [new file with mode: 0644]
deal.II/doc/tutorial/chapter-2.step-by-step/step-6.data/grid-0.jpg [new file with mode: 0644]
deal.II/doc/tutorial/chapter-2.step-by-step/step-6.data/grid-1.jpg [new file with mode: 0644]
deal.II/doc/tutorial/chapter-2.step-by-step/step-6.data/grid-2.jpg [new file with mode: 0644]
deal.II/doc/tutorial/chapter-2.step-by-step/step-6.data/grid-3.jpg [new file with mode: 0644]
deal.II/doc/tutorial/chapter-2.step-by-step/step-6.data/grid-4.jpg [new file with mode: 0644]
deal.II/doc/tutorial/chapter-2.step-by-step/step-6.data/grid-5.jpg [new file with mode: 0644]
deal.II/doc/tutorial/chapter-2.step-by-step/step-6.data/grid-6.jpg [new file with mode: 0644]
deal.II/doc/tutorial/chapter-2.step-by-step/step-6.data/grid-7.jpg [new file with mode: 0644]
deal.II/doc/tutorial/chapter-2.step-by-step/step-6.intro [new file with mode: 0644]
deal.II/doc/tutorial/chapter-2.step-by-step/step-6.results [new file with mode: 0644]
deal.II/doc/tutorial/chapter-2.step-by-step/toc.html

index 05ed596c2acff7492d00dd8a189cd65fbd248024..b89eccbced097c20b2b3cdc4c5eb6a8f66449c3d 100644 (file)
@@ -7,6 +7,7 @@ include ../../../common/Make.global_options
 example-directories = $(shell echo $D/deal.II/examples/step-by-step/step-*)
 example-names       = $(notdir $(example-directories))
 example-htmls       = $(addsuffix .html,$(example-names))
+example-sgmls       = $(addsuffix .sgml,$(example-names))
 
 all: $(example-htmls)
 
@@ -28,6 +29,46 @@ $(example-htmls):
        @cat step-by-step.foot >> $@
 
 
+# Note: SGML support is very preliminary and not very functional at present!
+$(example-sgmls):
+       @echo ================== Assembling $@
+       @cat $(@:.sgml=.intro) >> $@
+       @echo "</sect2>" >> $@
+       @cat ../../../deal.II/examples/step-by-step/$(@:.sgml=)/$(@:.sgml=.cc) \
+         | $(PERL) program2html \
+         >> $@
+       @echo "</sect2>" >> $@
+       @cat $(@:.sgml=.results) >> $@
+       @echo "</sect2>" >> $@
+       @cat $D/deal.II/examples/step-by-step/$(@:.sgml=)/$(@:.sgml=.cc) \
+         | $(PERL) program2plain \
+         | $(PERL) -e '$$path="$D/deal.II/examples/step-by-step/$(@:.sgml=)/$(@:.sgml=.cc)"; \
+                        $$path =~ s!/! /!g; \
+                       while (<>) { s!PROGRAMPATH!$$path!g; print; };' \
+         >> $@
+       @echo "</sect2>" >> $@
+       @$(PERL) -pi -e 's!<a .*</a>!!gi;       \
+                         s!<h1>(.*)</h1>!<sect2><title>$$1</title>!gi; \
+                         s!<p>!\n<para>!gi;                            \
+                         s!</p>!</para>!gi;                            \
+                         s!<pre><code>!<programlisting>!gi;            \
+                         s!</code></pre>!</programlisting>!gi; ' $@
+
+step-by-step.sgml: $(example-sgmls)
+       @echo ================== Concating $@
+       @cat step-by-step.header.sgml          \
+             | perl -pi -e 's/TODAY/$(shell date)/;'   \
+             > $@
+       @for step in $(example-names) ; do      \
+            echo "<sect1><title>$$step</title>" >> $@ ; \
+            cat $$step.sgml     >> $@ ; \
+            echo "</sect1>"   >> $@ ; \
+        done
+       @echo "</chapter>" >> $@
+       @echo "</book>" >> $@
+       @rm $(example-sgmls)
+
+
 clean:
        -rm $(example-htmls)
 
index 0124224506b9bb869d10726fb5ebca60ee52dbc8..cabe68c98812f5202b24b7a097f86af704d667d0 100644 (file)
@@ -18,7 +18,7 @@
 <p>
 <strong>Table of contents</strong>
 </p>
-    <ol>
+    <ul>
       <li>
        <p>
          <a href="toc.html" target="body">Step-by-Step overview</a>
          <a href="step-5.html" target="body">Step 5</a>
        </p>
       </li>
-    </ol>
+
+      <li>
+       <p>
+         <a href="step-6.html" target="body">Step 6</a>
+       </p>
+      </li>
+    </ul>
     <p>
       <a href="../index.html" target="_top">Back to the tutorial index</a>
     </p>
+
+    <p>
+      <a href="../../index.html" target="_top">Back to the deal.II homepage</a>
+    </p>
+
+
     <hr>
+
     <p>
       <a href="mailto:deal@iwr.uni-heidelberg.de">Comments on the tutorial</a>
     </p>
index 8ac79e55491e7893570ca45363b5b5ceb5650f5f..c578e7474d9c4ade883492f3975c401520acecb2 100644 (file)
@@ -12,11 +12,15 @@ while ( m!/\*\s*\$Id$!) {
 $comment_mode = 0;
 $program_mode = 1;
 $state =  $comment_mode;
+
+print "<p>\n";
+
 while (<>) {
     # ignore cvs tag
     next if m!/\*\s*\$Id:!;
 
     # substitute special characters
+    s/&/&amp;/g;
     s/</&lt;/g;
     s/>/&gt;/g;
     s/\t/        /g;
@@ -25,12 +29,16 @@ while (<>) {
     {     
        $state = $comment_mode;
        print "</code></pre>\n";
+       print "\n";
+       print "<p>\n";
     }
     # if in comment mode and no comment line: toggle state.
     # don't do so, if only a blank line
     elsif (($state == $comment_mode) && !m!^\s*//! && !m!^\s*$!)
     {     
        $state = $program_mode;
+       print "</p>\n";
+       print "\n";
        print "<pre><code>\n";
     }
     
@@ -38,7 +46,7 @@ while (<>) {
     {
        m!\s*//\s*(.*)!;
        print $1, "\n";
-       print "<p>" if  $1 =~ m!^\s*$!;
+       print "</p>\n\n<p>" if  $1 =~ m!^\s*$!;
     }
     else
     {
index 4fe9180d9e80dd871eb52d54e2886d23dfd81e1a..720819ba49e173dd2a000e37aab08cb96146b6dc 100644 (file)
@@ -4,12 +4,17 @@ while ( m!/\*\s*\$Id$!) {
     $_ = <>;
 }
 
-print "<a name=\"PlainProg\"></a>\n";
-print "<h1> The plain program</h1>\n";
+print <<END;
+<a name=\"PlainProg\"></a>
+<h1> The plain program</h1>
 
-print "(The program can be found at <i>PROGRAMPATH</i>.)\n <p>\n";
+<p>
+(The program can be found at <i>PROGRAMPATH</i>.)
+</p>
 
-print "<pre><code>\n";
+<p>
+<pre><code>
+END
 
 
 while (<>) {
@@ -20,6 +25,7 @@ while (<>) {
     next if m!^\s*//!;  
 
     # substitute special characters
+    s/&/&amp;/g;
     s/</&lt;/g;
     s/>/&gt;/g;
     s/\t/        /g;
@@ -27,4 +33,4 @@ while (<>) {
     print "  $_";
 }
 
-print "</code></pre>";
+print "</code></pre>\n</p>\n\n";
index 6da48d4f784e5e71a1567f858c2e6141c5433be7..618e17f1f9492c04bfdbefe84386ae0467380798 100644 (file)
@@ -1,6 +1,7 @@
 <a name="Intro"></a>
 <h1>Introduction</h1>
 
+<p>
 In this first example, we do not so very much, but show two
 techniques: what is the syntax to generate triangulation objects, and
 some elements of simple loops over all cells. We create two grids, one
@@ -10,3 +11,4 @@ ring-shaped domain, which is refined towards the inner edge. The
 latter is certainly not very useful and is certainly only rarely used
 in numerical analysis, but looks nice and illustrates how loops over
 cells are written and some of the things you can do with cells.
+</p>
index 56f0a1d19ee8e93305782a045175258fc6336321..79c285ca5120eb8b54db3432bb7852a39eae990b 100644 (file)
@@ -1,9 +1,10 @@
 <a name="Results"></a>
 <h1>Results</h1>
 
+<p>
 The program has, after having been run, produced two grids, which look
 like this:
-<p>
+
 <TABLE WIDTH="60%">
 <tr>
 <td>
@@ -14,6 +15,7 @@ like this:
 </td>
 </tr>
 </table>
-<p>
+
 The left one, well, is not very exciting. The right one is - at least
 - unconventional.
+</p>
index 1e4e2c71c10017221269fe10d4ec620bbdbcb84f..3795cc5f49688db985038bc555f7d0af80b2f057 100644 (file)
@@ -1,6 +1,7 @@
 <a name="Intro"></a>
 <h1>Introduction</h1>
 
+<p>
 After we have created a grid in the previous example, we now show how
 we can associate a degree of freedom with each vertex of the
 triangulation. This is a rather simple task, since the library does
@@ -9,3 +10,4 @@ solvers, it is advantageous to have the degrees of freedom numbered
 in a certain sense, and we will use the algorithm of Cuthill and McKee
 to do so. The results are written to a file and visualized using
 GNUPLOT. 
+</p>
index 8a1ea53bd1b2d68859e5ecac59438de84d2dceb8..9eb478fee121be546099fce960090efb50b7e190 100644 (file)
@@ -1,14 +1,14 @@
 <a name="Results"></a>
 <h1>Results</h1>
 
+<p>
 The program has, after having been run, produced two sparsity
 patterns. We can visualize them using GNUPLOT:
-<pre>
-<code>
+<pre><code>
   set data style points
   plot "sparsity_pattern.1"
-</code>
-</pre>
+</code></pre>
+</p>
 
 <p>
 The results then look like this (every cross denotes an entry which
@@ -17,7 +17,6 @@ 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, if the equation is a local, i.e. differential
 one): 
-<p>
 <TABLE WIDTH="60%">
 <tr>
 <td>
@@ -28,16 +27,19 @@ one):
 </td>
 </tr>
 </table>
-<p>
+</p>
 
+<p>
 The different regions in the left picture 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.
+</p>
 
 <p>
-
 A common observation is that the more refined the grid is, the better
 the clustering around the diagonal will get.
+</p>
+
index fbca9526a3cdfba3bdba5143913411332cf729ab..8e8e458000892ff633b62da19b123e48da662816 100644 (file)
@@ -1,6 +1,7 @@
 <a name="Intro"></a>
 <h1>Introduction</h1>
 
+<p>
 This is the first example where we actually use finite elements. We
 will solve a simple version of Laplace's equation witht zero boundary
 values, but a nonzero right hand side. This example is still quite
@@ -12,3 +13,4 @@ element programs, which are along the following lines:
   <li> solving the linear system of equations;
   <li> writing results to disk.
 </ul>
+</p>
index 959b9946c6551151184fec015abe7660af5c4e4f..39219e4a43b398dc7be1376576bed5a92c43fc98 100644 (file)
@@ -1,17 +1,16 @@
 <a name="Results"></a>
 <h1>Results</h1>
 
+<p>
 The output of the program looks as follows:
-<pre>
-<code>
+<pre><code>
 Number of active cells: 1024
 Total number of cells: 1365
 Number of degrees of freedom: 1089
 DEAL:cg::Starting value 0.121094
 DEAL:cg::Starting value 0.323075
 DEAL:cg::Convergence step 47 value 5.33692e-13
-</code>
-</pre>
+</code></pre>
 
 The first three lines is what we wrote to <code>cout</code>. The last
 three lines were generated without our interaction by the CG
@@ -22,27 +21,25 @@ the threshold 1e-12 which we have set in the `solve' function. We will
 show in the next program how to suppress this output, which is
 sometimes useful for debugging purposes, but often clutters up the
 screen display.
+</p>
 
 <p>
-
 Apart from the output shown above, the program generated the file
 <code>solution.gpl</code>, which is in GNUPLOT format. It can be
 viewed as follows: invoke GNUPLOT and enter the following sequence of
 commands at its prompt:
-<pre>
-<code>
+<pre><code>
 gnuplot> set data style lines
 gnuplot> splot "solution.gpl"
-</code>
-</pre>
+</code></pre>
 This produces the picture of the solution below left. Alternatively,
 you can order GNUPLOT to do some hidden line removal by the command
-<pre>
-<code>
+<pre><code>
 gnuplot> set hidden3d
-</code>
-</pre>
+</code></pre>
 to get the result at the right:
+</p>
+
 <p>
 <TABLE WIDTH="100%">
 <tr>
@@ -54,4 +51,5 @@ to get the result at the right:
 </td>
 </tr>
 </table>
-<p>
+</p>
+
index 35c826cb319a268390739e99e42a924f7f0333b9..2b68184950a8f347d9f2614bcd8a8729afee2259 100644 (file)
@@ -1,6 +1,7 @@
 <a name="Intro"></a>
 <h1>Introduction</h1>
 
+<p>
 <acronym>deal.II</acronym> has a unique feature which we call
 ``dimension independent programming''. You may have noticed in the
 previous examples that many classes had a number in angle brackets
@@ -22,9 +23,10 @@ working on <code>Triangulation2d</code> and once working with a
 programming and leads to a nuisance to keep the two function in synch
 (at best) or difficult to find errors if the two versions get out of
 synch (at worst; this would probably the more common case).
+</p>
 
-<p>
 
+<p>
 Such obstacles can be circumvented by using some template magic as
 provided by the C++ language: templatized classes and functions are
 not really classes or functions but only a pattern depending on an
@@ -42,15 +44,17 @@ parameter. For example, consider the following piece of code:
     GridGenerator::hyper_cube (triangulation, -1, 1);
   };
 </code></pre>
+</p>
 
+<p>
 At the point where the compiler sees this function, it does not know
 anything about the value of ``dim'', by now there is a whole zoo of
 functions make_grid, one for every possible valueof ``dim''. But since
 the compiler can't know which might be used, it can not compile the
 function. 
+</p>
 
 <p>
-
 However, if later down a function would use the following sequence,
 <pre><code>
   Triangulation&lt;2&gt; triangulation;
@@ -66,19 +70,18 @@ as
     GridGenerator::hyper_cube (triangulation, -1, 1);
   };
 </code></pre>
+</p>
 
 <p>
-
 However, it is worth to note that the function
 <code>GridGenerator::hyper_cube</code> depends on the dimension as
 well, so in this case, the compiler will call the function
 <code>GridGenerator::hyper_cube&lt;2&gt;</code> while if dim were 3,
 it would call <code>GridGenerator::hyper_cube&lt;3&gt;</code> which
 might be (and actually is) a totally unrelated  function.
-
+</p>
 
 <p>
-
 The same can be made with member variables. Consider the following
 function, which might in turn call the above one:
 <pre><code>
@@ -91,7 +94,6 @@ function, which might in turn call the above one:
     ...
   };
 </code></pre>
-
 This function has a member variable of type
 <code>DoFHandler&lt;dim&gt;</code> the size of which may (and does)
 depend on the dimension we are working in. Again, the compiler can't
@@ -103,9 +105,9 @@ which it was called, and compile it. If you call the function several
 times for different dimensions, it will compile it several times, each
 time calling the right ``make_grid'' function and reserving the right
 amount of memory for the member variable.
+</p>
 
 <p>
-
 The <acronym>deal.II</acronym> library is build around this concept
 and that allows you to program in way that will not need to
 distinguish between the space dimensions. It should be noted that in
@@ -115,13 +117,14 @@ has to compile each function for each dimension separately, even there
 it knows the value of ``dim'' at the time of compilation and will
 therefore be able to optimize the ``if'' statement along with the
 unused branch.
+</p>
 
 <p>
-
 In this example program, we will show how to program dimension
 independently (which in fact is even simpler than if you had to take
 care about the dimension) and we will extend the Laplace problem of
 the last example to a program that runs in two and three space
 dimensions at the same time. Other extensions are the use of a
 non-constant right hand side function and of non-zero boundary values.
+</p>
 
index 7514fac593112471e37462d58e5b4b8a1eb7660b..321c4f94a46c83ee4a3da7c4834da274e7b77051 100644 (file)
@@ -1,12 +1,12 @@
 <a name="Results"></a>
 <h1>Results</h1>
 
+<p>
 The output of the program looks as follows (the number of iterations
 may vary by one or two, depending on your computer, since this is
 often dependent on the round-off accuracy of floating point
 operations, which differs between micro-processors):
-<pre>
-<code>
+<pre><code>
 Solving problem in 2 space dimensions.
    Number of active cells: 256
    Total number of cells: 341
@@ -17,8 +17,7 @@ Solving problem in 3 space dimensions.
    Total number of cells: 4681
    Number of degrees of freedom: 4913
    29 CG iterations needed to obtain convergence.
-</code>
-</pre>
+</code></pre>
 It is obvious that in three spatial dimensions the number of cells and
 therefore also the number of degrees of freedom is
 much higher. What cannot be seen here, is that besides this higher
@@ -27,15 +26,16 @@ more entries per row of the matrix in three space
 dimensions. Together, this leads to a much higher numerical effort for
 solving the system of equation, which you can feel when you actually
 run the program.
+</p>
 
 <p>
-
 The program produces two files: <code>solution-2d.gmv</code> and
 <code>solution-3d.gmv</code>, which can be viewed using the program
 GMV (in case you do not have that program, you can easily change the
 output format in the program to something which you can view more
 easily). From the two-dimensional output, we have produced the
 following two pictures:
+</p>
 
 <p>
 <TABLE WIDTH="100%">
@@ -48,8 +48,9 @@ following two pictures:
 </td>
 </tr>
 </table>
-<p>
+</p>
 
+<p>
 The left one shows the solution of the problem under consideration as
 a 3D plot. As can be seen, the solution is almost flat in the interior
 of the domain and has a higher curvature near the boundary. This, of
@@ -59,23 +60,23 @@ a quartic polynomial which is nearly zero in the interior and is only
 rising sharply when approaching the boundaries of the domain; the
 maximal values of the right hand side function are at the corners of
 the domain, where also the solution is moving most rapidly.
-
 It is also nice to see that the solution follows the desired quadratic
 boundary values along the boundaries of the domain.
+</p>
 
 <p>
-
 The right picture shows the two dimensional grid, colorized by the
 values of the solution function. This is not very exciting, but the
 colors are nice.
-
-<p>
+</p>
 
 
+<p>
 In three spatial dimensions, visualization is a bit more difficult. To
 the left, you can see the solution at three of the six outer faces of
 the cube in which we solved the equation, and on a plane through the
 origin. On some of the planes, the cut through the grid is also shown.
+</p>
 
 <p>
 <TABLE WIDTH="100%">
@@ -88,10 +89,11 @@ origin. On some of the planes, the cut through the grid is also shown.
 </td>
 </tr>
 </table>
-<p>
+</p>
 
+<p>
 The right picture shows the three dimensional grid, colorized by the
 solutions values. 3D grids are difficult to visualize, which can be
 seen here already, even though the grid is not locally refined.
-
+</p>
 
index 362d757e286fa59a3d1c4f04d514cd28eccecaff..70568cad3180399637d8b69be5b2d50aa5ffe7af 100644 (file)
@@ -1,6 +1,7 @@
 <a name="Intro"></a>
 <h1>Introduction</h1>
 
+<p>
 This example does not show revolutionary new things, but it shows many
 small improvements over the previous examples, and also many small
 things that can usually be found in finite element programs. Among
@@ -35,3 +36,4 @@ them are:
        preconditioned iterative solvers for the linear systems of
        equations.
 </ul>
+</p>
index 4df7e28e3ce420aa338446e45e1131f86ab2ba5c..5277a927f63e3e3bbef47ac8f7c4ad87c924ffee 100644 (file)
@@ -1,10 +1,9 @@
 <a name="Results"></a>
 <h1>Results</h1>
 
-
+<p>
 The output of the program looks as follows:
-<pre>
-<code>
+<pre><code>
 Cycle 0:
    Number of active cells: 20
    Total number of cells: 20
@@ -36,8 +35,8 @@ Cycle 5:
    Number of degrees of freedom: 20609
    200 CG iterations needed to obtain convergence.
 --------------------------------------------------------
-An error occurred in line <206> of file <step-5.cc> in function
-    void Coefficient<2>::value_list<2>(const class vector<Point<2>,__default_alloc_template<false,0> > &, class vector<double,__default_alloc_template<false,0> > &, unsigned int = 0) const
+An error occurred in line &lt;206&gt; of file &lt;step-5.cc&gt; in function
+    void Coefficient&lt;2&gt;::value_list&lt;2&gt;(const class vector&lt;Point&lt;2&gt;,__default_alloc_template&lt;false,0&gt; &gt; &, class vector&lt;double,__default_alloc_template&lt;false,0&gt; &gt; &, unsigned int = 0) const
 The violated condition was: 
     values.size() == n_points
 The name and call sequence of the exception was:
@@ -45,17 +44,19 @@ The name and call sequence of the exception was:
 Additional Information: 
 The vector has size 1 but should have 2 elements.
 --------------------------------------------------------
-</code>
-</pre>
+</code></pre>
+</p>
 
+<p>
 In each cycle, the number of cells quadruples and the number of CG
 iterations roughly doubles. The exception is only raised if the
 respective lines at the end of the programs are un-commented.
+</p>
 
 <p>
-
 In each cycle, the program writes one output graphic file in EPS
 format. They are depicted in the following:
+</p>
 
 <p>
 <TABLE WIDTH="100%">
@@ -85,14 +86,17 @@ format. They are depicted in the following:
 <IMG SRC="step-5.data/solution-5.jpg" ALT="solution-5" WIDTH="300">
 </td>
 </tr>
-
 </table>
-<p>
+</p>
 
+<p>
 Due to the variable coefficient (the curvature there is reduced by the
 same factor by which the coefficient is increased), the top region of
 the solution is flattened. The gradient of the solution is
 discontinuous there, although this is not very clearly visible in the
 pictures above. We will look at this in more detail in the next
 example.
+</p>
+
+
 
diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-6.data/final-solution.jpg b/deal.II/doc/tutorial/chapter-2.step-by-step/step-6.data/final-solution.jpg
new file mode 100644 (file)
index 0000000..376e4a6
Binary files /dev/null and b/deal.II/doc/tutorial/chapter-2.step-by-step/step-6.data/final-solution.jpg differ
diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-6.data/grid-0.jpg b/deal.II/doc/tutorial/chapter-2.step-by-step/step-6.data/grid-0.jpg
new file mode 100644 (file)
index 0000000..87697d6
Binary files /dev/null and b/deal.II/doc/tutorial/chapter-2.step-by-step/step-6.data/grid-0.jpg differ
diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-6.data/grid-1.jpg b/deal.II/doc/tutorial/chapter-2.step-by-step/step-6.data/grid-1.jpg
new file mode 100644 (file)
index 0000000..77728cf
Binary files /dev/null and b/deal.II/doc/tutorial/chapter-2.step-by-step/step-6.data/grid-1.jpg differ
diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-6.data/grid-2.jpg b/deal.II/doc/tutorial/chapter-2.step-by-step/step-6.data/grid-2.jpg
new file mode 100644 (file)
index 0000000..3ce4182
Binary files /dev/null and b/deal.II/doc/tutorial/chapter-2.step-by-step/step-6.data/grid-2.jpg differ
diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-6.data/grid-3.jpg b/deal.II/doc/tutorial/chapter-2.step-by-step/step-6.data/grid-3.jpg
new file mode 100644 (file)
index 0000000..c6312a1
Binary files /dev/null and b/deal.II/doc/tutorial/chapter-2.step-by-step/step-6.data/grid-3.jpg differ
diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-6.data/grid-4.jpg b/deal.II/doc/tutorial/chapter-2.step-by-step/step-6.data/grid-4.jpg
new file mode 100644 (file)
index 0000000..f8a7670
Binary files /dev/null and b/deal.II/doc/tutorial/chapter-2.step-by-step/step-6.data/grid-4.jpg differ
diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-6.data/grid-5.jpg b/deal.II/doc/tutorial/chapter-2.step-by-step/step-6.data/grid-5.jpg
new file mode 100644 (file)
index 0000000..ed495d1
Binary files /dev/null and b/deal.II/doc/tutorial/chapter-2.step-by-step/step-6.data/grid-5.jpg differ
diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-6.data/grid-6.jpg b/deal.II/doc/tutorial/chapter-2.step-by-step/step-6.data/grid-6.jpg
new file mode 100644 (file)
index 0000000..71c34b5
Binary files /dev/null and b/deal.II/doc/tutorial/chapter-2.step-by-step/step-6.data/grid-6.jpg differ
diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-6.data/grid-7.jpg b/deal.II/doc/tutorial/chapter-2.step-by-step/step-6.data/grid-7.jpg
new file mode 100644 (file)
index 0000000..4d9a0d0
Binary files /dev/null and b/deal.II/doc/tutorial/chapter-2.step-by-step/step-6.data/grid-7.jpg differ
diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-6.intro b/deal.II/doc/tutorial/chapter-2.step-by-step/step-6.intro
new file mode 100644 (file)
index 0000000..a3108dc
--- /dev/null
@@ -0,0 +1,5 @@
+<a name="Intro"></a>
+<h1>Introduction</h1>
+
+<p>
+</p>
diff --git a/deal.II/doc/tutorial/chapter-2.step-by-step/step-6.results b/deal.II/doc/tutorial/chapter-2.step-by-step/step-6.results
new file mode 100644 (file)
index 0000000..26b30c1
--- /dev/null
@@ -0,0 +1,95 @@
+<a name="Results"></a>
+<h1>Results</h1>
+
+<p>
+The output of the program looks as follows:
+<pre><code>
+Cycle 0:
+   Number of active cells: 20
+Cycle 1:
+   Number of active cells: 44
+Cycle 2:
+   Number of active cells: 86
+Cycle 3:
+   Number of active cells: 164
+Cycle 4:
+   Number of active cells: 344
+Cycle 5:
+   Number of active cells: 656
+Cycle 6:
+   Number of active cells: 1364
+Cycle 7:
+   Number of active cells: 2684
+</code></pre>
+</p>
+
+<p>
+As intended, the number of cells roughly doubles in each cycle. The
+final solution, as written by the program, looks as follows:
+</p>
+
+<p>
+<IMG SRC="step-6.data/final-solution.jpg" ALT="final-solution" WIDTH="300">
+</p>
+
+<p>
+In each cycle, the program furthermore writes the grid in EPS
+format. These are depicted in the following:
+</p>
+
+<p>
+<TABLE WIDTH="100%">
+<tr>
+<td>
+<IMG SRC="step-6.data/grid-0.jpg" ALT="grid-0" WIDTH="300">
+</td>
+<td>
+<IMG SRC="step-6.data/grid-1.jpg" ALT="grid-1" WIDTH="300">
+</td>
+</tr>
+
+<tr>
+<td>
+<IMG SRC="step-6.data/grid-2.jpg" ALT="grid-2" WIDTH="300">
+</td>
+<td>
+<IMG SRC="step-6.data/grid-3.jpg" ALT="grid-3" WIDTH="300">
+</td>
+</tr>
+
+<tr>
+<td>
+<IMG SRC="step-6.data/grid-4.jpg" ALT="grid-4" WIDTH="300">
+</td>
+<td>
+<IMG SRC="step-6.data/grid-5.jpg" ALT="grid-5" WIDTH="300">
+</td>
+</tr>
+</table>
+</p>
+
+<tr>
+<td>
+<IMG SRC="step-6.data/grid-6.jpg" ALT="grid-6" WIDTH="300">
+</td>
+<td>
+<IMG SRC="step-6.data/grid-7.jpg" ALT="grid-7" WIDTH="300">
+</td>
+</tr>
+</table>
+</p>
+
+<p>
+It is clearly visible that the region where the solution has a kink,
+i.e. the circle at radial distance 0.5 from the center, is
+refined most. Furthermore, the central region where the solution is
+very smooth and almost flat, is almost not refined at all, but this
+results from the fact that we did not take into account that the
+coefficient is large there. The region outside is refined rather
+randomly, since the second derivative is constant there and refinement
+is therefore mostly based on the size of the cells and their deviation
+from the optimal square.
+</p>
+
+
+
index 2017634d8b15063f6e70bb94882345a0edd91838..35973eff1c7e0af92eb1a6dd0263ffc69ba436df 100644 (file)
 <h1>Step-by-Step Examples</h1>
 
 <p>
-In this chapter, we present a collecting of small programs, each more
+In this chapter, we present a collection of small programs, each more
 or less built atop of the previous one, which demonstrate various
 aspects of the library. The general layout of each such example is as
 follows:
 <ol>
   <li> A brief description of what the program does and what is new
-  compared to the previous programs.
+       compared to the previous programs.
   <li> The program, in commented form.
   <li> The output of the program, with some comments.
   <li> Since the program itself usually is a little bit unreadable
-  with all the comments intertwingled, we present the program again,
-  with all comments stripped off, to allow getting an overview of it.
+       with all the comments intertwingled, we present the program again,
+       with all comments stripped off, to allow getting an overview of it.
 </ol>
 </p>
+
+<p>
+The programs themselves can be found at a path which is indicated at
+the beginning of the last section of each example. You can compile
+them by typing ``make'' in the respective directory, and run them
+using ``make run''. The latter command also compiles the program if
+that has not already been done.
+</p>
+
+
 <p>
 At present, the following programs exist:
 </p>
@@ -73,6 +83,11 @@ At present, the following programs exist:
       the elliptic operator. Preconditioning of the CG solver for the
       linear system of equations.
       </dd>
+
+      <dt><a href="step-6.html">Step 6</a></dt> 
+      <dd><strong>What's new:</strong> Adaptive local
+      refinement. Handling of hanging nodes.
+      </dd>
 </dl>
 
 <!-- Page Foot -->

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.