From 420fb595e7d3c5f0c28da63b4aae89bdc8aa6786 Mon Sep 17 00:00:00 2001
From: Matteo Cicuttin <datafl4sh@toxicnet.eu>
Date: Mon, 14 Mar 2022 13:48:02 +0100
Subject: [PATCH] Fixed MPI bug.

---
 include/libgmshdg/gmsh_io.h      | 7 +++++++
 include/maxwell/maxwell_common.h | 1 -
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/include/libgmshdg/gmsh_io.h b/include/libgmshdg/gmsh_io.h
index 6d76d48..c33ac53 100644
--- a/include/libgmshdg/gmsh_io.h
+++ b/include/libgmshdg/gmsh_io.h
@@ -154,6 +154,13 @@ struct surface_descriptor
 
     std::vector<face_number> face_numbers;
 
+    surface_descriptor()
+        : surface_entity(0), adjacent_volume_entity(0)
+#ifdef USE_MPI
+        , parent_entity(-1)
+#endif /* USE_MPI */
+    {}
+
     void add_face(size_t local_num, size_t global_num)
     {
         face_number fn;
diff --git a/include/maxwell/maxwell_common.h b/include/maxwell/maxwell_common.h
index 2e013d0..1e902e1 100644
--- a/include/maxwell/maxwell_common.h
+++ b/include/maxwell/maxwell_common.h
@@ -152,7 +152,6 @@ eval_boundary_sources_new(const model& mod, const parameter_loader& mpl,
         auto etag = e.material_tag();
 
         auto mtag = sd.material_tag();
-
         switch ( mpl.boundary_type( mtag ) )
         {
             case boundary_condition::UNSPECIFIED:
-- 
GitLab