Added reset_dt() function. Have not moved files to USER-MISC folder yet (waiting to hear back on some comments).

This commit is contained in:
Sam Cameron
2020-12-10 09:12:21 +00:00
parent dab4c7409a
commit ee99a2e960
2 changed files with 8 additions and 3 deletions

View File

@ -182,9 +182,6 @@ void FixBdSphere::initial_integrate(int /* vflag */)
if (igroup == atom->firstgroup) nlocal = atom->nfirst;
int d3rot; // whether to compute angular momentum in xy plane
dt = update->dt;
sqrtdt = sqrt(dt);
if (domain->dimension==2) {
d3rot = 0;
@ -315,3 +312,10 @@ void FixBdSphere::post_force(int vflag)
}
}
}
void FixBdSphere::reset_dt()
{
dt = update->dt;
sqrtdt = sqrt(dt);
}

View File

@ -33,6 +33,7 @@ class FixBdSphere : public Fix {
void setup(int);
void post_force(int);
int setmask();
void reset_dt();
private:
int seed; // RNG seed