As I understand mass lumping is supposed to work like this:
lm = assemble(action(p*q*dx, Constant(1)))
For linear Lagrange elements this should give a vector lm with a the elements of a lumped mass matrix. However, I get
Invalid number of indices (1) for tensor expression of rank 0:
Coefficient(FiniteElement('Real', None, 0, quad_scheme=None), 60)
FAILURE in reuse_if_possible:
type(o) = <class 'ufl.indexed.Indexed'>
operands =
f_60
2
stack =
////////////////////////////////////////////////////////////////////////////////
Visit stack in Transformer:
<class 'ufl.algebra.Product'> ; ((v_0)[2]) * ((v_1)[2])
<class 'ufl.indexed.Indexed'> ; (v_1)[2]
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
Any idea what I am doing wrong here?