]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Wolfs suggestions adapted.
authorschrage <schrage@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 9 Apr 1999 17:31:57 +0000 (17:31 +0000)
committerschrage <schrage@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 9 Apr 1999 17:31:57 +0000 (17:31 +0000)
git-svn-id: https://svn.dealii.org/trunk@1120 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/doc/tutorial/chapter-1.elements/dofs.html
deal.II/doc/tutorial/chapter-1.elements/grid_creation.html
deal.II/doc/tutorial/chapter-1.elements/hanging_nodes.html [new file with mode: 0644]
deal.II/doc/tutorial/chapter-1.elements/matrix_generation.html [new file with mode: 0644]
deal.II/doc/tutorial/chapter-1.elements/matrix_structure.html
deal.II/doc/tutorial/chapter-1.elements/toc.html
deal.II/doc/tutorial/chapter-3.laplace/code/laplace.cc
deal.II/doc/tutorial/chapter-3.laplace/main.html
deal.II/doc/tutorial/dealtut.css

index 8af0bf3559e2979275f7e02c9471be28eaa203ec..74daf63d6afa3a7fc5c6b727311ab3c71291149a 100644 (file)
@@ -50,6 +50,11 @@ The degrees of freedom are distributed on a triangulation using the function<br>
 <code>void DoFHandler::distribute_dofs(const FiniteElement&lt;dim&gt; &amp;)</code><br>
 The argument to <code>distribute_dofs</code> is a finite element that describes
 how many degrees of freedom are located on vertices, lines etc. 
+(<code>FiniteElement</code> objects have much more functionality than only storing
+these numbers. This functionality is discussed partly in the chapter on 
+<a href="matrix_generation.html">matrix and vector
+generation</a>
+and partly in URL_NEEDS_TO_BE_SET.)
 <code>distribute_dofs</code> works its way through the triangulation cell by
 cell, starting at the coarsest level, and numbers every degree of freedom that is not yet numbered.
 For non-multigrid algorithms it considers only active cells, i.e. cells 
index aba610126981f57ae6391e3ec5569127ba84a11b..5565514063ec54833b732db6319efe7b59be21f3 100644 (file)
@@ -96,7 +96,9 @@ away the hypercube [left+right/2,right]<sup>dimension</sup>.
 The hyper-L is mainly of use in testing grid refinement, error estimates etc.
 Boundary conditions of the form <code>u=g</code> on the faces of the original
 hypercube and <code>&part;<sub>n</sub>u=0</code> on the "inner" faces resulting
-from the smaller hypercube taken away.
+from the smaller hypercube taken away  are chosen, this will usually lead to
+a singular solution because of the reentrant corner; these singularities 
+can be used to test the efficiency of error estimators.
 </p>
 
 <p class="example">
diff --git a/deal.II/doc/tutorial/chapter-1.elements/hanging_nodes.html b/deal.II/doc/tutorial/chapter-1.elements/hanging_nodes.html
new file mode 100644 (file)
index 0000000..bb5c605
--- /dev/null
@@ -0,0 +1,40 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
+   "http://www.w3.org/TR/REC-html40/strict.dtd">
+<html>
+<head>
+<!-- deal.II tutorial template
+     Jan Schrage <schrage@gaia.iwr.uni-heidelberg.de> 1999 
+-->
+
+<title>Hanging Nodes</title>
+    <link href="../dealtut.css" rel="StyleSheet" title="deal.II Tutorial">
+    <meta name="author" content="Jan Schrage <schrage@gaia.iwr.uni-heidelberg.de>">
+    <meta name="keywords" content="deal.II,deal.II tutorial,deal II">
+</head>
+
+<!-- Page Body -->
+<body lang="en">
+
+<h1>Hanging Nodes</h1>
+
+
+<!-- Page Foot -->
+<hr>
+<table class="navbar">      
+<tr>
+  <td>
+    <a href="toc.html">Back to this chapter's index</a>
+  </td>
+  <td>
+    <a href="../index.html" target="_top">Back to the tutorial index</a>
+  </td>
+</tr>
+</table>
+<hr>
+<address>
+<a href="mailto:schrage@gaia.iwr.uni-heidelberg.de">Jan Schrage</a></address>
+<p>
+Last modified: $Date$
+</p>
+</body>
+</html>
diff --git a/deal.II/doc/tutorial/chapter-1.elements/matrix_generation.html b/deal.II/doc/tutorial/chapter-1.elements/matrix_generation.html
new file mode 100644 (file)
index 0000000..6654607
--- /dev/null
@@ -0,0 +1,65 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
+   "http://www.w3.org/TR/REC-html40/strict.dtd">
+<html>
+<head>
+<!-- deal.II tutorial template
+     Jan Schrage <schrage@gaia.iwr.uni-heidelberg.de> 1999 
+-->
+
+<title>Matrix and Vector Generation</title>
+    <link href="../dealtut.css" rel="StyleSheet" title="deal.II Tutorial">
+    <meta name="author" content="Jan Schrage <schrage@gaia.iwr.uni-heidelberg.de>">
+    <meta name="keywords" content="deal.II,deal.II tutorial,deal II">
+</head>
+
+<!-- Page Body -->
+<body lang="en">
+
+<h1>Matrix and Vector Generation</h1>
+
+
+
+<p class="Example">
+<span class="example">Example:</span> We show the include files you need, 
+the definitions and the function calls. Make sure to use them in their
+appropriate places. This example initializes a sparse square matrix structure.
+</p>
+<pre class="example">
+<code>
+#include &lt;grid/dof.h&gt;
+#include &lt;lac/sparsematrix.h&gt;
+
+
+int dim=2; // For example
+SparseMatrixStruct&lt;double&gt; smstruct;
+SparseMatrix&lt;double&gt; sm;
+DoFHandler&lt;dim&gt; dof;
+
+// Your degrees of freedom must already be distributed
+
+smstruct.reinit(dof.n_dofs(),dof.n_dofs(),dof.max_couplings_between_dofs());
+sm.reinit(smstruct);
+</code>
+</pre>
+
+
+<!-- Page Foot -->
+<hr>
+<table class="navbar">      
+<tr>
+  <td>
+    <a href="toc.html">Back to this chapter's index</a>
+  </td>
+  <td>
+    <a href="../index.html" target="_top">Back to the tutorial index</a>
+  </td>
+</tr>
+</table>
+<hr>
+<address>
+<a href="mailto:schrage@gaia.iwr.uni-heidelberg.de">Jan Schrage</a></address>
+<p>
+Last modified: $Date$ 
+</p>
+</body>
+</html>
index 1c2872fd32c02475d7689b5f573f84189c494ae0..490f2725d78b185804aaa7552487ab011998fd3d 100644 (file)
@@ -33,7 +33,8 @@ Before you can build the appropriate matrices for your problem you
 need to ascertain where the components of your matrix are non-zero 
 and generate a structure for storing the matrix accordingly. 
 This structure
-is then used to actually initialize the matrix.
+is then used to actually initialize the matrix, i.e.
+tell the matrix for which elements to allocate memory.
 </p>
 
 <h3>The Standard Sparse Matrix</h3>
@@ -73,10 +74,28 @@ smstruct.reinit(dof.n_dofs(),dof.n_dofs(),dof.max_couplings_between_dofs());
 <h3>Compression of Matrix Structures</h3>
 
 <p>
-Sparse matrix structure can (and indeed must) be compressed. They can be
-compressed because it saves memory and they must be compressed because
-the classes dealing with sparse matrices require it.
+Sparse matrix structures can (and indeed must) be compressed before they are used 
+in objects of the class <code>SparseMatrix&lt;&gt;</code> that actually hold the matrix
+data. The reason for this is the way matrix structures and matrices are generated:
+<ul>
+      <li>Initially a fixed number of non-zero entries is allocated for each matrix row.
+       Usually, though, rows will have much less entries than this maximum number. Rows
+       rows corresponding to degrees of freedom
+       on cells with hanging nodes have more entries than rows corresponding to degrees of freedom
+       in regular regions of the grid.
+      </li>
+      <li> When you compress the matrix structure
+       you stop adding new non-zero entries and all unused entries in each row
+       are deleted. Thus memory is saved.
+      </li>
+      <li> Only now are you allowed to associate this matrix structure
+       to a matrix object which then allocates memory for each non-zero entry,
+       rather than for the maximum number of non-zero entries of each row.
+      </li>
+</ul>
+
 The appropriate function is <code>void SparseMatrixStruct::compress()</code>.
+</p>
 
 <p class="Example">
 <span class="example">Example:</span> Starting from <a href="#smstruct">the example above</a>, we
index 60ac0ddf8a4898e1f222b9f0608eb3af047bf05d..a59fe82f903de9d124ae8713c2d2ffb2d8ed32c8 100644 (file)
@@ -111,8 +111,8 @@ your needs.
        <p>
          <b><a href="parameters.html">Parameter Input</a></b>
        </p>
-       <p>explaining how to use a parameter file for configuration
-         of your program.
+       <p>explaining how to use a parameter file for configuring
+          your program.
        </p>
       </li>
     </ol>
index 49044c1acc0fcdc38dd25a4cfe41502ac6f8b33c..98c93d8fa2714ac91da65df05039f4da2a5157e9 100644 (file)
@@ -88,6 +88,7 @@ Laplace::assemble()
   hanging_nodes.clear();
   dof.make_constraint_matrix(hanging_nodes);
   hanging_nodes.condense(matrix_structure);
+  matrix_structure.compress(); 
   
   // The problem has the form Au=f.
   A.reinit(matrix_structure);
index 65168c23efc2bd4ec9810e154d7b196c4664f275..0485acda58a1771922885a0914ece9339f304ad9 100644 (file)
@@ -87,7 +87,7 @@ following time it is done once more.
 for (unsigned step = 0; step &lt; 3 ; ++step)   
 {     
   
-  if (!step
+  if (step == 0
      lap.remesh(firstgrid);
   else
   {
index cfa5c961a88b3d44ccd1edccc40f0369040ac7c8..78013d075daa8d82fd7be296f4d71a34092b7adb 100644 (file)
@@ -1,6 +1,11 @@
 
-body { bgcolor: white; background-color: white; }
+body { background-image: none;
+       background-color: white; 
+     }
 
+frameset { background-color: white;
+          border-color: white;
+         }
 
 span.parhead { font-weight: bold;
             }  

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.