revert changes to force tolerance computations

This commit is contained in:
Axel Kohlmeyer
2019-10-25 15:06:19 -04:00
parent 22288e06b7
commit a54f191c2a
3 changed files with 12 additions and 32 deletions

View File

@ -251,16 +251,10 @@ int MinFire::iterate(int maxiter)
// sync across replicas if running multi-replica minimization
if (update->ftol > 0.0) {
if (normstyle == MAX) {
fdotfloc = fnorm_max(); // max force norm
MPI_Allreduce(&fdotfloc,&fdotf,1,MPI_DOUBLE,MPI_MAX,universe->uworld);
} else if (normstyle == INF) {
fdotfloc = fnorm_inf(); // inf force norm
MPI_Allreduce(&fdotfloc,&fdotf,1,MPI_DOUBLE,MPI_MAX,universe->uworld);
} else if (normstyle == TWO) {
fdotf = fnorm_sqr(); // Euclidean force 2-norm
MPI_Allreduce(&fdotfloc,&fdotf,1,MPI_DOUBLE,MPI_SUM,universe->uworld);
} else error->all(FLERR,"Illegal min_modify command");
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;
} else {