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<
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<
161 boxes.emplace_back(mapping->get_bounding_box(cell), cell);
163 locally_owned_cell_bounding_boxes_rtree =
pack_rtree(boxes);
165 update_flags & ~update_locally_owned_cell_bounding_boxes_rtree;
167 return locally_owned_cell_bounding_boxes_rtree;
172 template <
int dim,
int spacedim>
177 covering_rtree.find(
level) == covering_rtree.end())
183 if (
const auto tria_mpi =
188 boxes, tria_mpi->get_communicator());
192 covering_rtree[
level] =
195 update_flags = update_flags & ~update_covering_rtree;
198 return covering_rtree[
level];
201 template <
int dim,
int spacedim>
202 const std::vector<std::set<unsigned int>> &
207 vertex_to_neighbor_subdomain.clear();
211 if (cell->is_ghost())
213 vertex_to_neighbor_subdomain[cell->vertex_index(v)].insert(
214 cell->subdomain_id());
216 update_flags = update_flags & ~update_vertex_to_neighbor_subdomain;
218 return vertex_to_neighbor_subdomain;
221#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
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)
const ::Triangulation< dim, spacedim > & tria