16 #include <deal.II/base/bounding_box.h> 17 #include <deal.II/base/mpi.h> 19 #include <deal.II/grid/filtered_iterator.h> 20 #include <deal.II/grid/grid_tools.h> 21 #include <deal.II/grid/grid_tools_cache.h> 23 #include <boost/geometry.hpp> 25 DEAL_II_NAMESPACE_OPEN
29 template <
int dim,
int spacedim>
40 template <
int dim,
int spacedim>
45 if (tria_signal.connected())
46 tria_signal.disconnect();
51 template <
int dim,
int spacedim>
55 update_flags |= flags;
60 template <
int dim,
int spacedim>
62 std::set<typename Triangulation<dim, spacedim>::active_cell_iterator>> &
70 return vertex_to_cells;
75 template <
int dim,
int spacedim>
76 const std::vector<std::vector<Tensor<1, spacedim>>> &
82 *tria, get_vertex_to_cell_map());
85 return vertex_to_cell_centers;
90 template <
int dim,
int spacedim>
91 const std::map<unsigned int, Point<spacedim>> &
104 template <
int dim,
int spacedim>
105 const RTree<std::pair<Point<spacedim>,
unsigned int>> &
110 const auto &used_vertices = get_used_vertices();
111 std::vector<std::pair<Point<spacedim>,
unsigned int>> vertices(
112 used_vertices.size());
114 for (
const auto &it : used_vertices)
115 vertices[i++] = std::make_pair(it.second, it.first);
116 used_vertices_rtree = pack_rtree(vertices);
118 return used_vertices_rtree;
123 template <
int dim,
int spacedim>
125 std::pair<BoundingBox<spacedim>,
131 std::vector<std::pair<
134 boxes(tria->n_active_cells());
136 for (
const auto &cell : tria->active_cell_iterators())
137 boxes[i++] = std::make_pair(mapping->get_bounding_box(cell), cell);
139 cell_bounding_boxes_rtree = pack_rtree(boxes);
141 return cell_bounding_boxes_rtree;
145 #ifdef DEAL_II_WITH_NANOFLANN 146 template <
int dim,
int spacedim>
152 vertex_kdtree.set_points(tria->get_vertices());
155 return vertex_kdtree;
161 template <
int dim,
int spacedim>
162 const RTree<std::pair<BoundingBox<spacedim>,
unsigned int>> &
176 ptr(locally_owned_cell_predicate);
182 std::vector<BoundingBox<spacedim>> bbox_v(1, bbox);
183 if (
const auto tria_mpi =
188 bbox_v, tria_mpi->get_communicator());
198 return covering_rtree;
201 #include "grid_tools_cache.inst" 205 DEAL_II_NAMESPACE_CLOSE
Abstract base class for mapping classes.