forked from lijiext/lammps
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@2598 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
17411d1369
commit
227a7b67a7
|
@ -238,6 +238,7 @@ void Neighbor::init()
|
||||||
cutneighmaxsq = cutneighmax * cutneighmax;
|
cutneighmaxsq = cutneighmax * cutneighmax;
|
||||||
|
|
||||||
// check other classes that can induce reneighboring in decide()
|
// check other classes that can induce reneighboring in decide()
|
||||||
|
// don't check if build_once is set
|
||||||
|
|
||||||
restart_check = 0;
|
restart_check = 0;
|
||||||
if (output->restart_every) restart_check = 1;
|
if (output->restart_every) restart_check = 1;
|
||||||
|
@ -253,6 +254,7 @@ void Neighbor::init()
|
||||||
|
|
||||||
must_check = 0;
|
must_check = 0;
|
||||||
if (restart_check || fix_check) must_check = 1;
|
if (restart_check || fix_check) must_check = 1;
|
||||||
|
if (build_once) must_check = 0;
|
||||||
|
|
||||||
// set special_flag for 1-2, 1-3, 1-4 neighbors
|
// set special_flag for 1-2, 1-3, 1-4 neighbors
|
||||||
// flag[0] is not used, flag[1] = 1-2, flag[2] = 1-3, flag[3] = 1-4
|
// flag[0] is not used, flag[1] = 1-2, flag[2] = 1-3, flag[3] = 1-4
|
||||||
|
@ -968,9 +970,6 @@ 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;
|
||||||
|
@ -980,8 +979,9 @@ int Neighbor::decide()
|
||||||
|
|
||||||
ago++;
|
ago++;
|
||||||
if (ago >= delay && ago % every == 0) {
|
if (ago >= delay && ago % every == 0) {
|
||||||
|
if (build_once) return 0;
|
||||||
if (dist_check == 0) return 1;
|
if (dist_check == 0) return 1;
|
||||||
else return check_distance();
|
return check_distance();
|
||||||
} else return 0;
|
} else return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -77,8 +77,8 @@ class Neighbor : protected Pointers {
|
||||||
int maxlocal; // size of atom-based NeighList arrays
|
int maxlocal; // size of atom-based NeighList arrays
|
||||||
int maxbond,maxangle,maxdihedral,maximproper; // size of bond lists
|
int maxbond,maxangle,maxdihedral,maximproper; // size of bond lists
|
||||||
|
|
||||||
|
int build_once; // 1 if only build lists once per run
|
||||||
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
|
||||||
|
|
Loading…
Reference in New Issue