]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Modified the example to account for hanging nodes
authorschrage <schrage@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 14 Apr 1999 16:05:26 +0000 (16:05 +0000)
committerschrage <schrage@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 14 Apr 1999 16:05:26 +0000 (16:05 +0000)
git-svn-id: https://svn.dealii.org/trunk@1141 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/doc/tutorial/chapter-1.elements/matrix_structure.html

index 547f713f24969968043939758bc4cd9613c66a09..3a601a6a43287521d143163036ca1379d5789d9e 100644 (file)
@@ -69,6 +69,18 @@ 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());
+
+// Condense the <a href="hanging_nodes.html">hanging nodes</a> into
+// the matrix, taking into account the constraints to the hanging nodes.
+// This must be done before the matrix structure is compressed, but only
+// on locally refined grids.
+// You can skip this part if your grid is not locally refined.
+
+dof.make_sparsity_pattern(smstruct); 
+hanging_nodes.clear();
+dof.make_constraint_matrix(hanging_nodes);
+hanging_nodes.condense(smstruct);
+
 </code>
 </pre>
 

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.