forked from lijiext/lammps
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@9601 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
e21af691be
commit
0316286abb
|
@ -273,13 +273,10 @@ void Atom::create_avec(const char *style, int narg, char **arg, char *suffix)
|
|||
vfrac_flag = spin_flag = eradius_flag = ervel_flag = erforce_flag = 0;
|
||||
|
||||
// create instance of AtomVec
|
||||
// use grow to initialize atom-based arrays to length 1
|
||||
// so that x[0][0] can be referenced even if proc has no atoms
|
||||
|
||||
int sflag;
|
||||
avec = new_avec(style,suffix,sflag);
|
||||
avec->settings(narg,arg);
|
||||
avec->grow(1);
|
||||
|
||||
if (sflag) {
|
||||
char estyle[256];
|
||||
|
|
|
@ -1003,6 +1003,11 @@ void Input::atom_style()
|
|||
if (domain->box_exist)
|
||||
error->all(FLERR,"Atom_style command after simulation box is defined");
|
||||
atom->create_avec(arg[0],narg-1,&arg[1],lmp->suffix);
|
||||
|
||||
// use grow to initialize atom-based arrays to length 1
|
||||
// so that x[0][0] can be referenced even if proc has no atoms
|
||||
|
||||
atom->avec->grow(1);
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
|
|
@ -464,6 +464,12 @@ void LAMMPS::create()
|
|||
else domain = new Domain(this);
|
||||
#endif
|
||||
|
||||
// use grow to initialize atom-based arrays to length 1
|
||||
// so that x[0][0] can be referenced even if proc has no atoms
|
||||
// must be done after nthreads is defined by Comm class
|
||||
|
||||
atom->avec->grow(1);
|
||||
|
||||
group = new Group(this);
|
||||
force = new Force(this); // must be after group, to create temperature
|
||||
|
||||
|
|
Loading…
Reference in New Issue