From 52c7cfffb77caf42b41678bbfef8588517a57d40 Mon Sep 17 00:00:00 2001 From: Jaron Kent-Dobias Date: Wed, 31 Jul 2019 18:12:07 -0400 Subject: now recording number of samples and the full correlation function --- ising.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ising.cpp b/ising.cpp index 9ca6060..ca2e2e7 100644 --- a/ising.cpp +++ b/ising.cpp @@ -148,7 +148,7 @@ int main(int argc, char* argv[]) { while (true) { ising.wolff(T, N, rng); std::array τ = ising.Eq.τ(); - std::cout << τ[0] << " " << τ[1] << " " << τ[1] / τ[0] << "\n"; + std::cout << ising.Eq.num_added() << " " << τ[0] << " " << τ[1] << " " << τ[1] / τ[0] << "\n"; if (τ[1] / τ[0] < ε && τ[0] * multi < ising.Eq.num_added()) { break; } @@ -165,8 +165,13 @@ int main(int argc, char* argv[]) { outfile.open("out.dat", std::ios::app); std::array act = ising.Eq.τ(); + std::vector ρ = ising.Eq.ρ(); - outfile << L << " " << T << " " << mod << " " << H << " " << ising.Cq.avg() << " " << ising.Cq.serr() << " " << act[0] << " " << act[1] << "\n"; + outfile << L << " " << T << " " << mod << " " << H << " " << ising.Eq.num_added() << " " << ising.Cq.avg() << " " << ising.Cq.serr() << " " << act[0] << " " << act[1]; + for (double ρi : ρ) { + outfile << " " << ρi; + } + outfile << "\n"; return 0; } -- cgit v1.2.3-54-g00ecf