--- /dev/null
+Improved: convert_to_distributed_compute_point_locations_internal() takes a pointer to a vector
+of quadratures as an additional argument. In case this pointer is not a null pointer, the vector is
+populated by the mapped quadratures that are internally used during the conversion.
+<br>
+(Johannes Heinz, 2023/12/29)
+
* from class members. This can be done without searching for points again
* since all information is locally known.
*
+ * @p mapped_quadratures_recv_comp is a pointer to an empty vector of
+ * mapped quadratures. By default it is a `nullptr` and the parameter is
+ * ignored. Otherwise, the vector is filled with the mapped quadrature
+ * rules (in real coordinates) corresponding to recv_components.
+ *
* The parameter @p consistent_numbering_of_sender_and_receiver can be used to ensure
* points on sender and receiver side are numbered consistently.
* This parameter is optional if DistributedComputePointLocationsInternal
const unsigned int n_points_1D,
const Triangulation<dim, spacedim> &tria,
const Mapping<dim, spacedim> &mapping,
+ std::vector<Quadrature<spacedim>> *mapped_quadratures_recv_comp =
+ nullptr,
const bool consistent_numbering_of_sender_and_receiver = false) const;
private:
const unsigned int n_points_1D,
const Triangulation<dim, spacedim> &tria,
const Mapping<dim, spacedim> &mapping,
+ std::vector<Quadrature<spacedim>> *mapped_quadratures_recv_comp,
const bool consistent_numbering_of_sender_and_receiver) const
{
using CellIterator =
typename Triangulation<dim, spacedim>::active_cell_iterator;
+ if (mapped_quadratures_recv_comp != nullptr)
+ {
+ AssertDimension(mapped_quadratures_recv_comp->size(), 0);
+ mapped_quadratures_recv_comp->reserve(recv_components.size());
+ }
+
GridTools::internal::DistributedComputePointLocationsInternal<dim,
spacedim>
result;
result.recv_components.size(), // number of point
numbers::invalid_unsigned_int);
}
+
+ // append quadrature
+ if (mapped_quadratures_recv_comp != nullptr)
+ mapped_quadratures_recv_comp->push_back(quad);
}
// since empty quadratures might be present we have to set the number
const unsigned int,
const Triangulation<deal_II_dimension, deal_II_space_dimension> &,
const Mapping<deal_II_dimension, deal_II_space_dimension> &,
+ std::vector<Quadrature<deal_II_space_dimension>> *,
const bool) const;
template internal::DistributedComputeIntersectionLocationsInternal<
auto rpe_data = intersection_location
.convert_to_distributed_compute_point_locations_internal(
- n_quad_points, tria, mapping, true);
+ n_quad_points, tria, mapping, nullptr, true);
deallog << "Recv Components " << std::endl;
for (const auto &rc : rpe_data.recv_components)
auto rpe_data = intersection_location
.convert_to_distributed_compute_point_locations_internal(
- n_quad_points, tria, mapping, true);
+ n_quad_points, tria, mapping, nullptr, true);
deallog << "Recv Components " << std::endl;
for (const auto &rc : rpe_data.recv_components)
auto rpe_data = intersection_location
.convert_to_distributed_compute_point_locations_internal(
- n_quad_points, tria, mapping, true);
+ n_quad_points, tria, mapping, nullptr, true);
deallog << "Recv Components " << std::endl;
for (const auto &rc : rpe_data.recv_components)
auto rpe_data = intersection_location
.convert_to_distributed_compute_point_locations_internal(
- n_quad_points, tria, mapping, true);
+ n_quad_points, tria, mapping, nullptr, true);
deallog << "Recv Components " << std::endl;
for (const auto &rc : rpe_data.recv_components)
intersection_requests.emplace_back(vertices);
}
}
- std::cout << "CALLING FUNCTION" << std::endl;
+
auto intersection_location =
GridTools::internal::distributed_compute_intersection_locations<structdim>(
cache,
std::vector<bool>(),
1.0e-9);
- std::cout << "FINISHED" << std::endl;
-
auto rpe_intersection_data =
intersection_location
.convert_to_distributed_compute_point_locations_internal(n_quad_points,
tria,
mapping);
- std::cout << "WTF" << std::endl;
-
// setup rpe without additional search
dealii::Utilities::MPI::RemotePointEvaluation<dim> rpe_intersections;
rpe_intersections.reinit(rpe_intersection_data, tria, mapping);