From c42f46c4bca60b5ac7338e66499160b89b47c1d3 Mon Sep 17 00:00:00 2001
From: Alexandru Fikl <alexfikl@gmail.com>
Date: Mon, 20 Apr 2020 21:56:37 -0500
Subject: [PATCH] allow partitioning a hypersurface

---
 meshmode/distributed.py | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/meshmode/distributed.py b/meshmode/distributed.py
index 7ddaa804..54135fb0 100644
--- a/meshmode/distributed.py
+++ b/meshmode/distributed.py
@@ -239,10 +239,12 @@ def get_connected_partitions(mesh):
     connected_parts = set()
     from meshmode.mesh import InterPartitionAdjacencyGroup
     for adj in mesh.facial_adjacency_groups:
-        if isinstance(adj[None], InterPartitionAdjacencyGroup):
-            indices = (adj[None].neighbor_partitions >= 0)
+        grp = adj.get(None, None)
+        if isinstance(grp, InterPartitionAdjacencyGroup):
+            indices = grp.neighbor_partitions >= 0
             connected_parts = connected_parts.union(
-                                        adj[None].neighbor_partitions[indices])
+                    grp.neighbor_partitions[indices])
+
     return connected_parts
 
 
-- 
GitLab