git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@622 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -39,23 +39,6 @@ AtomVecDPD::AtomVecDPD(LAMMPS *lmp, int narg, char **arg) :
|
||||
xcol_data = 3;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
zero auxiliary data for n ghost atoms
|
||||
data in border(), not including x,tag,type,mask
|
||||
grow() is here since zero_ghost called first in hybrid::unpack_border()
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void AtomVecDPD::zero_ghost(int n, int first)
|
||||
{
|
||||
int last = first + n;
|
||||
for (int i = first; i < last; i++) {
|
||||
if (i == nmax) atom->avec->grow(0);
|
||||
v[i][0] = 0.0;
|
||||
v[i][1] = 0.0;
|
||||
v[i][2] = 0.0;
|
||||
}
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
int AtomVecDPD::pack_comm(int n, int *list, double *buf,
|
||||
@ -225,4 +208,3 @@ int AtomVecDPD::unpack_border_one(int i, double *buf)
|
||||
v[i][2] = buf[2];
|
||||
return 3;
|
||||
}
|
||||
|
||||
|
||||
@ -147,21 +147,13 @@ void PairDPD::compute(int eflag, int vflag)
|
||||
}
|
||||
|
||||
if (vflag == 1) {
|
||||
if (newton_pair || j < nlocal) {
|
||||
virial[0] += delx*delx*fforce;
|
||||
virial[1] += dely*dely*fforce;
|
||||
virial[2] += delz*delz*fforce;
|
||||
virial[3] += delx*dely*fforce;
|
||||
virial[4] += delx*delz*fforce;
|
||||
virial[5] += dely*delz*fforce;
|
||||
} else {
|
||||
virial[0] += 0.5*delx*delx*fforce;
|
||||
virial[1] += 0.5*dely*dely*fforce;
|
||||
virial[2] += 0.5*delz*delz*fforce;
|
||||
virial[3] += 0.5*delx*dely*fforce;
|
||||
virial[4] += 0.5*delx*delz*fforce;
|
||||
virial[5] += 0.5*dely*delz*fforce;
|
||||
}
|
||||
if (newton_pair == 0 && j >= nlocal) fforce *= 0.5;
|
||||
virial[0] += delx*delx*fforce;
|
||||
virial[1] += dely*dely*fforce;
|
||||
virial[2] += delz*delz*fforce;
|
||||
virial[3] += delx*dely*fforce;
|
||||
virial[4] += delx*delz*fforce;
|
||||
virial[5] += dely*delz*fforce;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -277,14 +269,14 @@ double PairDPD::init_one(int i, int j)
|
||||
|
||||
void PairDPD::init_style()
|
||||
{
|
||||
// check that atom style is dpd
|
||||
// check that atom style is dpd or hybrid with dpd
|
||||
// else compute() will not have ghost atom velocities
|
||||
|
||||
if (atom->check_style("dpd") == 0)
|
||||
error->all("Must use atom style dpd with pair style dpd");
|
||||
if (atom->style_match("dpd") == 0)
|
||||
error->all("Pair style dpd requires atom style dpd");
|
||||
|
||||
// if newton off, forces between atoms ij will be double computed
|
||||
// using different random numbers
|
||||
// using different random numbers
|
||||
|
||||
if (force->newton_pair == 0 && comm->me == 0) error->warning(
|
||||
"DPD potential needs newton pair on for momentum conservation");
|
||||
|
||||
Reference in New Issue
Block a user