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()
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;
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)