forked from lijiext/lammps
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@5425 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
16e92ca3e0
commit
952bfcafaa
|
@ -118,6 +118,7 @@ Neighbor::Neighbor(LAMMPS *lmp) : Pointers(lmp)
|
|||
requests = NULL;
|
||||
|
||||
old_style = BIN;
|
||||
old_triclinic = 0;
|
||||
old_nrequest = 0;
|
||||
old_requests = NULL;
|
||||
|
||||
|
@ -382,10 +383,12 @@ void Neighbor::init()
|
|||
|
||||
// test if pairwise lists need to be re-created
|
||||
// no need to re-create if:
|
||||
// neigh style has not changed and current requests = old requests
|
||||
// neigh style and triclinic has not changed and
|
||||
// current requests = old requests
|
||||
|
||||
int same = 1;
|
||||
if (style != old_style) same = 0;
|
||||
if (triclinic != old_triclinic) same = 0;
|
||||
if (nrequest != old_nrequest) same = 0;
|
||||
else
|
||||
for (i = 0; i < nrequest; i++)
|
||||
|
@ -629,6 +632,7 @@ void Neighbor::init()
|
|||
nrequest = maxrequest = 0;
|
||||
requests = NULL;
|
||||
old_style = style;
|
||||
old_triclinic = triclinic;
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
// topology lists
|
||||
|
|
|
@ -43,6 +43,7 @@ class Neighbor : protected Pointers {
|
|||
|
||||
int old_style; // previous run info to avoid
|
||||
int old_nrequest; // re-creation of pairwise neighbor lists
|
||||
int old_triclinic;
|
||||
class NeighRequest **old_requests;
|
||||
|
||||
int nlist; // pairwise neighbor lists
|
||||
|
|
Loading…
Reference in New Issue