~ubuntu-branches/debian/sid/lammps/sid

« back to all changes in this revision

Viewing changes to src/bond_hybrid.cpp

  • Committer: Package Import Robot
  • Author(s): Anton Gladky
  • Date: 2015-04-29 23:44:49 UTC
  • mfrom: (5.1.3 experimental)
  • Revision ID: package-import@ubuntu.com-20150429234449-mbhy9utku6hp6oq8
Tags: 0~20150313.gitfa668e1-1
Upload into unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
203
203
  keywords = new char*[nstyles];
204
204
 
205
205
  // allocate each sub-style and call its settings() with subset of args
 
206
  // allocate uses suffix, but don't store suffix version in keywords,
 
207
  //   else syntax in coeff() will not match
206
208
  // define subset of args for a sub-style by skipping numeric args
207
209
  // one exception is 1st arg of style "table", which is non-numeric
208
210
  // need a better way to skip these exceptions
219
221
      error->all(FLERR,"Bond style hybrid cannot have hybrid as an argument");
220
222
    if (strcmp(arg[i],"none") == 0)
221
223
      error->all(FLERR,"Bond style hybrid cannot have none as an argument");
222
 
    styles[nstyles] = force->new_bond(arg[i],lmp->suffix,dummy);
223
 
    keywords[nstyles] = new char[strlen(arg[i])+1];
224
 
    strcpy(keywords[nstyles],arg[i]);
 
224
 
 
225
    styles[nstyles] = force->new_bond(arg[i],1,dummy);
 
226
    force->store_style(keywords[nstyles],arg[i],0);
 
227
 
225
228
    istyle = i;
226
229
    if (strcmp(arg[i],"table") == 0) i++;
227
230
    i++;
330
333
    keywords[m] = new char[n];
331
334
    if (me == 0) fread(keywords[m],sizeof(char),n,fp);
332
335
    MPI_Bcast(keywords[m],n,MPI_CHAR,0,world);
333
 
    styles[m] = force->new_bond(keywords[m],lmp->suffix,dummy);
 
336
    styles[m] = force->new_bond(keywords[m],0,dummy);
334
337
  }
335
338
}
336
339