From e8e3b63f786eb21afe8b97a131f908b0e5db5fd2 Mon Sep 17 00:00:00 2001
From: ellis <eshoag2@illinois.edu>
Date: Sat, 25 Mar 2017 13:00:04 -0500
Subject: [PATCH] Comments and better errors

---
 meshmode/mesh/__init__.py   | 2 +-
 meshmode/mesh/processing.py | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/meshmode/mesh/__init__.py b/meshmode/mesh/__init__.py
index cc32e962..472e6c4f 100644
--- a/meshmode/mesh/__init__.py
+++ b/meshmode/mesh/__init__.py
@@ -872,7 +872,7 @@ class Mesh(Record):
             if elem < grp.nelements:
                 return igrp
             elem -= grp.nelements
-        raise RuntimeError("Could not find group with element ", elem)
+        raise RuntimeError("Could not find group with element %d" % elem)
 
     # Design experience: Try not to add too many global data structures to the
     # mesh. Let the element groups be responsible for that at the mesh level.
diff --git a/meshmode/mesh/processing.py b/meshmode/mesh/processing.py
index 19d8e9f7..c028c63f 100644
--- a/meshmode/mesh/processing.py
+++ b/meshmode/mesh/processing.py
@@ -185,6 +185,8 @@ def partition_mesh(mesh, part_per_element, part_nr):
                         n_elem = np.count_nonzero(
                                     part_per_element[:rank_neighbor] == n_part_num)
 
+                        # I cannot compute the group because the other
+                        # partitions have not been built yet.
                         adj_grps[igrp].add_connection(
                                             elem,
                                             face,
-- 
GitLab