From cc2106397af7f2cd3f3f07d12091350d7cb2f01e Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Wed, 22 Mar 2023 10:18:50 -0600 Subject: [PATCH] fix ids once bug in compute chunk/atom --- src/compute_chunk_atom.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/compute_chunk_atom.cpp b/src/compute_chunk_atom.cpp index f5c68c8f25..fc70a3246f 100644 --- a/src/compute_chunk_atom.cpp +++ b/src/compute_chunk_atom.cpp @@ -691,9 +691,10 @@ void ComputeChunkAtom::compute_ichunk() if (invoked_ichunk == update->ntimestep) return; // if old IDs persist via storage in fixstore, then just retrieve them - // yes if idsflag = ONCE, and already done once + // restore = yes if idsflag = ONCE, and already done once // or if idsflag = NFREQ and lock is in place and are on later timestep // else proceed to recalculate per-atom chunk assignments + // if restoring, update invoked_ichunk only for NFREQ case const int nlocal = atom->nlocal; int restore = 0; @@ -701,7 +702,7 @@ void ComputeChunkAtom::compute_ichunk() if (idsflag == NFREQ && lockfix && update->ntimestep > lockstart) restore = 1; if (restore) { - invoked_ichunk = update->ntimestep; + if (idsflag == NFREQ) invoked_ichunk = update->ntimestep; double *vstore = fixstore->vstore; for (i = 0; i < nlocal; i++) ichunk[i] = static_cast(vstore[i]); return;