added internal fix dummy command to enable more control of fix ordering

This commit is contained in:
Steve Plimpton
2019-11-05 12:57:34 -07:00
parent cf251eb8be
commit d8ef5f6991
17 changed files with 253 additions and 32 deletions

View File

@ -19,6 +19,7 @@
#include "comm.h"
#include "neighbor.h"
#include "neigh_list.h"
#include "modify.h"
#include "force.h"
#include "pair.h"
#include "memory.h"
@ -147,6 +148,19 @@ void FixNeighHistory::init()
if (atom->tag_enable == 0)
error->all(FLERR,"Neighbor history requires atoms have IDs");
// this fix must come before any fix which migrates atoms in its pre_exchange()
// b/c this fix's pre_exchange() creates per-atom data structure
// that data must be current for atom migration to carry it along
for (int i = 0; i < modify->nfix; i++) {
if (modify->fix[i] == this) break;
if (modify->fix[i]->pre_exchange_migrate)
error->all(FLERR,"Fix neigh_history comes after a fix which "
"migrates atoms in pre_exchange");
}
// setup data struct
allocate_pages();
}