Open
Description
Describe the current issue
I happened to be looking at this code I wrote years ago and noticed:
firedrake/firedrake/formmanipulation.py
Line 72 in c9af09f
This is the traversal antipattern discussed in FEniCS/ufl#35
In lieu of a proper fix in UFL to the visitor infrastructure, I think this could be addressed by passing in a cache as the optional argument to map_expr_dags
(as seen in FEniCS/ufl#69)