From: Wolfgang Bangerth Date: Fri, 22 Sep 2023 15:07:41 +0000 (-0600) Subject: Avoid use of old AffineConstraints functions. X-Git-Tag: relicensing~473^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F16034%2Fhead;p=dealii.git Avoid use of old AffineConstraints functions. --- diff --git a/include/deal.II/multigrid/mg_constrained_dofs.h b/include/deal.II/multigrid/mg_constrained_dofs.h index 1f4e2b1790..6882b92219 100644 --- a/include/deal.II/multigrid/mg_constrained_dofs.h +++ b/include/deal.II/multigrid/mg_constrained_dofs.h @@ -298,13 +298,15 @@ MGConstrainedDoFs::initialize( { if (user_level_dofs) { - level_constraints[l].reinit(level_relevant_dofs[l]); + level_constraints[l].reinit(dof.locally_owned_mg_dofs(l), + level_relevant_dofs[l]); } else { const IndexSet relevant_dofs = DoFTools::extract_locally_relevant_level_dofs(dof, l); - level_constraints[l].reinit(relevant_dofs); + level_constraints[l].reinit(dof.locally_owned_mg_dofs(l), + relevant_dofs); } // Loop through relevant cells and faces finding those which are periodic @@ -478,7 +480,9 @@ MGConstrainedDoFs::add_user_constraints( // Get the relevant DoFs from level_constraints if // the user constraint matrix has not been initialized if (user_constraints[level].get_local_lines().size() == 0) - user_constraints[level].reinit(level_constraints[level].get_local_lines()); + user_constraints[level].reinit( + level_constraints[level].get_locally_owned_indices(), + level_constraints[level].get_local_lines()); user_constraints[level].merge( constraints_on_level, @@ -613,7 +617,7 @@ MGConstrainedDoFs::merge_constraints(AffineConstraints &constraints, index_set.add_indices( this->get_user_constraint_matrix(level).get_local_lines()); - constraints.reinit(index_set); + constraints.reinit(constraints.get_locally_owned_indices(), index_set); // merge constraints if (add_boundary_indices && this->have_boundary_indices()) diff --git a/include/deal.II/numerics/vector_tools_constraints.templates.h b/include/deal.II/numerics/vector_tools_constraints.templates.h index d40fd671aa..f8c8146c61 100644 --- a/include/deal.II/numerics/vector_tools_constraints.templates.h +++ b/include/deal.II/numerics/vector_tools_constraints.templates.h @@ -1314,7 +1314,7 @@ namespace VectorTools const Mapping &mapping) { AffineConstraints no_normal_flux_constraints( - constraints.get_local_lines()); + constraints.get_locally_owned_indices(), constraints.get_local_lines()); compute_nonzero_normal_flux_constraints(dof_handler, first_vector_component, boundary_ids, diff --git a/source/dofs/dof_renumbering.cc b/source/dofs/dof_renumbering.cc index 5582a6b5b0..dd7cd9e809 100644 --- a/source/dofs/dof_renumbering.cc +++ b/source/dofs/dof_renumbering.cc @@ -429,7 +429,7 @@ namespace DoFRenumbering // reordering with constraints is not yet implemented on a level basis Assert(reorder_level_dofs == false, ExcNotImplemented()); - constraints.reinit(locally_relevant_dofs); + constraints.reinit(locally_owned_dofs, locally_relevant_dofs); DoFTools::make_hanging_node_constraints(dof_handler, constraints); } constraints.close();