Skip to content

Commit

Permalink
Merge pull request #46 from FEniCS/wence/fix/serendipity
Browse files Browse the repository at this point in the history
Fix serendipity tabulation for non-3D cells
  • Loading branch information
wence- authored May 1, 2020
2 parents 6cd7732 + 37b48ee commit cea4908
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions FIAT/serendipity.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def __init__(self, ref_el, degree):
super(Serendipity, self).__init__(ref_el=ref_el, dual=None, order=degree, formdegree=formdegree)

self.basis = {(0,)*dim: Array(s_list)}
self.basis_callable = {(0,)*dim: lambdify(variables, Array(s_list),
self.basis_callable = {(0,)*dim: lambdify(variables[:dim], Array(s_list),
modules="numpy", dummify=True)}
topology = ref_el.get_topology()
unflattening_map = compute_unflattening_map(topology)
Expand Down Expand Up @@ -157,7 +157,7 @@ def tabulate(self, order, points, entity=None):
callable = self.basis_callable[alpha]
except KeyError:
polynomials = diff(self.basis[(0,)*dim], *zip(variables, alpha))
callable = lambdify(variables, polynomials, modules="numpy", dummify=True)
callable = lambdify(variables[:dim], polynomials, modules="numpy", dummify=True)
self.basis[alpha] = polynomials
self.basis_callable[alpha] = callable
points = np.asarray(points)
Expand Down

0 comments on commit cea4908

Please sign in to comment.