Remove un-necessary option adaptstep in adaptglok. Adapted documentation.
This commit is contained in:
@ -28,7 +28,6 @@ keyword = {dmax} or {line} or {delaystep} or {dt_grow} or {dt_shrink}
|
|||||||
{tmin} value = {float} for adaptglok
|
{tmin} value = {float} for adaptglok
|
||||||
{integrator} value = {eulerimplicit} or {eulerexplicit} or {verlet}
|
{integrator} value = {eulerimplicit} or {eulerexplicit} or {verlet}
|
||||||
or {leapfrog} for adaptglok
|
or {leapfrog} for adaptglok
|
||||||
{adaptstep} arg = {yes} or {no} for adaptglok
|
|
||||||
{halfstepback} value = {yes} or {no} for adaptglok :pre
|
{halfstepback} value = {yes} or {no} for adaptglok :pre
|
||||||
:ule
|
: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
|
been chosen to be reliable in most cases, but one could be willing
|
||||||
to adapt them for particular cases.
|
to adapt them for particular cases.
|
||||||
In particular for debugging purpose, it is possible to switch off the
|
In particular for debugging purpose, it is possible to switch off the
|
||||||
variable timestep and the backstep when downhill, by using {adaptstep}
|
the backstep when downhill, by using and {halfstepback}.
|
||||||
and {halfstepback}.
|
|
||||||
|
|
||||||
[Restrictions:] none
|
[Restrictions:] none
|
||||||
|
|
||||||
|
|||||||
@ -64,7 +64,6 @@ Min::Min(LAMMPS *lmp) : Pointers(lmp)
|
|||||||
tmin = 0.02;
|
tmin = 0.02;
|
||||||
integrator = 0;
|
integrator = 0;
|
||||||
halfstepback_flag = 1;
|
halfstepback_flag = 1;
|
||||||
adaptstep_flag = 1;
|
|
||||||
|
|
||||||
elist_global = elist_atom = NULL;
|
elist_global = elist_atom = NULL;
|
||||||
vlist_global = vlist_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 if (strcmp(arg[iarg+1],"no") == 0) halfstepback_flag = 0;
|
||||||
else error->all(FLERR,"Illegal min_modify command");
|
else error->all(FLERR,"Illegal min_modify command");
|
||||||
iarg += 2;
|
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) {
|
} else if (strcmp(arg[iarg],"integrator") == 0) {
|
||||||
if (iarg+2 > narg) error->all(FLERR,"Illegal min_modify command");
|
if (iarg+2 > narg) error->all(FLERR,"Illegal min_modify command");
|
||||||
if (strcmp(arg[iarg+1],"eulerimplicit") == 0) integrator = 0;
|
if (strcmp(arg[iarg+1],"eulerimplicit") == 0) integrator = 0;
|
||||||
|
|||||||
@ -64,7 +64,6 @@ class Min : protected Pointers {
|
|||||||
double tmax,tmin; // timestep max, min (adaptglok)
|
double tmax,tmin; // timestep max, min (adaptglok)
|
||||||
int integrator; // choose the style of time integrator (adaptglok)
|
int integrator; // choose the style of time integrator (adaptglok)
|
||||||
int halfstepback_flag; // 1: half step backward when v.f <= 0.0 (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 nelist_global,nelist_atom; // # of PE,virial computes to check
|
||||||
int nvlist_global,nvlist_atom;
|
int nvlist_global,nvlist_atom;
|
||||||
|
|||||||
@ -184,7 +184,7 @@ int MinAdaptGlok::iterate(int maxiter)
|
|||||||
if (fdotfall <= 1e-20) scale2 = 0.0;
|
if (fdotfall <= 1e-20) scale2 = 0.0;
|
||||||
else scale2 = alpha * sqrt(vdotvall/fdotfall);
|
else scale2 = alpha * sqrt(vdotvall/fdotfall);
|
||||||
|
|
||||||
if (ntimestep - last_negative > delaystep && adaptstep_flag) {
|
if (ntimestep - last_negative > delaystep) {
|
||||||
dt = MIN(dt*dt_grow,dtmax);
|
dt = MIN(dt*dt_grow,dtmax);
|
||||||
update->dt = dt;
|
update->dt = dt;
|
||||||
alpha *= alpha_shrink;
|
alpha *= alpha_shrink;
|
||||||
@ -201,7 +201,7 @@ int MinAdaptGlok::iterate(int maxiter)
|
|||||||
} else {
|
} else {
|
||||||
last_negative = ntimestep;
|
last_negative = ntimestep;
|
||||||
// Limit decrease of timestep
|
// Limit decrease of timestep
|
||||||
if (ntimestep - ntimestep_fire > delaystep && adaptstep_flag) {
|
if (ntimestep - ntimestep_fire > delaystep) {
|
||||||
alpha = alpha0;
|
alpha = alpha0;
|
||||||
if (dt > dtmin) {
|
if (dt > dtmin) {
|
||||||
dt *= dt_shrink;
|
dt *= dt_shrink;
|
||||||
|
|||||||
Reference in New Issue
Block a user