From eb806959febf0d89f3164c5cd69a0c99d1d51d33 Mon Sep 17 00:00:00 2001 From: Dominic Kempf <dominic.r.kempf@gmail.com> Date: Fri, 28 Aug 2015 19:03:02 +0200 Subject: [PATCH] UFL classes are already immutable. Directly return them. --- python/dune/perftool/preambles.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/python/dune/perftool/preambles.py b/python/dune/perftool/preambles.py index 1c9008b0..7a4dfea0 100644 --- a/python/dune/perftool/preambles.py +++ b/python/dune/perftool/preambles.py @@ -50,6 +50,10 @@ def generate_cache_tuple(*args): if isinstance(data, str): return data + import ufl.classes + if isinstance(data, ufl.classes.Expr): + return data + # Check if the given data is already hashable if isinstance(data, Hashable): if isinstance(data, Iterable): -- GitLab