Added once option to neigh_modify
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@2594 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -70,6 +70,7 @@ Neighbor::Neighbor(LAMMPS *lmp) : Pointers(lmp)
|
|||||||
pgsize = 100000;
|
pgsize = 100000;
|
||||||
oneatom = 2000;
|
oneatom = 2000;
|
||||||
binsizeflag = 0;
|
binsizeflag = 0;
|
||||||
|
build_once = 0;
|
||||||
|
|
||||||
cutneighsq = NULL;
|
cutneighsq = NULL;
|
||||||
cuttype = NULL;
|
cuttype = NULL;
|
||||||
@ -967,6 +968,9 @@ void Neighbor::print_lists_of_lists()
|
|||||||
|
|
||||||
int Neighbor::decide()
|
int Neighbor::decide()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
if (build_once) return 0;
|
||||||
|
|
||||||
if (must_check) {
|
if (must_check) {
|
||||||
int n = update->ntimestep;
|
int n = update->ntimestep;
|
||||||
if (restart_check && n == output->next_restart) return 1;
|
if (restart_check && n == output->next_restart) return 1;
|
||||||
@ -1345,6 +1349,12 @@ void Neighbor::modify_params(int narg, char **arg)
|
|||||||
else if (strcmp(arg[iarg+1],"no") == 0) dist_check = 0;
|
else if (strcmp(arg[iarg+1],"no") == 0) dist_check = 0;
|
||||||
else error->all("Illegal neigh_modify command");
|
else error->all("Illegal neigh_modify command");
|
||||||
iarg += 2;
|
iarg += 2;
|
||||||
|
} else if (strcmp(arg[iarg],"once") == 0) {
|
||||||
|
if (iarg+2 > narg) error->all("Illegal neigh_modify command");
|
||||||
|
if (strcmp(arg[iarg+1],"yes") == 0) build_once = 1;
|
||||||
|
else if (strcmp(arg[iarg+1],"no") == 0) build_once = 0;
|
||||||
|
else error->all("Illegal neigh_modify command");
|
||||||
|
iarg += 2;
|
||||||
} else if (strcmp(arg[iarg],"page") == 0) {
|
} else if (strcmp(arg[iarg],"page") == 0) {
|
||||||
if (iarg+2 > narg) error->all("Illegal neigh_modify command");
|
if (iarg+2 > narg) error->all("Illegal neigh_modify command");
|
||||||
pgsize = atoi(arg[iarg+1]);
|
pgsize = atoi(arg[iarg+1]);
|
||||||
|
|||||||
@ -78,6 +78,7 @@ class Neighbor : protected Pointers {
|
|||||||
int maxbond,maxangle,maxdihedral,maximproper; // size of bond lists
|
int maxbond,maxangle,maxdihedral,maximproper; // size of bond lists
|
||||||
|
|
||||||
int must_check; // 1 if must check other classes to reneigh
|
int must_check; // 1 if must check other classes to reneigh
|
||||||
|
int build_once; // 1 if never rebuild
|
||||||
int restart_check; // 1 if restart enabled, 0 if no
|
int restart_check; // 1 if restart enabled, 0 if no
|
||||||
int fix_check; // # of fixes that induce reneigh
|
int fix_check; // # of fixes that induce reneigh
|
||||||
int *fixchecklist; // which fixes to check
|
int *fixchecklist; // which fixes to check
|
||||||
|
|||||||
Reference in New Issue
Block a user