Commit 8053375a authored by Julien Guénolé's avatar Julien Guénolé
Browse files

Remove un-necessary option adaptstep in adaptglok. Adapted documentation.

parent bf85b04a
Loading
Loading
Loading
Loading
+1 −3
Changes for doc/src/min_modify.txt: 1 added line, 3 removed lines.
Original line number Diff line number Diff line
@@ -28,7 +28,6 @@ keyword = {dmax} or {line} or {delaystep} or {dt_grow} or {dt_shrink}
  {tmin} value = {float}  for adaptglok
  {integrator} value = {eulerimplicit} or {eulerexplicit} or {verlet} 
                       or {leapfrog}  for adaptglok
  {adaptstep} arg = {yes} or {no}  for adaptglok
  {halfstepback} value = {yes} or {no}  for adaptglok :pre
:ule

@@ -83,8 +82,7 @@ to optimize the relaxation: {integrator}, {delaystep}, {dt_grow}, {dt_shrink},
been chosen to be reliable in most cases, but one could be willing 
to adapt them for particular cases.
In particular for debugging purpose, it is possible to switch off the 
variable timestep and the backstep when downhill, by using {adaptstep} 
and {halfstepback}.
the backstep when downhill, by using and {halfstepback}.

[Restrictions:] none

+0 −7
Changes for src/min.cpp: 0 added lines, 7 removed lines.
Original line number Diff line number Diff line
@@ -64,7 +64,6 @@ Min::Min(LAMMPS *lmp) : Pointers(lmp)
  tmin = 0.02;
  integrator = 0;
  halfstepback_flag = 1;
  adaptstep_flag = 1;

  elist_global = elist_atom = NULL;
  vlist_global = vlist_atom = NULL;
@@ -688,12 +687,6 @@ void Min::modify_params(int narg, char **arg)
      else if (strcmp(arg[iarg+1],"no") == 0) halfstepback_flag = 0;
      else error->all(FLERR,"Illegal min_modify command");
      iarg += 2;       
     } else if (strcmp(arg[iarg],"adaptstep") == 0) {
      if (iarg+2 > narg) error->all(FLERR,"Illegal min_modify command");
      if (strcmp(arg[iarg+1],"yes") == 0) adaptstep_flag = 1;
      else if (strcmp(arg[iarg+1],"no") == 0) adaptstep_flag = 0;
      else error->all(FLERR,"Illegal min_modify command");
      iarg += 2;       
     } else if (strcmp(arg[iarg],"integrator") == 0) {
      if (iarg+2 > narg) error->all(FLERR,"Illegal min_modify command");
      if (strcmp(arg[iarg+1],"eulerimplicit") == 0) integrator = 0;
+0 −1
Changes for src/min.h: 0 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -64,7 +64,6 @@ class Min : protected Pointers {
  double tmax,tmin;           // timestep max, min (adaptglok)
  int integrator;             // choose the style of time integrator (adaptglok)
  int halfstepback_flag;      // 1: half step backward when v.f <= 0.0 (adaptglok)
  int adaptstep_flag;         // 1: variable timestep, 0: constant (adaptglok)

  int nelist_global,nelist_atom;    // # of PE,virial computes to check
  int nvlist_global,nvlist_atom;
+2 −2
Changes for src/min_adaptglok.cpp: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -184,7 +184,7 @@ int MinAdaptGlok::iterate(int maxiter)
      if (fdotfall <= 1e-20) scale2 = 0.0;
      else scale2 = alpha * sqrt(vdotvall/fdotfall);

      if (ntimestep - last_negative > delaystep && adaptstep_flag) {
      if (ntimestep - last_negative > delaystep) {
        dt = MIN(dt*dt_grow,dtmax);
        update->dt = dt;
        alpha *= alpha_shrink;
@@ -201,7 +201,7 @@ int MinAdaptGlok::iterate(int maxiter)
    } else {
      last_negative = ntimestep;
      // Limit decrease of timestep
      if (ntimestep - ntimestep_fire > delaystep && adaptstep_flag) {
      if (ntimestep - ntimestep_fire > delaystep) {
        alpha = alpha0;
        if (dt > dtmin) {
          dt *= dt_shrink;