def safe_action(x, y): x = expand_derivatives(x) if x.integrals() == (): return x # form is empty, return anyway else: return ufl_action(x, y)
def safe_action(x, y): x = ufl.algorithms.expand_derivatives(x) if x.integrals() == (): return x # form is empty, return anyway else: return ufl_action(x, y)