Skip to content
This repository has been archived by the owner on Feb 21, 2022. It is now read-only.

Commit

Permalink
Fix serendipity tabulation for non-3D cells
Browse files Browse the repository at this point in the history
  • Loading branch information
wence- committed May 1, 2020
1 parent 6cd7732 commit 37b48ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions FIAT/serendipity.py
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 37b48ee

Please sign in to comment.