From b40cd20066c75e9cbbd71db94b6bb3e03f0b164e Mon Sep 17 00:00:00 2001 From: sjplimp Date: Fri, 20 May 2011 17:14:51 +0000 Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@6187 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/atom_vec_hybrid.cpp | 4 ++-- src/pair_hybrid.cpp | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/atom_vec_hybrid.cpp b/src/atom_vec_hybrid.cpp index a7f48066f0..03c0c501ea 100644 --- a/src/atom_vec_hybrid.cpp +++ b/src/atom_vec_hybrid.cpp @@ -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]); } diff --git a/src/pair_hybrid.cpp b/src/pair_hybrid.cpp index a3d0dafd32..5fd45a8f60 100644 --- a/src/pair_hybrid.cpp +++ b/src/pair_hybrid.cpp @@ -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); } }