# Mass matrix lumping

Dear all,

I have been looking in the documentation but I haven't seen it mentioned a single time so I was wondering: is it possible to ask FEniCS to lump the mass matrix?

Vincent

This is not possible in the form language. But you can assemble the action of a matrix and get a vector. Then you use this to set the diagonal of the matrix.

mass_form = v*u*dx()
mass_action_form = action(mass_form, Constant(1))
M_lumped = assemble(mass_form)
M_lumped.zero()
M_lumped.set_diagonal(assemble(mass_action_form))

answered Aug 4, 2014 by FEniCS Expert (22,480 points)
selected Aug 5, 2014 by V_L