diff options
author | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2018-10-19 01:26:14 -0400 |
---|---|---|
committer | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2018-10-19 01:26:14 -0400 |
commit | 643baba78eb15a685d959aae718ee3eeade2f806 (patch) | |
tree | 35c35e5e383f7ae1937574f3c764a0f60a448e6e /examples/On.cpp | |
parent | f2f7a072216dfafab89851e4ff3e0b2c3eb16663 (diff) | |
download | c++-643baba78eb15a685d959aae718ee3eeade2f806.tar.gz c++-643baba78eb15a685d959aae718ee3eeade2f806.tar.bz2 c++-643baba78eb15a685d959aae718ee3eeade2f806.zip |
big library overhual, fixed all examples, added documentation with sphinx
Diffstat (limited to 'examples/On.cpp')
-rw-r--r-- | examples/On.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/examples/On.cpp b/examples/On.cpp index e045f52..6c3f0fd 100644 --- a/examples/On.cpp +++ b/examples/On.cpp @@ -7,6 +7,7 @@ #include <wolff/models/vector.hpp> #include <wolff/models/orthogonal.hpp> + #include <wolff.hpp> int main(int argc, char *argv[]) { @@ -56,10 +57,13 @@ int main(int argc, char *argv[]) { return H * s; }; + // initialize the lattice + graph G(D, L); + // initialize the system - wolff_system<orthogonal_t<WOLFF_N, double>, vector_t<WOLFF_N, double>> S(D, L, T, Z, B); + system<orthogonal_t<WOLFF_N, double>, vector_t<WOLFF_N, double>> S(G, T, Z, B); - std::function <orthogonal_t<WOLFF_N, double>(std::mt19937&, const vector_t<WOLFF_N, double>&)> gen_R = generate_rotation_uniform<WOLFF_N>; + std::function <orthogonal_t<WOLFF_N, double>(std::mt19937&, const system<orthogonal_t<WOLFF_N, double>, vector_t<WOLFF_N, double>>&, v_t)> gen_R = generate_rotation_uniform<WOLFF_N>; // initailze the measurement object simple_measurement A(S); @@ -69,7 +73,7 @@ int main(int argc, char *argv[]) { std::mt19937 rng{seed}; // run wolff N times - wolff<orthogonal_t<WOLFF_N, double>, vector_t<WOLFF_N, double>>(N, S, gen_R, A, rng); + S.run_wolff(N, gen_R, A, rng); // print the result of our measurements std::cout << "Wolff complete!\nThe average energy per site was " << A.avgE() / S.nv |