]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
ignore non local cells in mg*
authorheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 24 May 2013 16:11:47 +0000 (16:11 +0000)
committerheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 24 May 2013 16:11:47 +0000 (16:11 +0000)
git-svn-id: https://svn.dealii.org/trunk@29574 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/source/multigrid/mg_tools.cc
deal.II/source/multigrid/mg_transfer_prebuilt.cc

index 1fe5ef922d226d0a5d912108667cdb0e8ba6d7d2..0ec23e20e7c220e8d128ed3d4d99e0eeff3a917f 100644 (file)
@@ -1201,6 +1201,8 @@ namespace MGTools
         endc = dof.end();
         for (; cell!=endc; ++cell)
           {
+            if (cell->level_subdomain_id()!=dof.get_tria().locally_owned_subdomain())
+              continue;
             const FiniteElement<dim> &fe = cell->get_fe();
             const unsigned int level = cell->level();
             local_dofs.resize(fe.dofs_per_face);
@@ -1430,6 +1432,9 @@ namespace MGTools
 
     for (; cell!=endc; ++cell)
       {
+        if (cell->level_subdomain_id()!=mg_dof_handler.get_tria().locally_owned_subdomain())
+          continue;
+
         std::fill (cell_dofs.begin(), cell_dofs.end(), false);
 
         for (unsigned int face_nr=0; face_nr<GeometryInfo<dim>::faces_per_cell; ++face_nr)
@@ -1484,6 +1489,9 @@ namespace MGTools
 
     for (; cell!=endc; ++cell)
       {
+        if (cell->level_subdomain_id()!=mg_dof_handler.get_tria().locally_owned_subdomain())
+          continue;
+
         std::fill (cell_dofs.begin(), cell_dofs.end(), false);
         std::fill (cell_dofs_interface.begin(), cell_dofs_interface.end(), false);
 
@@ -1571,6 +1579,9 @@ namespace MGTools
 
     for (; cell!=endc; ++cell)
       {
+        if (cell->level_subdomain_id()!=mg_dof_handler.get_tria().locally_owned_subdomain())
+          continue;
+
         bool has_coarser_neighbor = false;
 
         std::fill (cell_dofs.begin(), cell_dofs.end(), false);
index 933db2ba1b47993f7711b3dca8c1a44cfc6b9606..de6e664ef851db77e82423313878fefb840ff610 100644 (file)
@@ -142,7 +142,7 @@ void MGTransferPrebuilt<VECTOR>::build_matrices (
       std::vector<unsigned int> entries (dofs_per_cell);
       for (typename DoFHandler<dim,spacedim>::cell_iterator cell=mg_dof.begin(level);
            cell != mg_dof.end(level); ++cell)
-        if (cell->has_children())
+        if (cell->has_children() && cell->level_subdomain_id()==mg_dof.get_tria().locally_owned_subdomain())
           {
             cell->get_mg_dof_indices (dof_indices_parent);
 
@@ -183,7 +183,7 @@ void MGTransferPrebuilt<VECTOR>::build_matrices (
       // now actually build the matrices
       for (typename DoFHandler<dim,spacedim>::cell_iterator cell=mg_dof.begin(level);
            cell != mg_dof.end(level); ++cell)
-        if (cell->has_children())
+        if (cell->has_children() && cell->level_subdomain_id()==mg_dof.get_tria().locally_owned_subdomain())
           {
             cell->get_mg_dof_indices (dof_indices_parent);
 
@@ -283,6 +283,9 @@ void MGTransferPrebuilt<VECTOR>::build_matrices (
       // by restricting from fine level.
       for (; level_cell!=level_end; ++level_cell)
         {
+          if (level_cell->level_subdomain_id()!=mg_dof.get_tria().locally_owned_subdomain())
+            continue;
+
           // get the dof numbers of
           // this cell for the global
           // and the level-wise

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.