]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Make run in parallel, this time for sure.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 14 Jan 2013 19:20:28 +0000 (19:20 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 14 Jan 2013 19:20:28 +0000 (19:20 +0000)
git-svn-id: https://svn.dealii.org/trunk@28050 0785d39b-7218-0410-832d-ea1e28bc413d

tests/mpi/constraint_matrix_condense_01.cc

index 48c458f8903fcd5783c39ede2aaf74b1dd26cdbe..7a5b9219134dca059f1a36b92a5c5d2fffa799e2 100644 (file)
@@ -50,7 +50,6 @@ void test ()
   ConstraintMatrix constraints (locally_relevant_dofs);
   constraints.clear();
   {
-    constraints.reinit (locally_relevant_dofs);
     IndexSet boundary_dofs (dof_handler.n_dofs());
     DoFTools::extract_boundary_dofs
       (dof_handler, std::vector<bool>(1,true),boundary_dofs);
@@ -59,10 +58,13 @@ void test ()
     while(boundary_dofs.is_element(first_nboundary_dof))
       first_nboundary_dof++;
 
-    constraints.add_line (first_nboundary_dof);
-    for (unsigned int i=0; i<dof_handler.n_dofs();++i)
-      if (boundary_dofs.is_element(i) == true)
-       constraints.add_entry (first_nboundary_dof, i, -1);
+    if (locally_relevant_dofs.is_element(first_nboundary_dof))
+      {
+       constraints.add_line (first_nboundary_dof);
+       for (unsigned int i=0; i<dof_handler.n_dofs();++i)
+         if (boundary_dofs.is_element(i) == true)
+           constraints.add_entry (first_nboundary_dof, i, -1);
+      }
   }
   constraints.close();
 

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.