Commit JT 092319

- modified norm input in min_modify
- corrected doc/src/min_modify.txt
- added expression of the norms
- added a min max method in src/min.h
This commit is contained in:
julient31
2019-09-23 11:12:31 -06:00
parent f1563ed988
commit 56e1a05287
13 changed files with 109 additions and 46 deletions

View File

@ -250,15 +250,8 @@ int MinFire::iterate(int maxiter)
// sync across replicas if running multi-replica minimization
if (update->ftol > 0.0) {
if (normstyle == 1) { // max force norm
fdotf = fnorm_inf();
fdotfloc = fdotf;
MPI_Allreduce(&fdotfloc,&fdotf,1,MPI_INT,MPI_MAX,universe->uworld);
} else { // Euclidean force norm
fdotf = fnorm_sqr();
fdotfloc = fdotf;
MPI_Allreduce(&fdotfloc,&fdotf,1,MPI_INT,MPI_SUM,universe->uworld);
}
if (normstyle == MAX) fdotf = fnorm_inf(); // max force norm
else fdotf = fnorm_sqr(); // Euclidean force 2-norm
if (update->multireplica == 0) {
if (fdotf < update->ftol*update->ftol) return FTOL;
} else {