Skip to content

Commit

Permalink
Enable 3D Rtree
Browse files Browse the repository at this point in the history
  • Loading branch information
fdrmrc committed Dec 13, 2023
1 parent ca7d803 commit ca8e41c
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions include/poly_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ namespace dealii::PolyUtils
inline Rtree_visitor(
const Translator &translator,
unsigned int target_level,
std::vector<std::vector<typename Triangulation<2>::active_cell_iterator>>
& boxes,
std::vector<std::vector<unsigned int>> &csr);
std::vector<std::vector<typename Triangulation<
boost::geometry::dimension<Box>::value>::active_cell_iterator>> &boxes,
std::vector<std::vector<unsigned int>> & csr);


/**
Expand Down Expand Up @@ -122,7 +122,8 @@ namespace dealii::PolyUtils
* vector v has the following property: v[i] = vector with all
* of the BoundingBox bounded by the i-th node of the Rtree.
*/
std::vector<std::vector<typename Triangulation<2>::active_cell_iterator>>
std::vector<std::vector<typename Triangulation<
boost::geometry::dimension<Box>::value>::active_cell_iterator>>
&agglomerates;

std::vector<std::vector<unsigned int>> &row_ptr;
Expand All @@ -138,7 +139,8 @@ namespace dealii::PolyUtils
Rtree_visitor<Value, Options, Translator, Box, Allocators>::Rtree_visitor(
const Translator & translator,
const unsigned int target_level,
std::vector<std::vector<typename Triangulation<2>::active_cell_iterator>>
std::vector<std::vector<typename Triangulation<
boost::geometry::dimension<Box>::value>::active_cell_iterator>>
& bb_in_boxes,
std::vector<std::vector<unsigned int>> &csr)
: translator(translator)
Expand Down Expand Up @@ -250,15 +252,17 @@ namespace dealii::PolyUtils
template <typename Rtree>
inline std::pair<
std::vector<std::vector<unsigned int>>,
std::vector<std::vector<typename Triangulation<2>::active_cell_iterator>>>
std::vector<std::vector<typename Triangulation<boost::geometry::dimension<
typename Rtree::indexable_type>::value>::active_cell_iterator>>>
extract_children_of_level(const Rtree &tree, const unsigned int level)
{
using RtreeView =
boost::geometry::index::detail::rtree::utilities::view<Rtree>;
RtreeView rtv(tree);

std::vector<std::vector<unsigned int>> csrs;
std::vector<std::vector<typename Triangulation<2>::active_cell_iterator>>
std::vector<std::vector<typename Triangulation<boost::geometry::dimension<
typename Rtree::indexable_type>::value>::active_cell_iterator>>
agglomerates;

if (rtv.depth() == 0)
Expand Down

0 comments on commit ca8e41c

Please sign in to comment.