mirror of https://github.com/lammps/lammps.git
Added uphill check to quadratic linesearch.
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@4052 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
e2840e300d
commit
80ac665b3e
|
@ -464,11 +464,13 @@ int MinLineSearch::linemin_quadratic(double eoriginal, double &alpha,
|
|||
|
||||
if (relerr <= QUADRATIC_TOL && alpha0 > 0.0) {
|
||||
ecurrent = alpha_step(alpha0,1,nfunc);
|
||||
if (nextra_global) {
|
||||
int itmp = modify->min_reset_ref();
|
||||
if (itmp) ecurrent = energy_force(1);
|
||||
if (ecurrent < eoriginal) {
|
||||
if (nextra_global) {
|
||||
int itmp = modify->min_reset_ref();
|
||||
if (itmp) ecurrent = energy_force(1);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// if backtracking energy change is better than ideal, exit with success
|
||||
|
|
Loading…
Reference in New Issue