Skip to content

Commit

Permalink
there is no need to keep the family cache
Browse files Browse the repository at this point in the history
  • Loading branch information
pbrubeck committed Nov 1, 2023
1 parent b699807 commit e8311c4
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions FIAT/reference_element.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
QUADRILATERAL = 11
HEXAHEDRON = 111
TENSORPRODUCT = 99
_family_cache = {}


def multiindex_equal(d, isum, imin=0):
Expand Down Expand Up @@ -78,11 +77,9 @@ def make_lattice(verts, n, interior=0, family=None):
and interior = 0, this function will return the vertices and
midpoint, but with interior = 1, it will only return the
midpoint."""
key = family or "equi"
try:
family = _family_cache[key]
except KeyError:
family = _family_cache.setdefault(key, _decode_family(family))
if family is None or family == "equispaced":
family = "equi"
family = _decode_family(family)
D = len(verts)
X = numpy.array(verts)
get_point = lambda alpha: tuple(numpy.dot(_recursive(D - 1, n, alpha, family), X))
Expand Down

0 comments on commit e8311c4

Please sign in to comment.