From 43912638f7f10b15c9b2bd12115da9e84b505190 Mon Sep 17 00:00:00 2001 From: David Wells Date: Thu, 15 Aug 2024 10:03:06 -0600 Subject: [PATCH] Drop support for p4est versions older than 2.2. We already have several features which depend on this version. --- cmake/configure/configure_50_p4est.cmake | 4 +-- .../incompatibilities/20240815DavidWells | 4 +++ source/distributed/tria.cc | 27 +------------------ 3 files changed, 7 insertions(+), 28 deletions(-) create mode 100644 doc/news/changes/incompatibilities/20240815DavidWells diff --git a/cmake/configure/configure_50_p4est.cmake b/cmake/configure/configure_50_p4est.cmake index 13992d1d1f..77c170d967 100644 --- a/cmake/configure/configure_50_p4est.cmake +++ b/cmake/configure/configure_50_p4est.cmake @@ -26,9 +26,9 @@ macro(feature_p4est_find_external var) set(${var} TRUE) # - # We require at least version 2.0 + # We require at least version 2.2 # - set(_version_required 2.0) + set(_version_required 2.2) if(P4EST_VERSION VERSION_LESS ${_version_required}) message(STATUS "Insufficient p4est installation found: " "At least version ${_version_required} is required." diff --git a/doc/news/changes/incompatibilities/20240815DavidWells b/doc/news/changes/incompatibilities/20240815DavidWells new file mode 100644 index 0000000000..78021f68c7 --- /dev/null +++ b/doc/news/changes/incompatibilities/20240815DavidWells @@ -0,0 +1,4 @@ +Changed: The minimum version of p4est compatible with deal.II has been +increased to 2.2. +
+(David Wells, 2024/08/15) diff --git a/source/distributed/tria.cc b/source/distributed/tria.cc index 623822953d..27f27e1a53 100644 --- a/source/distributed/tria.cc +++ b/source/distributed/tria.cc @@ -618,7 +618,6 @@ namespace } } -# ifdef P4EST_SEARCH_LOCAL template class PartitionSearch { @@ -1193,7 +1192,7 @@ namespace are_vertices_initialized = true; } -# endif // P4EST_SEARCH_LOCAL defined + /** @@ -1977,19 +1976,6 @@ namespace parallel this->data_serializer.dest_sizes_variable.end(), std::vector::size_type(0))); -# if DEAL_II_P4EST_VERSION_GTE(2, 0, 65, 0) -# else - // ----- WORKAROUND ----- - // An assertion in p4est prevents us from sending/receiving no data - // at all, which is mandatory if one of our processes does not own - // any quadrant. This bypasses the assertion from being triggered. - // - see: https://github.com/cburstedde/p4est/issues/48 - if (this->data_serializer.src_sizes_variable.empty()) - this->data_serializer.src_sizes_variable.resize(1); - if (this->data_serializer.dest_sizes_variable.empty()) - this->data_serializer.dest_sizes_variable.resize(1); -# endif - // Execute variable size transfer. dealii::internal::p4est::functions::transfer_custom( parallel_forest->global_first_quadrant, @@ -3202,16 +3188,6 @@ namespace parallel std::vector Triangulation:: find_point_owner_rank(const std::vector> &points) { -# ifndef P4EST_SEARCH_LOCAL - (void)points; - AssertThrow( - false, - ExcMessage( - "This function is only available if p4est is version 2.2 and higher.")); - // Just return to satisfy compiler - return std::vector(1, - dealii::numbers::invalid_subdomain_id); -# else // We can only use this function if vertices are communicated to p4est AssertThrow(this->are_vertices_communicated_to_p4est(), ExcMessage( @@ -3298,7 +3274,6 @@ namespace parallel sc_array_destroy_null(&point_sc_array); return owner_rank; -# endif // P4EST_SEARCH_LOCAL defined } -- 2.39.5