Skip to content

Commit

Permalink
Merged in tsfc (pull request #46)
Browse files Browse the repository at this point in the history
Fixes for TSFC
  • Loading branch information
miklos1 committed Feb 1, 2016
2 parents 4f05894 + 39d1d12 commit ab26b0b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 4 additions & 4 deletions FIAT/reference_element.py
Original file line number Diff line number Diff line change
Expand Up @@ -577,13 +577,13 @@ def get_facet_transform(self, facet_i):
x_f on facet_i, x_c = f(x_f) is the corresponding cell coordinates.
"""
if facet_i == 0:
return lambda p: numpy.array([0.0, p])
return lambda p: numpy.array([0.0, float(p)])
elif facet_i == 1:
return lambda p: numpy.array([1.0, p])
return lambda p: numpy.array([1.0, float(p)])
elif facet_i == 2:
return lambda p: numpy.array([p, 0.0])
return lambda p: numpy.array([float(p), 0.0])
elif facet_i == 3:
return lambda p: numpy.array([p, 1.0])
return lambda p: numpy.array([float(p), 1.0])
else:
raise RuntimeError("Illegal quadrilateral facet number.")

Expand Down
4 changes: 4 additions & 0 deletions FIAT/restricted.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,12 @@ def __init__(self, element, indices=None, restriction_domain=None):
nodes.append(nodes_old[dof])
assert dof_counter == len(indices)
dual = DualSet(nodes, ref_el, entity_ids)
self.ref_el = ref_el
self.dual = dual

def get_reference_element(self):
return self.ref_el

def space_dimension(self):
return len(self._indices)

Expand Down

0 comments on commit ab26b0b

Please sign in to comment.