summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2018-05-12 23:59:12 -0400
committerJaron Kent-Dobias <jaron@kent-dobias.com>2018-05-12 23:59:12 -0400
commit7ee46e45abea3261b2728aa4d0f03f939e123dc7 (patch)
tree40d07023893eaea1878474d2a61557465f9fb7d5
parentec96a308e11c4195fd278913acba3b675372cdb5 (diff)
downloadc++-7ee46e45abea3261b2728aa4d0f03f939e123dc7.tar.gz
c++-7ee46e45abea3261b2728aa4d0f03f939e123dc7.tar.bz2
c++-7ee46e45abea3261b2728aa4d0f03f939e123dc7.zip
changes
-rw-r--r--src/wolff_potts.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/wolff_potts.c b/src/wolff_potts.c
index 683b1a2..f40c216 100644
--- a/src/wolff_potts.c
+++ b/src/wolff_potts.c
@@ -177,9 +177,9 @@ int main(int argc, char *argv[]) {
autocorr->OO = (double *)calloc(2 * W + 1, sizeof(double));
}
- count_t *cluster_dist;
+ count_t *mag_dist;
if (record_distribution) {
- cluster_dist = (count_t *)calloc(h->nv, sizeof(count_t));
+ mag_dist = (count_t *)calloc(h->nv + 1, sizeof(count_t));
}
if (!silent) printf("\n");
@@ -212,7 +212,7 @@ int main(int argc, char *argv[]) {
}
if (record_distribution) {
- cluster_dist[tmp_flips - 1]++;
+ mag_dist[s->M[0]]++;
}
}
@@ -412,14 +412,14 @@ int main(int argc, char *argv[]) {
fprintf(outfile, ",Subscript[n,\"clust\"]->%.15f,Subscript[\\[Delta]n,\"clust\"]->%.15f,Subscript[m,\"clust\"]->%.15f,Subscript[\\[Delta]m,\"clust\"]->%.15f,\\[Tau]->%.15f,\\[Tau]s->%d", clust->x / h->nv, meas_dx(clust) / h->nv, meas_c(clust) / h->nv, meas_dc(clust) / h->nv,tau,tau_failed);
if (record_distribution) {
fprintf(outfile, ",S->{");
- for (v_t i = 0; i < h->nv; i++) {
- fprintf(outfile, "%" PRIcount, cluster_dist[i]);
- if (i != h->nv - 1) {
+ for (v_t i = 0; i < h->nv + 1; i++) {
+ fprintf(outfile, "%" PRIcount, mag_dist[i]);
+ if (i != h->nv) {
fprintf(outfile, ",");
}
}
fprintf(outfile, "}");
- free(cluster_dist);
+ free(mag_dist);
}
fprintf(outfile, "|>\n");