Commit JT 092419

- added inf norm option
This commit is contained in:
julient31
2019-09-24 13:58:56 -06:00
parent a0f0c23578
commit d9306a5865
12 changed files with 94 additions and 20 deletions

View File

@ -16,6 +16,7 @@
#include <cmath>
#include "universe.h"
#include "atom.h"
#include "error.h"
#include "force.h"
#include "update.h"
#include "output.h"
@ -250,8 +251,10 @@ int MinFire::iterate(int maxiter)
// sync across replicas if running multi-replica minimization
if (update->ftol > 0.0) {
if (normstyle == MAX) fdotf = fnorm_inf(); // max force norm
else 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;
} else {