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)
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<
135 for (
const auto &cell :
tria->active_cell_iterators())
136 boxes.emplace_back(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<
161 boxes.reserve(parallel_tria->n_locally_owned_active_cells());
164 for (
const auto &cell :
tria->active_cell_iterators() |
166 boxes.emplace_back(mapping->get_bounding_box(cell), cell);
168 locally_owned_cell_bounding_boxes_rtree =
pack_rtree(boxes);
170 update_flags & ~update_locally_owned_cell_bounding_boxes_rtree;
172 return locally_owned_cell_bounding_boxes_rtree;
177 template <
int dim,
int spacedim>
182 covering_rtree.find(
level) == covering_rtree.end())
188 if (
const auto tria_mpi =
193 boxes, tria_mpi->get_communicator());
197 covering_rtree[
level] =
200 update_flags = update_flags & ~update_covering_rtree;
203 return covering_rtree[
level];
206 template <
int dim,
int spacedim>
207 const std::vector<std::set<unsigned int>> &
212 vertex_to_neighbor_subdomain.clear();
216 if (cell->is_ghost())
217 for (
const unsigned int v : cell->vertex_indices())
218 vertex_to_neighbor_subdomain[cell->vertex_index(v)].insert(
219 cell->subdomain_id());
221 update_flags = update_flags & ~update_vertex_to_neighbor_subdomain;
223 return vertex_to_neighbor_subdomain;
226 template <
int dim,
int spacedim>
227 const std::map<unsigned int, std::set<types::subdomain_id>> &
235 update_flags = update_flags & ~update_vertex_with_ghost_neighbors;
241#include "grid_tools_cache.inst"
Abstract base class for mapping classes.
unsigned int n_active_cells() const
unsigned int n_vertices() const
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
IteratorRange< active_cell_iterator > active_cell_iterators() const
std::map< unsigned int, std::set<::types::subdomain_id > > * vertices_with_ghost_neighbors
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)
const ::Triangulation< dim, spacedim > & tria