]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add constrained DoFs to locally relevant DoFs in non-nested MG
authorMarco Feder <marco.feder@sissa.it>
Mon, 31 Jul 2023 15:25:15 +0000 (15:25 +0000)
committerMarco Feder <marco.feder@sissa.it>
Mon, 31 Jul 2023 15:25:43 +0000 (15:25 +0000)
include/deal.II/multigrid/mg_transfer_global_coarsening.templates.h

index 4b67862f64d16293111b545cabde5aadad1851ac..6e78493f1e8eb6c3acbd2ae188663fe0e8bcfad6 100644 (file)
@@ -2224,6 +2224,18 @@ namespace internal
             compress_weights(transfer);
         }
     }
+
+
+    template <int dim, typename Number>
+    friend void
+    MGTwoLevelTransferNonNested<dim,
+                                LinearAlgebra::distributed::Vector<Number>>::
+      reinit(const DoFHandler<dim> &          dof_handler_fine,
+             const DoFHandler<dim> &          dof_handler_coarse,
+             const Mapping<dim> &             mapping_fine,
+             const Mapping<dim> &             mapping_coarse,
+             const AffineConstraints<Number> &constraint_fine,
+             const AffineConstraints<Number> &constraint_coarse);
   };
 
 
@@ -3839,12 +3851,9 @@ MGTwoLevelTransferNonNested<dim, LinearAlgebra::distributed::Vector<Number>>::
 
   // create partitioners and internal vectors
   {
-    IndexSet locally_active_dofs =
-      DoFTools::extract_locally_active_dofs(dof_handler_coarse);
-    this->partitioner_coarse.reset(
-      new Utilities::MPI::Partitioner(dof_handler_coarse.locally_owned_dofs(),
-                                      locally_active_dofs,
-                                      dof_handler_coarse.get_communicator()));
+    this->partitioner_coarse =
+      internal::MGTwoLevelTransferImplementation::create_coarse_partitioner(
+        dof_handler_coarse, constraint_coarse, numbers::invalid_unsigned_int);
 
     this->vec_coarse.reinit(this->partitioner_coarse);
   }

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.