mirror of https://github.com/lammps/lammps.git
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@3374 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
df2c612dce
commit
ac5efc97ad
|
@ -111,6 +111,7 @@ void FixWallColloid::init()
|
|||
error->all("Fix wall/colloid cannot be used with atom attribute diameter");
|
||||
|
||||
// insure all particle shapes are spherical
|
||||
// can be polydisperse
|
||||
|
||||
for (int i = 1; i <= atom->ntypes; i++)
|
||||
if ((atom->shape[i][0] != atom->shape[i][1]) ||
|
||||
|
@ -118,6 +119,22 @@ void FixWallColloid::init()
|
|||
(atom->shape[i][1] != atom->shape[i][2]))
|
||||
error->all("Fix wall/colloid requires spherical particles");
|
||||
|
||||
// insure all particles in group are finite-size
|
||||
|
||||
double **shape = atom->shape;
|
||||
int *type = atom->type;
|
||||
int *mask = atom->mask;
|
||||
int nlocal = atom->nlocal;
|
||||
|
||||
int flag = 0;
|
||||
for (int i = 0; i < nlocal; i++)
|
||||
if (mask[i] & groupbit)
|
||||
if (atom->shape[type[i]][0] == 0.0) flag = 1;
|
||||
|
||||
int flagall;
|
||||
MPI_Allreduce(&flag,&flagall,1,MPI_INT,MPI_SUM,world);
|
||||
if (flagall) error->all("Fix wall/colloid requires finite-size particles");
|
||||
|
||||
if (strcmp(update->integrate_style,"respa") == 0)
|
||||
nlevels_respa = ((Respa *) update->integrate)->nlevels;
|
||||
}
|
||||
|
|
|
@ -87,6 +87,7 @@ void PairLubricate::compute(int eflag, int vflag)
|
|||
double **omega = atom->omega;
|
||||
double **angmom = atom->angmom;
|
||||
double **torque = atom->torque;
|
||||
double **shape = atom->shape;
|
||||
int *type = atom->type;
|
||||
int nlocal = atom->nlocal;
|
||||
int newton_pair = force->newton_pair;
|
||||
|
@ -110,7 +111,7 @@ void PairLubricate::compute(int eflag, int vflag)
|
|||
ytmp = x[i][1];
|
||||
ztmp = x[i][2];
|
||||
itype = type[i];
|
||||
radi = atom->shape[itype][0];
|
||||
radi = shape[itype][0];
|
||||
jlist = firstneigh[i];
|
||||
jnum = numneigh[i];
|
||||
|
||||
|
@ -403,12 +404,13 @@ void PairLubricate::init_style()
|
|||
else error->all("Pair lubricate requires atom attribute omega or angmom");
|
||||
|
||||
// insure all particle shapes are finite-size, spherical, and monodisperse
|
||||
// for pair hybrid, should limit test to types using the pair style
|
||||
|
||||
double value = atom->shape[1][0];
|
||||
if (value == 0.0) error->all("Pair lubricate requires extended particles");
|
||||
double radi = atom->shape[1][0];
|
||||
if (radi == 0.0) error->all("Pair lubricate requires extended particles");
|
||||
for (int i = 1; i <= atom->ntypes; i++)
|
||||
if (atom->shape[i][0] != value || atom->shape[i][0] != value ||
|
||||
atom->shape[i][0] != value)
|
||||
if (atom->shape[i][0] != radi || atom->shape[i][0] != radi ||
|
||||
atom->shape[i][0] != radi)
|
||||
error->all("Pair lubricate requires spherical, mono-disperse particles");
|
||||
|
||||
int irequest = neighbor->request(this);
|
||||
|
|
|
@ -133,6 +133,7 @@ void PairYukawaColloid::init_style()
|
|||
"atom attribute diameter");
|
||||
|
||||
// insure all particle shapes are spherical
|
||||
// can be point particles or polydisperse
|
||||
|
||||
for (int i = 1; i <= atom->ntypes; i++)
|
||||
if ((atom->shape[i][0] != atom->shape[i][1]) ||
|
||||
|
@ -140,9 +141,6 @@ void PairYukawaColloid::init_style()
|
|||
(atom->shape[i][1] != atom->shape[i][2]))
|
||||
error->all("Pair yukawa/colloid requires spherical particles");
|
||||
|
||||
if (force->newton_pair != 1)
|
||||
error->all("Pair lubricate requires newton_pair on");
|
||||
|
||||
int irequest = neighbor->request(this);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue