27 template <
int dim,
int spacedim>
38 template <
int dim,
int spacedim>
43 if (tria_signal.connected())
44 tria_signal.disconnect();
49 template <
int dim,
int spacedim>
53 update_flags |= flags;
58 template <
int dim,
int spacedim>
60 std::set<typename Triangulation<dim, spacedim>::active_cell_iterator>> &
66 update_flags = update_flags & ~update_vertex_to_cell_map;
68 return vertex_to_cells;
73 template <
int dim,
int spacedim>
74 const std::vector<std::vector<Tensor<1, spacedim>>> &
80 *tria, get_vertex_to_cell_map());
81 update_flags = update_flags & ~update_vertex_to_cell_centers_directions;
83 return vertex_to_cell_centers;
88 template <
int dim,
int spacedim>
89 const std::map<unsigned int, Point<spacedim>> &
95 update_flags = update_flags & ~update_used_vertices;
102 template <
int dim,
int spacedim>
108 const auto &used_vertices = get_used_vertices();
109 std::vector<std::pair<Point<spacedim>,
unsigned int>>
vertices(
110 used_vertices.size());
112 for (
const auto &it : used_vertices)
113 vertices[i++] = std::make_pair(it.second, it.first);
115 update_flags = update_flags & ~update_used_vertices_rtree;
117 return used_vertices_rtree;
122 template <
int dim,
int spacedim>
124 std::pair<BoundingBox<spacedim>,
130 std::vector<std::pair<
133 boxes(tria->n_active_cells());
135 for (
const auto &cell : tria->active_cell_iterators())
136 boxes[i++] = std::make_pair(mapping->get_bounding_box(cell), cell);
138 cell_bounding_boxes_rtree =
pack_rtree(boxes);
139 update_flags = update_flags & ~update_cell_bounding_boxes_rtree;
141 return cell_bounding_boxes_rtree;
146 template <
int dim,
int spacedim>
148 std::pair<BoundingBox<spacedim>,
154 std::vector<std::pair<
158 boxes.reserve(tria->n_active_cells());
159 for (
const auto &cell : tria->active_cell_iterators())
160 if (cell->is_locally_owned())
162 std::make_pair(mapping->get_bounding_box(cell), cell));
166 update_flags & ~update_locally_owned_cell_bounding_boxes_rtree;
168 return locally_owned_cell_bounding_boxes_rtree;
173 template <
int dim,
int spacedim>
178 covering_rtree.find(
level) == covering_rtree.end())
184 if (
const auto tria_mpi =
189 boxes, tria_mpi->get_communicator());
193 covering_rtree[
level] =
196 update_flags = update_flags & ~update_covering_rtree;
199 return covering_rtree[
level];
202 template <
int dim,
int spacedim>
203 const std::vector<std::set<unsigned int>> &
208 vertex_to_neighbor_subdomain.clear();
209 vertex_to_neighbor_subdomain.resize(tria->n_vertices());
210 for (
const auto &cell : tria->active_cell_iterators())
212 if (cell->is_ghost())
214 vertex_to_neighbor_subdomain[cell->vertex_index(v)].insert(
215 cell->subdomain_id());
217 update_flags = update_flags & ~update_vertex_to_neighbor_subdomain;
219 return vertex_to_neighbor_subdomain;
222#include "grid_tools_cache.inst"
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
RTree< std::pair< BoundingBox< spacedim >, unsigned int > > build_global_description_tree(const std::vector< BoundingBox< spacedim > > &local_description, const MPI_Comm &mpi_communicator)
std::vector< BoundingBox< boost::geometry::dimension< typename Rtree::indexable_type >::value > > extract_rtree_level(const Rtree &tree, const unsigned int level)
boost::geometry::index::rtree< LeafType, IndexType, IndexableGetter > RTree
RTree< typename LeafTypeIterator::value_type, IndexType, IndexableGetter > pack_rtree(const LeafTypeIterator &begin, const LeafTypeIterator &end)