forked from lijiext/lammps
silence compiler warning and provide extra comment about optimization
This commit is contained in:
parent
45902772b7
commit
536e7a969a
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue