*
* @warning This is a collective call that needs to be executed by all
* processors in the communicator.
+ *
+ * @note If you want to be sure that all points have been found, call
+ * all_points_found() after calling this function.
*/
void
reinit(const std::vector<Point<spacedim>> &points,
bool
is_map_unique() const;
+ /**
+ * Return if all points could be found in the domain.
+ */
+ bool
+ all_points_found() const;
+
+ /**
+ * Return if point @p i could be found in the domain.
+ */
+ bool
+ point_found(const unsigned int i) const;
+
/**
* Return the Triangulation object used during reinit().
*/
* cache, dof_handler_2, vector_2);
* @endcode
*
+ * @note If a point cannot be found, the result for these points will
+ * be undefined (most probably 0). If you want to be sure that all
+ * points received a valid result, call `cache.all_points_found()`
+ * after this function call.
+ *
* @warning This is a collective call that needs to be executed by all
* processors in the communicator.
*/
+ template <int dim, int spacedim>
+ bool
+ RemotePointEvaluation<dim, spacedim>::all_points_found() const
+ {
+ if (is_map_unique())
+ return true;
+
+ for (unsigned int i = 1; i < point_ptrs.size(); ++i)
+ if (point_found(i) == false)
+ return false;
+
+ return true;
+ }
+
+
+
+ template <int dim, int spacedim>
+ bool
+ RemotePointEvaluation<dim, spacedim>::point_found(
+ const unsigned int i) const
+ {
+ AssertIndexRange(i, point_ptrs.size());
+ return (point_ptrs[i] - point_ptrs[i - 1]) > 0;
+ }
+
+
+
template <int dim, int spacedim>
const Triangulation<dim, spacedim> &
RemotePointEvaluation<dim, spacedim>::get_triangulation() const