Rewrite the collection function for PETScVector