Open
Description
Suppose I'm building Q_k(hex) = Q_k(quad) x CG_k(interval) on an extruded mesh. Right now I see 2 calls to the FIAT constructor for CG, where I am only expecting a single one.
I suspect that the conversion takes in each factor in the tensor product from left to right. Q_k(quad) gets decomposed into CG_k(int) x CG_k(int) and the cache is used here, but the decomposition of the quad element is not referenced anywhere else in the hexahedral element, thus the cache is erased. For the next factor of the 3D element, CG_k(int), we have to call the constructor again.
I get the desired single call by doing _cache = {}
in place of
https://github.com/firedrakeproject/tsfc/blob/b9158b262db6324afda1adbaf7dee3ec637d2686/tsfc/finatinterface.py#L273