summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/new_model.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/new_model.cpp b/src/new_model.cpp
index fdfc128..1886aa0 100644
--- a/src/new_model.cpp
+++ b/src/new_model.cpp
@@ -477,7 +477,7 @@ int main (int argc, char *argv[]) {
double err = mi.A2.serr();
double val2 = stiffness.avg();
double err2 = stiffness.serr();
- if (err / mi.A2.avg() <= εmag && err2 / val2 < εstiff) {
+ if ((err / mi.A2.avg() <= εmag || εmag == 0) && err2 / val2 < εstiff) {
break;
}
}