implement reinit & set reinitflag flag to 1

This commit is contained in:
Evangelos Voyiatzis
2025-02-06 15:37:59 +02:00
committed by GitHub
parent 95797d643b
commit feea204f7c

View File

@ -30,6 +30,7 @@ Improper::Improper(LAMMPS *_lmp) : Pointers(_lmp)
{
energy = 0.0;
writedata = 0;
reinitflag = 1;
for (int i = 0; i < 4; i++) symmatoms[i] = 0;
allocated = 0;
@ -421,3 +422,15 @@ double Improper::memory_usage()
bytes += (double) comm->nthreads * maxvatom * 6 * sizeof(double);
return bytes;
}
/* -----------------------------------------------------------------------
reset all type-based improper params via init()
-------------------------------------------------------------------------- */
void Improper::reinit()
{
if (!reinitflag)
error->all(FLERR, "Fix adapt interface to this improper style not supported");
init();
}