silence compiler warning and provide extra comment about optimization

This commit is contained in:
Axel Kohlmeyer 2020-03-09 09:17:49 -04:00
parent 45902772b7
commit 536e7a969a
No known key found for this signature in database
GPG Key ID: D9B44E93BF0C375A
1 changed files with 2 additions and 1 deletions

View File

@ -109,10 +109,11 @@ int MinCG::iterate(int maxiter)
dotall[1] += fextra[i]*gextra[i];
}
fdotf = 0.0;
if (update->ftol > 0.0) {
if (normstyle == MAX) fdotf = fnorm_max(); // max force norm
else if (normstyle == INF) fdotf = fnorm_inf(); // infinite force norm
else if (normstyle == TWO) fdotf = dotall[0]; // Euclidean force 2-norm
else if (normstyle == TWO) fdotf = dotall[0]; // same as fnorm_sqr(), Euclidean force 2-norm
else error->all(FLERR,"Illegal min_modify command");
if (fdotf < update->ftol*update->ftol) return FTOL;
}