Skip to content

Instantly share code, notes, and snippets.

@wence-
Created January 20, 2014 16:05
Show Gist options
  • Select an option

  • Save wence-/8522908 to your computer and use it in GitHub Desktop.

Select an option

Save wence-/8522908 to your computer and use it in GitHub Desktop.
diff --git a/python/firedrake/core_types.pyx b/python/firedrake/core_types.pyx
index 3a97056..b6427f7 100644
--- a/python/firedrake/core_types.pyx
+++ b/python/firedrake/core_types.pyx
@@ -830,9 +830,12 @@ class FunctionSpaceBase(object):
else:
self.interior_facet_node_list = None
- self.exterior_facet_node_list = \
- np.array(<int[:mesh.exterior_facets.count,:element_f.ndof]>
- function_space.exterior_facet_node_list)
+ if mesh.exterior_facets.count > 0:
+ self.exterior_facet_node_list = \
+ np.array(<int[:mesh.exterior_facets.count,:element_f.ndof]>
+ function_space.exterior_facet_node_list)
+ else:
+ self.exterior_facet_node_list = None
# Note: this is the function space rank. The value rank may be different.
self.rank = rank
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment