git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@9602 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -145,11 +145,8 @@ Atom::Atom(LAMMPS *lmp) : Pointers(lmp)
|
|||||||
map_bucket = NULL;
|
map_bucket = NULL;
|
||||||
map_hash = NULL;
|
map_hash = NULL;
|
||||||
|
|
||||||
// default atom style = atomic
|
|
||||||
|
|
||||||
atom_style = NULL;
|
atom_style = NULL;
|
||||||
avec = NULL;
|
avec = NULL;
|
||||||
create_avec("atomic",0,NULL,lmp->suffix);
|
|
||||||
|
|
||||||
datamask = ALL_MASK;
|
datamask = ALL_MASK;
|
||||||
datamask_ext = ALL_MASK;
|
datamask_ext = ALL_MASK;
|
||||||
@ -277,6 +274,7 @@ void Atom::create_avec(const char *style, int narg, char **arg, char *suffix)
|
|||||||
int sflag;
|
int sflag;
|
||||||
avec = new_avec(style,suffix,sflag);
|
avec = new_avec(style,suffix,sflag);
|
||||||
avec->settings(narg,arg);
|
avec->settings(narg,arg);
|
||||||
|
avec->grow(1);
|
||||||
|
|
||||||
if (sflag) {
|
if (sflag) {
|
||||||
char estyle[256];
|
char estyle[256];
|
||||||
|
|||||||
@ -1007,7 +1007,7 @@ void Input::atom_style()
|
|||||||
// use grow to initialize atom-based arrays to length 1
|
// use grow to initialize atom-based arrays to length 1
|
||||||
// so that x[0][0] can be referenced even if proc has no atoms
|
// so that x[0][0] can be referenced even if proc has no atoms
|
||||||
|
|
||||||
atom->avec->grow(1);
|
//atom->avec->grow(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|||||||
@ -449,14 +449,15 @@ LAMMPS::~LAMMPS()
|
|||||||
|
|
||||||
void LAMMPS::create()
|
void LAMMPS::create()
|
||||||
{
|
{
|
||||||
atom = new Atom(this);
|
// Comm class must be created before Atom
|
||||||
|
// so that nthreads is defined when create_avec invokes grow()
|
||||||
if (cuda) neighbor = new NeighborCuda(this);
|
|
||||||
else neighbor = new Neighbor(this);
|
|
||||||
|
|
||||||
if (cuda) comm = new CommCuda(this);
|
if (cuda) comm = new CommCuda(this);
|
||||||
else comm = new Comm(this);
|
else comm = new Comm(this);
|
||||||
|
|
||||||
|
if (cuda) neighbor = new NeighborCuda(this);
|
||||||
|
else neighbor = new Neighbor(this);
|
||||||
|
|
||||||
if (cuda) domain = new DomainCuda(this);
|
if (cuda) domain = new DomainCuda(this);
|
||||||
#ifdef LMP_USER_OMP
|
#ifdef LMP_USER_OMP
|
||||||
else domain = new DomainOMP(this);
|
else domain = new DomainOMP(this);
|
||||||
@ -464,11 +465,8 @@ void LAMMPS::create()
|
|||||||
else domain = new Domain(this);
|
else domain = new Domain(this);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// use grow to initialize atom-based arrays to length 1
|
atom = new Atom(this);
|
||||||
// so that x[0][0] can be referenced even if proc has no atoms
|
atom->create_avec("atomic",0,NULL,suffix);
|
||||||
// must be done after nthreads is defined by Comm class
|
|
||||||
|
|
||||||
atom->avec->grow(1);
|
|
||||||
|
|
||||||
group = new Group(this);
|
group = new Group(this);
|
||||||
force = new Force(this); // must be after group, to create temperature
|
force = new Force(this); // must be after group, to create temperature
|
||||||
|
|||||||
Reference in New Issue
Block a user