#include #include "glass.hpp" void print(const CiamarraSystem<2>& s) { for (const Vertex<2, CiamarraState<2>>& v : s.vertices) { if (v.state(0) == 1 && v.state(1) == 0) { std::cerr << "▶"; } else if (v.state(0) == -1 && v.state(1) == 0) { std::cerr << "◀"; } else if (v.state(0) == 0 && v.state(1) == -1) { std::cerr << "▲"; } else if (v.state(0) == 0 && v.state(1) == 1) { std::cerr << "▼"; } else if (v.state(0) == 0 && v.state(1) == 0) { std::cerr << " "; } else { std::cerr << "X"; } if (v.position(0) == s.L - 1) { std::cerr << std::endl; } } } template Vector randomVector(unsigned L, Rng& r) { Vector x; for (unsigned i = 0; i < D; i++) { x[i] = r.uniform((unsigned)0, L - 1); } return x; } int main() { const unsigned D = 3; unsigned L = 15; unsigned Nmin = 2e2; unsigned Nmax = 2e5; double Tmin = 0.04; double Tmax = 0.2; double δT = 0.02; CiamarraSystem s(L); Rng r; double z = exp(1 / 0.08); while (s.density() < 0.818) { s.sweepGrandCanonical(z, r); } if (!s.compatible()) { std::cerr << "Net compatible!" << std::endl; return 1; } std::cerr << "Found state with appropriate density." << std::endl; CiamarraSystem s0 = s; std::vector> ms = generateTorusMatrices(); unsigned n = 1; for (unsigned i = 0; i < 1e5; i++) { if (n < 20 * log(i + 1)) { n++; std::cout << i << " " << s.overlap(s0) << std::endl; } s.sweepLocal(r); // s.sweepSwap(r); // s.swendsenWang(Transformation(L, ms, r), r); } return 0; }