: // Do not check for distorted cells.
// For multigrid, we need limit_level_difference_at_vertices
// to make sure the transfer operators only need to consider two levels.
- dealii::parallel::TriangulationBase<dim, spacedim>(
+ dealii::parallel::DistributedTriangulationBase<dim, spacedim>(
mpi_communicator,
(settings_ & construct_multigrid_hierarchy) ?
static_cast<
+ template <int dim, int spacedim>
+ bool
+ Triangulation<dim, spacedim>::is_multilevel_hierarchy_constructed() const
+ {
+ return settings &
+ Triangulation<dim, spacedim>::construct_multigrid_hierarchy;
+ }
+
+
+
template <int dim, int spacedim>
bool
Triangulation<dim, spacedim>::has_hanging_nodes() const
const typename dealii::Triangulation<1, spacedim>::MeshSmoothing
smooth_grid,
const Settings /*settings*/)
- : dealii::parallel::TriangulationBase<1, spacedim>(mpi_communicator,
- smooth_grid,
- false)
+ : dealii::parallel::DistributedTriangulationBase<1, spacedim>(
+ mpi_communicator,
+ smooth_grid,
+ false)
{
Assert(false, ExcNotImplemented());
}
Assert(false, ExcNotImplemented());
}
+
+
+ template <int spacedim>
+ bool
+ Triangulation<1, spacedim>::is_multilevel_hierarchy_constructed() const
+ {
+ Assert(false, ExcNotImplemented());
+ return false;
+ }
+
} // namespace distributed
} // namespace parallel
std::vector<bool> include_vertex(
dof_handler.get_triangulation().n_vertices(), false);
if (dynamic_cast<
- const parallel::distributed::Triangulation<dim, spacedim> *>(
+ const parallel::DistributedTriangulationBase<dim, spacedim> *>(
&dof_handler.get_triangulation()) != nullptr)
for (const auto &cell : dof_handler.active_cell_iterators())
if (cell->is_ghost())
/**
* level subdomain association. Similar to the above function only
* for level meshes. This function assigns boundary dofs in
- * the same way as parallel::distributed::Triangulation (proc with
+ * the same way as parallel::DistributedTriangulationBase (proc with
* smallest index) instead of the coin flip method above.
*/
template <class DoFHandlerType>
template <int dim, int spacedim>
void
get_mg_dofindices_recursively(
- const parallel::distributed::Triangulation<dim, spacedim> &tria,
+ const parallel::DistributedTriangulationBase<dim, spacedim> &tria,
const typename dealii::internal::p4est::types<dim>::quadrant
&p4est_cell,
const typename DoFHandler<dim, spacedim>::level_cell_iterator
template <int dim, int spacedim>
void
find_marked_mg_ghost_cells_recursively(
- const typename parallel::distributed::Triangulation<dim, spacedim>
+ const typename parallel::DistributedTriangulationBase<dim, spacedim>
& tria,
const unsigned int tree_index,
const typename DoFHandler<dim, spacedim>::level_cell_iterator
template <int dim, int spacedim>
void
set_mg_dofindices_recursively(
- const parallel::distributed::Triangulation<dim, spacedim> &tria,
+ const parallel::DistributedTriangulationBase<dim, spacedim> &tria,
const typename dealii::internal::p4est::types<dim>::quadrant
&p4est_cell,
const typename DoFHandler<dim, spacedim>::level_cell_iterator
template <int dim, int spacedim, class DoFHandlerType>
void
communicate_mg_ghost_cells(
- const typename parallel::distributed::Triangulation<dim, spacedim>
+ const typename parallel::DistributedTriangulationBase<dim, spacedim>
& tria,
DoFHandlerType &dof_handler)
{
// barrier is negligible compared to everything else we do
// here
if (const auto *triangulation = dynamic_cast<
- const parallel::distributed::Triangulation<dim, spacedim> *>(
+ const parallel::DistributedTriangulationBase<dim, spacedim> *>(
&dof_handler.get_triangulation()))
{
const int ierr = MPI_Barrier(triangulation->get_communicator());
const unsigned int dim = DoFHandlerType::dimension;
const unsigned int spacedim = DoFHandlerType::space_dimension;
- parallel::distributed::Triangulation<dim, spacedim> *triangulation =
- (dynamic_cast<parallel::distributed::Triangulation<dim, spacedim> *>(
- const_cast<dealii::Triangulation<dim, spacedim> *>(
- &dof_handler->get_triangulation())));
+ parallel::DistributedTriangulationBase<dim, spacedim> *triangulation =
+ (dynamic_cast<parallel::DistributedTriangulationBase<dim, spacedim>
+ *>(const_cast<dealii::Triangulation<dim, spacedim> *>(
+ &dof_handler->get_triangulation())));
Assert(triangulation != nullptr, ExcInternalError());
const types::subdomain_id subdomain_id =
const unsigned int dim = DoFHandlerType::dimension;
const unsigned int spacedim = DoFHandlerType::space_dimension;
- parallel::distributed::Triangulation<dim, spacedim> *triangulation =
- (dynamic_cast<parallel::distributed::Triangulation<dim, spacedim> *>(
- const_cast<dealii::Triangulation<dim, spacedim> *>(
- &dof_handler->get_triangulation())));
+ parallel::DistributedTriangulationBase<dim, spacedim> *triangulation =
+ (dynamic_cast<parallel::DistributedTriangulationBase<dim, spacedim>
+ *>(const_cast<dealii::Triangulation<dim, spacedim> *>(
+ &dof_handler->get_triangulation())));
Assert(triangulation != nullptr, ExcInternalError());
- AssertThrow((triangulation->settings &
- parallel::distributed::Triangulation<dim, spacedim>::
- construct_multigrid_hierarchy),
+ AssertThrow((triangulation->is_multilevel_hierarchy_constructed()),
ExcMessage(
"Multigrid DoFs can only be distributed on a parallel "
"Triangulation if the flag construct_multigrid_hierarchy "
const unsigned int dim = DoFHandlerType::dimension;
const unsigned int spacedim = DoFHandlerType::space_dimension;
- parallel::distributed::Triangulation<dim, spacedim> *triangulation =
- (dynamic_cast<parallel::distributed::Triangulation<dim, spacedim> *>(
- const_cast<dealii::Triangulation<dim, spacedim> *>(
- &dof_handler->get_triangulation())));
+ parallel::DistributedTriangulationBase<dim, spacedim> *triangulation =
+ (dynamic_cast<parallel::DistributedTriangulationBase<dim, spacedim>
+ *>(const_cast<dealii::Triangulation<dim, spacedim> *>(
+ &dof_handler->get_triangulation())));
Assert(triangulation != nullptr, ExcInternalError());