Commit JT 110419

- removed fmax uninitialized variable from min_cg.cpp
- removed tabs from comments
- initialized fdotf variables
This commit is contained in:
julient31
2019-11-04 09:04:43 -07:00
parent 9159a43d5d
commit 1074884f74
7 changed files with 34 additions and 32 deletions

View File

@ -250,10 +250,11 @@ int MinFire::iterate(int maxiter)
// force tolerance criterion
// sync across replicas if running multi-replica minimization
fdotf = 0.0;
if (update->ftol > 0.0) {
if (normstyle == MAX) fdotf = fnorm_max(); // max force norm
else if (normstyle == INF) fdotf = fnorm_inf(); // inf force norm
else if (normstyle == TWO) fdotf = fnorm_sqr(); // Euclidean force 2-norm
if (normstyle == MAX) fdotf = fnorm_max(); // max force norm
else if (normstyle == INF) fdotf = fnorm_inf(); // inf force norm
else if (normstyle == TWO) fdotf = fnorm_sqr(); // Euclidean force 2-norm
else error->all(FLERR,"Illegal min_modify command");
if (update->multireplica == 0) {
if (fdotf < update->ftol*update->ftol) return FTOL;