Skip to content

Commit

Permalink
Fix for #160
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Hellander committed May 31, 2017
1 parent dc779eb commit 3480e87
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pyurdme/pyurdme.py
Original file line number Diff line number Diff line change
Expand Up @@ -1086,7 +1086,10 @@ def get_mesh_size(self):
cr = []
for i in range(self.num_cells()):
cell = dolfin.Cell(self, i)
cr.append(cell.diameter()/2.0)
try:
cr.append(cell.diameter()/2.0)
except:
cr.append(cell.circumradius())

# Compute the mean for each vertex based on all incident cells
vtx2cell = self.topology()(0,self.topology().dim())
Expand Down

0 comments on commit 3480e87

Please sign in to comment.