summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2019-09-04 14:17:00 -0400
committerJaron Kent-Dobias <jaron@kent-dobias.com>2019-09-04 14:17:00 -0400
commit84295bbd28e0082943d9775b36a6097830360fe1 (patch)
treeeb1b6a027f7acc4877f95e06233f91a41e3e4f0a /src
parentaceb74882845c1a18e723563226c92450c3d476d (diff)
downloadcode-84295bbd28e0082943d9775b36a6097830360fe1.tar.gz
code-84295bbd28e0082943d9775b36a6097830360fe1.tar.bz2
code-84295bbd28e0082943d9775b36a6097830360fe1.zip
added option to not check convergence of magnetization at all
Diffstat (limited to 'src')
-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;
}
}