Initial version of lammps halfneighbor list
This commit is contained in:
parent
ba3a0524f6
commit
c2fcd50773
@ -132,7 +132,7 @@ double computeForceLJHalfNeigh(Parameter *param, Atom *atom, Neighbor *neighbor,
|
||||
|
||||
for(int i = 0; i < Nlocal; i++) {
|
||||
neighs = &neighbor->neighbors[i * neighbor->maxneighs];
|
||||
int numneighs = neighbor.numneigh[i];
|
||||
int numneighs = neighbor->numneigh[i];
|
||||
MD_FLOAT xtmp = atom_x(i);
|
||||
MD_FLOAT ytmp = atom_y(i);
|
||||
MD_FLOAT ztmp = atom_z(i);
|
||||
|
@ -31,6 +31,7 @@ typedef struct {
|
||||
int* neighbors;
|
||||
int maxneighs;
|
||||
int* numneigh;
|
||||
int halfneigh;
|
||||
} Neighbor;
|
||||
|
||||
extern void initNeighbor(Neighbor*, Parameter*);
|
||||
|
@ -72,7 +72,7 @@ void init(Parameter *param)
|
||||
param->dtforce = 0.5 * param->dt;
|
||||
param->every = 20;
|
||||
param->proc_freq = 2.4;
|
||||
param->halfneigh = 0;
|
||||
param->halfneigh = 1;
|
||||
}
|
||||
|
||||
double setup(
|
||||
|
@ -232,7 +232,7 @@ void buildNeighbor(Atom *atom, Neighbor *neighbor)
|
||||
for(int m = 0; m < bincount[jbin]; m++) {
|
||||
int j = loc_bin[m];
|
||||
|
||||
if ( j == i ){
|
||||
if ( (j == i) || (neighbor->halfneigh && (j < i))) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user