Also pass in the mesh when computing the magnitude.