forked from lijiext/lammps
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@2576 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
ae442e9cc8
commit
e102f446a8
|
@ -38,6 +38,10 @@ NeighRequest::NeighRequest(LAMMPS *lmp) : Pointers(lmp)
|
|||
respainner = respamiddle = respaouter = 0;
|
||||
half_from_full = 0;
|
||||
|
||||
// default is use newton_pair setting in force
|
||||
|
||||
newton = 0;
|
||||
|
||||
// default is every reneighboring
|
||||
|
||||
occasional = 0;
|
||||
|
@ -89,6 +93,7 @@ int NeighRequest::identical(NeighRequest *other)
|
|||
if (respaouter != other->respaouter) same = 0;
|
||||
if (half_from_full != other->half_from_full) same = 0;
|
||||
|
||||
if (newton != other->newton) same = 0;
|
||||
if (occasional != other->occasional) same = 0;
|
||||
if (dnum != other->dnum) same = 0;
|
||||
|
||||
|
@ -116,28 +121,11 @@ int NeighRequest::same_kind(NeighRequest *other)
|
|||
if (respamiddle != other->respamiddle) same = 0;
|
||||
if (respaouter != other->respaouter) same = 0;
|
||||
if (half_from_full != other->half_from_full) same = 0;
|
||||
if (newton != other->newton) same = 0;
|
||||
|
||||
return same;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
set kind value of this request to that of other request
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void NeighRequest::copy_kind(NeighRequest *other)
|
||||
{
|
||||
half = 0;
|
||||
|
||||
if (other->half) half = 1;
|
||||
if (other->full) full = 1;
|
||||
if (other->gran) gran = 1;
|
||||
if (other->granhistory) granhistory = 1;
|
||||
if (other->respainner) respainner = 1;
|
||||
if (other->respamiddle) respamiddle = 1;
|
||||
if (other->respaouter) respaouter = 1;
|
||||
if (other->half_from_full) half_from_full = 1;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
compare skip attributes of this request to other request
|
||||
return 1 if same, 0 if different
|
||||
|
@ -162,3 +150,23 @@ int NeighRequest::same_skip(NeighRequest *other)
|
|||
return same;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
set kind and other values of this request to that of other request
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void NeighRequest::copy_request(NeighRequest *other)
|
||||
{
|
||||
half = 0;
|
||||
|
||||
if (other->half) half = 1;
|
||||
if (other->full) full = 1;
|
||||
if (other->gran) gran = 1;
|
||||
if (other->granhistory) granhistory = 1;
|
||||
if (other->respainner) respainner = 1;
|
||||
if (other->respamiddle) respamiddle = 1;
|
||||
if (other->respaouter) respaouter = 1;
|
||||
if (other->half_from_full) half_from_full = 1;
|
||||
|
||||
newton = other->newton;
|
||||
dnum = other->dnum;
|
||||
}
|
||||
|
|
|
@ -52,6 +52,12 @@ class NeighRequest : protected Pointers {
|
|||
|
||||
int occasional;
|
||||
|
||||
// 0 if use force::newton_pair setting
|
||||
// 1 if override with pair newton on
|
||||
// 2 if override with pair newton off
|
||||
|
||||
int newton;
|
||||
|
||||
// number of auxiliary floating point values to store, 0 if none
|
||||
// set by requesting class
|
||||
|
||||
|
@ -74,8 +80,8 @@ class NeighRequest : protected Pointers {
|
|||
~NeighRequest();
|
||||
int identical(NeighRequest *);
|
||||
int same_kind(NeighRequest *);
|
||||
void copy_kind(NeighRequest *);
|
||||
int same_skip(NeighRequest *);
|
||||
void copy_request(NeighRequest *);
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue