From: Wolfgang Bangerth Date: Tue, 7 Nov 2017 22:42:21 +0000 (-0700) Subject: Some comment updates and minor restructuring. X-Git-Tag: v9.0.0-rc1~809^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8a6431a155e205cca2656ce4d9d14b913e6f4d14;p=dealii.git Some comment updates and minor restructuring. --- diff --git a/source/dofs/dof_renumbering.cc b/source/dofs/dof_renumbering.cc index 71faad5b40..ffd18ac1a8 100644 --- a/source/dofs/dof_renumbering.cc +++ b/source/dofs/dof_renumbering.cc @@ -380,53 +380,51 @@ namespace DoFRenumbering 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 - // memory consumption + // make the connection graph // // note that if constraints are not requested, then the 'constraints' - // object will be empty and nothing happens + // object will be empty and using it has no effect + IndexSet locally_relevant_dofs; + DoFTools::extract_locally_relevant_dofs(dof_handler, locally_relevant_dofs); + ConstraintMatrix constraints; if (use_constraints) { - IndexSet relevant_dofs; - DoFTools::extract_locally_relevant_dofs(dof_handler, relevant_dofs); - constraints.reinit(relevant_dofs); + constraints.reinit(locally_relevant_dofs); DoFTools::make_hanging_node_constraints (dof_handler, constraints); } constraints.close (); - const IndexSet &locally_owned = dof_handler.locally_owned_dofs(); + const IndexSet &locally_owned_dofs = dof_handler.locally_owned_dofs(); // otherwise compute the Cuthill-McKee permutation DynamicSparsityPattern dsp (dof_handler.n_dofs(), dof_handler.n_dofs(), - locally_owned); + locally_owned_dofs); DoFTools::make_sparsity_pattern (dof_handler, dsp, constraints); // constraints are not needed anymore constraints.clear (); - // If the index set is not complete, need to get indices in local index - // space. - if (locally_owned.n_elements() != locally_owned.size()) + // If the index set is not complete, then we need to work on only the + // local index space. + if (locally_owned_dofs.n_elements() != locally_owned_dofs.size()) { // Create sparsity pattern from dsp by transferring its indices to // processor-local index space and doing Cuthill-McKee there - DynamicSparsityPattern sparsity(locally_owned.n_elements(), - locally_owned.n_elements()); + DynamicSparsityPattern sparsity(locally_owned_dofs.n_elements(), + locally_owned_dofs.n_elements()); std::vector row_entries; - for (unsigned int i=0; i local_starting_indices (starting_indices.size()); for (unsigned int i=0; i