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

This commit is contained in:
sjplimp 2006-11-06 23:43:36 +00:00
parent a9158f97d0
commit f352e63370
6 changed files with 11 additions and 7 deletions

View File

@ -292,7 +292,7 @@ void FixInsert::pre_exchange()
int nnew = nper;
if (ninserted + nnew > ninsert) nnew = ninsert - ninserted;
// lo/hi current = z bounds of insertion region this timestep
// lo/hi current = z (or y) bounds of insertion region this timestep
if (force->dimension == 3) {
lo_current = zlo + (update->ntimestep - nfirst) * update->dt * rate;

View File

@ -303,6 +303,7 @@ void PairSW::init_style()
void PairSW::read_file(char *file)
{
int params_per_line = 13;
char **words = new char*[params_per_line];
if (params) delete [] params;
params = NULL;
@ -325,7 +326,6 @@ void PairSW::read_file(char *file)
// store params if all 3 element tags are in element list
int i,n,nwords,ielement,jelement,kelement;
char *words[params_per_line];
char line[MAXLINE],*ptr;
int eof = 0;
@ -422,6 +422,8 @@ void PairSW::read_file(char *file)
nparams++;
}
delete [] words;
}
/* ---------------------------------------------------------------------- */

View File

@ -340,6 +340,7 @@ void PairTersoff::init_style()
void PairTersoff::read_file(char *file)
{
int params_per_line = 15;
char **words = new char*[params_per_line];
if (params) delete [] params;
params = NULL;
@ -361,7 +362,6 @@ void PairTersoff::read_file(char *file)
// store line of params if all 3 element tags are in element list
int i,n,nwords,ielement,jelement,kelement;
char *words[params_per_line];
char line[MAXLINE],*ptr;
int eof = 0;
@ -462,6 +462,8 @@ void PairTersoff::read_file(char *file)
nparams++;
}
delete [] words;
}
/* ---------------------------------------------------------------------- */

View File

@ -49,7 +49,7 @@ FixMomentum::FixMomentum(int narg, char **arg) : Fix(narg, arg)
}
if (linear == 0 && angular == 0)
error->all("Illegal run_style respa command");
error->all("Illegal fix momentum command");
if (linear)
if (xflag < 0 || xflag > 1 || yflag < 0 || yflag > 1 ||
@ -132,7 +132,7 @@ void FixMomentum::end_of_step()
dy = (x[i][1] + ybox*yprd) - xcm[1];
dz = (x[i][2] + zbox*zprd) - xcm[2];
v[i][0] -= omega[1]*dz - omega[2]*dy;
v[i][1] -= omega[2]*dx - omega[0]*dy;
v[i][1] -= omega[2]*dx - omega[0]*dz;
v[i][2] -= omega[0]*dy - omega[1]*dx;
}
}

View File

@ -61,7 +61,7 @@ FixRecenter::FixRecenter(int narg, char **arg) : Fix(narg, arg)
if (strcmp(arg[iarg+1],"box") == 0) scaleflag = 0;
else if (strcmp(arg[iarg+1],"lattice") == 0) scaleflag = 1;
else if (strcmp(arg[iarg+1],"fraction") == 0) scaleflag = 2;
else error->all("Illegal fix indent command");
else error->all("Illegal fix recenter command");
iarg += 2;
} else error->all("Illegal fix recenter command");
}

View File

@ -582,7 +582,7 @@ void Velocity::zero_rotation()
dy = (x[i][1] + ybox*yprd) - xcm[1];
dz = (x[i][2] + zbox*zprd) - xcm[2];
v[i][0] -= omega[1]*dz - omega[2]*dy;
v[i][1] -= omega[2]*dx - omega[0]*dy;
v[i][1] -= omega[2]*dx - omega[0]*dz;
v[i][2] -= omega[0]*dy - omega[1]*dx;
}
}