]> https://gitweb.dealii.org/ - dealii.git/commitdiff
multigrid in parallel: only track own dofs
authorTimo Heister <timo.heister@gmail.com>
Sun, 26 May 2013 13:02:06 +0000 (13:02 +0000)
committerTimo Heister <timo.heister@gmail.com>
Sun, 26 May 2013 13:02:06 +0000 (13:02 +0000)
git-svn-id: https://svn.dealii.org/trunk@29604 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/source/multigrid/mg_transfer_prebuilt.cc

index 85c5c74031711845fad299a81e6720e9327a489d..fcfd6e1dd5ba5342fa928ff8a92aca0ac9031f30 100644 (file)
@@ -272,9 +272,16 @@ void MGTransferPrebuilt<VECTOR>::build_matrices (
           level_cell->get_dof_indices(global_dof_indices);
           level_cell->get_mg_dof_indices (level_dof_indices);
 
+          // ignore dofs that
+          // 1. are not locally owned
+          // 2. are constrained at a refinement edge
           for (unsigned int i=0; i<dofs_per_cell; ++i)
-           if (mg_constrained_dofs == 0
-               || !mg_constrained_dofs->at_refinement_edge(level,level_dof_indices[i]))
+           if (mg_dof.locally_owned_dofs().is_element(global_dof_indices[i])
+               &&
+               (
+               mg_constrained_dofs == 0
+               || !mg_constrained_dofs->at_refinement_edge(level,level_dof_indices[i])
+               ))
              temp_copy_indices[level_dof_indices[i]] = global_dof_indices[i];
         }
 

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.