summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/wolff_finite.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/wolff_finite.c b/src/wolff_finite.c
index 4bf96b9..05fa154 100644
--- a/src/wolff_finite.c
+++ b/src/wolff_finite.c
@@ -138,11 +138,14 @@ int main(int argc, char *argv[]) {
// as a fast time many machines will actually have it be 64 bits. we cast
// it down here to halve space.
- for (q_t i = 0; i < s->q - 1; i++) { // if we know the occupation of the first q - 1 states, we know the occupation of the last
- fwrite(&(s->M[i]), sizeof(uint32_t), 1, outfile_M);
+ for (q_t i = 0; i < s->n_bond_types - 1; i++) { // if we know the occupation of all but one state we know the occupation of the last
fwrite(&(s->B[i]), sizeof(uint32_t), 1, outfile_B);
}
+ for (q_t i = 0; i < s->q - 1; i++) { // if we know the occupation of all but one state we know the occupation of the last
+ fwrite(&(s->M[i]), sizeof(uint32_t), 1, outfile_M);
+ }
+
fwrite(&cluster_size, sizeof(uint32_t), 1, outfile_S);
}