From 6bbce8d7168cf8d72096ad630e3b9e4d1d0b7038 Mon Sep 17 00:00:00 2001 From: Marc Fehling Date: Fri, 23 Jul 2021 17:21:46 -0600 Subject: [PATCH] Load: align dealii and p4est meshes before repartitioning. --- source/distributed/tria.cc | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/source/distributed/tria.cc b/source/distributed/tria.cc index 333e12acc5..e7f0271692 100644 --- a/source/distributed/tria.cc +++ b/source/distributed/tria.cc @@ -1558,6 +1558,19 @@ namespace parallel } else { + // first, align both dealii and p4est meshes, which is a + // requirement of our internal cell weights algorithm + try + { + copy_local_forest_to_triangulation(); + } + catch (const typename Triangulation::DistortedCellList &) + { + // the underlying triangulation should not be checking for + // distorted cells + Assert(false, ExcInternalError()); + } + // get cell weights for a weighted repartitioning. const std::vector cell_weights = get_cell_weights(); @@ -1585,10 +1598,8 @@ namespace parallel } catch (const typename Triangulation::DistortedCellList &) { - // the underlying - // triangulation should not - // be checking for - // distorted cells + // the underlying triangulation should not be checking for distorted + // cells Assert(false, ExcInternalError()); } -- 2.39.5