added internal fix dummy command to enable more control of fix ordering
This commit is contained in:
@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user