]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 14 Sep 2001 12:10:38 +0000 (12:10 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 14 Sep 2001 12:10:38 +0000 (12:10 +0000)
git-svn-id: https://svn.dealii.org/trunk@5008 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/examples/step-11/step-11.cc

index 13a869057f86de9f9df9c1ea202912ec6b91807e..6ed00efc4e52dc730c760d42727d12b5fdc5f47c 100644 (file)
@@ -132,8 +132,13 @@ void LaplaceProblem<dim>::setup_system ()
 {
                                   // The first task is trivial:
                                   // generate an enumeration of the
-                                  // degrees of freedom:
+                                  // degrees of freedom, and
+                                  // initialize solution and right
+                                  // hand side vector to their
+                                  // correct sizes:
   dof_handler.distribute_dofs (fe);
+  solution.reinit (dof_handler.n_dofs());
+  system_rhs.reinit (dof_handler.n_dofs());
 
                                   // Next task is to construct the
                                   // object representing the
@@ -192,9 +197,6 @@ void LaplaceProblem<dim>::setup_system ()
   sparsity_pattern.copy_from (csp);
 
   system_matrix.reinit (sparsity_pattern);
-
-  solution.reinit (dof_handler.n_dofs());
-  system_rhs.reinit (dof_handler.n_dofs());
 };
 
 

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.