summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2019-07-31 18:12:07 -0400
committerJaron Kent-Dobias <jaron@kent-dobias.com>2019-07-31 18:12:07 -0400
commit52c7cfffb77caf42b41678bbfef8588517a57d40 (patch)
treea1bcbec05bdf3f5e03d0f131c32058e40856f183
parent91bcb56c0cd86002a403671a8dbd74d6d5540028 (diff)
downloadspace_wolff-52c7cfffb77caf42b41678bbfef8588517a57d40.tar.gz
space_wolff-52c7cfffb77caf42b41678bbfef8588517a57d40.tar.bz2
space_wolff-52c7cfffb77caf42b41678bbfef8588517a57d40.zip
now recording number of samples and the full correlation function
-rw-r--r--ising.cpp9
1 files 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<double, 2> τ = 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<double, 2> act = ising.Eq.τ();
+ std::vector<double> ρ = 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;
}