diff options
Diffstat (limited to 'distinguishable.cpp')
-rw-r--r-- | distinguishable.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/distinguishable.cpp b/distinguishable.cpp index b739927..0aae0c1 100644 --- a/distinguishable.cpp +++ b/distinguishable.cpp @@ -1,6 +1,7 @@ #include <iostream> #include "glass.hpp" +#include "quantity.hpp" class DistinguishableState { public: @@ -71,6 +72,7 @@ int main() { } } + unsigned n = 1; for (double T = Tmax; T > Tmin; T -= δT) { @@ -86,6 +88,7 @@ int main() { std::cout << T << " "; s.setInitialPosition(); auto start = std::chrono::high_resolution_clock::now(); + Quantity<double> energy(1e3); for (unsigned i = 0; i < 1e5; i++) { for (unsigned j = 0; j < s.vertices.size(); j++) { s.tryRandomSwap(T, r); @@ -96,9 +99,10 @@ int main() { s.wolff(Transformation<D>(L, m, v.position - m * v.position), T, r); */ if (i % 10 == 0) { + energy.add(s.energy()); auto stop = std::chrono::high_resolution_clock::now(); auto duration = duration_cast<std::chrono::microseconds>(stop - start); - std::cout << duration.count() << " " << s.selfIntermediateScattering(ms) << " "; + std::cout /*<< duration.count() << " "*/ << s.selfIntermediateScattering(ms) << " "; } } /* @@ -110,6 +114,11 @@ int main() { } */ std::cout << std::endl; + std::vector<double> rho = energy.ρ(); + for (const double& x : rho) { + std::cout << x << " "; + } + std::cout << std::endl; std::cerr << T << " " << s.energy() / N << std::endl; // s.sweepLocal(r); // s.sweepSwap(r); |