Changed alpha_init initialization to avoid infinite loop with 0 starting

value.
This commit is contained in:
Germain Clavier
2024-04-26 14:46:30 +02:00
committed by Axel Kohlmeyer
parent 874f5577d4
commit 411574a39c

View File

@ -690,7 +690,7 @@ int MinLineSearch::linemin_forcezero(double eoriginal, double &alpha)
// choosing the initial alpha that we'll use
// rough estimate that'll decrease energy to 1/10
alpha_init = 0.1*fabs(eoriginal)/fdothall;
alpha_init = MAX(EPS_QUAD, 0.1*fabs(eoriginal)/fdothall);
// initialize aplha to 0.0