Adding fix spring/self/kk, needed to add maxatom to fix spring/self, may need resize xoriginal as well
This commit is contained in:
@ -73,6 +73,7 @@ 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);
|
||||
|
||||
@ -47,11 +47,12 @@ class FixSpringSelf : public Fix {
|
||||
int size_restart(int) override;
|
||||
int maxsize_restart() override;
|
||||
|
||||
private:
|
||||
protected:
|
||||
double k, espring;
|
||||
double **xoriginal; // original coords of atoms
|
||||
int xflag, yflag, zflag;
|
||||
int ilevel_respa;
|
||||
int maxatom;
|
||||
};
|
||||
|
||||
} // namespace LAMMPS_NS
|
||||
|
||||
Reference in New Issue
Block a user