From 8481e06c751b46ce9fc0479507efcf734bb9a5ab Mon Sep 17 00:00:00 2001 From: sjplimp Date: Tue, 21 Jan 2014 15:11:12 +0000 Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@11277 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/respa.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/respa.cpp b/src/respa.cpp index 36cfb36de9..3d0e71a7a5 100644 --- a/src/respa.cpp +++ b/src/respa.cpp @@ -516,8 +516,6 @@ void Respa::recurse(int ilevel) if (modify->n_post_integrate_respa) modify->post_integrate_respa(ilevel,iloop); - if (ilevel) recurse(ilevel-1); - // at outermost level, check on rebuilding neighbor list // at innermost level, communicate // at middle levels, do nothing @@ -555,6 +553,14 @@ void Respa::recurse(int ilevel) timer->stamp(TIME_COMM); } + // rRESPA recursion thru all levels + // this used to be before neigh list build, + // which prevented per-atom energy/stress being tallied correctly + // b/c atoms migrated to new procs between short/long force calls + // now they migrate at very start of rRESPA timestep, before all forces + + if (ilevel) recurse(ilevel-1); + // force computations // important that ordering is same as Verlet // so that any order dependencies are the same