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

This commit is contained in:
sjplimp 2011-05-20 17:14:51 +00:00
parent 717139ef0f
commit b40cd20066
2 changed files with 7 additions and 5 deletions

View File

@ -34,7 +34,7 @@ using namespace LAMMPS_NS;
AtomVecHybrid::AtomVecHybrid(LAMMPS *lmp, int narg, char **arg) :
AtomVec(lmp, narg, arg)
{
int i,k;
int i,k,dummy;
if (narg < 1) error->all("Illegal atom_style command");
@ -50,7 +50,7 @@ AtomVecHybrid::AtomVecHybrid(LAMMPS *lmp, int narg, char **arg) :
error->all("Atom style hybrid cannot use same atom style twice");
if (strcmp(arg[i],"hybrid") == 0)
error->all("Atom style hybrid cannot have hybrid as an argument");
styles[i] = atom->new_avec(arg[i],0,NULL);
styles[i] = atom->new_avec(arg[i],0,NULL,NULL,dummy);
keywords[i] = new char[strlen(arg[i])+1];
strcpy(keywords[i],arg[i]);
}

View File

@ -227,6 +227,8 @@ void PairHybrid::settings(int narg, char **arg)
// exception is 1st arg of reax/c style, which is non-numeric
// need a better way to skip these exceptions
int dummy;
nstyles = 0;
i = 0;
while (i < narg) {
@ -237,7 +239,7 @@ void PairHybrid::settings(int narg, char **arg)
error->all("Pair style hybrid cannot have hybrid as an argument");
if (strcmp(arg[i],"none") == 0)
error->all("Pair style hybrid cannot have none as an argument");
styles[nstyles] = force->new_pair(arg[i]);
styles[nstyles] = force->new_pair(arg[i],NULL,dummy);
keywords[nstyles] = new char[strlen(arg[i])+1];
strcpy(keywords[nstyles],arg[i]);
istyle = i;
@ -574,14 +576,14 @@ void PairHybrid::read_restart(FILE *fp)
// each sub-style is created via new_pair()
// each reads its settings, but no coeff info
int n;
int n,dummy;
for (int m = 0; m < nstyles; m++) {
if (me == 0) fread(&n,sizeof(int),1,fp);
MPI_Bcast(&n,1,MPI_INT,0,world);
keywords[m] = new char[n];
if (me == 0) fread(keywords[m],sizeof(char),n,fp);
MPI_Bcast(keywords[m],n,MPI_CHAR,0,world);
styles[m] = force->new_pair(keywords[m]);
styles[m] = force->new_pair(keywords[m],NULL,dummy);
styles[m]->read_restart_settings(fp);
}
}