From e8311c4a4cc6aaf6b890b8d88ee2f3319ba2f6e7 Mon Sep 17 00:00:00 2001 From: Pablo Brubeck Date: Wed, 1 Nov 2023 21:41:02 +0000 Subject: [PATCH] there is no need to keep the family cache --- FIAT/reference_element.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/FIAT/reference_element.py b/FIAT/reference_element.py index d65bc9884..61f7de8b1 100644 --- a/FIAT/reference_element.py +++ b/FIAT/reference_element.py @@ -38,7 +38,6 @@ QUADRILATERAL = 11 HEXAHEDRON = 111 TENSORPRODUCT = 99 -_family_cache = {} def multiindex_equal(d, isum, imin=0): @@ -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))