From: Wolfgang Bangerth Date: Thu, 4 Dec 2014 19:57:06 +0000 (-0600) Subject: DoFRenumbering::Cuthill_McKee failed in parallel when a processor had no dofs. X-Git-Tag: v8.2.0-rc1~32^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bbf00ddd3bc9f87d216d55615d048b5e9712cf48;p=dealii.git DoFRenumbering::Cuthill_McKee failed in parallel when a processor had no dofs. --- diff --git a/doc/news/changes.h b/doc/news/changes.h index 17af13643f..8feeb75a28 100644 --- a/doc/news/changes.h +++ b/doc/news/changes.h @@ -340,6 +340,13 @@ inconvenience this causes.

Specific improvements

    +
  1. Fixed: Calling DoFRenumbering::Cuthill_McKee threw an exception + whenever one of the processors of a parallel triangulation did not own + any degrees of freedom. +
    + (Michal Wichrowski, Wolfgang Bangerth, 2014/12/04) +
  2. +
  3. Fixed: Serializing an object of type DoFHandler did not work without including additional header files.
    diff --git a/source/dofs/dof_renumbering.cc b/source/dofs/dof_renumbering.cc index a5085e250a..f1f986a5de 100644 --- a/source/dofs/dof_renumbering.cc +++ b/source/dofs/dof_renumbering.cc @@ -378,6 +378,13 @@ namespace DoFRenumbering const bool use_constraints, const std::vector &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(),