git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@3483 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -51,6 +51,7 @@ FixWallGran::FixWallGran(LAMMPS *lmp, int narg, char **arg) :
|
||||
|
||||
restart_peratom = 1;
|
||||
create_attribute = 1;
|
||||
time_depend = 1;
|
||||
|
||||
// wall/particle coefficients
|
||||
|
||||
@ -179,6 +180,8 @@ FixWallGran::FixWallGran(LAMMPS *lmp, int narg, char **arg) :
|
||||
int nlocal = atom->nlocal;
|
||||
for (int i = 0; i < nlocal; i++)
|
||||
shear[i][0] = shear[i][1] = shear[i][2] = 0.0;
|
||||
|
||||
time_origin = update->ntimestep;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
@ -251,7 +254,7 @@ void FixWallGran::post_force(int vflag)
|
||||
double whi = hi;
|
||||
vwall[0] = vwall[1] = vwall[2] = 0.0;
|
||||
if (wiggle) {
|
||||
double arg = omega * (update->ntimestep - update->beginstep) * dt;
|
||||
double arg = omega * (update->ntimestep - time_origin) * dt;
|
||||
wlo = lo + amplitude - amplitude*cos(arg);
|
||||
whi = hi + amplitude - amplitude*cos(arg);
|
||||
vwall[axis] = amplitude*omega*sin(arg);
|
||||
|
||||
@ -44,9 +44,10 @@ class FixWallGran : public Fix {
|
||||
int wallstyle,pairstyle,wiggle,wshear,axis;
|
||||
double kn,kt,gamman,gammat,xmu;
|
||||
double lo,hi,cylradius;
|
||||
double amplitude,period,omega,time_origin,vshear;
|
||||
double amplitude,period,omega,vshear;
|
||||
double dt;
|
||||
int nlevels_respa;
|
||||
int time_origin;
|
||||
|
||||
int *touch;
|
||||
double **shear;
|
||||
|
||||
@ -131,6 +131,10 @@ void ComputeHeatFlux::compute_vector()
|
||||
|
||||
neighbor->build_one(list->index);
|
||||
|
||||
// invoke ghost comm to insure ghost vels are up-to-date
|
||||
|
||||
comm->forward_comm();
|
||||
|
||||
inum = list->inum;
|
||||
ilist = list->ilist;
|
||||
numneigh = list->numneigh;
|
||||
|
||||
@ -33,6 +33,8 @@ FixGravity::FixGravity(LAMMPS *lmp, int narg, char **arg) :
|
||||
{
|
||||
if (narg < 5) error->all("Illegal fix gravity command");
|
||||
|
||||
time_depend = 1;
|
||||
|
||||
magnitude = atof(arg[3]);
|
||||
|
||||
if (strcmp(arg[4],"chute") == 0) {
|
||||
@ -86,6 +88,8 @@ FixGravity::FixGravity(LAMMPS *lmp, int narg, char **arg) :
|
||||
zgrav = 0.0;
|
||||
}
|
||||
}
|
||||
|
||||
time_origin = update->ntimestep;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
@ -134,15 +138,15 @@ void FixGravity::post_force(int vflag)
|
||||
if (style == GRADIENT) {
|
||||
if (domain->dimension == 3) {
|
||||
double phi_current = degree2rad *
|
||||
(phi + (update->ntimestep-update->beginstep)*dt*phigrad*360.0);
|
||||
(phi + (update->ntimestep - time_origin)*dt*phigrad*360.0);
|
||||
double theta_current = degree2rad *
|
||||
(theta + (update->ntimestep-update->beginstep)*dt*thetagrad*360.0);
|
||||
(theta + (update->ntimestep - time_origin)*dt*thetagrad*360.0);
|
||||
xgrav = sin(theta_current) * cos(phi_current);
|
||||
ygrav = sin(theta_current) * sin(phi_current);
|
||||
zgrav = cos(theta_current);
|
||||
} else {
|
||||
double theta_current = degree2rad *
|
||||
(theta + (update->ntimestep-update->beginstep)*dt*thetagrad*360.0);
|
||||
(theta + (update->ntimestep - time_origin)*dt*thetagrad*360.0);
|
||||
xgrav = sin(theta_current);
|
||||
ygrav = cos(theta_current);
|
||||
}
|
||||
|
||||
@ -37,6 +37,7 @@ class FixGravity : public Fix {
|
||||
double xgrav,ygrav,zgrav,xacc,yacc,zacc;
|
||||
double degree2rad;
|
||||
int nlevels_respa;
|
||||
int time_origin;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@ -45,6 +45,7 @@ FixMove::FixMove(LAMMPS *lmp, int narg, char **arg) :
|
||||
size_peratom = 3;
|
||||
peratom_freq = 1;
|
||||
time_integrate = 1;
|
||||
time_depend = 1;
|
||||
|
||||
// parse args
|
||||
|
||||
@ -254,6 +255,8 @@ FixMove::FixMove(LAMMPS *lmp, int narg, char **arg) :
|
||||
if (mask[i] & groupbit) domain->unmap(x[i],image[i],xoriginal[i]);
|
||||
else xoriginal[i][0] = xoriginal[i][1] = xoriginal[i][2] = 0.0;
|
||||
}
|
||||
|
||||
time_origin = update->ntimestep;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
@ -368,7 +371,7 @@ void FixMove::initial_integrate(int vflag)
|
||||
double xold[3],a[3],b[3],c[3],d[3],disp[3];
|
||||
double x0dotr,dx,dy,dz;
|
||||
|
||||
double delta = (update->ntimestep - update->beginstep) * dt;
|
||||
double delta = (update->ntimestep - time_origin) * dt;
|
||||
|
||||
double **x = atom->x;
|
||||
double **v = atom->v;
|
||||
|
||||
@ -50,6 +50,7 @@ class FixMove : public Fix {
|
||||
int xvar,yvar,zvar,vxvar,vyvar,vzvar;
|
||||
int xvarstyle,yvarstyle,zvarstyle,vxvarstyle,vyvarstyle,vzvarstyle;
|
||||
int omega_flag,nlevels_respa;
|
||||
int time_origin;
|
||||
|
||||
double **xoriginal; // original coords of atoms
|
||||
int displaceflag,velocityflag;
|
||||
|
||||
@ -38,6 +38,7 @@ FixWall::FixWall(LAMMPS *lmp, int narg, char **arg) :
|
||||
scalar_vector_freq = 1;
|
||||
extscalar = 1;
|
||||
extvector = 1;
|
||||
time_depend = 1;
|
||||
|
||||
// parse args
|
||||
|
||||
@ -148,6 +149,8 @@ FixWall::FixWall(LAMMPS *lmp, int narg, char **arg) :
|
||||
|
||||
eflag = 0;
|
||||
for (int m = 0; m < 7; m++) ewall[m] = 0.0;
|
||||
|
||||
time_origin = update->ntimestep;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
@ -207,7 +210,7 @@ void FixWall::post_force(int vflag)
|
||||
// coord0 = initial position of wall
|
||||
// coord = current position of wall
|
||||
|
||||
double delta = (update->ntimestep - update->beginstep) * dt;
|
||||
double delta = (update->ntimestep - time_origin) * dt;
|
||||
double coord;
|
||||
|
||||
for (int m = 0; m < 6; m++) {
|
||||
|
||||
@ -45,6 +45,7 @@ class FixWall : public Fix {
|
||||
double ewall[7],ewall_all[7];
|
||||
int nlevels_respa;
|
||||
double dt;
|
||||
int time_origin;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user