git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@9206 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp 2013-01-03 17:17:45 +00:00
parent 0147edb8ea
commit da49b01f76
7 changed files with 22 additions and 2 deletions

View File

@ -420,8 +420,8 @@ void Atom::modify_params(int narg, char **arg)
iarg += 2; iarg += 2;
} else if (strcmp(arg[iarg],"sort") == 0) { } else if (strcmp(arg[iarg],"sort") == 0) {
if (iarg+3 > narg) error->all(FLERR,"Illegal atom_modify command"); if (iarg+3 > narg) error->all(FLERR,"Illegal atom_modify command");
sortfreq = atoi(arg[iarg+1]); sortfreq = force->inumeric(arg[iarg+1]);
userbinsize = atof(arg[iarg+2]); userbinsize = force->numeric(arg[iarg+2]);
if (sortfreq < 0 || userbinsize < 0.0) if (sortfreq < 0 || userbinsize < 0.0)
error->all(FLERR,"Illegal atom_modify command"); error->all(FLERR,"Illegal atom_modify command");
if (sortfreq >= 0 && firstgroupname) if (sortfreq >= 0 && firstgroupname)

View File

@ -89,6 +89,7 @@ class Fix : protected Pointers {
virtual void init_list(int, class NeighList *) {} virtual void init_list(int, class NeighList *) {}
virtual void setup(int) {} virtual void setup(int) {}
virtual void setup_pre_exchange() {} virtual void setup_pre_exchange() {}
virtual void setup_pre_neighbor() {}
virtual void setup_pre_force(int) {} virtual void setup_pre_force(int) {}
virtual void min_setup(int) {} virtual void min_setup(int) {}
virtual void initial_integrate(int) {} virtual void initial_integrate(int) {}

View File

@ -235,6 +235,7 @@ void Min::setup()
comm->borders(); comm->borders();
if (triclinic) domain->lamda2x(atom->nlocal+atom->nghost); if (triclinic) domain->lamda2x(atom->nlocal+atom->nghost);
domain->box_too_small_check(); domain->box_too_small_check();
modify->setup_pre_neighbor();
neighbor->build(); neighbor->build();
neighbor->ncalls = 0; neighbor->ncalls = 0;
@ -321,6 +322,7 @@ void Min::setup_minimal(int flag)
comm->borders(); comm->borders();
if (triclinic) domain->lamda2x(atom->nlocal+atom->nghost); if (triclinic) domain->lamda2x(atom->nlocal+atom->nghost);
domain->box_too_small_check(); domain->box_too_small_check();
modify->setup_pre_neighbor();
neighbor->build(); neighbor->build();
neighbor->ncalls = 0; neighbor->ncalls = 0;
} }

View File

@ -245,6 +245,18 @@ void Modify::setup_pre_exchange()
fix[list_min_pre_exchange[i]]->min_setup_pre_exchange(); fix[list_min_pre_exchange[i]]->min_setup_pre_exchange();
} }
/* ----------------------------------------------------------------------
setup pre_neighbor call, only for fixes that define pre_neighbor
called from Verlet, RESPA
------------------------------------------------------------------------- */
void Modify::setup_pre_neighbor()
{
if (update->whichflag == 1)
for (int i = 0; i < n_pre_neighbor; i++)
fix[list_pre_neighbor[i]]->setup_pre_neighbor();
}
/* ---------------------------------------------------------------------- /* ----------------------------------------------------------------------
setup pre_force call, only for fixes that define pre_force setup pre_force call, only for fixes that define pre_force
called from Verlet, RESPA, Min called from Verlet, RESPA, Min

View File

@ -44,6 +44,7 @@ class Modify : protected Pointers {
virtual void init(); virtual void init();
virtual void setup(int); virtual void setup(int);
virtual void setup_pre_exchange(); virtual void setup_pre_exchange();
virtual void setup_pre_neighbor();
virtual void setup_pre_force(int); virtual void setup_pre_force(int);
virtual void initial_integrate(int); virtual void initial_integrate(int);
virtual void post_integrate(); virtual void post_integrate();

View File

@ -352,6 +352,7 @@ void Respa::setup()
comm->borders(); comm->borders();
if (triclinic) domain->lamda2x(atom->nlocal+atom->nghost); if (triclinic) domain->lamda2x(atom->nlocal+atom->nghost);
domain->box_too_small_check(); domain->box_too_small_check();
modify->setup_pre_neighbor();
neighbor->build(); neighbor->build();
neighbor->ncalls = 0; neighbor->ncalls = 0;
@ -417,6 +418,7 @@ void Respa::setup_minimal(int flag)
comm->borders(); comm->borders();
if (triclinic) domain->lamda2x(atom->nlocal+atom->nghost); if (triclinic) domain->lamda2x(atom->nlocal+atom->nghost);
domain->box_too_small_check(); domain->box_too_small_check();
modify->setup_pre_neighbor();
neighbor->build(); neighbor->build();
neighbor->ncalls = 0; neighbor->ncalls = 0;
} }

View File

@ -112,6 +112,7 @@ void Verlet::setup()
comm->borders(); comm->borders();
if (triclinic) domain->lamda2x(atom->nlocal+atom->nghost); if (triclinic) domain->lamda2x(atom->nlocal+atom->nghost);
domain->box_too_small_check(); domain->box_too_small_check();
modify->setup_pre_neighbor();
neighbor->build(); neighbor->build();
neighbor->ncalls = 0; neighbor->ncalls = 0;
@ -169,6 +170,7 @@ void Verlet::setup_minimal(int flag)
comm->borders(); comm->borders();
if (triclinic) domain->lamda2x(atom->nlocal+atom->nghost); if (triclinic) domain->lamda2x(atom->nlocal+atom->nghost);
domain->box_too_small_check(); domain->box_too_small_check();
modify->setup_pre_neighbor();
neighbor->build(); neighbor->build();
neighbor->ncalls = 0; neighbor->ncalls = 0;
} }