summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/graph.h2
-rw-r--r--src/wolff.c6
2 files changed, 5 insertions, 3 deletions
diff --git a/lib/graph.h b/lib/graph.h
index eda7630..9c80dd6 100644
--- a/lib/graph.h
+++ b/lib/graph.h
@@ -16,3 +16,5 @@ graph_t *graph_create_square(D_t D, L_t L);
graph_t *graph_add_ext(const graph_t *G);
+void graph_free(graph_t *h);
+
diff --git a/src/wolff.c b/src/wolff.c
index 2a10b7a..d577b00 100644
--- a/src/wolff.c
+++ b/src/wolff.c
@@ -139,7 +139,7 @@ int main(int argc, char *argv[]) {
if (pretend_ising) {
fprintf(outfile,
- "%u %.15f %" PRIu64 " %.15f %.15f %.15f %.15f %.15f %.15f %.15f %.15f\n",
+ "%" PRIL " %.15f %" PRIcount " %.15f %.15f %.15f %.15f %.15f %.15f %.15f %.15f\n",
L, 2 * T, n_runs,
(2 * E->x - h->ne) / h->nv, 2 * E->dx / h->nv, (M[0]->x - M[1]->x) / h->nv, M[0]->dx / h->nv, 4 * E->c / h->nv, 4 * E->dc / h->nv, 4 * M[0]->c / h->nv, 4 * M[0]->dc / h->nv);
} else {
@@ -178,10 +178,10 @@ int main(int argc, char *argv[]) {
free(s->H_probs);
free(s->M);
free(s->spins);
- free(s->g);
+ graph_free(s->g);
free(s);
free(H);
- free(h);
+ graph_free(h);
return 0;
}