From: Peter Munch Date: Fri, 24 Mar 2023 21:08:22 +0000 (+0100) Subject: Add warning to pack_rtree_of_indices() X-Git-Tag: relicensing~628^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F14976%2Fhead;p=dealii.git Add warning to pack_rtree_of_indices() --- diff --git a/include/deal.II/numerics/rtree.h b/include/deal.II/numerics/rtree.h index 6a56118253..596f50da4e 100644 --- a/include/deal.II/numerics/rtree.h +++ b/include/deal.II/numerics/rtree.h @@ -271,6 +271,30 @@ private: * the container. A reference to the external container is stored internally, * but keep in mind that if you change the container, you should rebuild the * tree. + * + * @warning This function does not work on Windows. As an alternative, + * build a tree with pairs of point and id. For instance to + * create an intersection between `BoundingBox box` and + * `std::vector> boxes`, don't write: + * @code + * const auto tree = pack_rtree_of_indices(boxes); + * + * for (const auto &i : tree | bgi::adaptors::queried(bgi::intersects(box))) + * std::cout << i << " " << boxes[i] << std::endl; + * @endcode + * but instead: + * @code + * std::vector, unsigned int>> boxes_and_ids; + * + * for(unsigned int i = 0; i < boxes.size(); ++i) + * boxes_and_ids.emplace_back(boxes[i], i); + * + * const auto tree = pack_rtree(boxes_and_ids); + * + * for (const auto &i : tree | bgi::adaptors::queried(bgi::intersects(box))) + * std::cout << i->second << " " << boxes[i->second] << std::endl; + * @endcode + * */ template , typename ContainerType>