diff options
author | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2021-08-02 18:09:53 +0200 |
---|---|---|
committer | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2021-08-02 18:09:53 +0200 |
commit | fb4c5ffab6a3648ef7d9d3558cd4f9edc1fe2254 (patch) | |
tree | 60cb9e3a2ed2a6065b28253a74b1a6d785094f8d /distinguishable.cpp | |
parent | 3e9beab27c343d1008199302e644c3e740d66592 (diff) | |
download | lattice_glass-master.tar.gz lattice_glass-master.tar.bz2 lattice_glass-master.zip |
Diffstat (limited to 'distinguishable.cpp')
-rw-r--r-- | distinguishable.cpp | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/distinguishable.cpp b/distinguishable.cpp index 0aae0c1..de71c47 100644 --- a/distinguishable.cpp +++ b/distinguishable.cpp @@ -53,7 +53,7 @@ int main() { unsigned N = 1560; double Tmin = 0; double Tmax = 0.4; - double δT = 0.02; + double δT = 0.05; Rng r; @@ -86,23 +86,29 @@ int main() { /* */ std::cout << T << " "; + for (unsigned i = 0; i < 1e3; i++) { + for (unsigned j = 0; j < s.vertices.size(); j++) { + s.tryRandomSwap(T, r); + } + } s.setInitialPosition(); + DistinguishableSystem<D> s0 = s; auto start = std::chrono::high_resolution_clock::now(); - Quantity<double> energy(1e3); +// Quantity<double> energy(1e3); for (unsigned i = 0; i < 1e5; i++) { + /* for (unsigned j = 0; j < s.vertices.size(); j++) { s.tryRandomSwap(T, r); } - /* + */ Matrix<D> m = r.pick(ms); Vertex<D, DistinguishableState>& v = r.pick(s.vertices); s.wolff(Transformation<D>(L, m, v.position - m * v.position), T, r); - */ if (i % 10 == 0) { - energy.add(s.energy()); +// 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.overlap(s0) << " "; } } /* @@ -114,12 +120,14 @@ 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); // s.swendsenWang(Transformation<D>(L, ms, r), r); |