diff options
author | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2018-07-10 11:17:03 -0400 |
---|---|---|
committer | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2018-07-10 11:17:03 -0400 |
commit | 1810103bc9ac4c9a8d432d113f5ca6eae6560fb4 (patch) | |
tree | 0921569f0301915d726f6f2fb137aa172e96a3b7 /lib | |
parent | 88086fc222e1802d2a68edf5f1097cf9685ec42c (diff) | |
download | c++-1810103bc9ac4c9a8d432d113f5ca6eae6560fb4.tar.gz c++-1810103bc9ac4c9a8d432d113f5ca6eae6560fb4.tar.bz2 c++-1810103bc9ac4c9a8d432d113f5ca6eae6560fb4.zip |
minor reorganizing
Diffstat (limited to 'lib')
-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); + } +} + |