LoU
README.md

LoU

Copyright (c) 2021 Noah Halberstam and Tom Hutchcroft Licensed under the MIT License http://opensource.org/licenses/MIT. SPDX-License-Identifier: MIT

Code has been refactored and reorganised for tidiness since gathering simulation data - may contain bugs as a result. Please email nh448@cam.ac.uk with any bugs found.

perc_xxx.cpp gives the code for the percolation simulations. LT_xxx.cpp gives the code for the lattice tree simulations.

To compile, run: g++ -O3 -std=c++17 xxx.cpp -o xxx

Each executable takes command line arguments which are explained in the code files next to the main function(s). They each write files as they run, with each file containing the output corresponding to a set number of samples.

The percolation files have pre-processor 'switches' to compile for different behaviours. For the files corresponding to non-Euclidean lattices, the RUN variable determines whether to run the code for the Leath algorithm or the invasion percolation algorithm. For the fractal percolation files perc_H1H2.cpp and perc_mult_fractals.cpp, the TYPE variable determines which fractal type to run on. Where applicable, the TERM variable determines the stopping condition for the Leath algorithm.

Thanks to https://github.com/martinus/robin-hood-hashing for fast maps/hashing.

Credit to Leo Goodstadt (https://stackoverflow.com/questions/7110301/generic-hash-for-tuples-in-unordered-map-unordered-set) for recursive tuple hashing code.