From: heister Date: Sat, 25 May 2013 08:48:01 +0000 (+0000) Subject: and some more MG bugs from yesterday X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=545b5cada31d6129c54365c2d1671c3f918a3cc1;p=dealii-svn.git and some more MG bugs from yesterday git-svn-id: https://svn.dealii.org/trunk@29587 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/source/multigrid/mg_tools.cc b/deal.II/source/multigrid/mg_tools.cc index f92d2caa2d..49660106ce 100644 --- a/deal.II/source/multigrid/mg_tools.cc +++ b/deal.II/source/multigrid/mg_tools.cc @@ -1202,8 +1202,8 @@ namespace MGTools 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) + if (dof.get_tria().locally_owned_subdomain()!=numbers::invalid_subdomain_id + && cell->level_subdomain_id()!=dof.get_tria().locally_owned_subdomain()) continue; const FiniteElement &fe = cell->get_fe(); const unsigned int level = cell->level(); @@ -1236,8 +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) + if (dof.get_tria().locally_owned_subdomain()==numbers::invalid_subdomain_id + || cell->level_subdomain_id()==dof.get_tria().locally_owned_subdomain()) for (unsigned int face_no = 0; face_no < GeometryInfo::faces_per_cell; ++face_no) { @@ -1436,8 +1436,8 @@ namespace MGTools for (; cell!=endc; ++cell) { - 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) + if (mg_dof_handler.get_tria().locally_owned_subdomain()!=numbers::invalid_subdomain_id + && cell->level_subdomain_id()!=mg_dof_handler.get_tria().locally_owned_subdomain()) continue; std::fill (cell_dofs.begin(), cell_dofs.end(), false); @@ -1494,8 +1494,8 @@ namespace MGTools for (; cell!=endc; ++cell) { - 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) + if (mg_dof_handler.get_tria().locally_owned_subdomain()!=numbers::invalid_subdomain_id + && cell->level_subdomain_id()!=mg_dof_handler.get_tria().locally_owned_subdomain()) continue; std::fill (cell_dofs.begin(), cell_dofs.end(), false); @@ -1585,8 +1585,8 @@ namespace MGTools for (; cell!=endc; ++cell) { - 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) + if (mg_dof_handler.get_tria().locally_owned_subdomain()!=numbers::invalid_subdomain_id + && cell->level_subdomain_id()!=mg_dof_handler.get_tria().locally_owned_subdomain()) continue; bool has_coarser_neighbor = false; diff --git a/deal.II/source/multigrid/mg_transfer_prebuilt.cc b/deal.II/source/multigrid/mg_transfer_prebuilt.cc index 1ae25aab42..754fc21585 100644 --- a/deal.II/source/multigrid/mg_transfer_prebuilt.cc +++ b/deal.II/source/multigrid/mg_transfer_prebuilt.cc @@ -142,7 +142,10 @@ void MGTransferPrebuilt::build_matrices ( std::vector entries (dofs_per_cell); for (typename DoFHandler::cell_iterator cell=mg_dof.begin(level); cell != mg_dof.end(level); ++cell) - if (cell->has_children() && cell->level_subdomain_id()==mg_dof.get_tria().locally_owned_subdomain()) + if (cell->has_children() && + ( mg_dof.get_tria().locally_owned_subdomain()==numbers::invalid_subdomain_id + || cell->level_subdomain_id()==mg_dof.get_tria().locally_owned_subdomain() + )) { cell->get_mg_dof_indices (dof_indices_parent); @@ -186,7 +189,10 @@ void MGTransferPrebuilt::build_matrices ( // now actually build the matrices for (typename DoFHandler::cell_iterator cell=mg_dof.begin(level); cell != mg_dof.end(level); ++cell) - if (cell->has_children() && cell->level_subdomain_id()==mg_dof.get_tria().locally_owned_subdomain()) + if (cell->has_children() && + (mg_dof.get_tria().locally_owned_subdomain()==numbers::invalid_subdomain_id + || cell->level_subdomain_id()==mg_dof.get_tria().locally_owned_subdomain()) + ) { cell->get_mg_dof_indices (dof_indices_parent); @@ -286,7 +292,8 @@ void MGTransferPrebuilt::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()) + if (mg_dof.get_tria().locally_owned_subdomain()!=numbers::invalid_subdomain_id + && level_cell->level_subdomain_id()!=mg_dof.get_tria().locally_owned_subdomain()) continue; // get the dof numbers of