This PR fixes the rule for simplifying the sum of a BaseForm with a ufl.constantvalue.Zero. The rule used to be that any Zero that is added to a BaseForm is dismissed if that zero is scalar and doesn't have free indices. This logic, inherited from ufl.Expr objects, doesn't apply to BaseForm objects and should be removed.
This PR fixes the rule for simplifying the sum of a
BaseForm
with aufl.constantvalue.Zero
. The rule used to be that anyZero
that is added to aBaseForm
is dismissed if that zero is scalar and doesn't have free indices. This logic, inherited fromufl.Expr
objects, doesn't apply toBaseForm
objects and should be removed.