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