neighbor list bugfix to prevent cycle in copy lists

This commit is contained in:
Steve Plimpton
2017-05-09 08:55:18 -06:00
parent c4f90b3841
commit 08ec55743e
4 changed files with 24 additions and 20 deletions

View File

@ -1224,10 +1224,13 @@ void Neighbor::morph_copy()
if (jrq->copy && jrq->copylist == i) continue;
// parent list must be perpetual
// copied list can be perpetual or occasional
// other list (jrq) to copy from must be perpetual
// list that becomes a copy list (irq) can be perpetual or occasional
// if both lists are perpetual, require j < i
// to prevent circular dependence with 3 or more copies of a list
if (jrq->occasional) continue;
if (!irq->occasional && j > i) continue;
// both lists must be half, or both full