git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@12449 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -242,11 +242,7 @@ FixMove::FixMove(LAMMPS *lmp, int narg, char **arg) :
|
||||
atom->add_callback(0);
|
||||
atom->add_callback(1);
|
||||
|
||||
maxatom = atom->nmax;
|
||||
if (displaceflag) memory->create(displace,maxatom,3,"move:displace");
|
||||
else displace = NULL;
|
||||
if (velocityflag) memory->create(velocity,maxatom,3,"move:velocity");
|
||||
else velocity = NULL;
|
||||
displace = velocity = NULL;
|
||||
|
||||
// xoriginal = initial unwrapped positions of atoms
|
||||
|
||||
@ -368,6 +364,14 @@ void FixMove::init()
|
||||
if (vzvarstr && vzvarstyle == ATOM) velocityflag = 1;
|
||||
}
|
||||
|
||||
maxatom = atom->nmax;
|
||||
memory->destroy(displace);
|
||||
memory->destroy(velocity);
|
||||
if (displaceflag) memory->create(displace,maxatom,3,"move:displace");
|
||||
else displace = NULL;
|
||||
if (velocityflag) memory->create(velocity,maxatom,3,"move:velocity");
|
||||
else velocity = NULL;
|
||||
|
||||
if (strstr(update->integrate_style,"respa"))
|
||||
nlevels_respa = ((Respa *) update->integrate)->nlevels;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user