diff options
-rw-r--r-- | lib/orthogonal.h | 13 | ||||
-rw-r--r-- | lib/vector.h | 13 |
2 files changed, 13 insertions, 13 deletions
diff --git a/lib/orthogonal.h b/lib/orthogonal.h index 2d0e1a1..85f7a20 100644 --- a/lib/orthogonal.h +++ b/lib/orthogonal.h @@ -161,16 +161,3 @@ void generate_rotation (gsl_rng *r, orthogonal_t <q, double> *ptr) { } } -template <q_t q, class T> -void write_magnetization(vector_t <q, T> M, FILE *outfile) { - fwrite(M.x, sizeof(double), q, outfile); -} - -template <q_t q> // save some space and don't write whole doubles -void write_magnetization(vector_t <q, double> M, FILE *outfile) { - for (q_t i = 0; i < q; i++) { - float M_tmp = (float)M.x[i]; - fwrite(&M_tmp, sizeof(float), 1, outfile); - } -} - diff --git a/lib/vector.h b/lib/vector.h index c7f459c..62ce59e 100644 --- a/lib/vector.h +++ b/lib/vector.h @@ -70,3 +70,16 @@ void free_spin (vector_t <q, T> v) { free(v.x); } +template <q_t q, class T> +void write_magnetization(vector_t <q, T> M, FILE *outfile) { + fwrite(M.x, sizeof(double), q, outfile); +} + +template <q_t q> // save some space and don't write whole doubles +void write_magnetization(vector_t <q, double> M, FILE *outfile) { + for (q_t i = 0; i < q; i++) { + float M_tmp = (float)M.x[i]; + fwrite(&M_tmp, sizeof(float), 1, outfile); + } +} + |