compute_vertices_with_ghost_neighbors () const;
/**
- * Fills a map that, for each vertex, lists all the processors whose
+ * Return a map that, for each vertex, lists all the processors whose
* subdomains are adjacent to that vertex on the given level for the
* multigrid hierarchy. Used by DoFHandler::Policy::ParallelDistributed.
*/
- void
- fill_level_vertices_with_ghost_neighbors
- (const int level,
- std::map<unsigned int, std::set<dealii::types::subdomain_id> >
- &vertices_with_ghost_neighbors);
+ std::map<unsigned int, std::set<dealii::types::subdomain_id> >
+ compute_level_vertices_with_ghost_neighbors (const int level) const;
/**
* This method returns a bit vector of length tria.n_vertices()
* Like above, this method, which is only implemented for dim = 2 or 3,
* needs a stub because it is used in dof_handler_policy.cc
*/
- void
- fill_level_vertices_with_ghost_neighbors
- (const unsigned int level,
- std::map<unsigned int, std::set<dealii::types::subdomain_id> >
- &vertices_with_ghost_neighbors);
+ std::map<unsigned int, std::set<dealii::types::subdomain_id> >
+ compute_level_vertices_with_ghost_neighbors (const unsigned int level) const;
/**
* Like above, this method, which is only implemented for dim = 2 or 3,
* on the given multigrid level
*/
template <int dim, int spacedim>
- void
+ std::map<unsigned int, std::set<dealii::types::subdomain_id> >
Triangulation<dim,spacedim>::
- fill_level_vertices_with_ghost_neighbors
- (const int level,
- std::map<unsigned int, std::set<dealii::types::subdomain_id> >
- &vertices_with_ghost_neighbors)
+ compute_level_vertices_with_ghost_neighbors (const int level) const
{
+ std::map<unsigned int, std::set<dealii::types::subdomain_id> >
+ vertices_with_ghost_neighbors;
+
const std::vector<bool> locally_active_vertices =
mark_locally_active_vertices_on_level(level);
cell_iterator cell = this->begin(level),
}
}
}
+
+ return vertices_with_ghost_neighbors;
}
template <int dim, int spacedim>
std::vector<bool>
- Triangulation<dim,spacedim>
- ::mark_locally_active_vertices_on_level (const int level) const
+ Triangulation<dim,spacedim>::
+ mark_locally_active_vertices_on_level (const int level) const
{
Assert (dim>1, ExcNotImplemented());
}
template <int spacedim>
- void
+ std::map<unsigned int, std::set<dealii::types::subdomain_id> >
Triangulation<1,spacedim>::
- fill_level_vertices_with_ghost_neighbors
- (const unsigned int /*level*/,
- std::map<unsigned int, std::set<dealii::types::subdomain_id> >
- &/*vertices_with_ghost_neighbors*/)
+ compute_level_vertices_with_ghost_neighbors (const unsigned int /*level*/) const
{
Assert (false, ExcNotImplemented());
+
+ return std::map<unsigned int, std::set<dealii::types::subdomain_id> >();
}
template <int spacedim>