BUG: +=
does not assign when combining multiple Cofunctions
#3182
Labels
+=
does not assign when combining multiple Cofunctions
#3182
Describe the bug
The
Cofunction.__iadd__
method is not usingassign
when the update consisits of a (weighted) sum ofCofunctions
. Instead it returns aFormSum
, as opposed to the same operation onFunctions
, where we numerically compute the linear combination and accumulate the result in the LHS.Steps to Reproduce
Expected behavior
+=
should be consistent withFunctions
andCofunctions
. As these are well defined vector spaces, we have closure of linear combinations. I would expect+=
to useassign
if I'm adding severalCofunctions
Error message
The text was updated successfully, but these errors were encountered: