]> https://gitweb.dealii.org/ - dealii.git/commitdiff
fix stuff I broke yesterday
authorTimo Heister <timo.heister@gmail.com>
Sat, 25 May 2013 08:22:36 +0000 (08:22 +0000)
committerTimo Heister <timo.heister@gmail.com>
Sat, 25 May 2013 08:22:36 +0000 (08:22 +0000)
git-svn-id: https://svn.dealii.org/trunk@29584 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/source/multigrid/mg_tools.cc

index 0ec23e20e7c220e8d128ed3d4d99e0eeff3a917f..f92d2caa2df168a99832c3df53872990f489c157 100644 (file)
@@ -554,7 +554,8 @@ namespace MGTools
     typename DH::cell_iterator cell = dof.begin(level),
                                endc = dof.end(level);
     for (; cell!=endc; ++cell)
-      if (dof.get_tria().locally_owned_subdomain()==numbers::invalid_subdomain_id || cell->level_subdomain_id()==dof.get_tria().locally_owned_subdomain())
+      if (dof.get_tria().locally_owned_subdomain()==numbers::invalid_subdomain_id
+          || cell->level_subdomain_id()==dof.get_tria().locally_owned_subdomain())
         {
           cell->get_mg_dof_indices (dofs_on_this_cell);
           // make sparsity pattern for this cell
@@ -1201,7 +1202,8 @@ namespace MGTools
         endc = dof.end();
         for (; cell!=endc; ++cell)
           {
-            if (cell->level_subdomain_id()!=dof.get_tria().locally_owned_subdomain())
+            if (cell->level_subdomain_id()!=dof.get_tria().locally_owned_subdomain()
+                && dof.get_tria().locally_owned_subdomain()!=numbers::invalid_subdomain_id)
               continue;
             const FiniteElement<dim> &fe = cell->get_fe();
             const unsigned int level = cell->level();
@@ -1234,6 +1236,8 @@ namespace MGTools
         cell = dof.begin(),
         endc = dof.end();
         for (; cell!=endc; ++cell)
+          if (cell->level_subdomain_id()==dof.get_tria().locally_owned_subdomain()
+              || dof.get_tria().locally_owned_subdomain()==numbers::invalid_subdomain_id)
           for (unsigned int face_no = 0; face_no < GeometryInfo<dim>::faces_per_cell;
                ++face_no)
             {
@@ -1432,7 +1436,8 @@ namespace MGTools
 
     for (; cell!=endc; ++cell)
       {
-        if (cell->level_subdomain_id()!=mg_dof_handler.get_tria().locally_owned_subdomain())
+        if (cell->level_subdomain_id()!=mg_dof_handler.get_tria().locally_owned_subdomain()
+          && mg_dof_handler.get_tria().locally_owned_subdomain()!=numbers::invalid_subdomain_id)
           continue;
 
         std::fill (cell_dofs.begin(), cell_dofs.end(), false);
@@ -1489,7 +1494,8 @@ namespace MGTools
 
     for (; cell!=endc; ++cell)
       {
-        if (cell->level_subdomain_id()!=mg_dof_handler.get_tria().locally_owned_subdomain())
+        if (cell->level_subdomain_id()!=mg_dof_handler.get_tria().locally_owned_subdomain()
+            && mg_dof_handler.get_tria().locally_owned_subdomain()!=numbers::invalid_subdomain_id)
           continue;
 
         std::fill (cell_dofs.begin(), cell_dofs.end(), false);
@@ -1579,7 +1585,8 @@ namespace MGTools
 
     for (; cell!=endc; ++cell)
       {
-        if (cell->level_subdomain_id()!=mg_dof_handler.get_tria().locally_owned_subdomain())
+        if (cell->level_subdomain_id()!=mg_dof_handler.get_tria().locally_owned_subdomain()
+        && mg_dof_handler.get_tria().locally_owned_subdomain()!=numbers::invalid_subdomain_id)
           continue;
 
         bool has_coarser_neighbor = false;

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.