We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 34ec933 commit a90e5c3Copy full SHA for a90e5c3
source/source_relax/bfgs.cpp
@@ -229,7 +229,8 @@ void BFGS::Update(std::vector<double>& pos,
229
dpos[iat * 3 + 2] = move_ion_dr.z ;
230
}
231
232
- if(*max_element(dpos.begin(), dpos.end()) < 1e-7)
+ double threshold=1e-7;
233
+ if(*max_element(dpos.begin(), dpos.end()) < threshold)
234
{
235
return;
236
@@ -251,7 +252,8 @@ void BFGS::DetermineStep(std::vector<double>& steplength,
251
252
253
std::vector<double>::iterator maxsteplength = max_element(steplength.begin(), steplength.end());
254
double a = *maxsteplength;
- assert(a > 1e-10);
255
+ double threshold=1e-10;
256
+ assert(a > threshold);
257
if(a >= maxstep)
258
259
double scale = maxstep / a;
0 commit comments