removed unnecessary clear() when calling set_mesh