summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2017-10-12 18:00:24 -0400
committerJaron Kent-Dobias <jaron@kent-dobias.com>2017-10-12 18:00:24 -0400
commite0135494451d5026734f6d0df6bdfed50662b93e (patch)
treeaaf403259861bb70c24d5a4846a994375df94cff /src
parentf6b85f7a59ba21840a2ab82689e0b1bf41ade04e (diff)
downloadc++-e0135494451d5026734f6d0df6bdfed50662b93e.tar.gz
c++-e0135494451d5026734f6d0df6bdfed50662b93e.tar.bz2
c++-e0135494451d5026734f6d0df6bdfed50662b93e.zip
fixed the metastable test condition
Diffstat (limited to 'src')
-rw-r--r--src/wolff.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/wolff.c b/src/wolff.c
index 981a090..da57057 100644
--- a/src/wolff.c
+++ b/src/wolff.c
@@ -123,11 +123,6 @@ int main(int argc, char *argv[]) {
n_clust++;
}
- double ss = 1;
- if (s->spins[s->g->nv - 1]) {
- ss = -1;
- }
-
double HH = 1;
if (H < 0) {
HH = -1;
@@ -137,7 +132,7 @@ int main(int argc, char *argv[]) {
update_meas(aM, HH * fabs((double)(s->M)));
update_meas(E, s->H);
- if (HH * s->M * ss > 0) {
+ if (s->M > 0) {
update_meas(eM, HH * fabs((double)(s->M)));
update_meas(eE, s->H);
} else {