diff --git a/src/fix_bd_sphere.cpp b/src/fix_bd_sphere.cpp index ba7cd2a81c..cc3c788349 100644 --- a/src/fix_bd_sphere.cpp +++ b/src/fix_bd_sphere.cpp @@ -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); +} diff --git a/src/fix_bd_sphere.h b/src/fix_bd_sphere.h index 245e04274e..8a3df214a6 100644 --- a/src/fix_bd_sphere.h +++ b/src/fix_bd_sphere.h @@ -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