There is a difference between tensor rank and form rank. You are printing
the tensor ranks. The form rank would be number of Arguments.
So, in your example:
The first term on the right-hand side has form rank 2 (there is a TestFunction
and a TrialFunction involved) while the other has form rank 1 (just a TestFunction).
DOLFIN can only assemble (and FFC only generate code for) forms
in which all terms have the same (form) rank.
In short, you can't add a matrix and vector together.
There is a difference between tensor rank and form rank. You are printing
the tensor ranks. The form rank would be number of Arguments.
So, in your example:
(grad(u) + Delta) * grad(v) = grad(u)*grad(v) + Delta*grad(v)
The first term on the right-hand side has form rank 2 (there is a TestFunction
and a TrialFunction involved) while the other has form rank 1 (just a TestFunction).
DOLFIN can only assemble (and FFC only generate code for) forms
in which all terms have the same (form) rank.
In short, you can't add a matrix and vector together.