Example #1
0
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)
Example #2
0
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)