Skip to content
Snippets Groups Projects
Commit 463db585 authored by athomps's avatar athomps
Browse files

Made line quadratic default and changed backtrack alpha zero check to be more friendly

git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@12531 f3b2605a-c512-4ea7-a41b-209d697bcdaa
parent edd0d2de
No related branches found
No related tags found
No related merge requests found
......@@ -53,7 +53,7 @@ Min::Min(LAMMPS *lmp) : Pointers(lmp)
{
dmax = 0.1;
searchflag = 0;
linestyle = 0;
linestyle = 1;
elist_global = elist_atom = NULL;
vlist_global = vlist_atom = NULL;
......
......@@ -48,6 +48,7 @@ using namespace LAMMPS_NS;
#define ALPHA_REDUCE 0.5
#define BACKTRACK_SLOPE 0.4
#define QUADRATIC_TOL 0.1
//#define EMACH 1.0e-8
#define EMACH 1.0e-8
#define EPS_QUAD 1.0e-28
......@@ -277,12 +278,15 @@ int MinLineSearch::linemin_backtrack(double eoriginal, double &alpha)
alpha *= ALPHA_REDUCE;
// backtracked all the way to 0.0
// reset to starting point, exit with error
// backtracked too much
// reset to starting point
// if de is positive, exit with error
// if de is negative, exit with ETOL
if (alpha <= 0.0 || de_ideal >= -EMACH) {
ecurrent = alpha_step(0.0,0);
return ZEROALPHA;
if (de < 0.0) return ETOL;
else return ZEROALPHA;
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment