From 8a9793881d3dfa13440c516691144fd6cefa29db Mon Sep 17 00:00:00 2001 From: Jaron Kent-Dobias Date: Wed, 18 Jul 2018 16:10:34 -0400 Subject: some reorganization --- lib/vector.h | 6 ++++++ lib/wolff.h | 11 +---------- 2 files changed, 7 insertions(+), 10 deletions(-) (limited to 'lib') diff --git a/lib/vector.h b/lib/vector.h index 88934c1..6c72fd1 100644 --- a/lib/vector.h +++ b/lib/vector.h @@ -88,3 +88,9 @@ double correlation_component(vector_t v) { return (double)v.x[0]; } +template +double H_vector(vector_t v1, T *H) { + vector_t H_vec; + H_vec.x = H; + return (double)(dot (v1, H_vec)); +} diff --git a/lib/wolff.h b/lib/wolff.h index 2d7e8b2..eb357c7 100644 --- a/lib/wolff.h +++ b/lib/wolff.h @@ -2,13 +2,6 @@ #include "cluster.h" #include "state.h" -template -double H_vector(vector_t v1, T *H) { - vector_t H_vec; - H_vec.x = H; - return (double)(dot (v1, H_vec)); -} - template void wolff(count_t N, D_t D, L_t L, double T, std::function J, std::function H, std::function *)> gen_R, unsigned int n_measurements, std::function *)> *measurements, bool silent) { @@ -30,15 +23,13 @@ void wolff(count_t N, D_t D, L_t L, double T, std::function J for (unsigned int i = 0; i < n_measurements; i++) { measurements[i](&s); } - } + if (!silent) { printf("\033[F\033[J"); } printf("WOLFF: sweep %" PRIu64 " / %" PRIu64 ": E = %.2f, S = %" PRIv "\n", N, N, s.E, s.last_cluster_size); - fftw_cleanup(); - gsl_rng_free(r); } -- cgit v1.2.3-70-g09d2