Removed maxatom from fix spring/self, need to work on exchange for xoriginal on spring/self/kk

This commit is contained in:
Trung Nguyen
2023-08-11 09:43:28 -05:00
parent 4bb3ecd09c
commit a24eccf95d
3 changed files with 3 additions and 13 deletions

View File

@ -73,7 +73,6 @@ FixSpringSelf::FixSpringSelf(LAMMPS *lmp, int narg, char **arg) :
// register with Atom class
xoriginal = nullptr;
maxatom = atom->nmax;
FixSpringSelf::grow_arrays(atom->nmax);
atom->add_callback(Atom::GROW);
atom->add_callback(Atom::RESTART);
@ -97,6 +96,8 @@ FixSpringSelf::FixSpringSelf(LAMMPS *lmp, int narg, char **arg) :
FixSpringSelf::~FixSpringSelf()
{
if (copymode) return;
// unregister callbacks to this fix from Atom class
atom->delete_callback(id,Atom::GROW);