changing order of getNewVertex and omp_set_lock in the parallel code after a discharge operation, since it uses a shared variable as one of the parameters