* @param enforce_unique_mapping Enforce unique mapping, i.e.,
* (one-to-one) relation of points and cells.
* @param rtree_level RTree level to be used during the construction of the bounding boxes.
+ * @param marked_vertices Function that marks relevant vertices to make search
+ * of active cells around point more efficient.
*/
- RemotePointEvaluation(const double tolerance = 1e-6,
- const bool enforce_unique_mapping = false,
- const unsigned int rtree_level = 0);
+ RemotePointEvaluation(
+ const double tolerance = 1e-6,
+ const bool enforce_unique_mapping = false,
+ const unsigned int rtree_level = 0,
+ const std::function<std::vector<bool>()> &marked_vertices = {});
/**
* Destructor.
*/
const unsigned int rtree_level;
+ /**
+ * Function that marks relevant vertices to make search of active cells
+ * around point more efficient.
+ */
+ const std::function<std::vector<bool>()> marked_vertices;
+
/**
* Storage for the status of the triangulation signal.
*/
const GridTools::Cache<dim, spacedim> & cache,
const std::vector<Point<spacedim>> & points,
const std::vector<std::vector<BoundingBox<spacedim>>> &global_bboxes,
+ const std::vector<bool> & marked_vertices,
const double tolerance,
const bool perform_handshake,
const bool enforce_unique_mapping = false);
{
template <int dim, int spacedim>
RemotePointEvaluation<dim, spacedim>::RemotePointEvaluation(
- const double tolerance,
- const bool enforce_unique_mapping,
- const unsigned int rtree_level)
+ const double tolerance,
+ const bool enforce_unique_mapping,
+ const unsigned int rtree_level,
+ const std::function<std::vector<bool>()> &marked_vertices)
: tolerance(tolerance)
, enforce_unique_mapping(enforce_unique_mapping)
, rtree_level(rtree_level)
+ , marked_vertices(marked_vertices)
, ready_flag(false)
{}
cache,
points,
global_bboxes,
+ marked_vertices ? marked_vertices() : std::vector<bool>(),
tolerance,
true,
enforce_unique_mapping);
{
// run internal function ...
const auto all = internal::distributed_compute_point_locations(
- cache, points, global_bboxes, tolerance, false, true)
+ cache, points, global_bboxes, {}, tolerance, false, true)
.send_components;
// ... and reshuffle the data
const GridTools::Cache<dim, spacedim> & cache,
const std::vector<Point<spacedim>> & points,
const std::vector<std::vector<BoundingBox<spacedim>>> &global_bboxes,
+ const std::vector<bool> & marked_vertices,
const double tolerance,
const bool perform_handshake,
const bool enforce_unique_mapping)
const auto &potential_owners_ptrs = std::get<1>(potential_owners);
const auto &potential_owners_indices = std::get<2>(potential_owners);
- const std::vector<bool> marked_vertices;
auto cell_hint = cache.get_triangulation().begin_active();
const auto translate = [&](const unsigned int other_rank) {
const Cache<deal_II_dimension, deal_II_space_dimension> &,
const std::vector<Point<deal_II_space_dimension>> &,
const std::vector<std::vector<BoundingBox<deal_II_space_dimension>>> &,
+ const std::vector<bool> &marked_vertices,
const double,
const bool,
const bool);