git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@3481 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp
2009-12-03 17:45:22 +00:00
parent 2ac56e521f
commit 69d350af34
25 changed files with 1065 additions and 270 deletions

View File

@ -33,8 +33,6 @@ 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) {
@ -88,8 +86,6 @@ FixGravity::FixGravity(LAMMPS *lmp, int narg, char **arg) :
zgrav = 0.0;
}
}
time_initial = update->ntimestep;
}
/* ---------------------------------------------------------------------- */
@ -138,15 +134,15 @@ void FixGravity::post_force(int vflag)
if (style == GRADIENT) {
if (domain->dimension == 3) {
double phi_current = degree2rad *
(phi + (update->ntimestep-time_initial)*dt*phigrad*360.0);
(phi + (update->ntimestep-update->beginstep)*dt*phigrad*360.0);
double theta_current = degree2rad *
(theta + (update->ntimestep-time_initial)*dt*thetagrad*360.0);
(theta + (update->ntimestep-update->beginstep)*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-time_initial)*dt*thetagrad*360.0);
(theta + (update->ntimestep-update->beginstep)*dt*thetagrad*360.0);
xgrav = sin(theta_current);
ygrav = cos(theta_current);
}