]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Avoid use of old AffineConstraints functions. 16034/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Fri, 22 Sep 2023 15:07:41 +0000 (09:07 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Fri, 22 Sep 2023 22:02:34 +0000 (16:02 -0600)
include/deal.II/multigrid/mg_constrained_dofs.h
include/deal.II/numerics/vector_tools_constraints.templates.h
source/dofs/dof_renumbering.cc

index 1f4e2b17905426038ba4749d43c26d1a7f82ba26..6882b92219037c0e2c2cab3403ab46bd047ffa08 100644 (file)
@@ -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<Number> &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())
index d40fd671aa2fd44f842e773e6435c20efb3b205a..f8c8146c618559e66ca316d46f206e5cb623dae0 100644 (file)
@@ -1314,7 +1314,7 @@ namespace VectorTools
     const Mapping<dim, spacedim> &mapping)
   {
     AffineConstraints<double> 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,
index 5582a6b5b08ea905dec7e0c27e8fa804be154fba..dd7cd9e8092a7b4218f9dffe32ba79c5c9e2fc5b 100644 (file)
@@ -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();

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.