added function for assembling local mass matrix.