]> https://gitweb.dealii.org/ - dealii.git/commitdiff
DoFRenumbering::Cuthill_McKee failed in parallel when a processor had no dofs.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 4 Dec 2014 19:57:06 +0000 (13:57 -0600)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 4 Dec 2014 19:57:06 +0000 (13:57 -0600)
doc/news/changes.h
source/dofs/dof_renumbering.cc

index 17af13643fe5c70850a3394b778b024192458cc5..8feeb75a28ec1b4dd0ede8fe68ba9f49c6e87f31 100644 (file)
@@ -340,6 +340,13 @@ inconvenience this causes.
 <h3>Specific improvements</h3>
 
 <ol>
+  <li> Fixed: Calling DoFRenumbering::Cuthill_McKee threw an exception
+  whenever one of the processors of a parallel triangulation did not own
+  any degrees of freedom.
+  <br>
+  (Michal Wichrowski, Wolfgang Bangerth, 2014/12/04)
+  </li>
+
   <li> Fixed: Serializing an object of type DoFHandler did not work without
   including additional header files.
   <br>
index a5085e250aabea3eb18ceb557c9fe114d82ea07c..f1f986a5de06bda77fd6206cd696ca68ec0ce2be 100644 (file)
@@ -378,6 +378,13 @@ namespace DoFRenumbering
                          const bool                 use_constraints,
                          const std::vector<types::global_dof_index> &starting_indices)
   {
+    // see if there is anything to do at all or whether we can skip the work on this processor
+    if (dof_handler.locally_owned_dofs().n_elements() == 0)
+      {
+        Assert (new_indices.size() == 0, ExcInternalError());
+        return;
+      }
+
     // make the connection graph. in 2d/3d use an intermediate compressed
     // sparsity pattern since the we don't have very good estimates for
     // max_couplings_between_dofs() in 3d and this then leads to excessive
@@ -392,7 +399,9 @@ namespace DoFRenumbering
 
     IndexSet locally_owned = dof_handler.locally_owned_dofs();
     SparsityPattern sparsity;
-    if (DH::dimension < 2)
+
+    // otherwise compute the Cuthill-McKee permutation
+    if (DH::dimension == 1)
       {
         sparsity.reinit (dof_handler.n_dofs(),
                          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.