From d5c1ceef8c5efbc7060b01434dcd9b2867c45666 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Del=20Pino?= <stephane.delpino44@gmail.com>
Date: Wed, 3 May 2023 21:32:26 +0200
Subject: [PATCH] Fix mpi parallelism for mesh smoother

---
 src/mesh/MeshSmoother.cpp | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/src/mesh/MeshSmoother.cpp b/src/mesh/MeshSmoother.cpp
index 5895feb58..bb6bf7289 100644
--- a/src/mesh/MeshSmoother.cpp
+++ b/src/mesh/MeshSmoother.cpp
@@ -165,8 +165,6 @@ class MeshSmootherHandler::MeshSmoother
         max_delta_xr[node_id] = max_delta;
       });
 
-    synchronize(max_delta_xr);
-
     NodeValue<Rd> shift_r{connectivity};
 
     parallel_for(
@@ -203,11 +201,7 @@ class MeshSmootherHandler::MeshSmoother
 
     this->_applyBC(shift_r);
 
-#ifndef NDEBUG
-    if (not isSynchronized(shift_r)) {
-      throw UnexpectedError("smoothed mesh coordinates are not synchronized");
-    }
-#endif   // NDEBUG
+    synchronize(shift_r);
 
     return shift_r;
   }
-- 
GitLab