From 33f8063545d0b205b31c7ad0cb12ed3b44c863c4 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Thu, 11 Jun 2015 19:53:19 -0500 Subject: [PATCH] Reuse a variable already defined, rather than recompute the value. --- source/dofs/dof_renumbering.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/dofs/dof_renumbering.cc b/source/dofs/dof_renumbering.cc index dbabbd6c3d..d197d5178a 100644 --- a/source/dofs/dof_renumbering.cc +++ b/source/dofs/dof_renumbering.cc @@ -398,12 +398,12 @@ namespace DoFRenumbering DoFTools::make_hanging_node_constraints (dof_handler, constraints); constraints.close (); - IndexSet locally_owned = dof_handler.locally_owned_dofs(); + const IndexSet locally_owned = dof_handler.locally_owned_dofs(); // otherwise compute the Cuthill-McKee permutation DynamicSparsityPattern dsp (dof_handler.n_dofs(), dof_handler.n_dofs(), - dof_handler.locally_owned_dofs()); + locally_owned); DoFTools::make_sparsity_pattern (dof_handler, dsp, constraints); // constraints are not needed anymore @@ -411,8 +411,8 @@ namespace DoFRenumbering // If the index set is not complete, need to get indices in local index // space. - if (dof_handler.locally_owned_dofs().n_elements() != - dof_handler.locally_owned_dofs().size()) + if (locally_owned.n_elements() != + locally_owned.size()) { // Create sparsity pattern from dsp by transferring its indices to // processor-local index space and doing Cuthill-McKee there -- 2.39.5