git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@8216 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -49,6 +49,10 @@ FixWallGran::FixWallGran(LAMMPS *lmp, int narg, char **arg) :
|
|||||||
if (!atom->sphere_flag)
|
if (!atom->sphere_flag)
|
||||||
error->all(FLERR,"Fix wall/gran requires atom style sphere");
|
error->all(FLERR,"Fix wall/gran requires atom style sphere");
|
||||||
|
|
||||||
|
// set time_depend so that history will be preserved correctly
|
||||||
|
// across multiple runs via laststep setting in granular pair styles
|
||||||
|
// same as fix shear/history
|
||||||
|
|
||||||
restart_peratom = 1;
|
restart_peratom = 1;
|
||||||
create_attribute = 1;
|
create_attribute = 1;
|
||||||
time_depend = 1;
|
time_depend = 1;
|
||||||
@ -150,7 +154,8 @@ FixWallGran::FixWallGran(LAMMPS *lmp, int narg, char **arg) :
|
|||||||
if (wallstyle == ZCYLINDER && (domain->xperiodic || domain->yperiodic))
|
if (wallstyle == ZCYLINDER && (domain->xperiodic || domain->yperiodic))
|
||||||
error->all(FLERR,"Cannot use wall in periodic dimension");
|
error->all(FLERR,"Cannot use wall in periodic dimension");
|
||||||
|
|
||||||
if (wiggle && wshear) error->all(FLERR,"Cannot wiggle and shear fix wall/gran");
|
if (wiggle && wshear)
|
||||||
|
error->all(FLERR,"Cannot wiggle and shear fix wall/gran");
|
||||||
if (wiggle && wallstyle == ZCYLINDER && axis != 2)
|
if (wiggle && wallstyle == ZCYLINDER && axis != 2)
|
||||||
error->all(FLERR,"Invalid wiggle direction for fix wall/gran");
|
error->all(FLERR,"Invalid wiggle direction for fix wall/gran");
|
||||||
if (wshear && wallstyle == XPLANE && axis == 0)
|
if (wshear && wallstyle == XPLANE && axis == 0)
|
||||||
|
|||||||
@ -68,7 +68,8 @@ FixGCMC::FixGCMC(LAMMPS *lmp, int narg, char **arg) :
|
|||||||
if (nexchanges < 0) error->all(FLERR,"Illegal fix GCMC command");
|
if (nexchanges < 0) error->all(FLERR,"Illegal fix GCMC command");
|
||||||
if (nmcmoves < 0) error->all(FLERR,"Illegal fix GCMC command");
|
if (nmcmoves < 0) error->all(FLERR,"Illegal fix GCMC command");
|
||||||
if (seed <= 0) error->all(FLERR,"Illegal fix GCMC command");
|
if (seed <= 0) error->all(FLERR,"Illegal fix GCMC command");
|
||||||
if (reservoir_temperature < 0.0) error->all(FLERR,"Illegal fix GCMC command");
|
if (reservoir_temperature < 0.0)
|
||||||
|
error->all(FLERR,"Illegal fix GCMC command");
|
||||||
if (displace < 0.0) error->all(FLERR,"Illegal fix GCMC command");
|
if (displace < 0.0) error->all(FLERR,"Illegal fix GCMC command");
|
||||||
|
|
||||||
// compute beta, lambda, sigma, and the zz factor
|
// compute beta, lambda, sigma, and the zz factor
|
||||||
@ -175,13 +176,16 @@ void FixGCMC::init()
|
|||||||
int flagall;
|
int flagall;
|
||||||
MPI_Allreduce(&flag,&flagall,1,MPI_INT,MPI_SUM,world);
|
MPI_Allreduce(&flag,&flagall,1,MPI_INT,MPI_SUM,world);
|
||||||
if (flagall && comm->me == 0)
|
if (flagall && comm->me == 0)
|
||||||
error->warning(FLERR,"Fix GCMC may delete atom with non-zero molecule ID");
|
error->warning(FLERR,
|
||||||
|
"Fix GCMC may delete atom with non-zero molecule ID");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (molflag && atom->molecule_flag == 0)
|
if (molflag && atom->molecule_flag == 0)
|
||||||
error->all(FLERR,"Fix GCMC molecule command requires atom attribute molecule");
|
error->all(FLERR,
|
||||||
|
"Fix GCMC molecule command requires atom attribute molecule");
|
||||||
|
|
||||||
if (molflag != 0) error->all(FLERR,"Fix GCMC molecule feature does not yet work");
|
if (molflag != 0)
|
||||||
|
error->all(FLERR,"Fix GCMC molecule feature does not yet work");
|
||||||
|
|
||||||
if (force->pair->single_enable == 0)
|
if (force->pair->single_enable == 0)
|
||||||
error->all(FLERR,"Fix GCMC incompatible with given pair_style");
|
error->all(FLERR,"Fix GCMC incompatible with given pair_style");
|
||||||
@ -303,7 +307,6 @@ void FixGCMC::attempt_move()
|
|||||||
nmove_successes += 1.0;
|
nmove_successes += 1.0;
|
||||||
comm->borders();
|
comm->borders();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
|
|||||||
@ -216,9 +216,7 @@ int FixAppendAtoms::setmask()
|
|||||||
|
|
||||||
void FixAppendAtoms::initial_integrate(int vflag)
|
void FixAppendAtoms::initial_integrate(int vflag)
|
||||||
{
|
{
|
||||||
if (update->ntimestep % freq == 0) {
|
if (update->ntimestep % freq == 0) next_reneighbor = update->ntimestep;
|
||||||
next_reneighbor = update->ntimestep;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|||||||
@ -38,7 +38,6 @@ FixWallPiston::FixWallPiston(LAMMPS *lmp, int narg, char **arg) :
|
|||||||
force_reneighbor = 1;
|
force_reneighbor = 1;
|
||||||
next_reneighbor = -1;
|
next_reneighbor = -1;
|
||||||
box_change = 1;
|
box_change = 1;
|
||||||
time_depend = 1;
|
|
||||||
|
|
||||||
if (narg < 4) error->all(FLERR,"Illegal fix wall/piston command");
|
if (narg < 4) error->all(FLERR,"Illegal fix wall/piston command");
|
||||||
|
|
||||||
@ -54,19 +53,25 @@ FixWallPiston::FixWallPiston(LAMMPS *lmp, int narg, char **arg) :
|
|||||||
rampNL5flag = 0;
|
rampNL5flag = 0;
|
||||||
x0 = y0 = z0 = vx = vy = vz = 0.0;
|
x0 = y0 = z0 = vx = vy = vz = 0.0;
|
||||||
xloflag = xhiflag = yloflag = yhiflag = zloflag = zhiflag = 0;
|
xloflag = xhiflag = yloflag = yhiflag = zloflag = zhiflag = 0;
|
||||||
int iarg = 0;
|
|
||||||
iarg = 3;
|
int iarg = 3;
|
||||||
while (iarg < narg) {
|
while (iarg < narg) {
|
||||||
if (strcmp(arg[iarg],"xlo") == 0) { error->all(FLERR,"Fix wall/piston command only available at zlo");
|
if (strcmp(arg[iarg],"xlo") == 0)
|
||||||
} else if (strcmp(arg[iarg],"ylo") == 0) { error->all(FLERR,"Fix wall/piston command only available at zlo");
|
error->all(FLERR,"Fix wall/piston command only available at zlo");
|
||||||
} else if (strcmp(arg[iarg],"zlo") == 0) {
|
else if (strcmp(arg[iarg],"ylo") == 0)
|
||||||
|
error->all(FLERR,"Fix wall/piston command only available at zlo");
|
||||||
|
else if (strcmp(arg[iarg],"zlo") == 0) {
|
||||||
zloflag = 1;
|
zloflag = 1;
|
||||||
iarg++;
|
iarg++;
|
||||||
if (domain->boundary[2][0] != 2) error->all(FLERR,"Must shrink-wrap piston boundary");
|
if (domain->boundary[2][0] != 2)
|
||||||
} else if (strcmp(arg[iarg],"xhi") == 0) { error->all(FLERR,"Fix wall/piston command only available at zlo");
|
error->all(FLERR,"Must shrink-wrap piston boundary");
|
||||||
} else if (strcmp(arg[iarg],"yhi") == 0) { error->all(FLERR,"Fix wall/piston command only available at zlo");
|
} else if (strcmp(arg[iarg],"xhi") == 0)
|
||||||
} else if (strcmp(arg[iarg],"zhi") == 0) { error->all(FLERR,"Fix wall/piston command only available at zlo");
|
error->all(FLERR,"Fix wall/piston command only available at zlo");
|
||||||
} else if (strcmp(arg[iarg],"vel") == 0) {
|
else if (strcmp(arg[iarg],"yhi") == 0)
|
||||||
|
error->all(FLERR,"Fix wall/piston command only available at zlo");
|
||||||
|
else if (strcmp(arg[iarg],"zhi") == 0)
|
||||||
|
error->all(FLERR,"Fix wall/piston command only available at zlo");
|
||||||
|
else if (strcmp(arg[iarg],"vel") == 0) {
|
||||||
if (iarg+4 > narg) error->all(FLERR,"Illegal fix wall/piston command");
|
if (iarg+4 > narg) error->all(FLERR,"Illegal fix wall/piston command");
|
||||||
vx = atof(arg[iarg+1]);
|
vx = atof(arg[iarg+1]);
|
||||||
vy = atof(arg[iarg+2]);
|
vy = atof(arg[iarg+2]);
|
||||||
@ -124,7 +129,8 @@ FixWallPiston::FixWallPiston(LAMMPS *lmp, int narg, char **arg) :
|
|||||||
} else error->all(FLERR,"Illegal fix wall/piston command");
|
} else error->all(FLERR,"Illegal fix wall/piston command");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (vx < 0.0 || vy < 0.0 || vz < 0.0) error->all(FLERR,"Illegal fix wall/piston velocity");
|
if (vx < 0.0 || vy < 0.0 || vz < 0.0)
|
||||||
|
error->all(FLERR,"Illegal fix wall/piston velocity");
|
||||||
if ((xloflag || xhiflag) && domain->xperiodic)
|
if ((xloflag || xhiflag) && domain->xperiodic)
|
||||||
error->all(FLERR,"Cannot use wall in periodic dimension");
|
error->all(FLERR,"Cannot use wall in periodic dimension");
|
||||||
if ((yloflag || yhiflag) && domain->yperiodic)
|
if ((yloflag || yhiflag) && domain->yperiodic)
|
||||||
@ -153,7 +159,8 @@ FixWallPiston::FixWallPiston(LAMMPS *lmp, int narg, char **arg) :
|
|||||||
z0 *= zscale;
|
z0 *= zscale;
|
||||||
roughdist *= zscale;
|
roughdist *= zscale;
|
||||||
|
|
||||||
if (rampflag || rampNL1flag || rampNL2flag || rampNL3flag || rampNL4flag || rampNL5flag) {
|
if (rampflag || rampNL1flag || rampNL2flag || rampNL3flag ||
|
||||||
|
rampNL4flag || rampNL5flag) {
|
||||||
maxvx = vx;
|
maxvx = vx;
|
||||||
maxvy = vy;
|
maxvy = vy;
|
||||||
maxvz = vz;
|
maxvz = vz;
|
||||||
@ -165,9 +172,9 @@ FixWallPiston::FixWallPiston(LAMMPS *lmp, int narg, char **arg) :
|
|||||||
int FixWallPiston::setmask()
|
int FixWallPiston::setmask()
|
||||||
{
|
{
|
||||||
int mask = 0;
|
int mask = 0;
|
||||||
|
mask |= INITIAL_INTEGRATE;
|
||||||
mask |= POST_INTEGRATE;
|
mask |= POST_INTEGRATE;
|
||||||
mask |= POST_INTEGRATE_RESPA;
|
mask |= POST_INTEGRATE_RESPA;
|
||||||
mask |= INITIAL_INTEGRATE;
|
|
||||||
return mask;
|
return mask;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -209,20 +216,26 @@ void FixWallPiston::post_integrate()
|
|||||||
angfreq = MY_2PI / (0.5 * tott);
|
angfreq = MY_2PI / (0.5 * tott);
|
||||||
|
|
||||||
if (zloflag) {
|
if (zloflag) {
|
||||||
zlo = z0 + paccelz * (0.5*tt + 1.0/(angfreq*angfreq) - 1.0/(angfreq*angfreq)*cos(angfreq*t));
|
zlo = z0 + paccelz * (0.5*tt + 1.0/(angfreq*angfreq) -
|
||||||
|
1.0/(angfreq*angfreq)*cos(angfreq*t));
|
||||||
vz = paccelz * (t + 1.0/angfreq*sin(angfreq*t));
|
vz = paccelz * (t + 1.0/angfreq*sin(angfreq*t));
|
||||||
}
|
}
|
||||||
else { error->all(FLERR,"NL ramp in wall/piston only implemented in zlo for now"); }
|
else error->all(FLERR,
|
||||||
|
"NL ramp in wall/piston only implemented in zlo for now");
|
||||||
}
|
}
|
||||||
else if (rampNL2flag) {
|
else if (rampNL2flag) {
|
||||||
paccelz = maxvz / tott;
|
paccelz = maxvz / tott;
|
||||||
angfreq = 3.0*MY_2PI / tott;
|
angfreq = 3.0*MY_2PI / tott;
|
||||||
|
|
||||||
if (zloflag) {
|
if (zloflag) {
|
||||||
zlo = z0 + paccelz * (0.5*tt + 4.0/(3.0*angfreq*angfreq)*(1.0-cos(angfreq*t)) + 1.0/(6.0*angfreq*angfreq)*(1.0-cos(2.0*angfreq*t)));
|
zlo = z0 + paccelz * (0.5*tt + 4.0/(3.0*angfreq*angfreq)*
|
||||||
vz = paccelz * (t + 4.0/(3.0*angfreq)*sin(angfreq*t) + 1.0/(3.0*angfreq)*sin(2.0*angfreq*t));
|
(1.0-cos(angfreq*t)) +
|
||||||
|
1.0/(6.0*angfreq*angfreq)*(1.0-cos(2.0*angfreq*t)));
|
||||||
|
vz = paccelz * (t + 4.0/(3.0*angfreq)*sin(angfreq*t) +
|
||||||
|
1.0/(3.0*angfreq)*sin(2.0*angfreq*t));
|
||||||
}
|
}
|
||||||
else { error->all(FLERR,"NL ramp in wall/piston only implemented in zlo for now"); }
|
else error->all(FLERR,
|
||||||
|
"NL ramp in wall/piston only implemented in zlo for now");
|
||||||
}
|
}
|
||||||
else if (rampNL3flag) {
|
else if (rampNL3flag) {
|
||||||
paccelz = maxvz / tott;
|
paccelz = maxvz / tott;
|
||||||
@ -231,7 +244,8 @@ void FixWallPiston::post_integrate()
|
|||||||
zlo = z0 + paccelz*tott*tott/2.5 * (t2p5 );
|
zlo = z0 + paccelz*tott*tott/2.5 * (t2p5 );
|
||||||
vz = paccelz * tott * (t1p5 );
|
vz = paccelz * tott * (t1p5 );
|
||||||
}
|
}
|
||||||
else { error->all(FLERR,"NL ramp in wall/piston only implemented in zlo for now"); }
|
else error->all(FLERR,
|
||||||
|
"NL ramp in wall/piston only implemented in zlo for now");
|
||||||
}
|
}
|
||||||
else if (rampNL4flag) {
|
else if (rampNL4flag) {
|
||||||
paccelz = maxvz / tott;
|
paccelz = maxvz / tott;
|
||||||
@ -240,7 +254,8 @@ void FixWallPiston::post_integrate()
|
|||||||
zlo = z0 + paccelz/tott/3.0 * (ttt);
|
zlo = z0 + paccelz/tott/3.0 * (ttt);
|
||||||
vz = paccelz / tott * (tt);
|
vz = paccelz / tott * (tt);
|
||||||
}
|
}
|
||||||
else { error->all(FLERR,"NL ramp in wall/piston only implemented in zlo for now"); }
|
else error->all(FLERR,
|
||||||
|
"NL ramp in wall/piston only implemented in zlo for now");
|
||||||
}
|
}
|
||||||
else if (rampNL5flag) {
|
else if (rampNL5flag) {
|
||||||
paccelz = maxvz / tott;
|
paccelz = maxvz / tott;
|
||||||
@ -249,7 +264,8 @@ void FixWallPiston::post_integrate()
|
|||||||
zlo = z0 + paccelz/tott/tott/4.0 * (tttt);
|
zlo = z0 + paccelz/tott/tott/4.0 * (tttt);
|
||||||
vz = paccelz / tott / tott * (ttt);
|
vz = paccelz / tott / tott * (ttt);
|
||||||
}
|
}
|
||||||
else { error->all(FLERR,"NL ramp in wall/piston only implemented in zlo for now"); }
|
else error->all(FLERR,
|
||||||
|
"NL ramp in wall/piston only implemented in zlo for now");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (zloflag) { zlo = z0 + vz * t; }
|
if (zloflag) { zlo = z0 + vz * t; }
|
||||||
@ -273,8 +289,10 @@ void FixWallPiston::post_integrate()
|
|||||||
if (mask[i] & groupbit) {
|
if (mask[i] & groupbit) {
|
||||||
roughoff = 0.0;
|
roughoff = 0.0;
|
||||||
if (roughflag) {
|
if (roughflag) {
|
||||||
roughoff += roughdist*fabs((x[i][0] - domain->boxlo[0])/(domain->boxhi[0]-domain->boxlo[0])-0.5);
|
roughoff += roughdist*fabs((x[i][0] - domain->boxlo[0])/
|
||||||
roughoff += roughdist*fabs((x[i][1] - domain->boxlo[1])/(domain->boxhi[1]-domain->boxlo[1])-0.5);
|
(domain->boxhi[0]-domain->boxlo[0])-0.5);
|
||||||
|
roughoff += roughdist*fabs((x[i][1] - domain->boxlo[1])/
|
||||||
|
(domain->boxhi[1]-domain->boxlo[1])-0.5);
|
||||||
}
|
}
|
||||||
if (zloflag && x[i][2] < zlo - roughoff) {
|
if (zloflag && x[i][2] < zlo - roughoff) {
|
||||||
x[i][2] = 2.0 * (zlo - roughoff) - x[i][2];
|
x[i][2] = 2.0 * (zlo - roughoff) - x[i][2];
|
||||||
@ -326,5 +344,4 @@ void FixWallPiston::post_integrate()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -156,11 +156,11 @@ FixWallSRD::FixWallSRD(LAMMPS *lmp, int narg, char **arg) :
|
|||||||
if (dimflag[0] + dimflag[1] + dimflag[2] > 1) overlap = 1;
|
if (dimflag[0] + dimflag[1] + dimflag[2] > 1) overlap = 1;
|
||||||
else overlap = 0;
|
else overlap = 0;
|
||||||
|
|
||||||
// set time_depend and varflag if any wall positions are variable
|
// set varflag if any wall positions are variable
|
||||||
|
|
||||||
varflag = 0;
|
varflag = 0;
|
||||||
for (int m = 0; m < nwall; m++)
|
for (int m = 0; m < nwall; m++)
|
||||||
if (wallstyle[m] == VARIABLE) time_depend = varflag = 1;
|
if (wallstyle[m] == VARIABLE) varflag = 1;
|
||||||
laststep = -1;
|
laststep = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -53,8 +53,6 @@ FixGravityCuda::FixGravityCuda(LAMMPS *lmp, int narg, char **arg) :
|
|||||||
|
|
||||||
if (narg < 5) error->all(FLERR,"Illegal fix gravity command");
|
if (narg < 5) error->all(FLERR,"Illegal fix gravity command");
|
||||||
|
|
||||||
time_depend = 1;
|
|
||||||
|
|
||||||
magnitude = atof(arg[3]);
|
magnitude = atof(arg[3]);
|
||||||
|
|
||||||
if (strcmp(arg[4],"chute") == 0) {
|
if (strcmp(arg[4],"chute") == 0) {
|
||||||
|
|||||||
@ -41,7 +41,9 @@ FixDtReset::FixDtReset(LAMMPS *lmp, int narg, char **arg) :
|
|||||||
{
|
{
|
||||||
if (narg < 7) error->all(FLERR,"Illegal fix dt/reset command");
|
if (narg < 7) error->all(FLERR,"Illegal fix dt/reset command");
|
||||||
|
|
||||||
time_depend = 1;
|
// set time_depend, else elapsed time accumulation can be messed up
|
||||||
|
|
||||||
|
time_depend = 1;
|
||||||
scalar_flag = 1;
|
scalar_flag = 1;
|
||||||
vector_flag = 1;
|
vector_flag = 1;
|
||||||
size_vector = 2;
|
size_vector = 2;
|
||||||
|
|||||||
@ -51,7 +51,6 @@ FixRestrain::FixRestrain(LAMMPS *lmp, int narg, char **arg) :
|
|||||||
scalar_flag = 1;
|
scalar_flag = 1;
|
||||||
global_freq = 1;
|
global_freq = 1;
|
||||||
extscalar = 1;
|
extscalar = 1;
|
||||||
time_depend = 1;
|
|
||||||
|
|
||||||
// parse args
|
// parse args
|
||||||
|
|
||||||
|
|||||||
@ -152,11 +152,11 @@ FixWall::FixWall(LAMMPS *lmp, int narg, char **arg) :
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// set time_depend and varflag if any wall positions are variable
|
// set varflag if any wall positions are variable
|
||||||
|
|
||||||
varflag = 0;
|
varflag = 0;
|
||||||
for (int m = 0; m < nwall; m++)
|
for (int m = 0; m < nwall; m++)
|
||||||
if (wallstyle[m] == VARIABLE) time_depend = varflag = 1;
|
if (wallstyle[m] == VARIABLE) varflag = 1;
|
||||||
|
|
||||||
eflag = 0;
|
eflag = 0;
|
||||||
for (int m = 0; m <= nwall; m++) ewall[m] = 0.0;
|
for (int m = 0; m <= nwall; m++) ewall[m] = 0.0;
|
||||||
|
|||||||
@ -133,11 +133,11 @@ FixWallReflect::FixWallReflect(LAMMPS *lmp, int narg, char **arg) :
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// set time_depend and varflag if any wall positions are variable
|
// set varflag if any wall positions are variable
|
||||||
|
|
||||||
varflag = 0;
|
varflag = 0;
|
||||||
for (int m = 0; m < nwall; m++)
|
for (int m = 0; m < nwall; m++)
|
||||||
if (wallstyle[m] == VARIABLE) time_depend = varflag = 1;
|
if (wallstyle[m] == VARIABLE) varflag = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|||||||
Reference in New Issue
Block a user