]> https://gitweb.dealii.org/ - dealii.git/commitdiff
smaller updates
authorTimo Heister <timo.heister@gmail.com>
Wed, 21 Oct 2015 22:04:49 +0000 (18:04 -0400)
committerTimo Heister <timo.heister@gmail.com>
Wed, 21 Oct 2015 22:04:49 +0000 (18:04 -0400)
source/dofs/dof_tools.cc
source/multigrid/mg_tools.cc

index ddef9865965374ca64f14819f833f3ad4c878c1a..55ea3f86642fe6ae59f6422a8cde600780a83053 100644 (file)
@@ -992,7 +992,7 @@ namespace DoFTools
                                endc = dof_handler.end(level);
     for (; cell!=endc; ++cell)
       {
-        types::subdomain_id id = cell->level_subdomain_id();
+        const types::subdomain_id id = cell->level_subdomain_id();
 
         // skip artificial and own cells (only look at ghost cells)
         if (id == dof_handler.get_tria().locally_owned_subdomain()
index 81c8df6ac72e4cddbf2ed209f34d5edfc6451227..583410e07843818ff1d46ab05229fbb0982bd58e 100644 (file)
@@ -1511,7 +1511,8 @@ namespace MGTools
 
     for (; cell!=endc; ++cell)
       {
-        // do not look at artificial cells
+        // Do not look at artificial level cells (in a serial computation we
+        // need to ignore the level_subdomain_id() because it is never set).
         if (mg_dof_handler.get_tria().locally_owned_subdomain()!=numbers::invalid_subdomain_id
             && cell->level_subdomain_id()==numbers::artificial_subdomain_id)
           continue;
@@ -1529,17 +1530,13 @@ namespace MGTools
                 const typename DoFHandler<dim>::cell_iterator
                 neighbor = cell->neighbor(face_nr);
 
-                // only process cell pairs if one of them is mine
+                // only process cell pairs if one or both of them are owned by me (ignore if running in serial)
                 if (mg_dof_handler.get_tria().locally_owned_subdomain()!=numbers::invalid_subdomain_id
                     &&
                     neighbor->level_subdomain_id()==numbers::artificial_subdomain_id)
-//                    neighbor->level_subdomain_id()!=mg_dof_handler.get_tria().locally_owned_subdomain()
-//                   &&
-//                   cell->level_subdomain_id()!=mg_dof_handler.get_tria().locally_owned_subdomain())
                   continue;
 
-                // Do refinement face
-                // from the coarse side
+                // Do refinement face from the coarse side
                 if (neighbor->level() < cell->level())
                   {
                     for (unsigned int j=0; j<dofs_per_face; ++j)

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.