diff --git a/.gitignore b/.gitignore index 3293757..03bd081 100644 --- a/.gitignore +++ b/.gitignore @@ -41,17 +41,8 @@ latex/*.pdf latex/*Notes.bib - -# C++ specifics -src/* -!src/Makefile -!src/*.cpp -!src/*.hpp -!src/*.py -!src/scripts - -!src/output -!src/fox_output - -# Job -!src/jobs/* +# C++ +build +bin +prof +debug diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..79ee877 --- /dev/null +++ b/Makefile @@ -0,0 +1,98 @@ +# The compiler +CC=mpicxx + +# Flags +CFLAGS=-Wall -larmadillo -std=c++11 -O3 -fopenmp +PROFFLAGS=-fno-inline-functions +DBGFLAGS=-DDBG -g + +MKDIR=mkdir -p +RMDIR=rm -rf +INSTRUMENT=scorep + +# Directories for binaries +BINDIR=./bin +PROFDIR=./prof +DEBUGDIR=./debug + +# Directories for object files +BUILDDIR=./build +BINOBJDIR=$(BUILDDIR)/objs +PROFOBJDIR=$(BUILDDIR)/prof +DEBUGOBJDIR=$(BUILDDIR)/debug + +# Directory for latex source +LATEXDIR=./latex + +# Source directories +SRC=./src +INCLUDE=./include + +# Source files and object file locations +SRCFILES=utils.cpp testlib.cpp data_type.cpp IsingModel.cpp monte_carlo.cpp +SRCS=$(addprefix $(SRC)/, $(SRCS)) +BINOBJS=$(addprefix $(BINOBJDIR)/, $(SRCFILES:.cpp=.o)) +PROFOBJS=$(addprefix $(PROFOBJDIR)/, $(SRCFILES:.cpp=.o)) +DEBUGOBJS=$(addprefix $(DEBUGOBJDIR)/, $(SRCFILES:.cpp=.o)) + +# Location for Binaries +EXEC=main test_suite phase_transition phase_transition_mpi time pd_estimate mcmc_progression +BINS=$(addprefix $(BINDIR)/, $(EXEC)) +PROFBINS=$(PROFDIR)/phase_transition_mpi +DEBUGBINS=$(addprefix $(DEBUGDIR)/, $(EXEC)) + +# List phony targets +.PHONY: all profile debug latex clean binclean objclean latexclean + +# "Commands" +all: $(BINS) + +profile: $(PROFBINS) + +debug: $(DEBUGBINS) + +# build latex file +latex: + $(MAKE) -C $(LATEXDIR) + +# Rule for binaries +$(BINDIR)/%: $(BINOBJDIR)/%.o $(BINOBJS) + $(MKDIR) $(BINDIR) + $(CC) $^ -o $@ $(CFLAGS) -I$(INCLUDE) + +# Rule for profiling binaries +$(PROFDIR)/%: $(PROFOBJDIR)/%.o $(PROFOBJS) + $(MKDIR) $(PROFDIR) + $(INSTRUMENT) $(CC) $^ -o $@ $(CFLAGS) $(PROFFLAGS) -I$(INCLUDE) + +# Rule for debug binaries +$(DEBUGDIR)/%: $(DEBUGOBJDIR)/%.o $(DEBUGOBJS) + $(MKDIR) $(DEBUGDIR) + $(CC) $^ -o $@ $(CFLAGS) $(DBGFLAGS) -I$(INCLUDE) + +# Rule for object files +$(BINOBJDIR)/%.o: $(SRC)/%.cpp + $(MKDIR) $(BINOBJDIR) + $(CC) -c $^ -o $@ $(CFLAGS) -I$(INCLUDE) + +# Rule for instrumented object files +$(PROFOBJDIR)/%.o: $(SRC)/%.cpp + $(MKDIR) $(PROFOBJDIR) + $(INSTRUMENT) $(CC) -c $^ -o $@ $(CFLAGS) $(PROFFLAGS) -I$(INCLUDE) + +# Rule for debug object files +$(DEBUGOBJDIR)/%.o: $(SRC)/%.cpp + $(MKDIR) $(DEBUGOBJDIR) + $(CC) -c $^ -o $@ $(CFLAGS) $(DBGFLAGS) -I$(INCLUDE) + +# Cleaning +clean: objclean binclean latexclean + +latexclean: + $(MAKE) -C $(LATEXDIR) clean + +objclean: + $(RMDIR) $(BUILDDIR) + +binclean: + $(RMDIR) $(BINDIR) $(PROFDIR) $(DEBUGDIR) diff --git a/README.md b/README.md index 1b277fb..5a7aac9 100644 --- a/README.md +++ b/README.md @@ -9,48 +9,79 @@ ### Operating systems - Linux - - Has been tested on [Fedora 38](https://fedoraproject.org/) - - Will most likely work on other Linux distributions + - Has been tested on [Fedora 38](https://fedoraproject.org/) + - Will most likely work on other Linux distributions - MacOS - - Might work, but hasn't been tested + - Might work, but hasn't been tested - Windows - - Will most likely not work + - Will most likely not work ### Tools - Profiling - - [gprof](https://ftp.gnu.org/old-gnu/Manuals/gprof-2.9.1/html_mono/gprof.html) - - [scalasca](https://www.scalasca.org/) - - [score-p](https://www.vi-hps.org/projects/score-p) + - [score-p](https://www.vi-hps.org/projects/score-p) ### Libraries - Python - - [matplotlib](https://matplotlib.org/) - - [numpy](https://numpy.org/) + + - [matplotlib](https://matplotlib.org/) + - [numpy](https://numpy.org/) - C++ - - [Openmp](https://www.openmp.org/) - - [OpenMPI](https://www.open-mpi.org/) - - [Armadillo](https://arma.sourceforge.net/) - + - [Openmp](https://www.openmp.org/) + - [OpenMPI](https://www.open-mpi.org/) + - [Armadillo](https://arma.sourceforge.net/) ## Compiling -Compiling is as easy as running this command while being inside the src directory: +The commands shown here should be run from the root of this project. + +### Normal binaries + +Compiling regular binaries is as easy as running this command: ```shell make ``` +The binaries will then be inside the **./bin** directory. + +### Profiling binaries + +If you want to profile the programs (specifically the MPI program), then run this command + +```shell + make profile +``` + +The binaries will then be inside the **./prof** directory. + +### Debugging binaries + +If you want to debug the code, then use this command: + +```shell + make debug +``` + +The binaries will then be inside the **./debug** directory. + ## Running programs ### C++ binaries -To run **main** or **test_suite**, just run this command while being inside src: +To run any of the programs, just use the following command: ```shell - ./ + .// +``` + +If you need help with any of the programs, you can use the **-h** or **--help** +flag to show you how to use the programs. Here is an example: + +```shell + ./bin/main --help ``` ### Python scripts @@ -68,62 +99,98 @@ This recursively install all the packages that are listed in **requirements.txt* #### Running scripts -For the Python scripts, run them from the src directory like this: +For the Python scripts, run them from the root of the project: ```shell - python scripts/ + python python_scripts/ ``` If you have any problems running the scripts, you might have to run this instead: ```shell - python3 scripts/ + python3 python_scripts/ ``` ### Batch system -For the **phase_transition_mpi** program, there are scripts in the **src/jobs** +For the **phase_transition_mpi** program, there are scripts in the **./slurm_scripts** directory that come along with it. This is to be able to run it on a -batch system using Slurm if you have access to one. -This is the recommended way to use this program as it takes approximately 90 +batch system using Slurm if you have access to one. +The only program that should be executed by the user is the **./slurm_scripts/execute.script** +script. You can see how to use this script by doing: + +```shell + ./slurm_scripts/execute.script --help +``` + +This is the recommended way to use this program as it takes approximately 90 minutes to complete when using 8 processes where each process has 10 threads. If you happen to have such a system available to you, then you should clone -this repo on that system, then compile it by running: +this repo on that system, then compile the MPI program like this: ```shell - make phase_transition_mpi + make bin/phase_transition_mpi ``` -You might have to load the Armadillo library using the **module** system before compiling. - -After compiling, you can schedule it by running: +After compiling, you can schedule it by using the **./slurm_scripts/execute.script**: ```shell - sbatch jobs/ + ./slurm_scripts/execute.script ``` ## Performance -This section aims to give an idea to the time it takes for the program to -run so that you know a bit what to expect if you decide to run it for -yourself. +This section aims to give an idea to the time it takes for the phase transition +program to run so that you know a bit what to expect if you decide to run it +for yourself. ### CPU -The times mentioned here are times achieved on a computer with these +The times mentioned here are times achieved on a computer with these specifications: - CPU model - - Intel i7-9850H + - Intel i7-9850H - Threads - - 12 + - 12 - Clock speed - - 4.6GHz + - 4.6GHz ### Times +Note that all times here are recorded using the OpenMP implementation of the +MCMC algorithm. + +| lattice size | points | samples | burn-in time | time (seconds) | +| ------------ | ------ | ------- | ------------ | -------------- | +| 20 | 20 | 100000 | 0 | 3.20 | +| 20 | 40 | 100000 | 0 | 6.17 | +| 20 | 80 | 100000 | 0 | 12.11 | + +| lattice size | points | samples | burn-in time | time (seconds) | +| ------------ | ------ | ------- | ------------ | -------------- | +| 20 | 20 | 100000 | 0 | 3.20 | +| 40 | 20 | 100000 | 0 | 11.91 | +| 80 | 20 | 100000 | 0 | 47.88 | + +| lattice size | points | samples | burn-in time | time (seconds) | +| ------------ | ------ | -------- | ------------ | -------------- | +| 20 | 20 | 100000 | 0 | 3.20 | +| 20 | 20 | 1000000 | 0 | 29.95 | +| 20 | 20 | 10000000 | 0 | 305.849 | + +| lattice size | points | samples | burn-in time | time (seconds) | +| ------------ | ------ | ------- | ------------ | -------------- | +| 20 | 20 | 100000 | 0 | 3.20 | +| 20 | 20 | 100000 | 5000 | 4.93 | +| 20 | 20 | 100000 | 10000 | 6.58 | + +We can see that changing the number of points, samples and burn-in time +changes the time in a linear fashion, while changing the size of the lattice +changes the time in a square fashion. + ## Credits -The Doxygen theme used here is +The Doxygen theme used here is [doxygen-awesome-css](https://github.com/jothepro/doxygen-awesome-css). diff --git a/src/fox_output/phase_transition/narrow/10M/size_100.txt b/data/fox/phase_transition/narrow/10M/size_100.txt similarity index 100% rename from src/fox_output/phase_transition/narrow/10M/size_100.txt rename to data/fox/phase_transition/narrow/10M/size_100.txt diff --git a/src/fox_output/phase_transition/narrow/10M/size_20.txt b/data/fox/phase_transition/narrow/10M/size_20.txt similarity index 100% rename from src/fox_output/phase_transition/narrow/10M/size_20.txt rename to data/fox/phase_transition/narrow/10M/size_20.txt diff --git a/src/fox_output/phase_transition/narrow/10M/size_40.txt b/data/fox/phase_transition/narrow/10M/size_40.txt similarity index 100% rename from src/fox_output/phase_transition/narrow/10M/size_40.txt rename to data/fox/phase_transition/narrow/10M/size_40.txt diff --git a/src/fox_output/phase_transition/narrow/10M/size_60.txt b/data/fox/phase_transition/narrow/10M/size_60.txt similarity index 100% rename from src/fox_output/phase_transition/narrow/10M/size_60.txt rename to data/fox/phase_transition/narrow/10M/size_60.txt diff --git a/src/fox_output/phase_transition/narrow/10M/size_80.txt b/data/fox/phase_transition/narrow/10M/size_80.txt similarity index 100% rename from src/fox_output/phase_transition/narrow/10M/size_80.txt rename to data/fox/phase_transition/narrow/10M/size_80.txt diff --git a/data/fox/phase_transition/wide/10M/size_100.txt b/data/fox/phase_transition/wide/10M/size_100.txt new file mode 100644 index 0000000..bffb826 --- /dev/null +++ b/data/fox/phase_transition/wide/10M/size_100.txt @@ -0,0 +1,40 @@ + 2.1000000000e+00, -1.6620471860e+00, 8.6837847062e-01, 9.6987901915e-01, 2.1418681981e+00 + 2.1075000000e+00, -1.6547036218e+00, 8.6419527824e-01, 9.9055450045e-01, 1.5516821620e+00 + 2.1150000000e+00, -1.6471712127e+00, 8.5889498242e-01, 1.0307044416e+00, 5.0154079785e+00 + 2.1225000000e+00, -1.6394554821e+00, 8.5410134604e-01, 1.0554197754e+00, 5.0853102382e+00 + 2.1300000000e+00, -1.6317009068e+00, 8.5030836330e-01, 1.0644327099e+00, 1.3879469469e+00 + 2.1375000000e+00, -1.6235855819e+00, 8.4457168236e-01, 1.0964297345e+00, 3.2163187667e+00 + 2.1450000000e+00, -1.6153651211e+00, 8.3921329408e-01, 1.1282891384e+00, 2.8603834041e+00 + 2.1525000000e+00, -1.6069284413e+00, 8.3381877564e-01, 1.1501591168e+00, 1.8910182298e+00 + 2.1600000000e+00, -1.5981165811e+00, 8.2747150680e-01, 1.1817661410e+00, 2.1354099415e+00 + 2.1675000000e+00, -1.5891378106e+00, 8.2084448842e-01, 1.2197566339e+00, 2.4155794425e+00 + 2.1750000000e+00, -1.5797094049e+00, 8.1321068938e-01, 1.2641513812e+00, 3.0149765488e+00 + 2.1825000000e+00, -1.5701584039e+00, 8.0541423312e-01, 1.3124122049e+00, 3.9587707947e+00 + 2.1900000000e+00, -1.5603483824e+00, 7.9735695412e-01, 1.3476320531e+00, 3.8540398382e+00 + 2.1975000000e+00, -1.5500480560e+00, 7.8831603064e-01, 1.3922915052e+00, 4.3804288919e+00 + 2.2050000000e+00, -1.5392950705e+00, 7.7778908650e-01, 1.4515119877e+00, 5.5484814383e+00 + 2.2125000000e+00, -1.5281208523e+00, 7.6629541204e-01, 1.5125757969e+00, 6.9204334142e+00 + 2.2200000000e+00, -1.5166346270e+00, 7.5366782028e-01, 1.5796162879e+00, 8.9312669120e+00 + 2.2275000000e+00, -1.5044004974e+00, 7.3859931438e-01, 1.6675760695e+00, 1.1992997980e+01 + 2.2350000000e+00, -1.4915752215e+00, 7.2154055728e-01, 1.7572918622e+00, 1.5859942066e+01 + 2.2425000000e+00, -1.4779456611e+00, 6.9995845836e-01, 1.8877650612e+00, 2.5128222072e+01 + 2.2500000000e+00, -1.4631248324e+00, 6.7183295970e-01, 2.0375643049e+00, 4.0950597375e+01 + 2.2575000000e+00, -1.4483340448e+00, 6.4481081136e-01, 2.1363904619e+00, 5.0989634294e+01 + 2.2650000000e+00, -1.4301678584e+00, 5.9447742824e-01, 2.3549214218e+00, 8.6520442728e+01 + 2.2725000000e+00, -1.4125256168e+00, 5.4541705588e-01, 2.4409857833e+00, 1.1143673443e+02 + 2.2800000000e+00, -1.3932486989e+00, 4.7747014982e-01, 2.4869007197e+00, 1.4756130892e+02 + 2.2875000000e+00, -1.3758151084e+00, 4.2227933526e-01, 2.3765851530e+00, 1.5334621858e+02 + 2.2950000000e+00, -1.3584812141e+00, 3.6214249800e-01, 2.2164213315e+00, 1.5204633512e+02 + 2.3025000000e+00, -1.3428821801e+00, 3.1406428052e-01, 2.0388367451e+00, 1.3861456664e+02 + 2.3100000000e+00, -1.3281767473e+00, 2.7180898806e-01, 1.8560155209e+00, 1.2007248997e+02 + 2.3175000000e+00, -1.3147565932e+00, 2.3751001854e-01, 1.7054312111e+00, 1.0111227357e+02 + 2.3250000000e+00, -1.3019875190e+00, 2.0643039502e-01, 1.5928851526e+00, 8.4258305804e+01 + 2.3325000000e+00, -1.2909072244e+00, 1.9102327048e-01, 1.5158086569e+00, 7.4343094525e+01 + 2.3400000000e+00, -1.2797500061e+00, 1.7101472042e-01, 1.4477874645e+00, 6.2467715867e+01 + 2.3475000000e+00, -1.2692217480e+00, 1.5673128652e-01, 1.3828951741e+00, 5.3024410679e+01 + 2.3550000000e+00, -1.2586897696e+00, 1.4379981552e-01, 1.3288944041e+00, 4.5759935334e+01 + 2.3625000000e+00, -1.2488592337e+00, 1.3380434730e-01, 1.2871413834e+00, 4.0125030469e+01 + 2.3700000000e+00, -1.2393790596e+00, 1.2494057972e-01, 1.2462862615e+00, 3.5082953700e+01 + 2.3775000000e+00, -1.2301411634e+00, 1.1821908046e-01, 1.2175194819e+00, 3.1990631554e+01 + 2.3850000000e+00, -1.2211819087e+00, 1.1084843416e-01, 1.1803579575e+00, 2.8150549990e+01 + 2.3925000000e+00, -1.2124257007e+00, 1.0527035490e-01, 1.1487733808e+00, 2.5296046050e+01 diff --git a/data/fox/phase_transition/wide/10M/size_20.txt b/data/fox/phase_transition/wide/10M/size_20.txt new file mode 100644 index 0000000..0da6964 --- /dev/null +++ b/data/fox/phase_transition/wide/10M/size_20.txt @@ -0,0 +1,40 @@ + 2.1000000000e+00, -1.6622528070e+00, 8.6880915500e-01, 9.6239316922e-01, 9.5212282251e-01 + 2.1075000000e+00, -1.6547466880e+00, 8.6426446250e-01, 9.8568668070e-01, 1.0606086002e+00 + 2.1150000000e+00, -1.6473733840e+00, 8.6007684050e-01, 1.0068394779e+00, 1.1148792535e+00 + 2.1225000000e+00, -1.6395861480e+00, 8.5518518350e-01, 1.0343943640e+00, 1.2324309483e+00 + 2.1300000000e+00, -1.6314132270e+00, 8.5002981000e-01, 1.0616707461e+00, 1.3481443589e+00 + 2.1375000000e+00, -1.6236834090e+00, 8.4511414300e-01, 1.0853696854e+00, 1.4619561069e+00 + 2.1450000000e+00, -1.6156703270e+00, 8.3992619550e-01, 1.1116490731e+00, 1.5835111870e+00 + 2.1525000000e+00, -1.6068605780e+00, 8.3370922550e-01, 1.1449166697e+00, 1.7649671682e+00 + 2.1600000000e+00, -1.5982437110e+00, 8.2788822850e-01, 1.1705193552e+00, 1.8981076553e+00 + 2.1675000000e+00, -1.5892297800e+00, 8.2140612200e-01, 1.2028598884e+00, 2.0786506142e+00 + 2.1750000000e+00, -1.5803012150e+00, 8.1507840300e-01, 1.2290730057e+00, 2.2390879297e+00 + 2.1825000000e+00, -1.5713317960e+00, 8.0845139750e-01, 1.2601658304e+00, 2.4161179891e+00 + 2.1900000000e+00, -1.5614643610e+00, 8.0038829950e-01, 1.2958486101e+00, 2.7080794942e+00 + 2.1975000000e+00, -1.5519162310e+00, 7.9325058550e-01, 1.3240109357e+00, 2.8800234678e+00 + 2.2050000000e+00, -1.5415927040e+00, 7.8466606550e-01, 1.3577396936e+00, 3.1618193080e+00 + 2.2125000000e+00, -1.5310635800e+00, 7.7536211700e-01, 1.3957317483e+00, 3.5081509652e+00 + 2.2200000000e+00, -1.5201748410e+00, 7.6560761850e-01, 1.4304588053e+00, 3.8471025905e+00 + 2.2275000000e+00, -1.5095557370e+00, 7.5641836200e-01, 1.4629601638e+00, 4.1369437215e+00 + 2.2350000000e+00, -1.4986980980e+00, 7.4657005750e-01, 1.4903049013e+00, 4.4468756675e+00 + 2.2425000000e+00, -1.4869949950e+00, 7.3532944700e-01, 1.5242443492e+00, 4.8138149636e+00 + 2.2500000000e+00, -1.4755208370e+00, 7.2427309400e-01, 1.5494194180e+00, 5.1799770840e+00 + 2.2575000000e+00, -1.4640478860e+00, 7.1321379150e-01, 1.5715272228e+00, 5.4707341877e+00 + 2.2650000000e+00, -1.4517405350e+00, 7.0044013150e-01, 1.6027331143e+00, 5.9108178952e+00 + 2.2725000000e+00, -1.4400095140e+00, 6.8832802700e-01, 1.6208899990e+00, 6.2494150462e+00 + 2.2800000000e+00, -1.4279356170e+00, 6.7582049850e-01, 1.6346525202e+00, 6.5785711535e+00 + 2.2875000000e+00, -1.4149043910e+00, 6.6136669900e-01, 1.6500877663e+00, 6.9811420265e+00 + 2.2950000000e+00, -1.4026292570e+00, 6.4803828350e-01, 1.6585352845e+00, 7.2893358964e+00 + 2.3025000000e+00, -1.3913258910e+00, 6.3667521650e-01, 1.6566872453e+00, 7.4735592473e+00 + 2.3100000000e+00, -1.3787597930e+00, 6.2253199650e-01, 1.6615622313e+00, 7.7817360418e+00 + 2.3175000000e+00, -1.3651859170e+00, 6.0581093350e-01, 1.6653000562e+00, 8.1754181116e+00 + 2.3250000000e+00, -1.3532303320e+00, 5.9262287350e-01, 1.6551805643e+00, 8.3466868984e+00 + 2.3325000000e+00, -1.3407528720e+00, 5.7756805350e-01, 1.6414055091e+00, 8.5559261751e+00 + 2.3400000000e+00, -1.3286581270e+00, 5.6357259450e-01, 1.6274544048e+00, 8.7117544121e+00 + 2.3475000000e+00, -1.3161797220e+00, 5.4862106600e-01, 1.6102371340e+00, 8.8576819784e+00 + 2.3550000000e+00, -1.3047913030e+00, 5.3546741300e-01, 1.5902774218e+00, 8.9258956374e+00 + 2.3625000000e+00, -1.2923619650e+00, 5.2001313450e-01, 1.5634557468e+00, 9.0070643081e+00 + 2.3700000000e+00, -1.2809659240e+00, 5.0623037950e-01, 1.5341348723e+00, 9.0528915306e+00 + 2.3775000000e+00, -1.2691424380e+00, 4.9201866550e-01, 1.5027036651e+00, 9.0511938906e+00 + 2.3850000000e+00, -1.2580611990e+00, 4.7877589400e-01, 1.4740335328e+00, 8.9969868813e+00 + 2.3925000000e+00, -1.2474349490e+00, 4.6652526800e-01, 1.4409392754e+00, 8.9108344581e+00 diff --git a/data/fox/phase_transition/wide/10M/size_40.txt b/data/fox/phase_transition/wide/10M/size_40.txt new file mode 100644 index 0000000..e17452f --- /dev/null +++ b/data/fox/phase_transition/wide/10M/size_40.txt @@ -0,0 +1,40 @@ + 2.1000000000e+00, -1.6620890500e+00, 8.6878439100e-01, 9.6254309255e-01, 9.4150920982e-01 + 2.1075000000e+00, -1.6548179380e+00, 8.6456392875e-01, 9.8477459730e-01, 1.0273234014e+00 + 2.1150000000e+00, -1.6472381530e+00, 8.5992612000e-01, 1.0116370041e+00, 1.1651341675e+00 + 2.1225000000e+00, -1.6396535407e+00, 8.5540678350e-01, 1.0310553746e+00, 1.2300692954e+00 + 2.1300000000e+00, -1.6317551280e+00, 8.5043887187e-01, 1.0618596639e+00, 1.3522717064e+00 + 2.1375000000e+00, -1.6237664988e+00, 8.4525669800e-01, 1.0905898589e+00, 1.4947867934e+00 + 2.1450000000e+00, -1.6154652197e+00, 8.3971780137e-01, 1.1191601397e+00, 1.6879726623e+00 + 2.1525000000e+00, -1.6069655835e+00, 8.3390703637e-01, 1.1496442564e+00, 1.8486914676e+00 + 2.1600000000e+00, -1.5981715542e+00, 8.2740224363e-01, 1.1861726464e+00, 2.1788207390e+00 + 2.1675000000e+00, -1.5889084872e+00, 8.2053559200e-01, 1.2222690350e+00, 2.4203728383e+00 + 2.1750000000e+00, -1.5797616785e+00, 8.1323151062e-01, 1.2627052207e+00, 3.0197841337e+00 + 2.1825000000e+00, -1.5701861655e+00, 8.0579899212e-01, 1.2977799603e+00, 3.1753418379e+00 + 2.1900000000e+00, -1.5602495555e+00, 7.9714816238e-01, 1.3464841728e+00, 3.8306754978e+00 + 2.1975000000e+00, -1.5500708840e+00, 7.8833226175e-01, 1.3911912963e+00, 4.3734756888e+00 + 2.2050000000e+00, -1.5390920068e+00, 7.7751321500e-01, 1.4492163792e+00, 5.3862506236e+00 + 2.2125000000e+00, -1.5281805267e+00, 7.6644684750e-01, 1.5008208015e+00, 6.3539354564e+00 + 2.2200000000e+00, -1.5168570300e+00, 7.5446290900e-01, 1.5620787897e+00, 7.5054398782e+00 + 2.2275000000e+00, -1.5046735652e+00, 7.4053975363e-01, 1.6308660998e+00, 8.9732428812e+00 + 2.2350000000e+00, -1.4921783367e+00, 7.2504278738e-01, 1.6986293657e+00, 1.0824743993e+01 + 2.2425000000e+00, -1.4795869660e+00, 7.0954820050e-01, 1.7523269962e+00, 1.2323452914e+01 + 2.2500000000e+00, -1.4667897357e+00, 6.9324211000e-01, 1.8094211031e+00, 1.4012300789e+01 + 2.2575000000e+00, -1.4519854583e+00, 6.7013506575e-01, 1.8809558695e+00, 1.6962982412e+01 + 2.2650000000e+00, -1.4383653925e+00, 6.5066234138e-01, 1.9247297203e+00, 1.8871407308e+01 + 2.2725000000e+00, -1.4237494283e+00, 6.2767513350e-01, 1.9710235795e+00, 2.1249522453e+01 + 2.2800000000e+00, -1.4075340995e+00, 5.9855654150e-01, 2.0156364627e+00, 2.4414818725e+01 + 2.2875000000e+00, -1.3928185072e+00, 5.7257874725e-01, 2.0309091491e+00, 2.6743970366e+01 + 2.2950000000e+00, -1.3777861452e+00, 5.4633882787e-01, 2.0182253546e+00, 2.8235238870e+01 + 2.3025000000e+00, -1.3623610235e+00, 5.1784302787e-01, 1.9894263218e+00, 2.9494651447e+01 + 2.3100000000e+00, -1.3488018945e+00, 4.9479439162e-01, 1.9457305019e+00, 2.9955574337e+01 + 2.3175000000e+00, -1.3347792118e+00, 4.7067601000e-01, 1.8942195539e+00, 3.0128213482e+01 + 2.3250000000e+00, -1.3198056355e+00, 4.3903039962e-01, 1.8426551153e+00, 3.0762163648e+01 + 2.3325000000e+00, -1.3054382985e+00, 4.1057796050e-01, 1.7657153390e+00, 3.0395814729e+01 + 2.3400000000e+00, -1.2932185910e+00, 3.8933843737e-01, 1.6896293559e+00, 2.9540294769e+01 + 2.3475000000e+00, -1.2812957232e+00, 3.7020587450e-01, 1.6234380926e+00, 2.8293289349e+01 + 2.3550000000e+00, -1.2688827325e+00, 3.4795128212e-01, 1.5467459792e+00, 2.6934785752e+01 + 2.3625000000e+00, -1.2572662725e+00, 3.2791564000e-01, 1.4734934968e+00, 2.5567656787e+01 + 2.3700000000e+00, -1.2468702170e+00, 3.1193163250e-01, 1.4226073086e+00, 2.4395589813e+01 + 2.3775000000e+00, -1.2363868770e+00, 2.9619067313e-01, 1.3650118369e+00, 2.2948141111e+01 + 2.3850000000e+00, -1.2261011747e+00, 2.8025764887e-01, 1.3017637083e+00, 2.1437116271e+01 + 2.3925000000e+00, -1.2166999532e+00, 2.6755842725e-01, 1.2524959602e+00, 2.0112409454e+01 diff --git a/data/fox/phase_transition/wide/10M/size_500.txt b/data/fox/phase_transition/wide/10M/size_500.txt new file mode 100644 index 0000000..3670e13 --- /dev/null +++ b/data/fox/phase_transition/wide/10M/size_500.txt @@ -0,0 +1,40 @@ + 2.1000000000e+00, -1.6583248747e+00, 7.1291876757e-01, 3.5543403833e+00, 9.9199171734e+03 + 2.1075000000e+00, -1.6470507333e+00, 5.6926714449e-01, 4.6470964208e+00, 1.2381906921e+04 + 2.1150000000e+00, -1.6434207171e+00, 7.1106127957e-01, 3.5804874145e+00, 8.9228857000e+03 + 2.1225000000e+00, -1.6346587178e+00, 6.5458848399e-01, 4.2222223729e+00, 1.1484928798e+04 + 2.1300000000e+00, -1.6265133260e+00, 6.3027809056e-01, 4.2958462504e+00, 1.2698936158e+04 + 2.1375000000e+00, -1.6149748990e+00, 4.6462498377e-01, 4.3868118419e+00, 1.3979695978e+04 + 2.1450000000e+00, -1.6136221726e+00, 7.8324715785e-01, 2.5792133972e+00, 3.3854022469e+03 + 2.1525000000e+00, -1.6038149775e+00, 7.2185648765e-01, 3.2615844390e+00, 6.7389966626e+03 + 2.1600000000e+00, -1.5943960605e+00, 7.0664505201e-01, 3.6321229847e+00, 6.1528657053e+03 + 2.1675000000e+00, -1.5867814888e+00, 7.3839354118e-01, 2.9035627338e+00, 5.0357917029e+03 + 2.1750000000e+00, -1.5763238219e+00, 6.7911939996e-01, 3.6799049596e+00, 8.3089042051e+03 + 2.1825000000e+00, -1.5671333121e+00, 6.8176155325e-01, 3.3830312952e+00, 7.8903735171e+03 + 2.1900000000e+00, -1.5576303260e+00, 7.0226861018e-01, 3.2290613476e+00, 5.7295601542e+03 + 2.1975000000e+00, -1.5480129948e+00, 7.3001442645e-01, 3.0201918764e+00, 3.3414543880e+03 + 2.2050000000e+00, -1.5383277825e+00, 7.5289206009e-01, 2.3067909318e+00, 1.3446700003e+03 + 2.2125000000e+00, -1.5246040804e+00, 6.4123779127e-01, 3.7977256410e+00, 6.6191177526e+03 + 2.2200000000e+00, -1.5138364125e+00, 6.5608985796e-01, 3.3820581765e+00, 5.5243054392e+03 + 2.2275000000e+00, -1.5024511432e+00, 6.7474048100e-01, 3.0457855428e+00, 3.6438904206e+03 + 2.2350000000e+00, -1.4901544389e+00, 6.8292046352e-01, 2.8446714158e+00, 1.9762517973e+03 + 2.2425000000e+00, -1.4766977928e+00, 6.7198671778e-01, 2.6789937789e+00, 1.2389224816e+03 + 2.2500000000e+00, -1.4609041835e+00, 6.0367901399e-01, 3.3856980346e+00, 3.2988484666e+03 + 2.2575000000e+00, -1.4456795841e+00, 6.0194057036e-01, 2.9945938497e+00, 1.3490863754e+03 + 2.2650000000e+00, -1.4262869454e+00, 4.9870722858e-01, 3.5670038289e+00, 2.8689917150e+03 + 2.2725000000e+00, -1.4042771204e+00, 3.3695119882e-01, 3.2303764518e+00, 2.8394058089e+03 + 2.2800000000e+00, -1.3837857065e+00, 1.7224576668e-01, 2.4170771340e+00, 1.5240060193e+03 + 2.2875000000e+00, -1.3671339265e+00, 1.0926794583e-01, 2.0737268227e+00, 6.8234491257e+02 + 2.2950000000e+00, -1.3521564480e+00, 7.7065915308e-02, 1.9038634690e+00, 3.5329646456e+02 + 2.3025000000e+00, -1.3383005625e+00, 6.4288129666e-02, 1.7674701728e+00, 2.5231068843e+02 + 2.3100000000e+00, -1.3253827717e+00, 5.2639149450e-02, 1.6919145451e+00, 1.7128707804e+02 + 2.3175000000e+00, -1.3130494500e+00, 4.6824435078e-02, 1.6049628887e+00, 1.3580667603e+02 + 2.3250000000e+00, -1.3012622309e+00, 4.0619661218e-02, 1.5283156720e+00, 1.0128261640e+02 + 2.3325000000e+00, -1.2900500490e+00, 3.6926809086e-02, 1.4657907865e+00, 8.4100123740e+01 + 2.3400000000e+00, -1.2792194343e+00, 3.3128355441e-02, 1.4145979775e+00, 6.7119558469e+01 + 2.3475000000e+00, -1.2688266435e+00, 3.0900965155e-02, 1.3709057232e+00, 5.7640698486e+01 + 2.3550000000e+00, -1.2586685390e+00, 2.8350986279e-02, 1.3175581609e+00, 4.8523186210e+01 + 2.3625000000e+00, -1.2489020899e+00, 2.6453261171e-02, 1.2834875489e+00, 4.1843923663e+01 + 2.3700000000e+00, -1.2394227415e+00, 2.5058410308e-02, 1.2426307324e+00, 3.7720494098e+01 + 2.3775000000e+00, -1.2302122501e+00, 2.3402109696e-02, 1.2122325247e+00, 3.3230977950e+01 + 2.3850000000e+00, -1.2212238536e+00, 2.1983345984e-02, 1.1829251237e+00, 2.8790400329e+01 + 2.3925000000e+00, -1.2125040439e+00, 2.0987768817e-02, 1.1507769724e+00, 2.6581196263e+01 diff --git a/data/fox/phase_transition/wide/10M/size_60.txt b/data/fox/phase_transition/wide/10M/size_60.txt new file mode 100644 index 0000000..562bb89 --- /dev/null +++ b/data/fox/phase_transition/wide/10M/size_60.txt @@ -0,0 +1,40 @@ + 2.1000000000e+00, -1.6620746617e+00, 8.6873649467e-01, 9.6504804562e-01, 9.6383024870e-01 + 2.1075000000e+00, -1.6547981822e+00, 8.6451834383e-01, 9.8686637351e-01, 1.0334076018e+00 + 2.1150000000e+00, -1.6472556578e+00, 8.5996743322e-01, 1.0116756966e+00, 1.1490125998e+00 + 2.1225000000e+00, -1.6396554830e+00, 8.5537474733e-01, 1.0354971817e+00, 1.2383974914e+00 + 2.1300000000e+00, -1.6317706109e+00, 8.5046556072e-01, 1.0595433822e+00, 1.3425465148e+00 + 2.1375000000e+00, -1.6236464129e+00, 8.4511307656e-01, 1.0904626175e+00, 1.5182851728e+00 + 2.1450000000e+00, -1.6153770547e+00, 8.3957698072e-01, 1.1223547589e+00, 1.7029797146e+00 + 2.1525000000e+00, -1.6069325847e+00, 8.3381421961e-01, 1.1502795702e+00, 1.8904679638e+00 + 2.1600000000e+00, -1.5981020939e+00, 8.2740128811e-01, 1.1854445244e+00, 2.1665503658e+00 + 2.1675000000e+00, -1.5891976442e+00, 8.2085919550e-01, 1.2172137426e+00, 2.5249757314e+00 + 2.1750000000e+00, -1.5799222866e+00, 8.1366107939e-01, 1.2586949681e+00, 2.8697346619e+00 + 2.1825000000e+00, -1.5700837307e+00, 8.0527124778e-01, 1.3110177407e+00, 3.5255701009e+00 + 2.1900000000e+00, -1.5601927672e+00, 7.9693389333e-01, 1.3525758065e+00, 4.0738510374e+00 + 2.1975000000e+00, -1.5500405352e+00, 7.8794318489e-01, 1.4007841897e+00, 4.5901259944e+00 + 2.2050000000e+00, -1.5393015093e+00, 7.7732322328e-01, 1.4593808179e+00, 6.0952450475e+00 + 2.2125000000e+00, -1.5281483263e+00, 7.6614438211e-01, 1.5164049463e+00, 7.1145292794e+00 + 2.2200000000e+00, -1.5167795440e+00, 7.5396322744e-01, 1.5773459477e+00, 8.5363966451e+00 + 2.2275000000e+00, -1.5047842283e+00, 7.4003392211e-01, 1.6408081553e+00, 1.0346333413e+01 + 2.2350000000e+00, -1.4919359419e+00, 7.2277471183e-01, 1.7386055854e+00, 1.4130804213e+01 + 2.2425000000e+00, -1.4782757290e+00, 7.0223850828e-01, 1.8403193816e+00, 1.8955266536e+01 + 2.2500000000e+00, -1.4637717093e+00, 6.7917073650e-01, 1.9312543827e+00, 2.3902477303e+01 + 2.2575000000e+00, -1.4491126076e+00, 6.5309187317e-01, 2.0336765085e+00, 3.0622990403e+01 + 2.2650000000e+00, -1.4333631889e+00, 6.2233537956e-01, 2.1189889015e+00, 3.8098682373e+01 + 2.2725000000e+00, -1.4175320153e+00, 5.8970985361e-01, 2.1903919591e+00, 4.5588560073e+01 + 2.2800000000e+00, -1.4009070311e+00, 5.5347197450e-01, 2.2119143841e+00, 5.1436797756e+01 + 2.2875000000e+00, -1.3837618523e+00, 5.1152758600e-01, 2.2086111887e+00, 5.8008712379e+01 + 2.2950000000e+00, -1.3681414904e+00, 4.7623305122e-01, 2.1547806782e+00, 6.0634296659e+01 + 2.3025000000e+00, -1.3519047986e+00, 4.3607242144e-01, 2.0833231284e+00, 6.2179425057e+01 + 2.3100000000e+00, -1.3364925541e+00, 3.9826870678e-01, 1.9839970947e+00, 6.2030815073e+01 + 2.3175000000e+00, -1.3212904782e+00, 3.5974619050e-01, 1.8691141661e+00, 5.8935977897e+01 + 2.3250000000e+00, -1.3085825537e+00, 3.3541930767e-01, 1.7678574738e+00, 5.5505185444e+01 + 2.3325000000e+00, -1.2956981930e+00, 3.0700692944e-01, 1.6758308698e+00, 5.2240098185e+01 + 2.3400000000e+00, -1.2836878026e+00, 2.8333348633e-01, 1.5674455830e+00, 4.7142290182e+01 + 2.3475000000e+00, -1.2720929519e+00, 2.6147077889e-01, 1.4869167408e+00, 4.2923350813e+01 + 2.3550000000e+00, -1.2610075859e+00, 2.4229079306e-01, 1.4193962775e+00, 3.8946800837e+01 + 2.3625000000e+00, -1.2505588928e+00, 2.2514878350e-01, 1.3533343111e+00, 3.5018867887e+01 + 2.3700000000e+00, -1.2406627381e+00, 2.0991560983e-01, 1.2940928492e+00, 3.1542500360e+01 + 2.3775000000e+00, -1.2311553736e+00, 1.9911223761e-01, 1.2493040916e+00, 2.8829231445e+01 + 2.3850000000e+00, -1.2218861916e+00, 1.8800791456e-01, 1.2075619502e+00, 2.6236022660e+01 + 2.3925000000e+00, -1.2130371556e+00, 1.7862059550e-01, 1.1742544778e+00, 2.4214145032e+01 diff --git a/data/fox/phase_transition/wide/10M/size_80.txt b/data/fox/phase_transition/wide/10M/size_80.txt new file mode 100644 index 0000000..da5427e --- /dev/null +++ b/data/fox/phase_transition/wide/10M/size_80.txt @@ -0,0 +1,40 @@ + 2.1000000000e+00, -1.6620948032e+00, 8.6874901422e-01, 9.6172508850e-01, 9.7917172838e-01 + 2.1075000000e+00, -1.6548140333e+00, 8.6451221459e-01, 9.8891002239e-01, 1.0483680266e+00 + 2.1150000000e+00, -1.6473341712e+00, 8.6005735475e-01, 1.0117887505e+00, 1.1740378685e+00 + 2.1225000000e+00, -1.6395743250e+00, 8.5526705241e-01, 1.0345096346e+00, 1.2502413970e+00 + 2.1300000000e+00, -1.6316858656e+00, 8.5011662322e-01, 1.0654765309e+00, 1.7771051269e+00 + 2.1375000000e+00, -1.6237533758e+00, 8.4530586991e-01, 1.0864136674e+00, 1.4796096585e+00 + 2.1450000000e+00, -1.6152543076e+00, 8.3912995541e-01, 1.1275135407e+00, 2.4648096074e+00 + 2.1525000000e+00, -1.6069479551e+00, 8.3382391766e-01, 1.1510954147e+00, 1.8904163586e+00 + 2.1600000000e+00, -1.5981367356e+00, 8.2753338259e-01, 1.1813429956e+00, 2.1158940219e+00 + 2.1675000000e+00, -1.5890642261e+00, 8.2073895275e-01, 1.2190477828e+00, 2.4320793447e+00 + 2.1750000000e+00, -1.5798247688e+00, 8.1351062122e-01, 1.2593172539e+00, 2.7976750200e+00 + 2.1825000000e+00, -1.5701791370e+00, 8.0566502703e-01, 1.3028387314e+00, 3.3382763181e+00 + 2.1900000000e+00, -1.5603569599e+00, 7.9753402644e-01, 1.3426270094e+00, 3.7118216114e+00 + 2.1975000000e+00, -1.5499230996e+00, 7.8799421506e-01, 1.3903970675e+00, 4.4786036845e+00 + 2.2050000000e+00, -1.5395137995e+00, 7.7813719437e-01, 1.4470589408e+00, 5.4913462580e+00 + 2.2125000000e+00, -1.5280947746e+00, 7.6611550219e-01, 1.5128905198e+00, 6.8912552714e+00 + 2.2200000000e+00, -1.5166915800e+00, 7.5385289422e-01, 1.5764947586e+00, 8.5372648137e+00 + 2.2275000000e+00, -1.5047731338e+00, 7.4009294666e-01, 1.6513125098e+00, 1.0908489763e+01 + 2.2350000000e+00, -1.4914030974e+00, 7.2050285606e-01, 1.7688493567e+00, 1.7273884467e+01 + 2.2425000000e+00, -1.4779890122e+00, 6.9974253509e-01, 1.8825026927e+00, 2.4031803586e+01 + 2.2500000000e+00, -1.4632321426e+00, 6.7410583284e-01, 1.9944964029e+00, 3.3077410279e+01 + 2.2575000000e+00, -1.4475989726e+00, 6.4344176203e-01, 2.1123742698e+00, 4.3039738003e+01 + 2.2650000000e+00, -1.4312548751e+00, 6.0681958603e-01, 2.2565683367e+00, 5.8464201886e+01 + 2.2725000000e+00, -1.4138775682e+00, 5.6065268122e-01, 2.3364061735e+00, 7.8123984610e+01 + 2.2800000000e+00, -1.3963896276e+00, 5.1455804234e-01, 2.3568457503e+00, 9.0088671615e+01 + 2.2875000000e+00, -1.3785920312e+00, 4.6126465928e-01, 2.3096857606e+00, 1.0094276522e+02 + 2.2950000000e+00, -1.3618964707e+00, 4.1241128469e-01, 2.2174273070e+00, 1.0377651883e+02 + 2.3025000000e+00, -1.3456712675e+00, 3.6462432997e-01, 2.0639077911e+00, 1.0091897155e+02 + 2.3100000000e+00, -1.3305389356e+00, 3.2380690362e-01, 1.9106741382e+00, 9.2769221782e+01 + 2.3175000000e+00, -1.3170874315e+00, 2.9066325241e-01, 1.7942239252e+00, 8.4523829773e+01 + 2.3250000000e+00, -1.3043502705e+00, 2.6139368903e-01, 1.6695740838e+00, 7.4790167386e+01 + 2.3325000000e+00, -1.2920127077e+00, 2.3464609150e-01, 1.5705550726e+00, 6.5378399486e+01 + 2.3400000000e+00, -1.2805130394e+00, 2.1236128681e-01, 1.4744319003e+00, 5.6666105678e+01 + 2.3475000000e+00, -1.2696125889e+00, 1.9606696284e-01, 1.4134176868e+00, 5.0046718106e+01 + 2.3550000000e+00, -1.2594314027e+00, 1.8382367984e-01, 1.3562721525e+00, 4.4789838919e+01 + 2.3625000000e+00, -1.2493660776e+00, 1.6932772553e-01, 1.3028020412e+00, 3.8913004516e+01 + 2.3700000000e+00, -1.2396608358e+00, 1.5819873234e-01, 1.2599114356e+00, 3.4724327667e+01 + 2.3775000000e+00, -1.2303675385e+00, 1.4826640891e-01, 1.2210871730e+00, 3.0869355651e+01 + 2.3850000000e+00, -1.2213093268e+00, 1.3971215706e-01, 1.1854883890e+00, 2.7891748366e+01 + 2.3925000000e+00, -1.2126708138e+00, 1.3392054472e-01, 1.1572078006e+00, 2.5498605986e+01 diff --git a/data/fox/phase_transition/wide/1M/size_100.txt b/data/fox/phase_transition/wide/1M/size_100.txt new file mode 100644 index 0000000..f1b0b71 --- /dev/null +++ b/data/fox/phase_transition/wide/1M/size_100.txt @@ -0,0 +1,40 @@ + 2.1000000000e+00, -1.6620015000e+00, 8.6805784340e-01, 9.7511118873e-01, 2.3134138793e+00 + 2.1075000000e+00, -1.6545890640e+00, 8.6415841280e-01, 9.9581608353e-01, 1.2768424462e+00 + 2.1150000000e+00, -1.6458636228e+00, 8.4576085880e-01, 1.2424289131e+00, 4.9346846613e+01 + 2.1225000000e+00, -1.6389780968e+00, 8.4902825620e-01, 1.1421514861e+00, 2.2513614626e+01 + 2.1300000000e+00, -1.6318892072e+00, 8.5067728720e-01, 1.0568466084e+00, 1.3314029858e+00 + 2.1375000000e+00, -1.6238456380e+00, 8.4539139640e-01, 1.0831076495e+00, 1.4715301302e+00 + 2.1450000000e+00, -1.6153696456e+00, 8.3954879920e-01, 1.1204002466e+00, 1.7445911019e+00 + 2.1525000000e+00, -1.6068201216e+00, 8.3370111220e-01, 1.1531864677e+00, 1.9215790084e+00 + 2.1600000000e+00, -1.5968803388e+00, 8.1810761420e-01, 1.3490511082e+00, 2.7919068345e+01 + 2.1675000000e+00, -1.5891408876e+00, 8.2085788000e-01, 1.2201949726e+00, 2.4291895289e+00 + 2.1750000000e+00, -1.5798754976e+00, 8.1382519220e-01, 1.2618077680e+00, 2.7138098837e+00 + 2.1825000000e+00, -1.5704483292e+00, 8.0628768160e-01, 1.2821183057e+00, 3.1166186554e+00 + 2.1900000000e+00, -1.5602007600e+00, 7.9618198220e-01, 1.3745382445e+00, 6.5160384309e+00 + 2.1975000000e+00, -1.5499059380e+00, 7.8730207680e-01, 1.4146341431e+00, 6.5907149295e+00 + 2.2050000000e+00, -1.5391578692e+00, 7.7591948280e-01, 1.4810544565e+00, 1.0615809395e+01 + 2.2125000000e+00, -1.5274130944e+00, 7.6246808380e-01, 1.5802578384e+00, 1.3133974648e+01 + 2.2200000000e+00, -1.5164067284e+00, 7.5173426240e-01, 1.5886247162e+00, 1.3425756378e+01 + 2.2275000000e+00, -1.5044009672e+00, 7.3853587520e-01, 1.6570907542e+00, 1.1179475047e+01 + 2.2350000000e+00, -1.4913839228e+00, 7.2074520780e-01, 1.7608751278e+00, 1.5872381639e+01 + 2.2425000000e+00, -1.4771436776e+00, 6.9325234300e-01, 1.9450992407e+00, 4.0044053699e+01 + 2.2500000000e+00, -1.4625063464e+00, 6.6773378540e-01, 2.1036128247e+00, 4.4899795582e+01 + 2.2575000000e+00, -1.4459229340e+00, 6.2874855280e-01, 2.2434582861e+00, 7.5100611721e+01 + 2.2650000000e+00, -1.4295128652e+00, 5.8790934140e-01, 2.3647995291e+00, 9.6780082583e+01 + 2.2725000000e+00, -1.4126855324e+00, 5.4700130020e-01, 2.4361847597e+00, 1.0764201733e+02 + 2.2800000000e+00, -1.3942742616e+00, 4.8330263960e-01, 2.4714007155e+00, 1.5051723377e+02 + 2.2875000000e+00, -1.3740979360e+00, 4.0683973680e-01, 2.3911740448e+00, 1.5635723752e+02 + 2.2950000000e+00, -1.3588656456e+00, 3.6821365400e-01, 2.1354332277e+00, 1.4118742061e+02 + 2.3025000000e+00, -1.3434037032e+00, 3.2219134300e-01, 2.0337727764e+00, 1.3553324517e+02 + 2.3100000000e+00, -1.3281024024e+00, 2.6925782820e-01, 1.8554581885e+00, 1.1934116113e+02 + 2.3175000000e+00, -1.3144403532e+00, 2.2684888240e-01, 1.7064641298e+00, 9.9115644053e+01 + 2.3250000000e+00, -1.3031356656e+00, 2.1714292640e-01, 1.6054553999e+00, 9.0070960203e+01 + 2.3325000000e+00, -1.2909613304e+00, 1.9202813960e-01, 1.5317645972e+00, 7.6917764837e+01 + 2.3400000000e+00, -1.2794368876e+00, 1.6704793920e-01, 1.4294418443e+00, 5.8903971809e+01 + 2.3475000000e+00, -1.2689690692e+00, 1.5658871600e-01, 1.4072939860e+00, 5.3507993766e+01 + 2.3550000000e+00, -1.2589896448e+00, 1.4788545820e-01, 1.3456489411e+00, 4.7957294247e+01 + 2.3625000000e+00, -1.2487803620e+00, 1.3413882360e-01, 1.2954108364e+00, 4.0761040738e+01 + 2.3700000000e+00, -1.2395548208e+00, 1.2756429620e-01, 1.2569880886e+00, 3.7244937176e+01 + 2.3775000000e+00, -1.2302002916e+00, 1.1740373960e-01, 1.2083105949e+00, 3.0472774049e+01 + 2.3850000000e+00, -1.2215869160e+00, 1.1126133340e-01, 1.1880294710e+00, 2.8698783762e+01 + 2.3925000000e+00, -1.2123756816e+00, 1.0678517980e-01, 1.1459525978e+00, 2.5979891127e+01 diff --git a/data/fox/phase_transition/wide/1M/size_20.txt b/data/fox/phase_transition/wide/1M/size_20.txt new file mode 100644 index 0000000..560c57b --- /dev/null +++ b/data/fox/phase_transition/wide/1M/size_20.txt @@ -0,0 +1,40 @@ + 2.1000000000e+00, -1.6619100300e+00, 8.6840588500e-01, 9.6758658371e-01, 9.8294429950e-01 + 2.1075000000e+00, -1.6549843200e+00, 8.6472606500e-01, 9.8150525093e-01, 1.0113804384e+00 + 2.1150000000e+00, -1.6472983100e+00, 8.6005777500e-01, 1.0100771207e+00, 1.1439936619e+00 + 2.1225000000e+00, -1.6391235800e+00, 8.5471338000e-01, 1.0428166920e+00, 1.2754758443e+00 + 2.1300000000e+00, -1.6321106100e+00, 8.5017581000e-01, 1.0615801473e+00, 1.3815309372e+00 + 2.1375000000e+00, -1.6235311000e+00, 8.4494003000e-01, 1.0885201361e+00, 1.4828272568e+00 + 2.1450000000e+00, -1.6154953200e+00, 8.3964730000e-01, 1.1115246414e+00, 1.5946780611e+00 + 2.1525000000e+00, -1.6076464700e+00, 8.3553662000e-01, 1.1299047314e+00, 1.5797031431e+00 + 2.1600000000e+00, -1.5982467200e+00, 8.2842643000e-01, 1.1644341057e+00, 1.8245031995e+00 + 2.1675000000e+00, -1.5894215800e+00, 8.2172377000e-01, 1.2050243315e+00, 2.0791098255e+00 + 2.1750000000e+00, -1.5810054200e+00, 8.1586681500e-01, 1.2180064098e+00, 2.1785571323e+00 + 2.1825000000e+00, -1.5713293300e+00, 8.0829201000e-01, 1.2622688354e+00, 2.4518276692e+00 + 2.1900000000e+00, -1.5616134800e+00, 8.0110160500e-01, 1.2890928615e+00, 2.6224940350e+00 + 2.1975000000e+00, -1.5518894600e+00, 7.9321547500e-01, 1.3265794171e+00, 2.8681304747e+00 + 2.2050000000e+00, -1.5416714300e+00, 7.8428563000e-01, 1.3633051925e+00, 3.2391930931e+00 + 2.2125000000e+00, -1.5301558100e+00, 7.7333785000e-01, 1.4190669418e+00, 3.6758598793e+00 + 2.2200000000e+00, -1.5197365100e+00, 7.6480923000e-01, 1.4372349706e+00, 3.9252316048e+00 + 2.2275000000e+00, -1.5106300500e+00, 7.5874912500e-01, 1.4464425766e+00, 3.9584306688e+00 + 2.2350000000e+00, -1.4983620800e+00, 7.4572578500e-01, 1.5011708196e+00, 4.5121464270e+00 + 2.2425000000e+00, -1.4876914000e+00, 7.3626379000e-01, 1.5249251781e+00, 4.7903413217e+00 + 2.2500000000e+00, -1.4746483800e+00, 7.2351194500e-01, 1.5533875645e+00, 5.1785495142e+00 + 2.2575000000e+00, -1.4627289000e+00, 7.0974116500e-01, 1.5998276481e+00, 5.8003178613e+00 + 2.2650000000e+00, -1.4501914900e+00, 6.9751833500e-01, 1.6204128771e+00, 6.0731369737e+00 + 2.2725000000e+00, -1.4401934700e+00, 6.8971018500e-01, 1.6086009419e+00, 6.1092636448e+00 + 2.2800000000e+00, -1.4256440900e+00, 6.7118246500e-01, 1.6522609071e+00, 6.8832738775e+00 + 2.2875000000e+00, -1.4161847600e+00, 6.6435709000e-01, 1.6517394693e+00, 6.8486843395e+00 + 2.2950000000e+00, -1.4040837400e+00, 6.5103785500e-01, 1.6504029556e+00, 7.1519238487e+00 + 2.3025000000e+00, -1.3915664500e+00, 6.3643450500e-01, 1.6579451121e+00, 7.5084323684e+00 + 2.3100000000e+00, -1.3769146000e+00, 6.1871973500e-01, 1.6699849933e+00, 7.9345587440e+00 + 2.3175000000e+00, -1.3646993900e+00, 6.0490341000e-01, 1.6717624274e+00, 8.2089799647e+00 + 2.3250000000e+00, -1.3523225800e+00, 5.9141712500e-01, 1.6525179177e+00, 8.3277428356e+00 + 2.3325000000e+00, -1.3398398700e+00, 5.7575392000e-01, 1.6530139071e+00, 8.6490410040e+00 + 2.3400000000e+00, -1.3293446700e+00, 5.6626699000e-01, 1.6231025234e+00, 8.6072894421e+00 + 2.3475000000e+00, -1.3160225600e+00, 5.4880977500e-01, 1.6096060551e+00, 8.8319434274e+00 + 2.3550000000e+00, -1.3029499500e+00, 5.3099855500e-01, 1.5889230139e+00, 9.0673941338e+00 + 2.3625000000e+00, -1.2914805300e+00, 5.1695173500e-01, 1.5758094033e+00, 9.1683807501e+00 + 2.3700000000e+00, -1.2816203200e+00, 5.0934515000e-01, 1.5351708995e+00, 8.9640495311e+00 + 2.3775000000e+00, -1.2686444500e+00, 4.9107958000e-01, 1.5014577850e+00, 8.9686271810e+00 + 2.3850000000e+00, -1.2596471600e+00, 4.8203529500e-01, 1.4715162852e+00, 8.9505402095e+00 + 2.3925000000e+00, -1.2474615700e+00, 4.6542540500e-01, 1.4287783614e+00, 8.8871703750e+00 diff --git a/data/fox/phase_transition/wide/1M/size_40.txt b/data/fox/phase_transition/wide/1M/size_40.txt new file mode 100644 index 0000000..2e6aee0 --- /dev/null +++ b/data/fox/phase_transition/wide/1M/size_40.txt @@ -0,0 +1,40 @@ + 2.1000000000e+00, -1.6622967025e+00, 8.6902229000e-01, 9.5922346535e-01, 9.3086217050e-01 + 2.1075000000e+00, -1.6548571250e+00, 8.6447246500e-01, 9.8642488177e-01, 1.0640174690e+00 + 2.1150000000e+00, -1.6472637775e+00, 8.5978774125e-01, 1.0120540255e+00, 1.2286014664e+00 + 2.1225000000e+00, -1.6391633600e+00, 8.5472458500e-01, 1.0450399516e+00, 1.3094858584e+00 + 2.1300000000e+00, -1.6316229700e+00, 8.5000677500e-01, 1.0672168065e+00, 1.4312195359e+00 + 2.1375000000e+00, -1.6234684975e+00, 8.4495477125e-01, 1.0967113913e+00, 1.5324802337e+00 + 2.1450000000e+00, -1.6155268100e+00, 8.3990847750e-01, 1.1189091983e+00, 1.6731818568e+00 + 2.1525000000e+00, -1.6071588425e+00, 8.3439265125e-01, 1.1471975608e+00, 1.7430100913e+00 + 2.1600000000e+00, -1.5982616700e+00, 8.2740359500e-01, 1.1907863070e+00, 2.1535553633e+00 + 2.1675000000e+00, -1.5886711600e+00, 8.2029555500e-01, 1.2204420956e+00, 2.4424111098e+00 + 2.1750000000e+00, -1.5791952900e+00, 8.1210781375e-01, 1.2744743003e+00, 3.3894377455e+00 + 2.1825000000e+00, -1.5697294525e+00, 8.0512091500e-01, 1.3061388813e+00, 3.2365477399e+00 + 2.1900000000e+00, -1.5608206225e+00, 7.9888411500e-01, 1.3235155138e+00, 3.2688510598e+00 + 2.1975000000e+00, -1.5498677925e+00, 7.8736604750e-01, 1.3989152662e+00, 4.4897702165e+00 + 2.2050000000e+00, -1.5386183175e+00, 7.7676099750e-01, 1.4578244858e+00, 5.5969138914e+00 + 2.2125000000e+00, -1.5272086200e+00, 7.6302837125e-01, 1.5397295145e+00, 7.5539845833e+00 + 2.2200000000e+00, -1.5181998925e+00, 7.5831997625e-01, 1.5115335587e+00, 6.3643461193e+00 + 2.2275000000e+00, -1.5051972325e+00, 7.4200782875e-01, 1.5999517931e+00, 8.4510040451e+00 + 2.2350000000e+00, -1.4906579275e+00, 7.1978221500e-01, 1.7249106898e+00, 1.2028908869e+01 + 2.2425000000e+00, -1.4802444575e+00, 7.1223016750e-01, 1.7414618539e+00, 1.1376309146e+01 + 2.2500000000e+00, -1.4693103400e+00, 7.0092820500e-01, 1.7579372347e+00, 1.1945562599e+01 + 2.2575000000e+00, -1.4525414825e+00, 6.7241977375e-01, 1.8689439938e+00, 1.6141732336e+01 + 2.2650000000e+00, -1.4370690400e+00, 6.4790212250e-01, 1.9188057517e+00, 1.8981787053e+01 + 2.2725000000e+00, -1.4233619500e+00, 6.2671106250e-01, 1.9521538009e+00, 2.1106743868e+01 + 2.2800000000e+00, -1.4102995375e+00, 6.0776764500e-01, 1.9666698510e+00, 2.2414981364e+01 + 2.2875000000e+00, -1.3918701625e+00, 5.6944712000e-01, 2.0266050226e+00, 2.7047340089e+01 + 2.2950000000e+00, -1.3776028425e+00, 5.4770270125e-01, 2.0206979552e+00, 2.7623429020e+01 + 2.3025000000e+00, -1.3613909025e+00, 5.1575756750e-01, 1.9710543007e+00, 2.9264442606e+01 + 2.3100000000e+00, -1.3476801125e+00, 4.9003423375e-01, 1.9429816317e+00, 3.0341744624e+01 + 2.3175000000e+00, -1.3359351725e+00, 4.7117588875e-01, 1.9278729658e+00, 3.1187673823e+01 + 2.3250000000e+00, -1.3191828400e+00, 4.3723914500e-01, 1.8495019242e+00, 3.0860509113e+01 + 2.3325000000e+00, -1.3061070175e+00, 4.1273091125e-01, 1.7667579799e+00, 3.0470038493e+01 + 2.3400000000e+00, -1.2935603250e+00, 3.9178488875e-01, 1.6944625680e+00, 2.9349628681e+01 + 2.3475000000e+00, -1.2819213375e+00, 3.7072874250e-01, 1.6317689772e+00, 2.8700517893e+01 + 2.3550000000e+00, -1.2688763125e+00, 3.4841845125e-01, 1.5607884263e+00, 2.7234286948e+01 + 2.3625000000e+00, -1.2569469725e+00, 3.2358590250e-01, 1.4727321608e+00, 2.5723427287e+01 + 2.3700000000e+00, -1.2455917375e+00, 3.0753619750e-01, 1.4077773371e+00, 2.4355062166e+01 + 2.3775000000e+00, -1.2368801000e+00, 2.9845223500e-01, 1.3675848653e+00, 2.3158142199e+01 + 2.3850000000e+00, -1.2256241575e+00, 2.7967529375e-01, 1.3023831184e+00, 2.1139000542e+01 + 2.3925000000e+00, -1.2166130025e+00, 2.6566784625e-01, 1.2459541932e+00, 1.9804883759e+01 diff --git a/data/fox/phase_transition/wide/1M/size_500.txt b/data/fox/phase_transition/wide/1M/size_500.txt new file mode 100644 index 0000000..cfd0a1a --- /dev/null +++ b/data/fox/phase_transition/wide/1M/size_500.txt @@ -0,0 +1,40 @@ + 2.1000000000e+00, -1.6494188830e+00, 5.0128568722e-01, 5.2440132770e+00, 9.1386577069e+03 + 2.1075000000e+00, -1.6432044472e+00, 4.5965776830e-01, 4.9794684639e+00, 1.2916826244e+04 + 2.1150000000e+00, -1.6360026708e+00, 5.2694596566e-01, 5.2784037959e+00, 9.6846561736e+03 + 2.1225000000e+00, -1.6315926514e+00, 6.2276152254e-01, 5.4955439973e+00, 9.2225007334e+03 + 2.1300000000e+00, -1.6207207485e+00, 4.7606176890e-01, 4.9994829866e+00, 1.2242529403e+04 + 2.1375000000e+00, -1.6123826520e+00, 4.6424061306e-01, 5.2314413230e+00, 1.1921203280e+04 + 2.1450000000e+00, -1.6033180927e+00, 4.5398560181e-01, 5.9033877996e+00, 1.1097761610e+04 + 2.1525000000e+00, -1.5972325886e+00, 5.2955795834e-01, 5.0696631305e+00, 1.0587765229e+04 + 2.1600000000e+00, -1.5862029916e+00, 4.6036368276e-01, 4.8563384451e+00, 9.7832121010e+03 + 2.1675000000e+00, -1.5781852138e+00, 4.8688076342e-01, 6.0277233499e+00, 1.1707422292e+04 + 2.1750000000e+00, -1.5697295642e+00, 5.4110075740e-01, 5.2125686652e+00, 7.9008682280e+03 + 2.1825000000e+00, -1.5586601962e+00, 4.0460564010e-01, 4.4386149607e+00, 9.8550319036e+03 + 2.1900000000e+00, -1.5481243335e+00, 4.0537103911e-01, 4.6632661042e+00, 9.8324131227e+03 + 2.1975000000e+00, -1.5403126612e+00, 4.8464415458e-01, 5.1790505604e+00, 1.0198195822e+04 + 2.2050000000e+00, -1.5271848538e+00, 4.0806674644e-01, 4.7230373080e+00, 8.6929213659e+03 + 2.2125000000e+00, -1.5169753821e+00, 4.5195485502e-01, 4.9775696174e+00, 6.9275930588e+03 + 2.2200000000e+00, -1.5078947658e+00, 5.5675829556e-01, 5.3982919294e+00, 5.1741658550e+03 + 2.2275000000e+00, -1.4896743389e+00, 2.9767218770e-01, 4.0677274609e+00, 6.4112056565e+03 + 2.2350000000e+00, -1.4810343047e+00, 4.5708942917e-01, 4.8813284831e+00, 5.6093507528e+03 + 2.2425000000e+00, -1.4683961378e+00, 4.6794291674e-01, 4.9419373776e+00, 5.1760941361e+03 + 2.2500000000e+00, -1.4527304211e+00, 3.4929178630e-01, 4.7689585588e+00, 7.0835082133e+03 + 2.2575000000e+00, -1.4333385262e+00, 2.2825477951e-01, 3.3900573852e+00, 3.5507180167e+03 + 2.2650000000e+00, -1.4197349773e+00, 3.4084939396e-01, 3.7215746791e+00, 3.3493881343e+03 + 2.2725000000e+00, -1.4006789044e+00, 2.1361438488e-01, 2.8891002385e+00, 2.5986990554e+03 + 2.2800000000e+00, -1.3840122038e+00, 1.9920761346e-01, 2.5800082512e+00, 1.6716611386e+03 + 2.2875000000e+00, -1.3673281460e+00, 1.0907078015e-01, 2.1232982836e+00, 7.2534206488e+02 + 2.2950000000e+00, -1.3520210178e+00, 6.7553378600e-02, 1.8222589362e+00, 2.9076458187e+02 + 2.3025000000e+00, -1.3382592304e+00, 5.8141674184e-02, 1.7941033570e+00, 2.1382933674e+02 + 2.3100000000e+00, -1.3254887171e+00, 5.4580321528e-02, 1.6870842204e+00, 1.6930036929e+02 + 2.3175000000e+00, -1.3133155717e+00, 4.7247370528e-02, 1.6073257570e+00, 1.3776431048e+02 + 2.3250000000e+00, -1.3014503380e+00, 4.1414305192e-02, 1.5174076690e+00, 1.1223590477e+02 + 2.3325000000e+00, -1.2898459255e+00, 3.5089982728e-02, 1.4721470359e+00, 7.4099685204e+01 + 2.3400000000e+00, -1.2792781025e+00, 3.3566342008e-02, 1.4305697955e+00, 6.8084060976e+01 + 2.3475000000e+00, -1.2687726675e+00, 3.0387531264e-02, 1.3820116565e+00, 5.6301881666e+01 + 2.3550000000e+00, -1.2587495321e+00, 2.8233289408e-02, 1.3208477920e+00, 4.8768362690e+01 + 2.3625000000e+00, -1.2489164174e+00, 2.5892825816e-02, 1.2857823365e+00, 4.2174445674e+01 + 2.3700000000e+00, -1.2393969838e+00, 2.4675269960e-02, 1.2516676054e+00, 3.6447049041e+01 + 2.3775000000e+00, -1.2302260506e+00, 2.2910871264e-02, 1.2007388785e+00, 3.1078679875e+01 + 2.3850000000e+00, -1.2212342807e+00, 2.1890979680e-02, 1.1701066687e+00, 2.8355729419e+01 + 2.3925000000e+00, -1.2124954842e+00, 2.0222789768e-02, 1.1475795017e+00, 2.4301031288e+01 diff --git a/data/fox/phase_transition/wide/1M/size_60.txt b/data/fox/phase_transition/wide/1M/size_60.txt new file mode 100644 index 0000000..f5db990 --- /dev/null +++ b/data/fox/phase_transition/wide/1M/size_60.txt @@ -0,0 +1,40 @@ + 2.1000000000e+00, -1.6621374444e+00, 8.6880037278e-01, 9.6310382294e-01, 9.5184320173e-01 + 2.1075000000e+00, -1.6548363000e+00, 8.6472097556e-01, 9.8218155041e-01, 9.9613041622e-01 + 2.1150000000e+00, -1.6470161222e+00, 8.5881513722e-01, 1.0273822711e+00, 2.6006282047e+00 + 2.1225000000e+00, -1.6394751122e+00, 8.5508365944e-01, 1.0464819658e+00, 1.3561769059e+00 + 2.1300000000e+00, -1.6317157522e+00, 8.5019721611e-01, 1.0582430200e+00, 1.3887887313e+00 + 2.1375000000e+00, -1.6234471956e+00, 8.4483037500e-01, 1.1029577415e+00, 1.5443726636e+00 + 2.1450000000e+00, -1.6154387656e+00, 8.3991471833e-01, 1.1153045909e+00, 1.6149448529e+00 + 2.1525000000e+00, -1.6069498533e+00, 8.3396505278e-01, 1.1540640039e+00, 1.8570758622e+00 + 2.1600000000e+00, -1.5980379211e+00, 8.2737086333e-01, 1.1866990327e+00, 2.1177261362e+00 + 2.1675000000e+00, -1.5892331800e+00, 8.2107258056e-01, 1.2198523918e+00, 2.3591055352e+00 + 2.1750000000e+00, -1.5796912089e+00, 8.1340622500e-01, 1.2619910204e+00, 2.7896689197e+00 + 2.1825000000e+00, -1.5701141578e+00, 8.0571700444e-01, 1.3011720635e+00, 3.2519530615e+00 + 2.1900000000e+00, -1.5609880644e+00, 7.9872172500e-01, 1.3422740497e+00, 3.6920546784e+00 + 2.1975000000e+00, -1.5504511233e+00, 7.8945491889e-01, 1.3881209324e+00, 4.2586373002e+00 + 2.2050000000e+00, -1.5402254589e+00, 7.7950725500e-01, 1.4293549661e+00, 5.4285162896e+00 + 2.2125000000e+00, -1.5285299244e+00, 7.6747972667e-01, 1.5108159132e+00, 6.4369502445e+00 + 2.2200000000e+00, -1.5160477078e+00, 7.5123072833e-01, 1.6099218983e+00, 9.8468114355e+00 + 2.2275000000e+00, -1.5054135822e+00, 7.4219906444e-01, 1.6410408618e+00, 9.5186325290e+00 + 2.2350000000e+00, -1.4918189333e+00, 7.2506985278e-01, 1.7008689450e+00, 1.1240915917e+01 + 2.2425000000e+00, -1.4788734011e+00, 7.0252808333e-01, 1.8769214986e+00, 2.0763895436e+01 + 2.2500000000e+00, -1.4650525922e+00, 6.8465015556e-01, 1.9011676055e+00, 2.0772215967e+01 + 2.2575000000e+00, -1.4471524167e+00, 6.4353316667e-01, 2.0782355413e+00, 3.6222049561e+01 + 2.2650000000e+00, -1.4332974878e+00, 6.2144001611e-01, 2.1473317631e+00, 4.0069280817e+01 + 2.2725000000e+00, -1.4162593722e+00, 5.8452624833e-01, 2.1993538485e+00, 4.6706028622e+01 + 2.2800000000e+00, -1.3993857089e+00, 5.4166454722e-01, 2.2638212660e+00, 5.7272948612e+01 + 2.2875000000e+00, -1.3855448700e+00, 5.1899580278e-01, 2.1843326929e+00, 5.6273828563e+01 + 2.2950000000e+00, -1.3673432000e+00, 4.7456821556e-01, 2.1635728279e+00, 6.0439390642e+01 + 2.3025000000e+00, -1.3519606633e+00, 4.3713216111e-01, 2.0655434070e+00, 6.2153569048e+01 + 2.3100000000e+00, -1.3371129189e+00, 4.0223401111e-01, 1.9605092565e+00, 6.0794217382e+01 + 2.3175000000e+00, -1.3216065278e+00, 3.6184146444e-01, 1.8670689828e+00, 5.9338122858e+01 + 2.3250000000e+00, -1.3075071989e+00, 3.2874724667e-01, 1.7603843326e+00, 5.6709492859e+01 + 2.3325000000e+00, -1.2949128233e+00, 3.0075970500e-01, 1.6429460860e+00, 5.1702163253e+01 + 2.3400000000e+00, -1.2830647767e+00, 2.7998198000e-01, 1.5481828326e+00, 4.6003396556e+01 + 2.3475000000e+00, -1.2711644544e+00, 2.5661422333e-01, 1.4609137814e+00, 4.1337336586e+01 + 2.3550000000e+00, -1.2606927467e+00, 2.3942903556e-01, 1.4095712913e+00, 3.8627558690e+01 + 2.3625000000e+00, -1.2512289344e+00, 2.2948117056e-01, 1.3584028126e+00, 3.5546239076e+01 + 2.3700000000e+00, -1.2402958922e+00, 2.0912210222e-01, 1.2950851543e+00, 3.0943889862e+01 + 2.3775000000e+00, -1.2308948700e+00, 1.9323292556e-01, 1.2374475507e+00, 2.8359189498e+01 + 2.3850000000e+00, -1.2216211878e+00, 1.8725841833e-01, 1.2046635072e+00, 2.5974863667e+01 + 2.3925000000e+00, -1.2132363211e+00, 1.7718845167e-01, 1.1618116031e+00, 2.3798040566e+01 diff --git a/data/fox/phase_transition/wide/1M/size_80.txt b/data/fox/phase_transition/wide/1M/size_80.txt new file mode 100644 index 0000000..c529115 --- /dev/null +++ b/data/fox/phase_transition/wide/1M/size_80.txt @@ -0,0 +1,40 @@ + 2.1000000000e+00, -1.6620294612e+00, 8.6867685625e-01, 9.6366077937e-01, 9.5567403867e-01 + 2.1075000000e+00, -1.6543594356e+00, 8.6235023375e-01, 1.0202846124e+00, 5.3255936997e+00 + 2.1150000000e+00, -1.6470931856e+00, 8.5983486781e-01, 1.0090775225e+00, 1.1363784078e+00 + 2.1225000000e+00, -1.6393608575e+00, 8.5299281594e-01, 1.0733043489e+00, 6.5757689162e+00 + 2.1300000000e+00, -1.6317870487e+00, 8.5047987531e-01, 1.0580594378e+00, 1.3454562425e+00 + 2.1375000000e+00, -1.6236384887e+00, 8.4520665562e-01, 1.0953794604e+00, 1.5155089196e+00 + 2.1450000000e+00, -1.6151493825e+00, 8.3899040000e-01, 1.1230195561e+00, 2.0189161598e+00 + 2.1525000000e+00, -1.6066627037e+00, 8.3298220875e-01, 1.1572561520e+00, 2.3711098064e+00 + 2.1600000000e+00, -1.5978830837e+00, 8.2696963500e-01, 1.1954055223e+00, 2.2967963781e+00 + 2.1675000000e+00, -1.5892290288e+00, 8.2093539937e-01, 1.2155121890e+00, 2.4563605008e+00 + 2.1750000000e+00, -1.5795307087e+00, 8.1157015531e-01, 1.2820283812e+00, 6.8190804152e+00 + 2.1825000000e+00, -1.5701937869e+00, 8.0598879625e-01, 1.3034749028e+00, 3.1489004002e+00 + 2.1900000000e+00, -1.5602793275e+00, 7.9746370062e-01, 1.3603431032e+00, 3.7641337201e+00 + 2.1975000000e+00, -1.5498111062e+00, 7.8805819406e-01, 1.3877441228e+00, 4.2585090550e+00 + 2.2050000000e+00, -1.5398495719e+00, 7.7899755937e-01, 1.4347231348e+00, 5.0633503739e+00 + 2.2125000000e+00, -1.5280316450e+00, 7.6616825344e-01, 1.5186924693e+00, 6.9732421594e+00 + 2.2200000000e+00, -1.5166193694e+00, 7.5136781781e-01, 1.6347138476e+00, 1.3980286343e+01 + 2.2275000000e+00, -1.5041013900e+00, 7.3634896469e-01, 1.6981363918e+00, 1.4744058135e+01 + 2.2350000000e+00, -1.4913677169e+00, 7.2101087656e-01, 1.7560498428e+00, 1.7492723240e+01 + 2.2425000000e+00, -1.4787462006e+00, 7.0424664250e-01, 1.8280138751e+00, 1.8978445907e+01 + 2.2500000000e+00, -1.4629398644e+00, 6.7277856469e-01, 2.0585449612e+00, 3.5621147160e+01 + 2.2575000000e+00, -1.4483950769e+00, 6.4990828656e-01, 2.0339885651e+00, 3.4362958942e+01 + 2.2650000000e+00, -1.4315351162e+00, 6.0524639719e-01, 2.2930240917e+00, 6.5640470166e+01 + 2.2725000000e+00, -1.4124599469e+00, 5.5261286687e-01, 2.3875978947e+00, 8.4263575928e+01 + 2.2800000000e+00, -1.3974585087e+00, 5.2232083000e-01, 2.3422447036e+00, 8.6025546760e+01 + 2.2875000000e+00, -1.3786457131e+00, 4.5610626250e-01, 2.3511600590e+00, 1.0906723445e+02 + 2.2950000000e+00, -1.3621142112e+00, 4.1654975625e-01, 2.1910629832e+00, 1.0099794235e+02 + 2.3025000000e+00, -1.3450351456e+00, 3.6047871375e-01, 2.0557471524e+00, 9.9440062902e+01 + 2.3100000000e+00, -1.3312283400e+00, 3.2722928594e-01, 1.9441652607e+00, 9.3101245659e+01 + 2.3175000000e+00, -1.3173336769e+00, 2.9090231625e-01, 1.8024754462e+00, 8.6187856701e+01 + 2.3250000000e+00, -1.3040473037e+00, 2.5752053500e-01, 1.6728059349e+00, 7.6626960662e+01 + 2.3325000000e+00, -1.2915401719e+00, 2.3342392000e-01, 1.5617091909e+00, 6.4544103441e+01 + 2.3400000000e+00, -1.2808505806e+00, 2.1801623719e-01, 1.4919006169e+00, 5.6758699164e+01 + 2.3475000000e+00, -1.2692913506e+00, 1.9040237344e-01, 1.4120836819e+00, 4.7984647261e+01 + 2.3550000000e+00, -1.2597224606e+00, 1.8347845750e-01, 1.3450194117e+00, 4.4387984526e+01 + 2.3625000000e+00, -1.2497304800e+00, 1.7118447406e-01, 1.3035494339e+00, 4.0370977711e+01 + 2.3700000000e+00, -1.2402236944e+00, 1.6158830469e-01, 1.2753451916e+00, 3.7050674260e+01 + 2.3775000000e+00, -1.2303322550e+00, 1.4625122563e-01, 1.2022778351e+00, 3.0664927724e+01 + 2.3850000000e+00, -1.2212019625e+00, 1.3823494094e-01, 1.1869640523e+00, 2.7626555037e+01 + 2.3925000000e+00, -1.2126564944e+00, 1.3490855437e-01, 1.1492783947e+00, 2.5431462101e+01 diff --git a/src/output/burn_in_time/ordered_1_0_611577739.txt b/data/hp/burn_in_time/ordered_1_0_611577739.txt similarity index 100% rename from src/output/burn_in_time/ordered_1_0_611577739.txt rename to data/hp/burn_in_time/ordered_1_0_611577739.txt diff --git a/src/output/burn_in_time/ordered_2_4_2408603856.txt b/data/hp/burn_in_time/ordered_2_4_2408603856.txt similarity index 100% rename from src/output/burn_in_time/ordered_2_4_2408603856.txt rename to data/hp/burn_in_time/ordered_2_4_2408603856.txt diff --git a/src/output/burn_in_time/unordered_1_0_1421110368.txt b/data/hp/burn_in_time/unordered_1_0_1421110368.txt similarity index 100% rename from src/output/burn_in_time/unordered_1_0_1421110368.txt rename to data/hp/burn_in_time/unordered_1_0_1421110368.txt diff --git a/src/output/burn_in_time/unordered_2_4_1212892317.txt b/data/hp/burn_in_time/unordered_2_4_1212892317.txt similarity index 100% rename from src/output/burn_in_time/unordered_2_4_1212892317.txt rename to data/hp/burn_in_time/unordered_2_4_1212892317.txt diff --git a/src/output/pd_estimate/estimate_1_0.txt b/data/hp/pd_estimate/estimate_1_0.txt similarity index 100% rename from src/output/pd_estimate/estimate_1_0.txt rename to data/hp/pd_estimate/estimate_1_0.txt diff --git a/src/output/pd_estimate/estimate_2_4.txt b/data/hp/pd_estimate/estimate_2_4.txt similarity index 100% rename from src/output/pd_estimate/estimate_2_4.txt rename to data/hp/pd_estimate/estimate_2_4.txt diff --git a/data/hp/phase_transition/size_100.txt b/data/hp/phase_transition/size_100.txt new file mode 100644 index 0000000..a1f0dac --- /dev/null +++ b/data/hp/phase_transition/size_100.txt @@ -0,0 +1,40 @@ + 2.1000000000e+00, -1.6371038000e+00, 6.2581558000e-01, 3.6095027156e+00, 5.7489856111e+02 + 2.1075000000e+00, -1.6435150000e+00, 7.6123262000e-01, 2.7802993399e+00, 2.6283062960e+02 + 2.1150000000e+00, -1.6426767600e+00, 8.0966756000e-01, 2.0542410004e+00, 1.4408710107e+02 + 2.1225000000e+00, -1.6344794400e+00, 8.0711036000e-01, 1.9355643586e+00, 1.2446169727e+02 + 2.1300000000e+00, -1.6205608000e+00, 7.5877138000e-01, 2.3655508902e+00, 2.4568489619e+02 + 2.1375000000e+00, -1.6214138000e+00, 8.3175844000e-01, 1.2795666043e+00, 1.6550405618e+01 + 2.1450000000e+00, -1.5997560800e+00, 7.0787784000e-01, 2.8037685495e+00, 3.3526314188e+02 + 2.1525000000e+00, -1.6022970800e+00, 8.0693338000e-01, 1.6353496690e+00, 3.9968711163e+01 + 2.1600000000e+00, -1.5910621600e+00, 7.8979922000e-01, 2.0517331450e+00, 6.9106446608e+01 + 2.1675000000e+00, -1.5737732400e+00, 7.1176228000e-01, 2.6975867475e+00, 2.1452131824e+02 + 2.1750000000e+00, -1.5703215200e+00, 7.3718808000e-01, 2.9152273809e+00, 1.6346322951e+02 + 2.1825000000e+00, -1.5595029200e+00, 6.9398684000e-01, 3.0152367370e+00, 3.0678720650e+02 + 2.1900000000e+00, -1.5579498800e+00, 7.8180838000e-01, 1.7652682137e+00, 1.8918956154e+01 + 2.1975000000e+00, -1.5414566400e+00, 7.5852508000e-01, 1.6257635448e+00, 2.2866553788e+01 + 2.2050000000e+00, -1.5353448000e+00, 7.6352362000e-01, 1.7077478149e+00, 1.4140458821e+01 + 2.2125000000e+00, -1.5235996000e+00, 7.2657998000e-01, 1.9721825546e+00, 8.3525849651e+01 + 2.2200000000e+00, -1.5142174800e+00, 7.3260968000e-01, 2.0123672073e+00, 4.9415163434e+01 + 2.2275000000e+00, -1.4978134400e+00, 6.8860188000e-01, 2.2215399948e+00, 1.0344524048e+02 + 2.2350000000e+00, -1.4895944000e+00, 7.1125768000e-01, 1.9917621661e+00, 2.0736451298e+01 + 2.2425000000e+00, -1.4731659200e+00, 6.5048836000e-01, 2.1611034359e+00, 1.3983721961e+02 + 2.2500000000e+00, -1.4582628400e+00, 6.0240854000e-01, 2.5233645415e+00, 1.8999851461e+02 + 2.2575000000e+00, -1.4342181600e+00, 5.4278660000e-01, 2.9292893735e+00, 1.9665956180e+02 + 2.2650000000e+00, -1.4163180000e+00, 4.7247974000e-01, 2.5186964158e+00, 2.0925954189e+02 + 2.2725000000e+00, -1.4044106800e+00, 5.1675614000e-01, 2.1712364524e+00, 8.0965986501e+01 + 2.2800000000e+00, -1.3794140000e+00, 4.1114440000e-01, 1.8470556402e+00, 1.1785915286e+02 + 2.2875000000e+00, -1.3795225600e+00, 4.3814352000e-01, 1.8879332023e+00, 1.1085340238e+02 + 2.2950000000e+00, -1.3634137600e+00, 3.8549398000e-01, 2.3566285458e+00, 1.6461073243e+02 + 2.3025000000e+00, -1.3401594400e+00, 2.7885920000e-01, 1.6345388537e+00, 1.1631028666e+02 + 2.3100000000e+00, -1.3286336400e+00, 2.3732102000e-01, 1.8529493607e+00, 1.3040063449e+02 + 2.3175000000e+00, -1.3153785200e+00, 2.5855216000e-01, 1.7975766127e+00, 1.2587585557e+02 + 2.3250000000e+00, -1.2975899600e+00, 1.8450448000e-01, 1.6637427480e+00, 7.2576349574e+01 + 2.3325000000e+00, -1.2898033600e+00, 1.7513594000e-01, 1.4415488723e+00, 4.9205481279e+01 + 2.3400000000e+00, -1.2776915200e+00, 1.8441732000e-01, 1.7936402222e+00, 6.7629297898e+01 + 2.3475000000e+00, -1.2684242400e+00, 1.3368142000e-01, 1.4821594993e+00, 4.3481206044e+01 + 2.3550000000e+00, -1.2595402000e+00, 1.1940780000e-01, 1.2813379672e+00, 3.3634558383e+01 + 2.3625000000e+00, -1.2501786000e+00, 1.2643562000e-01, 1.2677058475e+00, 4.1110495015e+01 + 2.3700000000e+00, -1.2414689200e+00, 1.0299240000e-01, 1.1768081362e+00, 2.3291583993e+01 + 2.3775000000e+00, -1.2277807200e+00, 1.2098908000e-01, 1.1489779287e+00, 3.0403697366e+01 + 2.3850000000e+00, -1.2214528000e+00, 9.8867520000e-02, 1.1575416025e+00, 2.2113722101e+01 + 2.3925000000e+00, -1.2150054800e+00, 1.0544216000e-01, 1.0150515519e+00, 2.7953452667e+01 diff --git a/data/hp/phase_transition/size_20.txt b/data/hp/phase_transition/size_20.txt new file mode 100644 index 0000000..9433f31 --- /dev/null +++ b/data/hp/phase_transition/size_20.txt @@ -0,0 +1,40 @@ + 2.1000000000e+00, -1.6633820000e+00, 8.7217500000e-01, 9.4065869170e-01, 6.8398845238e-01 + 2.1075000000e+00, -1.6631970000e+00, 8.7274250000e-01, 9.0778714699e-01, 6.9725953855e-01 + 2.1150000000e+00, -1.6410690000e+00, 8.5440500000e-01, 1.0088548856e+00, 1.2448938014e+00 + 2.1225000000e+00, -1.6441870000e+00, 8.6097100000e-01, 1.0100779799e+00, 9.6000700287e-01 + 2.1300000000e+00, -1.6324500000e+00, 8.5283250000e-01, 1.0136751967e+00, 9.5938768897e-01 + 2.1375000000e+00, -1.6291370000e+00, 8.5151600000e-01, 1.0276249578e+00, 1.1057210281e+00 + 2.1450000000e+00, -1.6146600000e+00, 8.4156050000e-01, 1.1239273336e+00, 1.2672675692e+00 + 2.1525000000e+00, -1.6027580000e+00, 8.3147850000e-01, 1.2134302683e+00, 1.6029178235e+00 + 2.1600000000e+00, -1.6002170000e+00, 8.3018700000e-01, 1.2131518271e+00, 1.8304361169e+00 + 2.1675000000e+00, -1.5808490000e+00, 8.0474700000e-01, 1.4520378890e+00, 3.9671300560e+00 + 2.1750000000e+00, -1.5735720000e+00, 8.0057350000e-01, 1.3269976645e+00, 3.0731344548e+00 + 2.1825000000e+00, -1.5544580000e+00, 7.8539300000e-01, 1.4133700713e+00, 3.8531354962e+00 + 2.1900000000e+00, -1.5603920000e+00, 7.9077350000e-01, 1.4411347833e+00, 3.8114181183e+00 + 2.1975000000e+00, -1.5516290000e+00, 7.9317550000e-01, 1.3774590877e+00, 3.1017590352e+00 + 2.2050000000e+00, -1.5452250000e+00, 7.9452500000e-01, 1.2624772086e+00, 2.4223808390e+00 + 2.2125000000e+00, -1.5329150000e+00, 7.8416500000e-01, 1.3252081810e+00, 2.3383869424e+00 + 2.2200000000e+00, -1.5126680000e+00, 7.5319500000e-01, 1.4819285590e+00, 4.6464724279e+00 + 2.2275000000e+00, -1.5043160000e+00, 7.4698400000e-01, 1.3768908655e+00, 4.4946260371e+00 + 2.2350000000e+00, -1.4981210000e+00, 7.4906400000e-01, 1.5292748062e+00, 4.4037778799e+00 + 2.2425000000e+00, -1.4863420000e+00, 7.3355600000e-01, 1.5522315290e+00, 5.0380137996e+00 + 2.2500000000e+00, -1.4948450000e+00, 7.5502650000e-01, 1.2933606696e+00, 3.2092972085e+00 + 2.2575000000e+00, -1.4706010000e+00, 7.2001950000e-01, 1.6160652668e+00, 5.5085540854e+00 + 2.2650000000e+00, -1.4445820000e+00, 6.9717150000e-01, 1.5540312775e+00, 5.5032824879e+00 + 2.2725000000e+00, -1.4404120000e+00, 6.9900050000e-01, 1.5075758687e+00, 4.8577027062e+00 + 2.2800000000e+00, -1.4363140000e+00, 6.9108150000e-01, 1.6333374426e+00, 5.6838689224e+00 + 2.2875000000e+00, -1.4161260000e+00, 6.5841300000e-01, 1.5819645805e+00, 7.2228924907e+00 + 2.2950000000e+00, -1.3723670000e+00, 5.9858850000e-01, 1.6375321789e+00, 8.6130536240e+00 + 2.3025000000e+00, -1.3922380000e+00, 6.2280050000e-01, 1.7943346841e+00, 8.8856529337e+00 + 2.3100000000e+00, -1.3855960000e+00, 6.4045900000e-01, 1.5783036138e+00, 6.7738838648e+00 + 2.3175000000e+00, -1.3755240000e+00, 6.2698900000e-01, 1.4448650367e+00, 6.7283812520e+00 + 2.3250000000e+00, -1.3577870000e+00, 5.9204150000e-01, 1.6835672198e+00, 9.2397272736e+00 + 2.3325000000e+00, -1.3431380000e+00, 5.7499100000e-01, 1.5596061859e+00, 8.1372724406e+00 + 2.3400000000e+00, -1.3444630000e+00, 6.0072250000e-01, 1.6264936541e+00, 7.3534624776e+00 + 2.3475000000e+00, -1.3124850000e+00, 5.3543350000e-01, 1.7123482662e+00, 1.0010569470e+01 + 2.3550000000e+00, -1.3136910000e+00, 5.5699450000e-01, 1.6070007992e+00, 8.2531956637e+00 + 2.3625000000e+00, -1.2810650000e+00, 5.0656800000e-01, 1.5315621059e+00, 8.5437225610e+00 + 2.3700000000e+00, -1.2705500000e+00, 4.8302350000e-01, 1.5720327939e+00, 9.4004313836e+00 + 2.3775000000e+00, -1.2660460000e+00, 4.7766650000e-01, 1.4751591568e+00, 9.4165269868e+00 + 2.3850000000e+00, -1.2688070000e+00, 5.0859250000e-01, 1.4145239860e+00, 7.7400321080e+00 + 2.3925000000e+00, -1.2634280000e+00, 4.7654750000e-01, 1.5547582235e+00, 1.0112374962e+01 diff --git a/data/hp/phase_transition/size_40.txt b/data/hp/phase_transition/size_40.txt new file mode 100644 index 0000000..2f9131a --- /dev/null +++ b/data/hp/phase_transition/size_40.txt @@ -0,0 +1,40 @@ + 2.1000000000e+00, -1.6618637500e+00, 8.6914825000e-01, 9.4657625794e-01, 7.8171606433e-01 + 2.1075000000e+00, -1.6554270000e+00, 8.6478112500e-01, 9.3051760261e-01, 8.5981926452e-01 + 2.1150000000e+00, -1.6495877500e+00, 8.6263700000e-01, 1.0075976683e+00, 1.0616654703e+00 + 2.1225000000e+00, -1.6417240000e+00, 8.5760462500e-01, 1.0228919257e+00, 1.0832180145e+00 + 2.1300000000e+00, -1.6280545000e+00, 8.4701462500e-01, 1.0739928250e+00, 1.2274745576e+00 + 2.1375000000e+00, -1.6233147500e+00, 8.4533325000e-01, 1.0287470643e+00, 1.3463538298e+00 + 2.1450000000e+00, -1.6151915000e+00, 8.3899750000e-01, 1.0697245341e+00, 1.4334978974e+00 + 2.1525000000e+00, -1.6091277500e+00, 8.3641712500e-01, 1.0756102013e+00, 1.4665726182e+00 + 2.1600000000e+00, -1.6021390000e+00, 8.3302962500e-01, 1.0681278906e+00, 1.5453437249e+00 + 2.1675000000e+00, -1.5910662500e+00, 8.2424787500e-01, 1.2668847840e+00, 2.2545947602e+00 + 2.1750000000e+00, -1.5799065000e+00, 8.1256562500e-01, 1.2308661144e+00, 2.7052847629e+00 + 2.1825000000e+00, -1.5708057500e+00, 8.0642325000e-01, 1.2051117282e+00, 2.2093461512e+00 + 2.1900000000e+00, -1.5613202500e+00, 8.0310512500e-01, 1.2202081074e+00, 2.0689586155e+00 + 2.1975000000e+00, -1.5566255000e+00, 8.0027450000e-01, 1.2860576438e+00, 2.3301207916e+00 + 2.2050000000e+00, -1.5488757500e+00, 7.9333450000e-01, 1.3393811630e+00, 2.8713289232e+00 + 2.2125000000e+00, -1.5390112500e+00, 7.8803875000e-01, 1.3109054073e+00, 2.8145738294e+00 + 2.2200000000e+00, -1.5253412500e+00, 7.7332037500e-01, 1.4391012656e+00, 3.6497936603e+00 + 2.2275000000e+00, -1.4961970000e+00, 7.0860087500e-01, 1.7816432449e+00, 1.9046329593e+01 + 2.2350000000e+00, -1.4909242500e+00, 7.3250437500e-01, 1.5636441240e+00, 6.6929081518e+00 + 2.2425000000e+00, -1.4783550000e+00, 7.0304737500e-01, 1.8126509368e+00, 1.6253480205e+01 + 2.2500000000e+00, -1.4772240000e+00, 7.2461725000e-01, 1.5824727147e+00, 5.7691422684e+00 + 2.2575000000e+00, -1.4544367500e+00, 6.8046800000e-01, 2.0368005551e+00, 1.6904981644e+01 + 2.2650000000e+00, -1.4431887500e+00, 6.7061612500e-01, 1.9069721109e+00, 1.2103955794e+01 + 2.2725000000e+00, -1.4273430000e+00, 6.3791537500e-01, 1.9055062501e+00, 1.7196094034e+01 + 2.2800000000e+00, -1.4175777500e+00, 6.4313950000e-01, 1.6355304186e+00, 1.0939969589e+01 + 2.2875000000e+00, -1.4004285000e+00, 5.8964362500e-01, 1.9828067667e+00, 2.3147417287e+01 + 2.2950000000e+00, -1.3677495000e+00, 5.1665737500e-01, 2.0157809009e+00, 3.0799995522e+01 + 2.3025000000e+00, -1.3649300000e+00, 5.3004400000e-01, 1.9130095640e+00, 2.6416010598e+01 + 2.3100000000e+00, -1.3391515000e+00, 4.6904875000e-01, 1.7899462297e+00, 2.9462253982e+01 + 2.3175000000e+00, -1.3299217500e+00, 4.5027100000e-01, 1.7626406097e+00, 3.0877758789e+01 + 2.3250000000e+00, -1.2996680000e+00, 3.6859825000e-01, 1.6039558130e+00, 2.7303325013e+01 + 2.3325000000e+00, -1.3065957500e+00, 3.9702187500e-01, 1.7889786051e+00, 3.2283859800e+01 + 2.3400000000e+00, -1.2804742500e+00, 3.5517725000e-01, 1.5202843778e+00, 2.6704582578e+01 + 2.3475000000e+00, -1.2864965000e+00, 3.8651312500e-01, 1.6351579296e+00, 2.6456978690e+01 + 2.3550000000e+00, -1.2611245000e+00, 3.2140812500e-01, 1.4595269224e+00, 2.2599238957e+01 + 2.3625000000e+00, -1.2681550000e+00, 3.7901825000e-01, 1.5642139577e+00, 2.5785949785e+01 + 2.3700000000e+00, -1.2458772500e+00, 3.2177900000e-01, 1.4574814741e+00, 2.1969821626e+01 + 2.3775000000e+00, -1.2365882500e+00, 3.1228725000e-01, 1.3400701572e+00, 2.2506270065e+01 + 2.3850000000e+00, -1.2311935000e+00, 2.8255362500e-01, 1.3351273714e+00, 2.2128293144e+01 + 2.3925000000e+00, -1.2161842500e+00, 2.5981187500e-01, 1.2826870950e+00, 1.8611641849e+01 diff --git a/data/hp/phase_transition/size_60.txt b/data/hp/phase_transition/size_60.txt new file mode 100644 index 0000000..b905204 --- /dev/null +++ b/data/hp/phase_transition/size_60.txt @@ -0,0 +1,40 @@ + 2.1000000000e+00, -1.6540002222e+00, 8.3136433333e-01, 1.5948383572e+00, 2.7441570607e+01 + 2.1075000000e+00, -1.6456700000e+00, 8.1050638889e-01, 1.8360357273e+00, 5.8141814297e+01 + 2.1150000000e+00, -1.6455295556e+00, 8.5688011111e-01, 1.1035588194e+00, 1.7200446495e+00 + 2.1225000000e+00, -1.6373152222e+00, 8.5282188889e-01, 1.0622621783e+00, 1.3272186864e+00 + 2.1300000000e+00, -1.6334084444e+00, 8.5176111111e-01, 1.0499880538e+00, 1.2364094418e+00 + 2.1375000000e+00, -1.6219742222e+00, 8.4388461111e-01, 1.1900590789e+00, 1.5892464409e+00 + 2.1450000000e+00, -1.6187030000e+00, 8.4498055556e-01, 1.0632710085e+00, 1.1914796037e+00 + 2.1525000000e+00, -1.6052558889e+00, 8.3113783333e-01, 1.2842649745e+00, 2.2802348620e+00 + 2.1600000000e+00, -1.5971676667e+00, 8.2197594444e-01, 1.3456056519e+00, 5.6152718030e+00 + 2.1675000000e+00, -1.5914575556e+00, 8.2436555556e-01, 1.1892870998e+00, 1.8853101812e+00 + 2.1750000000e+00, -1.5803726667e+00, 8.1594855556e-01, 1.2535770943e+00, 2.2379198903e+00 + 2.1825000000e+00, -1.5697217778e+00, 8.0372377778e-01, 1.2746857639e+00, 3.6961260899e+00 + 2.1900000000e+00, -1.5604053333e+00, 7.9786577778e-01, 1.3121186158e+00, 3.1135427242e+00 + 2.1975000000e+00, -1.5520627778e+00, 7.9332405556e-01, 1.3506122809e+00, 3.4251048015e+00 + 2.2050000000e+00, -1.5408311111e+00, 7.8028094444e-01, 1.6083598418e+00, 6.1169180990e+00 + 2.2125000000e+00, -1.5262208889e+00, 7.6525616667e-01, 1.4749366794e+00, 4.9293569802e+00 + 2.2200000000e+00, -1.5192147778e+00, 7.5825072222e-01, 1.7497371922e+00, 7.2093474416e+00 + 2.2275000000e+00, -1.4981175556e+00, 7.1909255556e-01, 1.6889472118e+00, 1.4322445295e+01 + 2.2350000000e+00, -1.4984063333e+00, 7.4789944444e-01, 1.4431042833e+00, 4.6884693209e+00 + 2.2425000000e+00, -1.4751695556e+00, 6.9572172222e-01, 1.9864795840e+00, 1.6163674292e+01 + 2.2500000000e+00, -1.4636893333e+00, 6.7512061111e-01, 1.8292634020e+00, 2.0878805120e+01 + 2.2575000000e+00, -1.4398260000e+00, 6.1392866667e-01, 2.5185818336e+00, 4.6072696874e+01 + 2.2650000000e+00, -1.4395602222e+00, 6.4825694444e-01, 2.0388618800e+00, 2.4495736960e+01 + 2.2725000000e+00, -1.4128195556e+00, 5.2779483333e-01, 2.5006491163e+00, 8.8246141136e+01 + 2.2800000000e+00, -1.4122497778e+00, 6.1288961111e-01, 1.6671011465e+00, 1.6927240340e+01 + 2.2875000000e+00, -1.4032304444e+00, 5.8849972222e-01, 2.1337704389e+00, 4.4825913394e+01 + 2.2950000000e+00, -1.3747425556e+00, 4.8167055556e-01, 2.1949381842e+00, 7.4455205883e+01 + 2.3025000000e+00, -1.3581913333e+00, 4.6851994444e-01, 1.8882411157e+00, 5.8578195329e+01 + 2.3100000000e+00, -1.3328340000e+00, 4.0425611111e-01, 1.9132861825e+00, 5.1568607542e+01 + 2.3175000000e+00, -1.3210327778e+00, 3.7945038889e-01, 2.0615709894e+00, 5.8056373767e+01 + 2.3250000000e+00, -1.3042545556e+00, 3.3456638889e-01, 1.6815891621e+00, 4.5649458122e+01 + 2.3325000000e+00, -1.2980037778e+00, 3.4123172222e-01, 1.5148961027e+00, 4.1749148490e+01 + 2.3400000000e+00, -1.2744992222e+00, 2.1353700000e-01, 1.3591796085e+00, 3.9462379584e+01 + 2.3475000000e+00, -1.2801508889e+00, 3.1566761111e-01, 1.5319145743e+00, 4.2148129034e+01 + 2.3550000000e+00, -1.2619510000e+00, 2.2901911111e-01, 1.3770268617e+00, 3.4117091605e+01 + 2.3625000000e+00, -1.2472958889e+00, 2.1884622222e-01, 1.4084660747e+00, 3.2260524163e+01 + 2.3700000000e+00, -1.2390235556e+00, 2.3409666667e-01, 1.3265727126e+00, 3.0474220874e+01 + 2.3775000000e+00, -1.2330763333e+00, 2.2147583333e-01, 1.3166904310e+00, 2.9393336094e+01 + 2.3850000000e+00, -1.2278515556e+00, 2.2068633333e-01, 1.3087975724e+00, 3.5630587741e+01 + 2.3925000000e+00, -1.2153211111e+00, 1.5936911111e-01, 1.1906943158e+00, 1.5990571932e+01 diff --git a/data/hp/phase_transition/size_80.txt b/data/hp/phase_transition/size_80.txt new file mode 100644 index 0000000..6af7c5d --- /dev/null +++ b/data/hp/phase_transition/size_80.txt @@ -0,0 +1,40 @@ + 2.1000000000e+00, -1.6622397500e+00, 8.6950137500e-01, 9.6774841896e-01, 8.7185793471e-01 + 2.1075000000e+00, -1.6485877500e+00, 8.3777900000e-01, 1.4234366658e+00, 2.5774540364e+01 + 2.1150000000e+00, -1.6357380625e+00, 7.7913865625e-01, 2.0164574637e+00, 1.4696931883e+02 + 2.1225000000e+00, -1.6378415625e+00, 8.5321990625e-01, 1.0661366107e+00, 1.6008261679e+00 + 2.1300000000e+00, -1.6244474375e+00, 7.9782031250e-01, 1.8411852075e+00, 9.8287771413e+01 + 2.1375000000e+00, -1.6226639375e+00, 8.4229471875e-01, 1.1971758551e+00, 3.5724814568e+00 + 2.1450000000e+00, -1.6098387500e+00, 8.2094300000e-01, 1.4568576763e+00, 1.1992312206e+01 + 2.1525000000e+00, -1.6003519375e+00, 8.0945571875e-01, 1.5786649068e+00, 1.9990437393e+01 + 2.1600000000e+00, -1.5955675000e+00, 8.2184993750e-01, 1.2226626457e+00, 3.2348256273e+00 + 2.1675000000e+00, -1.5735700000e+00, 7.5095731250e-01, 2.5177042399e+00, 8.9413784135e+01 + 2.1750000000e+00, -1.5749505625e+00, 7.8932768750e-01, 1.7171401470e+00, 2.0443257091e+01 + 2.1825000000e+00, -1.5668628125e+00, 7.8546015625e-01, 1.4439178248e+00, 1.7483438271e+01 + 2.1900000000e+00, -1.5611355625e+00, 7.9783140625e-01, 1.3238150656e+00, 3.1785728995e+00 + 2.1975000000e+00, -1.5539325000e+00, 7.9745615625e-01, 1.1612061674e+00, 2.2160880022e+00 + 2.2050000000e+00, -1.5421321875e+00, 7.8569690625e-01, 1.4025459391e+00, 3.6944631389e+00 + 2.2125000000e+00, -1.5219915625e+00, 7.5309437500e-01, 1.6775178105e+00, 8.4856707898e+00 + 2.2200000000e+00, -1.5082727500e+00, 7.3581437500e-01, 1.5980595706e+00, 1.1211351116e+01 + 2.2275000000e+00, -1.5045580625e+00, 7.4053928125e-01, 1.6655674639e+00, 7.6165379516e+00 + 2.2350000000e+00, -1.4801139375e+00, 6.8131940625e-01, 2.1507115629e+00, 5.0981052061e+01 + 2.2425000000e+00, -1.4752891250e+00, 6.8977953125e-01, 1.8946693369e+00, 2.1111285778e+01 + 2.2500000000e+00, -1.4498546250e+00, 5.9044000000e-01, 2.2950678011e+00, 9.5454575816e+01 + 2.2575000000e+00, -1.4461981875e+00, 6.3962690625e-01, 1.9672152883e+00, 3.0481657171e+01 + 2.2650000000e+00, -1.4415394375e+00, 6.6265996875e-01, 1.8686363846e+00, 1.6474752058e+01 + 2.2725000000e+00, -1.4046948750e+00, 5.3240953125e-01, 2.5800920804e+00, 9.0223587153e+01 + 2.2800000000e+00, -1.3939147500e+00, 4.7659168750e-01, 2.6544528677e+00, 1.3604420221e+02 + 2.2875000000e+00, -1.3778517500e+00, 4.6377521875e-01, 2.2117550986e+00, 7.1501548849e+01 + 2.2950000000e+00, -1.3480291875e+00, 3.2696493750e-01, 2.2546613122e+00, 1.1106179596e+02 + 2.3025000000e+00, -1.3464116250e+00, 3.8140221875e-01, 1.8968177799e+00, 7.9994460215e+01 + 2.3100000000e+00, -1.3301356250e+00, 2.7506562500e-01, 2.0210043435e+00, 1.1369933017e+02 + 2.3175000000e+00, -1.3260653125e+00, 3.6653284375e-01, 2.1050263076e+00, 8.3136481579e+01 + 2.3250000000e+00, -1.3010433125e+00, 2.1000118750e-01, 1.5613377443e+00, 6.9306022577e+01 + 2.3325000000e+00, -1.2959236875e+00, 2.4325200000e-01, 1.7695811488e+00, 7.4160643472e+01 + 2.3400000000e+00, -1.2780201875e+00, 2.1618071875e-01, 1.4198286839e+00, 5.3942020927e+01 + 2.3475000000e+00, -1.2701064375e+00, 2.0898393750e-01, 1.4416153400e+00, 4.2230692332e+01 + 2.3550000000e+00, -1.2621835000e+00, 2.3318268750e-01, 1.3707089127e+00, 5.4564307994e+01 + 2.3625000000e+00, -1.2474808125e+00, 1.6081746875e-01, 1.1973029008e+00, 3.0449130044e+01 + 2.3700000000e+00, -1.2363869375e+00, 1.3191662500e-01, 1.2496088123e+00, 2.7361537884e+01 + 2.3775000000e+00, -1.2277013750e+00, 1.2661056250e-01, 1.1466888635e+00, 2.3247367546e+01 + 2.3850000000e+00, -1.2230078750e+00, 1.4301137500e-01, 1.1279431990e+00, 3.2181757651e+01 + 2.3925000000e+00, -1.2149005625e+00, 1.5206834375e-01, 1.2603890760e+00, 3.1794743864e+01 diff --git a/data/hp/test_burn_in_time/burn_in.txt b/data/hp/test_burn_in_time/burn_in.txt new file mode 100644 index 0000000..61dcc1d --- /dev/null +++ b/data/hp/test_burn_in_time/burn_in.txt @@ -0,0 +1,20 @@ + 2.1000000000e+00, -1.6617635000e+00, 8.6787264000e-01, 9.7103663200e-01, 1.0491729980e+00 + 2.1150000000e+00, -1.6475635100e+00, 8.6042474000e-01, 1.0056565468e+00, 1.0814171340e+00 + 2.1300000000e+00, -1.6323857000e+00, 8.5085071500e-01, 1.0535043784e+00, 1.3276792036e+00 + 2.1450000000e+00, -1.6156031600e+00, 8.4019954000e-01, 1.1063124063e+00, 1.5055458525e+00 + 2.1600000000e+00, -1.5989340800e+00, 8.2866907500e-01, 1.1619684169e+00, 1.8416158173e+00 + 2.1750000000e+00, -1.5811273500e+00, 8.1612870500e-01, 1.2190148221e+00, 2.1546852138e+00 + 2.1900000000e+00, -1.5615252500e+00, 8.0009336000e-01, 1.2980841694e+00, 2.7870317048e+00 + 2.2050000000e+00, -1.5401519400e+00, 7.8183459000e-01, 1.3845035774e+00, 3.4239365586e+00 + 2.2200000000e+00, -1.5203860000e+00, 7.6566219000e-01, 1.4280835812e+00, 3.8484026044e+00 + 2.2350000000e+00, -1.4976508100e+00, 7.4582481000e-01, 1.4829979115e+00, 4.3874835595e+00 + 2.2500000000e+00, -1.4768044700e+00, 7.2660411500e-01, 1.5463351378e+00, 5.0174060871e+00 + 2.2650000000e+00, -1.4526503400e+00, 7.0177143000e-01, 1.5879520058e+00, 5.8441503021e+00 + 2.2800000000e+00, -1.4250755100e+00, 6.7062376000e-01, 1.6437067943e+00, 6.8291521971e+00 + 2.2950000000e+00, -1.4019157200e+00, 6.4690484000e-01, 1.6546429164e+00, 7.3222261760e+00 + 2.3100000000e+00, -1.3790397900e+00, 6.2285967000e-01, 1.6637922450e+00, 7.7567580411e+00 + 2.3250000000e+00, -1.3512864000e+00, 5.8877510500e-01, 1.6490082368e+00, 8.4528378679e+00 + 2.3400000000e+00, -1.3280151900e+00, 5.6273393000e-01, 1.6334073073e+00, 8.6790014832e+00 + 2.3550000000e+00, -1.3055916300e+00, 5.3744482000e-01, 1.5801579815e+00, 8.8512376399e+00 + 2.3700000000e+00, -1.2817610500e+00, 5.0701832000e-01, 1.5422366361e+00, 9.0734743855e+00 + 2.3850000000e+00, -1.2570240200e+00, 4.7704696500e-01, 1.4616775773e+00, 8.9758142573e+00 diff --git a/data/hp/test_burn_in_time/no_burn_in.txt b/data/hp/test_burn_in_time/no_burn_in.txt new file mode 100644 index 0000000..522e792 --- /dev/null +++ b/data/hp/test_burn_in_time/no_burn_in.txt @@ -0,0 +1,20 @@ + 2.1000000000e+00, -1.6619132900e+00, 8.6811622000e-01, 9.7288988856e-01, 1.0204055948e+00 + 2.1150000000e+00, -1.6467313100e+00, 8.5922790500e-01, 1.0183842544e+00, 1.1808654363e+00 + 2.1300000000e+00, -1.6313887100e+00, 8.4978376500e-01, 1.0682193026e+00, 1.3637763225e+00 + 2.1450000000e+00, -1.6146207800e+00, 8.3897405500e-01, 1.1176808813e+00, 1.5827014568e+00 + 2.1600000000e+00, -1.5982241700e+00, 8.2737717000e-01, 1.1857006282e+00, 1.9734006968e+00 + 2.1750000000e+00, -1.5811020700e+00, 8.1643799000e-01, 1.2181415134e+00, 2.1513857259e+00 + 2.1900000000e+00, -1.5610766000e+00, 7.9925653500e-01, 1.3132862728e+00, 2.8646846639e+00 + 2.2050000000e+00, -1.5417696200e+00, 7.8465401000e-01, 1.3639974821e+00, 3.1811652682e+00 + 2.2200000000e+00, -1.5203607000e+00, 7.6661311500e-01, 1.4266606197e+00, 3.7332090964e+00 + 2.2350000000e+00, -1.4978702200e+00, 7.4525522000e-01, 1.4973796966e+00, 4.5058703736e+00 + 2.2500000000e+00, -1.4743290500e+00, 7.2207903500e-01, 1.5639320989e+00, 5.3120951891e+00 + 2.2650000000e+00, -1.4514933700e+00, 6.9985274500e-01, 1.5971968127e+00, 5.9381039013e+00 + 2.2800000000e+00, -1.4290269000e+00, 6.7864666000e-01, 1.6275890487e+00, 6.3599046352e+00 + 2.2950000000e+00, -1.4033562500e+00, 6.4872791500e-01, 1.6552866854e+00, 7.3340586884e+00 + 2.3100000000e+00, -1.3790494300e+00, 6.2305609500e-01, 1.6653072556e+00, 7.7525182698e+00 + 2.3250000000e+00, -1.3535413400e+00, 5.9245705000e-01, 1.6731399541e+00, 8.4699155536e+00 + 2.3400000000e+00, -1.3275875500e+00, 5.6172020000e-01, 1.6281734228e+00, 8.7488559850e+00 + 2.3550000000e+00, -1.3023641600e+00, 5.3023305000e-01, 1.5892477908e+00, 9.0404514374e+00 + 2.3700000000e+00, -1.2793240300e+00, 5.0275315000e-01, 1.5314670060e+00, 9.0780012515e+00 + 2.3850000000e+00, -1.2564623100e+00, 4.7551642500e-01, 1.4737595119e+00, 9.0526098751e+00 diff --git a/data/hp/timing/lattice_sizes.txt b/data/hp/timing/lattice_sizes.txt new file mode 100644 index 0000000..e69de29 diff --git a/data/hp/timing/sample_sizes.txt b/data/hp/timing/sample_sizes.txt new file mode 100644 index 0000000..230fc29 --- /dev/null +++ b/data/hp/timing/sample_sizes.txt @@ -0,0 +1,3 @@ + 1.0000000000e+03, 4.4863519060e+00 + 1.0000000000e+04, 5.1105693560e+00 + 1.0000000000e+05, 1.1682900080e+01 diff --git a/include/IsingModel.hpp b/include/IsingModel.hpp index 8ec4ae9..aac9df3 100644 --- a/include/IsingModel.hpp +++ b/include/IsingModel.hpp @@ -18,6 +18,7 @@ #include "utils.hpp" #include +#include #include #include @@ -53,7 +54,8 @@ private: /** @brief A hash map containing all possible energy changes. * */ - std::unordered_map energy_diff; + //std::unordered_map energy_diff; + double energy_diff[17]; /** @brief The temperature of the model. * */ @@ -65,12 +67,15 @@ private: /** @brief The current energy state. unit: \f$ J \f$. * */ - int E; + int64_t E; /** @brief The current magnetic strength. unit: Unitless. * */ - int M; + int64_t M; + std::mt19937 engine; + + void initialize_engine(); /** @brief Initialize the lattice with a random distribution of 1s and * -1s. * */ diff --git a/include/data_type.hpp b/include/data_type.hpp index 5d3bfd5..7192660 100644 --- a/include/data_type.hpp +++ b/include/data_type.hpp @@ -49,7 +49,7 @@ public: return res; } - template data_t& operator/=(T num) + template data_t &operator/=(T num) { this->E /= (double)num; this->E2 /= (double)num; @@ -72,7 +72,7 @@ public: return res; } - template data_t& operator*=(T num) + template data_t &operator*=(T num) { this->E *= (double)num; this->E2 *= (double)num; @@ -95,7 +95,7 @@ public: return res; } - data_t& operator+=(const data_t &b) + data_t &operator+=(const data_t &b) { this->E += b.E; this->E2 += b.E2; @@ -116,4 +116,6 @@ public: } }; +#pragma omp declare reduction(+ : data_t : omp_out += omp_in) + #endif diff --git a/include/monte_carlo.hpp b/include/monte_carlo.hpp index 36e7b05..f865565 100644 --- a/include/monte_carlo.hpp +++ b/include/monte_carlo.hpp @@ -5,7 +5,7 @@ * * @version 1.0 * - * @brief Functions for monte carlo simulations. + * @brief Functions for Monte Carlo simulations. * * @bug No known bugs * */ @@ -17,23 +17,13 @@ #include "utils.hpp" #include -#include #include +#include -//#define BURN_IN_TIME 12500 +// #define BURN_IN_TIME 12500 #define BURN_IN_TIME 5000 -#pragma omp declare reduction(+: data_t: omp_out += omp_in) - -/** @brief Test numerical data with analytical data. - * - * @param tol The tolerance between the analytical and numerical solution. - * @param max_cycles The max number of Monte Carlo cycles. - * - * return int - * */ -int test_2x2_lattice(double tol, int max_cycles); - +namespace montecarlo { /** @brief Write the expected values for each Monte Carlo cycles to file. * * @param T Temperature @@ -41,8 +31,8 @@ int test_2x2_lattice(double tol, int max_cycles); * @param cycles The amount of Monte Carlo cycles to do * @param filename The file to write to * */ -void monte_carlo_progression(double T, int L, int cycles, - const std::string filename); +void progression(double T, int L, int cycles, const std::string filename, + int burn_in_time = BURN_IN_TIME); /** @brief Write the expected values for each Monte Carlo cycles to file. * @@ -52,8 +42,8 @@ void monte_carlo_progression(double T, int L, int cycles, * @param value The value to set the elements in the lattice * @param filename The file to write to * */ -void monte_carlo_progression(double T, int L, int cycles, int value, - const std::string filename); +void progression(double T, int L, int cycles, int value, + const std::string filename, int burn_in_time = BURN_IN_TIME); /** @brief Estimate the probability distribution for the energy. * @@ -62,7 +52,8 @@ void monte_carlo_progression(double T, int L, int cycles, int value, * @param cycles The amount of Monte Carlo cycles to do * @param filename The file to write to * */ -void pd_estimate(double T, int L, int cycles, const std::string filename); +void pd_estimate(double T, int L, int cycles, const std::string filename, + int burn_in_time = BURN_IN_TIME); /** @brief Execute the Metropolis algorithm for a certain amount of Monte * Carlo cycles. @@ -73,7 +64,8 @@ void pd_estimate(double T, int L, int cycles, const std::string filename); * * @return data_t * */ -data_t monte_carlo_serial(int L, double T, int cycles); +data_t mcmc_serial(int L, double T, int cycles, + int burn_in_time = BURN_IN_TIME); /** @brief Execute the Metropolis algorithm for a certain amount of Monte * Carlo cycles in parallel. @@ -84,7 +76,8 @@ data_t monte_carlo_serial(int L, double T, int cycles); * * @return data_t * */ -data_t monte_carlo_parallel(int L, double T, int cycles); +data_t mcmc_parallel(int L, double T, int cycles, + int burn_in_time = BURN_IN_TIME); /** @brief Perform the MCMC algorithm using a range of temperatures. * @@ -95,9 +88,10 @@ data_t monte_carlo_parallel(int L, double T, int cycles); * @param monte_carlo Which Monte Carlo implementation to use * @param outfile The file to write the data to * */ -void phase_transition( - int L, double start_T, double end_T, int points_T, - std::function monte_carlo, - std::string outfile); +void phase_transition(int L, double start_T, double end_T, int points_T, + int cycles, + std::function monte_carlo, + std::string outfile, int burn_in_time = BURN_IN_TIME); +}; // namespace montecarlo #endif diff --git a/include/utils.hpp b/include/utils.hpp index d9a99fd..0618908 100644 --- a/include/utils.hpp +++ b/include/utils.hpp @@ -49,7 +49,7 @@ namespace details { * * @details This function should only be used for the __METHOD_NAME__ macro, * since it takes the output from __PRETTY_FUNCTION__ and strips the return - * type. + * type. * * @param pretty_function The string from __PRETTY_FUNCTION__ * @@ -114,6 +114,21 @@ bool mkpath(std::string path, int mode = 0777); * */ std::string dirname(const std::string &path); +/** @brief Take 2 strings and concatenate them and make sure there is a + * directory separator (/) between them. + * + * @details This function doesn't care whether or not the values given as + * parameters are valid path strings. It is the responsibility of the user to make + * sure that the values given are valid path strings. + * The function only guarantees that the output string is a valid path string. + * + * @param left The left hand side of the result string + * @param right The right hand side of the result string + * + * @return string + * */ +std::string concatpath(const std::string &left, const std::string &right); + } // namespace utils #endif diff --git a/latex/Makefile b/latex/Makefile new file mode 100644 index 0000000..77f8d57 --- /dev/null +++ b/latex/Makefile @@ -0,0 +1,14 @@ +SRC=ising_model +PDFLATEX=pdflatex +BIBTEX=bibtex + +.PHONY: clean + +all: + $(PDFLATEX) $(SRC) + $(BIBTEX) $(SRC) + $(PDFLATEX) $(SRC) + $(PDFLATEX) $(SRC) + +clean: + $(RM) *.aux *.log *.out *Notes.bib diff --git a/latex/images/2x2_analysis.pdf b/latex/images/2x2_analysis.pdf deleted file mode 100644 index 5add5be..0000000 Binary files a/latex/images/2x2_analysis.pdf and /dev/null differ diff --git a/latex/images/2x2_energy.pdf b/latex/images/2x2_energy.pdf deleted file mode 100644 index 5005e74..0000000 Binary files a/latex/images/2x2_energy.pdf and /dev/null differ diff --git a/latex/images/2x2_heat_capacity.pdf b/latex/images/2x2_heat_capacity.pdf deleted file mode 100644 index 5a546f8..0000000 Binary files a/latex/images/2x2_heat_capacity.pdf and /dev/null differ diff --git a/latex/images/2x2_magnetization.pdf b/latex/images/2x2_magnetization.pdf deleted file mode 100644 index d79381a..0000000 Binary files a/latex/images/2x2_magnetization.pdf and /dev/null differ diff --git a/latex/images/2x2_susceptibility.pdf b/latex/images/2x2_susceptibility.pdf deleted file mode 100644 index 571cab3..0000000 Binary files a/latex/images/2x2_susceptibility.pdf and /dev/null differ diff --git a/latex/images/burn_in_time_energy.pdf b/latex/images/burn_in_time_energy.pdf deleted file mode 100644 index 063a9cb..0000000 Binary files a/latex/images/burn_in_time_energy.pdf and /dev/null differ diff --git a/latex/images/burn_in_time_energy_1_0.pdf b/latex/images/burn_in_time_energy_1_0.pdf deleted file mode 100644 index 8ff176f..0000000 Binary files a/latex/images/burn_in_time_energy_1_0.pdf and /dev/null differ diff --git a/latex/images/burn_in_time_energy_2_4.pdf b/latex/images/burn_in_time_energy_2_4.pdf deleted file mode 100644 index ad15f2c..0000000 Binary files a/latex/images/burn_in_time_energy_2_4.pdf and /dev/null differ diff --git a/latex/images/burn_in_time_magnetization.pdf b/latex/images/burn_in_time_magnetization.pdf deleted file mode 100644 index 0cb4a2b..0000000 Binary files a/latex/images/burn_in_time_magnetization.pdf and /dev/null differ diff --git a/latex/images/burn_in_time_magnetization_1_0.pdf b/latex/images/burn_in_time_magnetization_1_0.pdf deleted file mode 100644 index de4a73c..0000000 Binary files a/latex/images/burn_in_time_magnetization_1_0.pdf and /dev/null differ diff --git a/latex/images/burn_in_time_magnetization_2_4.pdf b/latex/images/burn_in_time_magnetization_2_4.pdf deleted file mode 100644 index 8455af3..0000000 Binary files a/latex/images/burn_in_time_magnetization_2_4.pdf and /dev/null differ diff --git a/latex/images/pd_estimate_1_0.pdf b/latex/images/pd_estimate_1_0.pdf deleted file mode 100644 index 48417b4..0000000 Binary files a/latex/images/pd_estimate_1_0.pdf and /dev/null differ diff --git a/latex/images/pd_estimate_2_4.pdf b/latex/images/pd_estimate_2_4.pdf deleted file mode 100644 index 04b1e1e..0000000 Binary files a/latex/images/pd_estimate_2_4.pdf and /dev/null differ diff --git a/latex/images/phase_transition/fox/narrow/10M/energy.pdf b/latex/images/phase_transition/fox/narrow/10M/energy.pdf deleted file mode 100644 index 5c79960..0000000 Binary files a/latex/images/phase_transition/fox/narrow/10M/energy.pdf and /dev/null differ diff --git a/latex/images/phase_transition/fox/narrow/10M/heat_capacity.pdf b/latex/images/phase_transition/fox/narrow/10M/heat_capacity.pdf deleted file mode 100644 index dcb6cb3..0000000 Binary files a/latex/images/phase_transition/fox/narrow/10M/heat_capacity.pdf and /dev/null differ diff --git a/latex/images/phase_transition/fox/narrow/10M/linreg.pdf b/latex/images/phase_transition/fox/narrow/10M/linreg.pdf deleted file mode 100644 index 0e99b39..0000000 Binary files a/latex/images/phase_transition/fox/narrow/10M/linreg.pdf and /dev/null differ diff --git a/latex/images/phase_transition/fox/narrow/10M/magnetization.pdf b/latex/images/phase_transition/fox/narrow/10M/magnetization.pdf deleted file mode 100644 index 30c1790..0000000 Binary files a/latex/images/phase_transition/fox/narrow/10M/magnetization.pdf and /dev/null differ diff --git a/latex/images/phase_transition/fox/narrow/10M/susceptibility.pdf b/latex/images/phase_transition/fox/narrow/10M/susceptibility.pdf deleted file mode 100644 index b9b1e09..0000000 Binary files a/latex/images/phase_transition/fox/narrow/10M/susceptibility.pdf and /dev/null differ diff --git a/latex/images/phase_transition/fox/wide/10M/energy.pdf b/latex/images/phase_transition/fox/wide/10M/energy.pdf deleted file mode 100644 index ffe20c1..0000000 Binary files a/latex/images/phase_transition/fox/wide/10M/energy.pdf and /dev/null differ diff --git a/latex/images/phase_transition/fox/wide/10M/heat_capacity.pdf b/latex/images/phase_transition/fox/wide/10M/heat_capacity.pdf deleted file mode 100644 index 7cd5bda..0000000 Binary files a/latex/images/phase_transition/fox/wide/10M/heat_capacity.pdf and /dev/null differ diff --git a/latex/images/phase_transition/fox/wide/10M/linreg.pdf b/latex/images/phase_transition/fox/wide/10M/linreg.pdf deleted file mode 100644 index 66e19a6..0000000 Binary files a/latex/images/phase_transition/fox/wide/10M/linreg.pdf and /dev/null differ diff --git a/latex/images/phase_transition/fox/wide/10M/magnetization.pdf b/latex/images/phase_transition/fox/wide/10M/magnetization.pdf deleted file mode 100644 index 5475e0b..0000000 Binary files a/latex/images/phase_transition/fox/wide/10M/magnetization.pdf and /dev/null differ diff --git a/latex/images/phase_transition/fox/wide/10M/susceptibility.pdf b/latex/images/phase_transition/fox/wide/10M/susceptibility.pdf deleted file mode 100644 index 13d8291..0000000 Binary files a/latex/images/phase_transition/fox/wide/10M/susceptibility.pdf and /dev/null differ diff --git a/latex/images/phase_transition/fox/wide/1M/energy.pdf b/latex/images/phase_transition/fox/wide/1M/energy.pdf deleted file mode 100644 index f9a359a..0000000 Binary files a/latex/images/phase_transition/fox/wide/1M/energy.pdf and /dev/null differ diff --git a/latex/images/phase_transition/fox/wide/1M/heat_capacity.pdf b/latex/images/phase_transition/fox/wide/1M/heat_capacity.pdf deleted file mode 100644 index cc05081..0000000 Binary files a/latex/images/phase_transition/fox/wide/1M/heat_capacity.pdf and /dev/null differ diff --git a/latex/images/phase_transition/fox/wide/1M/linreg.pdf b/latex/images/phase_transition/fox/wide/1M/linreg.pdf deleted file mode 100644 index 60ebf09..0000000 Binary files a/latex/images/phase_transition/fox/wide/1M/linreg.pdf and /dev/null differ diff --git a/latex/images/phase_transition/fox/wide/1M/magnetization.pdf b/latex/images/phase_transition/fox/wide/1M/magnetization.pdf deleted file mode 100644 index fb086c0..0000000 Binary files a/latex/images/phase_transition/fox/wide/1M/magnetization.pdf and /dev/null differ diff --git a/latex/images/phase_transition/fox/wide/1M/susceptibility.pdf b/latex/images/phase_transition/fox/wide/1M/susceptibility.pdf deleted file mode 100644 index ab5ab95..0000000 Binary files a/latex/images/phase_transition/fox/wide/1M/susceptibility.pdf and /dev/null differ diff --git a/latex/images/phase_transition/hp/energy.pdf b/latex/images/phase_transition/hp/energy.pdf deleted file mode 100644 index 18addd8..0000000 Binary files a/latex/images/phase_transition/hp/energy.pdf and /dev/null differ diff --git a/latex/images/phase_transition/hp/heat_capacity.pdf b/latex/images/phase_transition/hp/heat_capacity.pdf deleted file mode 100644 index 7fc0fd8..0000000 Binary files a/latex/images/phase_transition/hp/heat_capacity.pdf and /dev/null differ diff --git a/latex/images/phase_transition/hp/linreg.pdf b/latex/images/phase_transition/hp/linreg.pdf deleted file mode 100644 index 0647d05..0000000 Binary files a/latex/images/phase_transition/hp/linreg.pdf and /dev/null differ diff --git a/latex/images/phase_transition/hp/magnetization.pdf b/latex/images/phase_transition/hp/magnetization.pdf deleted file mode 100644 index 67f8660..0000000 Binary files a/latex/images/phase_transition/hp/magnetization.pdf and /dev/null differ diff --git a/latex/images/phase_transition/hp/susceptibility.pdf b/latex/images/phase_transition/hp/susceptibility.pdf deleted file mode 100644 index 09c4011..0000000 Binary files a/latex/images/phase_transition/hp/susceptibility.pdf and /dev/null differ diff --git a/latex/images/phase_transition/narrow/10M/energy.pdf b/latex/images/phase_transition/narrow/10M/energy.pdf deleted file mode 100644 index f4de570..0000000 Binary files a/latex/images/phase_transition/narrow/10M/energy.pdf and /dev/null differ diff --git a/latex/images/phase_transition/narrow/10M/heat_capacity.pdf b/latex/images/phase_transition/narrow/10M/heat_capacity.pdf deleted file mode 100644 index 698ef30..0000000 Binary files a/latex/images/phase_transition/narrow/10M/heat_capacity.pdf and /dev/null differ diff --git a/latex/images/phase_transition/narrow/10M/magnetization.pdf b/latex/images/phase_transition/narrow/10M/magnetization.pdf deleted file mode 100644 index 7a215e7..0000000 Binary files a/latex/images/phase_transition/narrow/10M/magnetization.pdf and /dev/null differ diff --git a/latex/images/phase_transition/narrow/10M/susceptibility.pdf b/latex/images/phase_transition/narrow/10M/susceptibility.pdf deleted file mode 100644 index 07dce76..0000000 Binary files a/latex/images/phase_transition/narrow/10M/susceptibility.pdf and /dev/null differ diff --git a/latex/images/phase_transition/wide/10M/energy.pdf b/latex/images/phase_transition/wide/10M/energy.pdf deleted file mode 100644 index f786c69..0000000 Binary files a/latex/images/phase_transition/wide/10M/energy.pdf and /dev/null differ diff --git a/latex/images/phase_transition/wide/10M/heat_capacity.pdf b/latex/images/phase_transition/wide/10M/heat_capacity.pdf deleted file mode 100644 index ccd66c5..0000000 Binary files a/latex/images/phase_transition/wide/10M/heat_capacity.pdf and /dev/null differ diff --git a/latex/images/phase_transition/wide/10M/magnetization.pdf b/latex/images/phase_transition/wide/10M/magnetization.pdf deleted file mode 100644 index 77ac47b..0000000 Binary files a/latex/images/phase_transition/wide/10M/magnetization.pdf and /dev/null differ diff --git a/latex/images/phase_transition/wide/10M/susceptibility.pdf b/latex/images/phase_transition/wide/10M/susceptibility.pdf deleted file mode 100644 index f044bb4..0000000 Binary files a/latex/images/phase_transition/wide/10M/susceptibility.pdf and /dev/null differ diff --git a/latex/images/phase_transition/wide/1M/energy.pdf b/latex/images/phase_transition/wide/1M/energy.pdf deleted file mode 100644 index 4d4d371..0000000 Binary files a/latex/images/phase_transition/wide/1M/energy.pdf and /dev/null differ diff --git a/latex/images/phase_transition/wide/1M/heat_capacity.pdf b/latex/images/phase_transition/wide/1M/heat_capacity.pdf deleted file mode 100644 index 8765c3e..0000000 Binary files a/latex/images/phase_transition/wide/1M/heat_capacity.pdf and /dev/null differ diff --git a/latex/images/phase_transition/wide/1M/magnetization.pdf b/latex/images/phase_transition/wide/1M/magnetization.pdf deleted file mode 100644 index c04fe54..0000000 Binary files a/latex/images/phase_transition/wide/1M/magnetization.pdf and /dev/null differ diff --git a/latex/images/phase_transition/wide/1M/susceptibility.pdf b/latex/images/phase_transition/wide/1M/susceptibility.pdf deleted file mode 100644 index dd36df2..0000000 Binary files a/latex/images/phase_transition/wide/1M/susceptibility.pdf and /dev/null differ diff --git a/python_scripts/burn_in_time.py b/python_scripts/burn_in_time.py new file mode 100644 index 0000000..ef49d3f --- /dev/null +++ b/python_scripts/burn_in_time.py @@ -0,0 +1,112 @@ +import matplotlib.pyplot as plt +import seaborn as sns + +sns.set_theme() +params = { + "font.family": "Serif", + "font.serif": "Roman", + "text.usetex": True, + "axes.titlesize": "large", + "axes.labelsize": "large", + "xtick.labelsize": "large", + "ytick.labelsize": "large", + "legend.fontsize": "medium", +} +plt.rcParams.update(params) + + +def plot_1_0(): + files = [ + "data/hp/burn_in_time/unordered_1_0_1421110368.txt", + "data/hp/burn_in_time/ordered_1_0_611577739.txt", + ] + labels = [ + "Unordered", + "Ordered", + ] + colors = [ + "darkred", + "seagreen", + ] + + fig1, ax1 = plt.subplots() + fig2, ax2 = plt.subplots() + + for infile, label, color in zip(files, labels, colors): + with open(infile) as f: + lines = f.readlines() + + t = [] + energy = [] + magnetization = [] + for line in lines: + items = line.strip().split(",") + t.append(int(items[0])) + energy.append(float(items[1])) + magnetization.append(float(items[5])) + + ax1.plot(t, energy, label=f"{label}", color=color) + ax2.plot(t, magnetization, label=f"{label}", color=color) + + ax1.set_xlabel("t") + ax1.set_ylabel(r"$\langle \epsilon \rangle$") + ax1.legend(title="Initial state", loc="upper right") + + fig1.savefig("./latex/images/burn_in_time_energy_1_0.pdf", bbox_inches="tight") + ax2.set_ylabel(r"$\langle |m| \rangle$") + ax2.set_xlabel("t") + ax2.legend(title="Initial state", loc="upper right") + fig2.savefig( + "./latex/images/burn_in_time_magnetization_1_0.pdf", bbox_inches="tight" + ) + + +def plot_2_4(): + files = [ + "data/hp/burn_in_time/unordered_2_4_1212892317.txt", + "data/hp/burn_in_time/ordered_2_4_2408603856.txt", + ] + labels = [ + "Unordered", + "Ordered", + ] + colors = [ + "darkred", + "seagreen", + ] + + fig1, ax1 = plt.subplots() + fig2, ax2 = plt.subplots() + + for infile, label, color in zip(files, labels, colors): + with open(infile) as f: + lines = f.readlines() + + t = [] + energy = [] + magnetization = [] + for line in lines: + items = line.strip().split(",") + t.append(int(items[0])) + energy.append(float(items[1])) + magnetization.append(float(items[5])) + + ax1.plot(t, energy, label=f"{label}", color=color) + ax2.plot(t, magnetization, label=f"{label}", color=color) + + ax1.set_xlabel("t") + ax1.set_ylabel(r"$\langle \epsilon \rangle$") + ax1.legend(title="Initial state", loc="upper right") + + fig1.savefig("./latex/images/burn_in_time_energy_2_4.pdf", bbox_inches="tight") + ax2.set_ylabel(r"$\langle |m| \rangle$") + ax2.set_xlabel("t") + ax2.legend(title="Initial state", loc="upper right") + fig2.savefig( + "./latex/images/burn_in_time_magnetization_2_4.pdf", bbox_inches="tight" + ) + + +if __name__ == "__main__": + plot_1_0() + plot_2_4() diff --git a/src/scripts/pd_estimate.py b/python_scripts/pd_estimate.py similarity index 57% rename from src/scripts/pd_estimate.py rename to python_scripts/pd_estimate.py index 881b79d..b1508c6 100644 --- a/src/scripts/pd_estimate.py +++ b/python_scripts/pd_estimate.py @@ -1,4 +1,4 @@ -import os +from os import makedirs from pathlib import Path import matplotlib.pyplot as plt @@ -9,20 +9,20 @@ from scipy.stats import norm sns.set_theme() params = { "font.family": "Serif", - "font.serif": "Roman", + "font.serif": "Roman", "text.usetex": True, "axes.titlesize": "large", "axes.labelsize": "large", "xtick.labelsize": "large", "ytick.labelsize": "large", - "legend.fontsize": "medium" + "legend.fontsize": "medium", } plt.rcParams.update(params) def plot(infile, outfile): if not (outdir := Path(outfile).parent).exists(): - os.makedirs(outdir) + makedirs(outdir) figure1, ax1 = plt.subplots() eps = [] @@ -32,21 +32,32 @@ def plot(infile, outfile): vals = line.strip().split(",") eps.append(float(vals[0])) - ax1.hist(eps, np.arange(min(eps), max(eps) + 0.02, 0.02), color="steelblue", density=True, ec="white", lw=0.2) + ax1.hist( + eps, + np.arange(min(eps), max(eps) + 0.02, 0.02), + color="steelblue", + density=True, + ec="white", + lw=0.2, + ) ax1.set_xlabel(r"$\epsilon$") ax1.set_ylabel("Density") - mu, sigma = np.mean(eps), np.std(eps) + mu, sigma = np.mean(eps), np.std(eps) x = np.arange(min(eps), max(eps) + 0.02, 0.02) - stats = (f"$\\langle \\epsilon \\rangle$ = {np.mean(eps):.4f}\n" - f"Var$(\\epsilon)$ = {np.var(eps):.4f}") + stats = ( + f"$\\langle \\epsilon \\rangle$ = {np.mean(eps):.4f}\n" + f"Var$(\\epsilon)$ = {np.var(eps):.4f}" + ) bbox = dict(boxstyle="round", pad=0.3, fc="white", ec="white", alpha=0.5) - ax1.text(0.95, 0.9, stats, bbox=bbox, transform=ax1.transAxes, ha="right", va="center") + ax1.text( + 0.95, 0.9, stats, bbox=bbox, transform=ax1.transAxes, ha="right", va="center" + ) ax1.plot(x, norm.pdf(x, mu, sigma), color="mediumseagreen") figure1.savefig(outfile, bbox_inches="tight") if __name__ == "__main__": - plot("output/pd_estimate/estimate_1_0.txt", "../latex/images/pd_estimate_1_0.pdf") - plot("output/pd_estimate/estimate_2_4.txt", "../latex/images/pd_estimate_2_4.pdf") + plot("./data/hp/pd_estimate/estimate_1_0.txt", "./latex/images/pd_estimate_1_0.pdf") + plot("./data/hp/pd_estimate/estimate_2_4.txt", "./latex/images/pd_estimate_2_4.pdf") diff --git a/python_scripts/phase_transition.py b/python_scripts/phase_transition.py new file mode 100644 index 0000000..c8186ca --- /dev/null +++ b/python_scripts/phase_transition.py @@ -0,0 +1,198 @@ +from os import makedirs +from pathlib import Path + +import matplotlib.pyplot as plt +import numpy as np +from scipy.stats import linregress + + +def plot_phase_transition_alt(indir, outdir): + if not (path := Path(outdir)).exists(): + makedirs(path) + + files = [ + "size_20.txt", + "size_40.txt", + "size_60.txt", + "size_80.txt", + "size_100.txt", + "size_500.txt", + ] + labels = ["L = 20", "L = 40", "L = 60", "L = 80", "L = 100", "L = 500"] + + figure1, ax1 = plt.subplots() + figure2, ax2 = plt.subplots() + figure3, ax3 = plt.subplots() + figure4, ax4 = plt.subplots() + figure5, ax5 = plt.subplots() + + # For linear regression + L = [] + Tc = [] + size = 20 + + for file, label in zip(files, labels): + t = [] + e = [] + m = [] + CV = [] + X = [] + + # Append the lattice size + L.append(size) + size += 20 + + with open(Path(indir, file)) as f: + lines = f.readlines() + for line in lines: + l = line.strip().split(",") + t.append(float(l[0])) + e.append(float(l[1])) + m.append(float(l[2])) + CV.append(float(l[3])) + X.append(float(l[4])) + + # Append the critical temp for the current lattice size + Tc.append(t[X.index(max(X))]) + + ax1.plot(t, e, label=label) + ax2.plot(t, m, label=label) + ax3.plot(t, CV, label=label) + ax4.plot(t, X, label=label) + + inv_L = list(map(lambda x: 1 / x, L)) + # Attempt linear regression + x = np.linspace(0, 1 / 20, 1001) + regression = linregress(inv_L, Tc) + f = lambda x: regression[0] * x + regression[1] + ax5.scatter(inv_L, Tc) + ax5.plot(x, f(x), label=f"m = {regression[0]}, i = {regression[1]}") + + figure1.legend() + figure2.legend() + figure3.legend() + figure4.legend() + figure5.legend() + + figure1.savefig(Path(outdir, "energy.pdf")) + figure2.savefig(Path(outdir, "magnetization.pdf")) + figure3.savefig(Path(outdir, "heat_capacity.pdf")) + figure4.savefig(Path(outdir, "susceptibility.pdf")) + figure5.savefig(Path(outdir, "linreg.pdf")) + + plt.close(figure1) + plt.close(figure2) + plt.close(figure3) + plt.close(figure4) + plt.close(figure5) + + +def plot_phase_transition(indir, outdir): + if not (path := Path(outdir)).exists(): + makedirs(path) + + files = [ + "size_20.txt", + "size_40.txt", + "size_60.txt", + "size_80.txt", + "size_100.txt", + ] + labels = [ + "L = 20", + "L = 40", + "L = 60", + "L = 80", + "L = 100", + ] + + figure1, ax1 = plt.subplots() + figure2, ax2 = plt.subplots() + figure3, ax3 = plt.subplots() + figure4, ax4 = plt.subplots() + figure5, ax5 = plt.subplots() + + # For linear regression + L = [] + Tc = [] + size = 20 + + for file, label in zip(files, labels): + t = [] + e = [] + m = [] + CV = [] + X = [] + + # Append the lattice size + L.append(size) + size += 20 + + with open(Path(indir, file)) as f: + lines = f.readlines() + for line in lines: + l = line.strip().split(",") + t.append(float(l[0])) + e.append(float(l[1])) + m.append(float(l[2])) + CV.append(float(l[3])) + X.append(float(l[4])) + + # Append the critical temp for the current lattice size + Tc.append(t[X.index(max(X))]) + + ax1.plot(t, e, label=label) + ax2.plot(t, m, label=label) + ax3.plot(t, CV, label=label) + ax4.plot(t, X, label=label) + + inv_L = list(map(lambda x: 1 / x, L)) + # Attempt linear regression + x = np.linspace(0, 1 / 20, 1001) + regression = linregress(inv_L, Tc) + f = lambda x: regression[0] * x + regression[1] + ax5.scatter(inv_L, Tc) + ax5.plot(x, f(x), label=f"m = {regression[0]}, i = {regression[1]}") + + figure1.legend() + figure2.legend() + figure3.legend() + figure4.legend() + figure5.legend() + + figure1.savefig(Path(outdir, "energy.pdf")) + figure2.savefig(Path(outdir, "magnetization.pdf")) + figure3.savefig(Path(outdir, "heat_capacity.pdf")) + figure4.savefig(Path(outdir, "susceptibility.pdf")) + figure5.savefig(Path(outdir, "linreg.pdf")) + + plt.close(figure1) + plt.close(figure2) + plt.close(figure3) + plt.close(figure4) + plt.close(figure5) + + +if __name__ == "__main__": + plot_phase_transition_alt( + "data/fox/phase_transition/wide/10M/", + "latex/images/phase_transition/fox/wide/10M/", + ) + plot_phase_transition( + "data/fox/phase_transition/wide/1M/", + "latex/images/phase_transition/fox/wide/1M/", + ) + plot_phase_transition( + "data/fox/phase_transition/narrow/10M/", + "latex/images/phase_transition/fox/narrow/10M/", + ) + plot_phase_transition( + "data/hp/phase_transition/", "latex/images/phase_transition/hp/" + ) + plot_phase_transition( + "data/hp/phase_transition/", "latex/images/phase_transition/hp/" + ) + plot_phase_transition( + "data/hp/phase_transition/", + "latex/images/phase_transition/hp/", + ) diff --git a/python_scripts/test_burn_in.py b/python_scripts/test_burn_in.py new file mode 100644 index 0000000..6360cde --- /dev/null +++ b/python_scripts/test_burn_in.py @@ -0,0 +1,67 @@ +from os import makedirs +from pathlib import Path + +import matplotlib.pyplot as plt + + +def plot(indir, outdir): + if not (path := Path(outdir)).exists(): + makedirs(path) + + files = [ + "no_burn_in.txt", + "burn_in.txt", + ] + labels = [ + "Without burn-in time", + "With burn-in time", + ] + + figure1, ax1 = plt.subplots() + figure2, ax2 = plt.subplots() + figure3, ax3 = plt.subplots() + figure4, ax4 = plt.subplots() + + for file, label in zip(files, labels): + t = [] + e = [] + m = [] + CV = [] + X = [] + + with open(Path(indir, file)) as f: + lines = f.readlines() + for line in lines: + l = line.strip().split(",") + t.append(float(l[0])) + e.append(float(l[1])) + m.append(float(l[2])) + CV.append(float(l[3])) + X.append(float(l[4])) + + ax1.plot(t, e, label=label) + ax2.plot(t, m, label=label) + ax3.plot(t, CV, label=label) + ax4.plot(t, X, label=label) + + figure1.legend() + figure2.legend() + figure3.legend() + figure4.legend() + + figure1.savefig(Path(outdir, "energy.pdf")) + figure2.savefig(Path(outdir, "magnetization.pdf")) + figure3.savefig(Path(outdir, "heat_capacity.pdf")) + figure4.savefig(Path(outdir, "susceptibility.pdf")) + + plt.close(figure1) + plt.close(figure2) + plt.close(figure3) + plt.close(figure4) + + +if __name__ == "__main__": + plot( + "./data/hp/test_burn_in_time/", + "./latex/images/test_burn_in", + ) diff --git a/python_scripts/timing.py b/python_scripts/timing.py new file mode 100644 index 0000000..bae1797 --- /dev/null +++ b/python_scripts/timing.py @@ -0,0 +1,49 @@ +from os import makedirs +from pathlib import Path + +import matplotlib.pyplot as plt + + +def plot_timing(indir, outdir): + if not (path := Path(outdir)).exists(): + makedirs(path) + + files = [ + "lattice_sizes.txt", + "sample_sizes.txt", + ] + labels = [ + "Lattice sizes", + "Sample sizes", + ] + xlabels = ["Lattice size", "Sampling size"] + outfiles = ["lattice_size.pdf", "sample_sizes.pdf"] + + for file, label, xlabel, outfile in zip(files, labels, xlabels, outfiles): + figure1, ax1 = plt.subplots() + x = [] + t = [] + + with open(Path(indir, file)) as f: + lines = f.readlines() + for line in lines: + l = line.strip().split(",") + x.append(float(l[0])) + t.append(float(l[1])) + + ax1.plot(x, t, label=label) + ax1.set_xlabel(xlabel) + ax1.set_ylabel("time (seconds)") + + figure1.legend() + + figure1.savefig(Path(outdir, outfile)) + + plt.close(figure1) + + +if __name__ == "__main__": + plot_timing( + "data/hp/timing/", + "./latex/images/timing", + ) diff --git a/requirements.txt b/requirements.txt index e69de29..8e444d2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -0,0 +1,3 @@ +numpy +matplotlib +seaborn diff --git a/slurm_scripts/execute.script b/slurm_scripts/execute.script new file mode 100755 index 0000000..4beaa0b --- /dev/null +++ b/slurm_scripts/execute.script @@ -0,0 +1,76 @@ +#!/bin/bash + +usage() { +>&2 cat << EOF +Usage: $0 + [ -h | --help ] + [ --start-temp input ] + [ --end-temp input ] + [ --points input ] + [ --samples input ] + [ --array input ] + [ --time input ] + [ --account input (required) ] +EOF +exit 1 +} + +# Defaults +start_temp=2.1 +end_temp=2.4 +points_temp=40 +samples=1000000 +array_arg=20 +time_arg="0-00:30:00" +account="" + +VALID_ARGS=$(getopt -o h --long help,start-temp:,end-temp:,points:,samples:,array:,time:,account: -- "$@") +if [[ $? -ne 0 ]]; then + usage +fi + +eval set -- ${VALID_ARGS} +while : +do + case "$1" in + -h | --help) + usage + shift + ;; + --start-temp) + start_temp=$2 + shift 2 + ;; + --end-temp) + end_temp=$2 + shift 2 + ;; + --points) + points=$2 + shift 2 + ;; + --samples) + samples=$2 + shift 2 + ;; + --array) + array_arg=$(echo "${2// /}") + shift 2 + ;; + --time) + time_arg=$2 + shift 2 + ;; + --account) + account=$2 + shift 2 + ;; + --) shift; break ;; + esac +done + +if [ -z "$account" ]; then + usage +fi + +sbatch --array=$array_arg --time=$time_arg --account=$account ./slurm_scripts/pt.script $start_temp $end_temp $points_temp $samples diff --git a/slurm_scripts/pt.script b/slurm_scripts/pt.script new file mode 100755 index 0000000..ea71d9c --- /dev/null +++ b/slurm_scripts/pt.script @@ -0,0 +1,21 @@ +#!/bin/bash + +#SBATCH --job-name=pt +#SBATCH --ntasks=10 +#SBATCH --mem-per-cpu=1G +#SBATCH --cpus-per-task=10 + +set -o errexit # Exit the script on any error +set -o nounset # Treat any unset variables as an error + +module --quiet purge # Reset the modules to the system default +module load Armadillo/11.4.3-foss-2022b +module load OpenMPI/4.1.5-GCC-12.3.0 + +# Args +start_temp=$1 +end_temp=$2 +points_temp=$3 +samples=$4 + +srun ./bin/phase_transition_mpi $start_temp $end_temp $points_temp ${SLURM_ARRAY_TASK_ID} $samples 0 ./output/$samples/size_${SLURM_ARRAY_TASK_ID}.txt diff --git a/slurm_scripts/pt_narrow.script b/slurm_scripts/pt_narrow.script new file mode 100644 index 0000000..d4aec22 --- /dev/null +++ b/slurm_scripts/pt_narrow.script @@ -0,0 +1,17 @@ +#!/bin/bash + +#SBATCH --account=ec54 +#SBATCH --job-name=pt_narrow +#SBATCH --time=0-02:00:00 +#SBATCH --ntasks=8 +#SBATCH --mem-per-cpu=1G +#SBATCH --cpus-per-task=10 + +set -o errexit # Exit the script on any error +set -o nounset # Treat any unset variables as an error + +module --quiet purge # Reset the modules to the system default +module load Armadillo/11.4.3-foss-2022b +module load OpenMPI/4.1.5-GCC-12.3.0 + +srun ./phase_transition_mpi 2.25 2.35 40 10000000 diff --git a/src/IsingModel.cpp b/src/IsingModel.cpp index e0a600e..c94478e 100644 --- a/src/IsingModel.cpp +++ b/src/IsingModel.cpp @@ -10,18 +10,18 @@ * @bug No known bugs * */ #include "IsingModel.hpp" - -#include #include IsingModel::IsingModel() { + this->initialize_engine(); } IsingModel::IsingModel(int L, double T) { this->L = L; this->T = T; + this->initialize_engine(); this->initialize_lattice(); this->initialize_neighbors(); this->initialize_energy_diff(); @@ -33,6 +33,7 @@ IsingModel::IsingModel(int L, double T, int val) { this->L = L; this->T = T; + this->initialize_engine(); this->lattice.set_size(this->L, this->L); this->lattice.fill(val); this->initialize_neighbors(); @@ -41,16 +42,20 @@ IsingModel::IsingModel(int L, double T, int val) this->initialize_energy(); } +void IsingModel::initialize_engine() +{ + std::random_device rd{}; + this->engine = std::mt19937{rd()}; +} + void IsingModel::initialize_lattice() { this->lattice.set_size(this->L, this->L); - std::random_device rd{}; - std::mt19937 engine{rd()}; std::uniform_int_distribution<> coin_flip(0, 1); for (size_t i = 0; i < this->lattice.n_elem; i++) - this->lattice(i) = 2 * coin_flip(engine) - 1; + this->lattice(i) = 2 * coin_flip(this->engine) - 1; } void IsingModel::initialize_neighbors() @@ -67,7 +72,7 @@ void IsingModel::initialize_neighbors() void IsingModel::initialize_energy_diff() { for (int i = -8; i <= 8; i += 4) { - this->energy_diff.insert({i, std::exp(-(double)i / this->T)}); + this->energy_diff[i+8] = std::exp(-(double)i / this->T); } } @@ -95,9 +100,6 @@ void IsingModel::initialize_energy() data_t IsingModel::Metropolis() { - std::random_device rd{}; - std::mt19937_64 engine{rd()}; - int ri, rj; int dE; @@ -120,7 +122,7 @@ data_t IsingModel::Metropolis() + this->lattice(this->neighbors(ri, DOWN), rj)); // Choose whether or not to accept the new configuration - if (random_number(engine) <= this->energy_diff[dE]) { + if (random_number(engine) <= this->energy_diff[dE+8]) { // Update if the configuration is accepted this->lattice(ri, rj) *= -1; this->M += 2 * this->lattice(ri, rj); diff --git a/src/Makefile b/src/Makefile index 720b48c..540efaa 100644 --- a/src/Makefile +++ b/src/Makefile @@ -3,9 +3,11 @@ CC=mpic++ LIBSRCS=utils.cpp testlib.cpp data_type.cpp LIBOBJS=$(LIBSRCS:.cpp=.o) +LIBPROFOBJS=$(addprefix prof/, $(LIBOBJS)) CLASSSRCS=IsingModel.cpp monte_carlo.cpp CLASSOBJS=$(CLASSSRCS:.cpp=.o) +CLASSPROFOBJS=$(addprefix prof/, $(CLASSOBJS)) INCLUDE=../include @@ -29,16 +31,14 @@ else PROFFLAG= endif -.PHONY: clean +.PHONY: clean instrument -all: main phase_transition_mpi test_suite +all: main phase_transition_mpi test_suite time #all: main # Instrumentation using scorep for parallel analysis -instrument: - scorep $(CC) -c utils.cpp -o utils.o $(CFLAGS) $(DBGFLAG) $(PROFFLAG) -I$(INCLUDE) $(OPENMP) - scorep $(CC) -c main.cpp -o main.o $(CFLAGS) $(DBGFLAG) $(PROFFLAG) -I$(INCLUDE) $(OPENMP) - scorep $(CC) $(LIBOBJS) $(CLASSOBJS) main.o -o main $(CFLAGS) $(DBGFLAG) $(PROFFLAG) -I$(INCLUDE) $(OPENMP) +instrument: prof/phase_transition_mpi.o $(LIBPROFOBJS) $(CLASSPROFOBJS) + scorep $(CC) $(LIBPROFOBJS) $(CLASSPROFOBJS) $< -o phase_transition_mpi_prof $(CFLAGS) $(DBGFLAG) $(PROFFLAG) -I$(INCLUDE) $(OPENMP) # Rules for executables main: main.o $(LIBOBJS) $(CLASSOBJS) @@ -50,10 +50,17 @@ phase_transition_mpi: phase_transition_mpi.o $(LIBOBJS) $(CLASSOBJS) test_suite: test_suite.o $(LIBOBJS) $(CLASSOBJS) $(CC) $^ -o $@ $(CFLAGS) $(DBGFLAG) $(PROFFLAG) -I$(INCLUDE) $(OPENMP) +time: time.o $(LIBOBJS) $(CLASSOBJS) + $(CC) $^ -o $@ $(CFLAGS) $(DBGFLAG) $(PROFFLAG) -I$(INCLUDE) $(OPENMP) + # Rule for object files %.o: %.cpp $(CC) -c $^ -o $@ $(CFLAGS) $(DBGFLAG) $(PROFFLAG) -I$(INCLUDE) $(OPENMP) +# Rule for instrumented object files +prof/%.o: %.cpp + scorep $(CC) -c $^ -o $@ $(CFLAGS) $(DBGFLAG) $(PROFFLAG) -I$(INCLUDE) $(OPENMP) + clean: - rm *.o - rm test_suite main + find . -maxdepth 2 -name "*.o" -type f -delete + rm test_suite main phase_transition_mpi phase_transition_mpi_prof time diff --git a/src/fox_output/phase_transition/wide/10M/size_100.txt b/src/fox_output/phase_transition/wide/10M/size_100.txt deleted file mode 100644 index 348620b..0000000 --- a/src/fox_output/phase_transition/wide/10M/size_100.txt +++ /dev/null @@ -1,40 +0,0 @@ - 2.1000000000e+00, -1.6620153162e+00, 8.6825921642e-01, 9.7151756678e-01, 2.4628207208e+00 - 2.1075000000e+00, -1.6547871402e+00, 8.6452546472e-01, 9.8586055596e-01, 1.0371424746e+00 - 2.1150000000e+00, -1.6470173946e+00, 8.5757567470e-01, 1.0527091921e+00, 9.2735057990e+00 - 2.1225000000e+00, -1.6395359027e+00, 8.5477023382e-01, 1.0458114211e+00, 2.8269978139e+00 - 2.1300000000e+00, -1.6317611242e+00, 8.5029719252e-01, 1.0648418813e+00, 1.5413540397e+00 - 2.1375000000e+00, -1.6235958872e+00, 8.4427437198e-01, 1.1067537915e+00, 4.1393110834e+00 - 2.1450000000e+00, -1.6154378059e+00, 8.3939453442e-01, 1.1249379789e+00, 2.4765189498e+00 - 2.1525000000e+00, -1.6068788967e+00, 8.3370064048e-01, 1.1529855330e+00, 1.9209173052e+00 - 2.1600000000e+00, -1.5981243397e+00, 8.2742933888e-01, 1.1832514097e+00, 2.1549193408e+00 - 2.1675000000e+00, -1.5891135955e+00, 8.2073828886e-01, 1.2185666891e+00, 2.4512526099e+00 - 2.1750000000e+00, -1.5799324034e+00, 8.1374150226e-01, 1.2592266595e+00, 2.7899402229e+00 - 2.1825000000e+00, -1.5701165092e+00, 8.0492814328e-01, 1.3164080508e+00, 5.6569919297e+00 - 2.1900000000e+00, -1.5603238432e+00, 7.9743303536e-01, 1.3446888670e+00, 3.8003080360e+00 - 2.1975000000e+00, -1.5498866007e+00, 7.8783085350e-01, 1.4001363797e+00, 4.9784343082e+00 - 2.2050000000e+00, -1.5392398990e+00, 7.7702621460e-01, 1.4673061547e+00, 7.9625339130e+00 - 2.2125000000e+00, -1.5281262918e+00, 7.6584789506e-01, 1.5232488352e+00, 8.4644768325e+00 - 2.2200000000e+00, -1.5165880163e+00, 7.5355556686e-01, 1.5748237550e+00, 8.7046281768e+00 - 2.2275000000e+00, -1.5043489448e+00, 7.3824513410e-01, 1.6730531386e+00, 1.3329874777e+01 - 2.2350000000e+00, -1.4919062936e+00, 7.2266862052e-01, 1.7605738773e+00, 1.5774847194e+01 - 2.2425000000e+00, -1.4779197153e+00, 6.9984947662e-01, 1.8842107989e+00, 2.5222532538e+01 - 2.2500000000e+00, -1.4630838121e+00, 6.7200043076e-01, 2.0414383332e+00, 4.0176409902e+01 - 2.2575000000e+00, -1.4466727990e+00, 6.3374453586e-01, 2.2394490921e+00, 6.5386553201e+01 - 2.2650000000e+00, -1.4302620022e+00, 5.9545725882e-01, 2.3367695957e+00, 8.4146921469e+01 - 2.2725000000e+00, -1.4129940982e+00, 5.4893978964e-01, 2.4264999588e+00, 1.0572940572e+02 - 2.2800000000e+00, -1.3938477486e+00, 4.8383973028e-01, 2.4843359422e+00, 1.4080896856e+02 - 2.2875000000e+00, -1.3755483071e+00, 4.2131611852e-01, 2.3668657423e+00, 1.5146279797e+02 - 2.2950000000e+00, -1.3587650193e+00, 3.6670820910e-01, 2.2238630418e+00, 1.4922116201e+02 - 2.3025000000e+00, -1.3424890747e+00, 3.1314528658e-01, 2.0388866034e+00, 1.3710935397e+02 - 2.3100000000e+00, -1.3278909358e+00, 2.6988360328e-01, 1.8428420582e+00, 1.1799184878e+02 - 2.3175000000e+00, -1.3146870617e+00, 2.3717208746e-01, 1.7132885225e+00, 1.0132633890e+02 - 2.3250000000e+00, -1.3022142125e+00, 2.0584315460e-01, 1.5883836563e+00, 8.4059694596e+01 - 2.3325000000e+00, -1.2906006156e+00, 1.8736295758e-01, 1.5132478295e+00, 7.2347213446e+01 - 2.3400000000e+00, -1.2797137160e+00, 1.7238447366e-01, 1.4469027063e+00, 6.2533751699e+01 - 2.3475000000e+00, -1.2689956506e+00, 1.5705407798e-01, 1.3862572655e+00, 5.3347428555e+01 - 2.3550000000e+00, -1.2590990874e+00, 1.4659499200e-01, 1.3372004012e+00, 4.7210919387e+01 - 2.3625000000e+00, -1.2489784134e+00, 1.3360769622e-01, 1.2889592617e+00, 3.9916238102e+01 - 2.3700000000e+00, -1.2394002512e+00, 1.2499840328e-01, 1.2447122211e+00, 3.5011112489e+01 - 2.3775000000e+00, -1.2301743490e+00, 1.1724050656e-01, 1.2126831520e+00, 3.1619751217e+01 - 2.3850000000e+00, -1.2212667213e+00, 1.1158216368e-01, 1.1817854995e+00, 2.8398360387e+01 - 2.3925000000e+00, -1.2125286096e+00, 1.0569096110e-01, 1.1511183772e+00, 2.5508811996e+01 diff --git a/src/fox_output/phase_transition/wide/10M/size_20.txt b/src/fox_output/phase_transition/wide/10M/size_20.txt deleted file mode 100644 index d810f3f..0000000 --- a/src/fox_output/phase_transition/wide/10M/size_20.txt +++ /dev/null @@ -1,40 +0,0 @@ - 2.1000000000e+00, -1.6619125180e+00, 8.6839291850e-01, 9.6555027618e-01, 9.7850361363e-01 - 2.1075000000e+00, -1.6549793570e+00, 8.6471839850e-01, 9.8240289303e-01, 1.0129724485e+00 - 2.1150000000e+00, -1.6468503490e+00, 8.5960125050e-01, 1.0138192976e+00, 1.1321474962e+00 - 2.1225000000e+00, -1.6395326080e+00, 8.5511700950e-01, 1.0365371568e+00, 1.2364229543e+00 - 2.1300000000e+00, -1.6317730720e+00, 8.5044005850e-01, 1.0587209589e+00, 1.3211835025e+00 - 2.1375000000e+00, -1.6234235200e+00, 8.4479707150e-01, 1.0873989398e+00, 1.4801573993e+00 - 2.1450000000e+00, -1.6159038850e+00, 8.4040335200e-01, 1.1054118047e+00, 1.5387845869e+00 - 2.1525000000e+00, -1.6068533790e+00, 8.3360464950e-01, 1.1465611095e+00, 1.7801980041e+00 - 2.1600000000e+00, -1.5982328140e+00, 8.2758169400e-01, 1.1760701126e+00, 1.9407916428e+00 - 2.1675000000e+00, -1.5893305490e+00, 8.2146220800e-01, 1.2027020856e+00, 2.0857388287e+00 - 2.1750000000e+00, -1.5800474730e+00, 8.1475079550e-01, 1.2322647833e+00, 2.2571138933e+00 - 2.1825000000e+00, -1.5712991630e+00, 8.0836790150e-01, 1.2576266534e+00, 2.4328877997e+00 - 2.1900000000e+00, -1.5610119330e+00, 7.9991190450e-01, 1.2986390210e+00, 2.7318627483e+00 - 2.1975000000e+00, -1.5512947190e+00, 7.9200833000e-01, 1.3324471512e+00, 2.9999142363e+00 - 2.2050000000e+00, -1.5412811640e+00, 7.8410793550e-01, 1.3603249592e+00, 3.2210726936e+00 - 2.2125000000e+00, -1.5312122480e+00, 7.7582262450e-01, 1.3914119268e+00, 3.4663325824e+00 - 2.2200000000e+00, -1.5202567750e+00, 7.6603557500e-01, 1.4290506271e+00, 3.7902650810e+00 - 2.2275000000e+00, -1.5101140570e+00, 7.5720912050e-01, 1.4571094065e+00, 4.0922499338e+00 - 2.2350000000e+00, -1.4983236510e+00, 7.4583789950e-01, 1.4940343199e+00, 4.4949431726e+00 - 2.2425000000e+00, -1.4872285410e+00, 7.3583214850e-01, 1.5209645562e+00, 4.7834776118e+00 - 2.2500000000e+00, -1.4755721230e+00, 7.2430785100e-01, 1.5494637112e+00, 5.1408071955e+00 - 2.2575000000e+00, -1.4646817370e+00, 7.1429082850e-01, 1.5665735040e+00, 5.4168636675e+00 - 2.2650000000e+00, -1.4525830090e+00, 7.0183889150e-01, 1.5930316440e+00, 5.8246607718e+00 - 2.2725000000e+00, -1.4401881130e+00, 6.8829875200e-01, 1.6210749189e+00, 6.2825629079e+00 - 2.2800000000e+00, -1.4275341280e+00, 6.7503738350e-01, 1.6377412939e+00, 6.6272843184e+00 - 2.2875000000e+00, -1.4153101170e+00, 6.6202681500e-01, 1.6474807652e+00, 6.9374221274e+00 - 2.2950000000e+00, -1.4025377850e+00, 6.4792210650e-01, 1.6613566237e+00, 7.2965666268e+00 - 2.3025000000e+00, -1.3901966580e+00, 6.3424726400e-01, 1.6643516967e+00, 7.5997720797e+00 - 2.3100000000e+00, -1.3777599550e+00, 6.2029042850e-01, 1.6655967518e+00, 7.8821870275e+00 - 2.3175000000e+00, -1.3658680790e+00, 6.0696951250e-01, 1.6640990107e+00, 8.1240659854e+00 - 2.3250000000e+00, -1.3536401310e+00, 5.9312723750e-01, 1.6552818870e+00, 8.3112943885e+00 - 2.3325000000e+00, -1.3397610860e+00, 5.7579100100e-01, 1.6468905936e+00, 8.6230949277e+00 - 2.3400000000e+00, -1.3279296500e+00, 5.6190994250e-01, 1.6315188349e+00, 8.7733425063e+00 - 2.3475000000e+00, -1.3157471180e+00, 5.4756469250e-01, 1.6092786419e+00, 8.8885122002e+00 - 2.3550000000e+00, -1.3041730460e+00, 5.3377897100e-01, 1.5875278057e+00, 8.9753683844e+00 - 2.3625000000e+00, -1.2926410050e+00, 5.2069073550e-01, 1.5603029077e+00, 8.9820705976e+00 - 2.3700000000e+00, -1.2802206010e+00, 5.0476759600e-01, 1.5297678965e+00, 9.0498806419e+00 - 2.3775000000e+00, -1.2699025730e+00, 4.9361168400e-01, 1.5059390703e+00, 9.0215829651e+00 - 2.3850000000e+00, -1.2586695900e+00, 4.8012205450e-01, 1.4771256938e+00, 8.9961790709e+00 - 2.3925000000e+00, -1.2478550800e+00, 4.6736909300e-01, 1.4420816831e+00, 8.9036470785e+00 diff --git a/src/fox_output/phase_transition/wide/10M/size_40.txt b/src/fox_output/phase_transition/wide/10M/size_40.txt deleted file mode 100644 index 9eee78a..0000000 --- a/src/fox_output/phase_transition/wide/10M/size_40.txt +++ /dev/null @@ -1,40 +0,0 @@ - 2.1000000000e+00, -1.6620241095e+00, 8.6870001213e-01, 9.6315452544e-01, 9.6226340795e-01 - 2.1075000000e+00, -1.6546474007e+00, 8.6435499912e-01, 9.8726491216e-01, 1.0486145186e+00 - 2.1150000000e+00, -1.6471901245e+00, 8.5999019563e-01, 1.0078816808e+00, 1.1309322111e+00 - 2.1225000000e+00, -1.6396131488e+00, 8.5534986700e-01, 1.0341186299e+00, 1.2401952685e+00 - 2.1300000000e+00, -1.6316233365e+00, 8.5028545800e-01, 1.0616281311e+00, 1.3647625002e+00 - 2.1375000000e+00, -1.6237929958e+00, 8.4533017437e-01, 1.0891759248e+00, 1.5241163310e+00 - 2.1450000000e+00, -1.6151386912e+00, 8.3903778937e-01, 1.1269490234e+00, 1.8646375755e+00 - 2.1525000000e+00, -1.6066617845e+00, 8.3330123700e-01, 1.1561499936e+00, 2.0164316252e+00 - 2.1600000000e+00, -1.5981390215e+00, 8.2754810150e-01, 1.1833323029e+00, 2.1355953037e+00 - 2.1675000000e+00, -1.5890042950e+00, 8.2053784450e-01, 1.2212535753e+00, 2.5182897415e+00 - 2.1750000000e+00, -1.5797295040e+00, 8.1340160300e-01, 1.2605568049e+00, 2.8268774622e+00 - 2.1825000000e+00, -1.5702464250e+00, 8.0565077875e-01, 1.3025929004e+00, 3.3805882500e+00 - 2.1900000000e+00, -1.5604939612e+00, 7.9764172887e-01, 1.3454520516e+00, 3.7938587164e+00 - 2.1975000000e+00, -1.5499313592e+00, 7.8792353400e-01, 1.3967813619e+00, 4.4756538550e+00 - 2.2050000000e+00, -1.5391499830e+00, 7.7744365112e-01, 1.4501456064e+00, 5.3798585716e+00 - 2.2125000000e+00, -1.5282690012e+00, 7.6690028637e-01, 1.4995460425e+00, 6.1870897661e+00 - 2.2200000000e+00, -1.5167300260e+00, 7.5423927662e-01, 1.5624874280e+00, 7.4548031568e+00 - 2.2275000000e+00, -1.5050149717e+00, 7.4142832087e-01, 1.6204433824e+00, 8.6979351346e+00 - 2.2350000000e+00, -1.4926378615e+00, 7.2640746162e-01, 1.6863439690e+00, 1.0422107961e+01 - 2.2425000000e+00, -1.4794847920e+00, 7.0900366487e-01, 1.7621420318e+00, 1.2536468715e+01 - 2.2500000000e+00, -1.4656867717e+00, 6.8967846612e-01, 1.8323331829e+00, 1.4893634634e+01 - 2.2575000000e+00, -1.4520555287e+00, 6.7119788675e-01, 1.8799168754e+00, 1.6547383769e+01 - 2.2650000000e+00, -1.4382698593e+00, 6.5065610625e-01, 1.9337012711e+00, 1.8914026717e+01 - 2.2725000000e+00, -1.4230305128e+00, 6.2540010162e-01, 1.9788823072e+00, 2.1651635903e+01 - 2.2800000000e+00, -1.4088086143e+00, 6.0163930987e-01, 2.0112447617e+00, 2.4199800899e+01 - 2.2875000000e+00, -1.3935304780e+00, 5.7577379412e-01, 2.0196168621e+00, 2.6064061662e+01 - 2.2950000000e+00, -1.3789640860e+00, 5.5077936987e-01, 2.0095359588e+00, 2.7512401284e+01 - 2.3025000000e+00, -1.3624053932e+00, 5.1785586512e-01, 1.9954287230e+00, 2.9529693197e+01 - 2.3100000000e+00, -1.3484675187e+00, 4.9407736975e-01, 1.9489026021e+00, 3.0040369409e+01 - 2.3175000000e+00, -1.3343921728e+00, 4.6778955013e-01, 1.9013520152e+00, 3.0603632810e+01 - 2.3250000000e+00, -1.3197310500e+00, 4.3895860962e-01, 1.8406235015e+00, 3.0679867277e+01 - 2.3325000000e+00, -1.3061023918e+00, 4.1355581687e-01, 1.7586976734e+00, 3.0281483045e+01 - 2.3400000000e+00, -1.2935458417e+00, 3.9148407650e-01, 1.6936163462e+00, 2.9309538353e+01 - 2.3475000000e+00, -1.2810342150e+00, 3.6986715562e-01, 1.6246099121e+00, 2.8219898740e+01 - 2.3550000000e+00, -1.2689798297e+00, 3.4784880125e-01, 1.5474347136e+00, 2.6988405432e+01 - 2.3625000000e+00, -1.2578110195e+00, 3.2940204463e-01, 1.4903891730e+00, 2.5855851530e+01 - 2.3700000000e+00, -1.2467082168e+00, 3.1144425187e-01, 1.4161229966e+00, 2.4265691669e+01 - 2.3775000000e+00, -1.2364888132e+00, 2.9590345237e-01, 1.3601555797e+00, 2.2803242240e+01 - 2.3850000000e+00, -1.2262656265e+00, 2.8063338050e-01, 1.3049288010e+00, 2.1507061243e+01 - 2.3925000000e+00, -1.2169632957e+00, 2.6823971300e-01, 1.2562566007e+00, 2.0148598349e+01 diff --git a/src/fox_output/phase_transition/wide/10M/size_60.txt b/src/fox_output/phase_transition/wide/10M/size_60.txt deleted file mode 100644 index 1fd2531..0000000 --- a/src/fox_output/phase_transition/wide/10M/size_60.txt +++ /dev/null @@ -1,40 +0,0 @@ - 2.1000000000e+00, -1.6620843629e+00, 8.6872799750e-01, 9.6264519505e-01, 9.5544569044e-01 - 2.1075000000e+00, -1.6547580499e+00, 8.6444806406e-01, 9.8544566002e-01, 1.0407756357e+00 - 2.1150000000e+00, -1.6473603679e+00, 8.6015627483e-01, 1.0101358749e+00, 1.1153310968e+00 - 2.1225000000e+00, -1.6396375339e+00, 8.5537835589e-01, 1.0356576220e+00, 1.2426188107e+00 - 2.1300000000e+00, -1.6317903722e+00, 8.5046221944e-01, 1.0630158285e+00, 1.3653424965e+00 - 2.1375000000e+00, -1.6236858849e+00, 8.4515188072e-01, 1.0898866806e+00, 1.5272736843e+00 - 2.1450000000e+00, -1.6154040312e+00, 8.3963544883e-01, 1.1163642113e+00, 1.6903490533e+00 - 2.1525000000e+00, -1.6068627261e+00, 8.3359092411e-01, 1.1525313123e+00, 1.9475784050e+00 - 2.1600000000e+00, -1.5981171297e+00, 8.2743907661e-01, 1.1856925219e+00, 2.1377189985e+00 - 2.1675000000e+00, -1.5891169522e+00, 8.2076692411e-01, 1.2202497445e+00, 2.4484997455e+00 - 2.1750000000e+00, -1.5798256027e+00, 8.1368407967e-01, 1.2558053037e+00, 2.7636023484e+00 - 2.1825000000e+00, -1.5703361263e+00, 8.0594987944e-01, 1.2983724079e+00, 3.3113282521e+00 - 2.1900000000e+00, -1.5602543071e+00, 7.9732757833e-01, 1.3446361432e+00, 3.7573016387e+00 - 2.1975000000e+00, -1.5500343039e+00, 7.8784426106e-01, 1.3953317819e+00, 4.7951647288e+00 - 2.2050000000e+00, -1.5392068992e+00, 7.7743896250e-01, 1.4609661357e+00, 5.7612740711e+00 - 2.2125000000e+00, -1.5282624559e+00, 7.6657300889e-01, 1.5089569958e+00, 6.7976296683e+00 - 2.2200000000e+00, -1.5167714741e+00, 7.5381184083e-01, 1.5765989542e+00, 8.7762464988e+00 - 2.2275000000e+00, -1.5046375629e+00, 7.3963954711e-01, 1.6538283053e+00, 1.0539882793e+01 - 2.2350000000e+00, -1.4916838380e+00, 7.2188930672e-01, 1.7479448742e+00, 1.4442688054e+01 - 2.2425000000e+00, -1.4783546668e+00, 7.0308972833e-01, 1.8379170953e+00, 1.8151938776e+01 - 2.2500000000e+00, -1.4641366169e+00, 6.8038036333e-01, 1.9265609125e+00, 2.3389888284e+01 - 2.2575000000e+00, -1.4486397249e+00, 6.5150604822e-01, 2.0422100075e+00, 3.1244165172e+01 - 2.2650000000e+00, -1.4336962390e+00, 6.2459981533e-01, 2.1075014455e+00, 3.6826447778e+01 - 2.2725000000e+00, -1.4180692170e+00, 5.9268105344e-01, 2.1893689007e+00, 4.4273470662e+01 - 2.2800000000e+00, -1.4010261546e+00, 5.5387566789e-01, 2.2234627988e+00, 5.2006827283e+01 - 2.2875000000e+00, -1.3842963302e+00, 5.1342188850e-01, 2.2093928783e+00, 5.8110524167e+01 - 2.2950000000e+00, -1.3674547366e+00, 4.7283667406e-01, 2.1664555299e+00, 6.1848500693e+01 - 2.3025000000e+00, -1.3514448674e+00, 4.3301724944e-01, 2.0844304859e+00, 6.2928742602e+01 - 2.3100000000e+00, -1.3361684618e+00, 3.9658430828e-01, 1.9897540506e+00, 6.2376495709e+01 - 2.3175000000e+00, -1.3221636203e+00, 3.6519162828e-01, 1.8755791202e+00, 5.9468771468e+01 - 2.3250000000e+00, -1.3086887623e+00, 3.3479607911e-01, 1.7751338406e+00, 5.5802216522e+01 - 2.3325000000e+00, -1.2953904763e+00, 3.0499253439e-01, 1.6542669252e+00, 5.1362305497e+01 - 2.3400000000e+00, -1.2832488826e+00, 2.8106546444e-01, 1.5692606461e+00, 4.7060215979e+01 - 2.3475000000e+00, -1.2720185431e+00, 2.6190353806e-01, 1.4883311872e+00, 4.2947040348e+01 - 2.3550000000e+00, -1.2610647641e+00, 2.4192990383e-01, 1.4150400094e+00, 3.8804813518e+01 - 2.3625000000e+00, -1.2506554469e+00, 2.2450839061e-01, 1.3515257395e+00, 3.5046451463e+01 - 2.3700000000e+00, -1.2409339288e+00, 2.1300559106e-01, 1.2983897866e+00, 3.1817431753e+01 - 2.3775000000e+00, -1.2311690934e+00, 1.9878405622e-01, 1.2474793538e+00, 2.8725909191e+01 - 2.3850000000e+00, -1.2220091820e+00, 1.8858339594e-01, 1.2096871264e+00, 2.6268765485e+01 - 2.3925000000e+00, -1.2128942612e+00, 1.7742550372e-01, 1.1741821474e+00, 2.3917176967e+01 diff --git a/src/fox_output/phase_transition/wide/10M/size_80.txt b/src/fox_output/phase_transition/wide/10M/size_80.txt deleted file mode 100644 index 1d1856a..0000000 --- a/src/fox_output/phase_transition/wide/10M/size_80.txt +++ /dev/null @@ -1,40 +0,0 @@ - 2.1000000000e+00, -1.6620756650e+00, 8.6874590631e-01, 9.6337351197e-01, 9.5351472363e-01 - 2.1075000000e+00, -1.6547735862e+00, 8.6447831991e-01, 9.8689361025e-01, 1.0408170215e+00 - 2.1150000000e+00, -1.6473087262e+00, 8.6005295253e-01, 1.0115783879e+00, 1.1325981342e+00 - 2.1225000000e+00, -1.6395752860e+00, 8.5529783394e-01, 1.0363020368e+00, 1.2499327245e+00 - 2.1300000000e+00, -1.6317063754e+00, 8.5009845187e-01, 1.0657630508e+00, 1.9312354901e+00 - 2.1375000000e+00, -1.6237104097e+00, 8.4518025262e-01, 1.0879722354e+00, 1.5113973758e+00 - 2.1450000000e+00, -1.6152916461e+00, 8.3937934853e-01, 1.1239740960e+00, 2.0178266919e+00 - 2.1525000000e+00, -1.6068573244e+00, 8.3364136481e-01, 1.1512040518e+00, 1.9975732782e+00 - 2.1600000000e+00, -1.5980690666e+00, 8.2744982978e-01, 1.1854341904e+00, 2.1241645942e+00 - 2.1675000000e+00, -1.5890817681e+00, 8.2076451319e-01, 1.2214163764e+00, 2.4285237978e+00 - 2.1750000000e+00, -1.5798129650e+00, 8.1358434325e-01, 1.2593479939e+00, 2.7739367008e+00 - 2.1825000000e+00, -1.5701542314e+00, 8.0558246494e-01, 1.3035816839e+00, 3.4536174390e+00 - 2.1900000000e+00, -1.5601962992e+00, 7.9711947519e-01, 1.3494407435e+00, 3.8450166174e+00 - 2.1975000000e+00, -1.5499282524e+00, 7.8789456247e-01, 1.3956130897e+00, 4.5449711982e+00 - 2.2050000000e+00, -1.5394033323e+00, 7.7813024216e-01, 1.4469297749e+00, 5.3965210114e+00 - 2.2125000000e+00, -1.5281962539e+00, 7.6650420066e-01, 1.5054808218e+00, 6.8357319764e+00 - 2.2200000000e+00, -1.5167144013e+00, 7.5372712081e-01, 1.5803322176e+00, 8.8529401534e+00 - 2.2275000000e+00, -1.5041353668e+00, 7.3701369209e-01, 1.6867391836e+00, 1.3547589490e+01 - 2.2350000000e+00, -1.4918010204e+00, 7.2184788872e-01, 1.7594791181e+00, 1.6421827540e+01 - 2.2425000000e+00, -1.4774107857e+00, 6.9811270391e-01, 1.8871499660e+00, 2.4132414777e+01 - 2.2500000000e+00, -1.4633492965e+00, 6.7501245453e-01, 1.9980479142e+00, 3.1832995920e+01 - 2.2575000000e+00, -1.4481626969e+00, 6.4464869912e-01, 2.1196194419e+00, 4.5523408624e+01 - 2.2650000000e+00, -1.4312964268e+00, 6.0561512331e-01, 2.2560044387e+00, 6.1067556545e+01 - 2.2725000000e+00, -1.4140666613e+00, 5.6202367778e-01, 2.3584586707e+00, 7.7815810663e+01 - 2.2800000000e+00, -1.3963192994e+00, 5.1399904344e-01, 2.3692841829e+00, 9.1735841859e+01 - 2.2875000000e+00, -1.3790272427e+00, 4.6401583122e-01, 2.3216706708e+00, 1.0111515817e+02 - 2.2950000000e+00, -1.3618707276e+00, 4.1294487594e-01, 2.2106009432e+00, 1.0439337290e+02 - 2.3025000000e+00, -1.3457345337e+00, 3.6521622144e-01, 2.0849681807e+00, 1.0151592962e+02 - 2.3100000000e+00, -1.3313221879e+00, 3.2891628841e-01, 1.9447394570e+00, 9.4585988411e+01 - 2.3175000000e+00, -1.3168939605e+00, 2.9075993544e-01, 1.7843051751e+00, 8.2939282435e+01 - 2.3250000000e+00, -1.3040026104e+00, 2.6018569022e-01, 1.6760082040e+00, 7.5314387732e+01 - 2.3325000000e+00, -1.2917462589e+00, 2.3482259528e-01, 1.5679147019e+00, 6.4810792954e+01 - 2.3400000000e+00, -1.2803463176e+00, 2.1379812091e-01, 1.4762551316e+00, 5.6581253116e+01 - 2.3475000000e+00, -1.2695552376e+00, 1.9517387319e-01, 1.4054334901e+00, 4.9784055131e+01 - 2.3550000000e+00, -1.2591213719e+00, 1.8010318962e-01, 1.3510403913e+00, 4.3679117401e+01 - 2.3625000000e+00, -1.2494132637e+00, 1.6935649678e-01, 1.3009501753e+00, 3.8970399523e+01 - 2.3700000000e+00, -1.2395117372e+00, 1.5613331394e-01, 1.2575165195e+00, 3.3873643211e+01 - 2.3775000000e+00, -1.2303350071e+00, 1.4791185106e-01, 1.2183135770e+00, 3.0730463637e+01 - 2.3850000000e+00, -1.2214079973e+00, 1.4019221863e-01, 1.1859429918e+00, 2.7883196541e+01 - 2.3925000000e+00, -1.2124997863e+00, 1.3183323931e-01, 1.1519411438e+00, 2.4554993354e+01 diff --git a/src/fox_output/phase_transition/wide/1M/size_100.txt b/src/fox_output/phase_transition/wide/1M/size_100.txt deleted file mode 100644 index 40da656..0000000 --- a/src/fox_output/phase_transition/wide/1M/size_100.txt +++ /dev/null @@ -1,40 +0,0 @@ - 2.1000000000e+00, -1.6612792192e+00, 8.6256190700e-01, 1.0596726999e+00, 2.0699159730e+01 - 2.1075000000e+00, -1.6532154832e+00, 8.4912965540e-01, 1.2417232670e+00, 5.2009116435e+01 - 2.1150000000e+00, -1.6472563896e+00, 8.5913015560e-01, 1.0308365224e+00, 3.7779210599e+00 - 2.1225000000e+00, -1.6396845888e+00, 8.5540663260e-01, 1.0323571679e+00, 1.2382711201e+00 - 2.1300000000e+00, -1.6307024120e+00, 8.3981236760e-01, 1.2256061598e+00, 3.6282044911e+01 - 2.1375000000e+00, -1.6228404716e+00, 8.3746777060e-01, 1.2361592355e+00, 2.4737106357e+01 - 2.1450000000e+00, -1.6151894124e+00, 8.3877039060e-01, 1.1421629476e+00, 3.0323645843e+00 - 2.1525000000e+00, -1.6068043624e+00, 8.3321685040e-01, 1.1638915303e+00, 2.8048344109e+00 - 2.1600000000e+00, -1.5978217808e+00, 8.2557953160e-01, 1.2271432548e+00, 6.2899678078e+00 - 2.1675000000e+00, -1.5890927616e+00, 8.2053412660e-01, 1.2308606284e+00, 2.8553684972e+00 - 2.1750000000e+00, -1.5796181176e+00, 8.1283302720e-01, 1.2792013850e+00, 3.9836509613e+00 - 2.1825000000e+00, -1.5701404220e+00, 8.0449301820e-01, 1.3252420837e+00, 7.0344686324e+00 - 2.1900000000e+00, -1.5601399924e+00, 7.9685539220e-01, 1.3471601924e+00, 3.9237174947e+00 - 2.1975000000e+00, -1.5496621900e+00, 7.8727214460e-01, 1.4073683128e+00, 4.7225186927e+00 - 2.2050000000e+00, -1.5391864712e+00, 7.7669461100e-01, 1.4584663488e+00, 6.4158531378e+00 - 2.2125000000e+00, -1.5278245632e+00, 7.6300203680e-01, 1.5755530082e+00, 1.7288365763e+01 - 2.2200000000e+00, -1.5168416332e+00, 7.5472625320e-01, 1.5587276071e+00, 7.7696543289e+00 - 2.2275000000e+00, -1.5039672404e+00, 7.3722169740e-01, 1.6783362991e+00, 1.4058982882e+01 - 2.2350000000e+00, -1.4900331104e+00, 7.1081896860e-01, 1.9018868063e+00, 3.7256706578e+01 - 2.2425000000e+00, -1.4769756772e+00, 6.9378741340e-01, 1.9670408332e+00, 3.7020885460e+01 - 2.2500000000e+00, -1.4637510180e+00, 6.7620220440e-01, 1.9979200843e+00, 3.3931264905e+01 - 2.2575000000e+00, -1.4476422300e+00, 6.4138856980e-01, 2.1380345770e+00, 5.2021590459e+01 - 2.2650000000e+00, -1.4307435584e+00, 5.9851754880e-01, 2.3331535844e+00, 8.2335132366e+01 - 2.2725000000e+00, -1.4141791960e+00, 5.5853701300e-01, 2.3050596707e+00, 9.1406894951e+01 - 2.2800000000e+00, -1.3923938220e+00, 4.7488244220e-01, 2.4406522679e+00, 1.3733108164e+02 - 2.2875000000e+00, -1.3762977632e+00, 4.3171120960e-01, 2.3723633257e+00, 1.4169760752e+02 - 2.2950000000e+00, -1.3590323604e+00, 3.7291955020e-01, 2.1810791891e+00, 1.3966381627e+02 - 2.3025000000e+00, -1.3417246376e+00, 2.9848023220e-01, 1.9675984066e+00, 1.3674713142e+02 - 2.3100000000e+00, -1.3285701848e+00, 2.7804916340e-01, 1.8203992375e+00, 1.1670439695e+02 - 2.3175000000e+00, -1.3151839460e+00, 2.4615282040e-01, 1.7306660269e+00, 1.0191649249e+02 - 2.3250000000e+00, -1.3017054568e+00, 2.0573457640e-01, 1.5785878199e+00, 8.3588251789e+01 - 2.3325000000e+00, -1.2910242132e+00, 1.8774745000e-01, 1.5189612998e+00, 7.2830170071e+01 - 2.3400000000e+00, -1.2798172344e+00, 1.7481334800e-01, 1.4392725317e+00, 6.4057634925e+01 - 2.3475000000e+00, -1.2689864880e+00, 1.5672259460e-01, 1.3795280727e+00, 5.2809854731e+01 - 2.3550000000e+00, -1.2590906328e+00, 1.4302703640e-01, 1.3285933904e+00, 4.6344606435e+01 - 2.3625000000e+00, -1.2492913080e+00, 1.3746292460e-01, 1.3154737585e+00, 4.2854759492e+01 - 2.3700000000e+00, -1.2394041272e+00, 1.2602869600e-01, 1.2522961125e+00, 3.6151827925e+01 - 2.3775000000e+00, -1.2300210804e+00, 1.1798949900e-01, 1.2290092092e+00, 3.2614364490e+01 - 2.3850000000e+00, -1.2213315444e+00, 1.1081263520e-01, 1.1703344954e+00, 2.8256183604e+01 - 2.3925000000e+00, -1.2128333720e+00, 1.0747050640e-01, 1.1493012272e+00, 2.6548973327e+01 diff --git a/src/fox_output/phase_transition/wide/1M/size_20.txt b/src/fox_output/phase_transition/wide/1M/size_20.txt deleted file mode 100644 index 71db145..0000000 --- a/src/fox_output/phase_transition/wide/1M/size_20.txt +++ /dev/null @@ -1,40 +0,0 @@ - 2.1000000000e+00, -1.6625690000e+00, 8.6936663000e-01, 9.5199677451e-01, 8.8569644618e-01 - 2.1075000000e+00, -1.6549473100e+00, 8.6473691000e-01, 9.8418368776e-01, 1.0051637644e+00 - 2.1150000000e+00, -1.6473698300e+00, 8.6007587500e-01, 1.0113134310e+00, 1.1196969301e+00 - 2.1225000000e+00, -1.6395494900e+00, 8.5548300500e-01, 1.0299964171e+00, 1.1716328445e+00 - 2.1300000000e+00, -1.6314012700e+00, 8.4996323500e-01, 1.0616896949e+00, 1.3405413189e+00 - 2.1375000000e+00, -1.6248786800e+00, 8.4645665500e-01, 1.0685391394e+00, 1.3624622748e+00 - 2.1450000000e+00, -1.6159789300e+00, 8.4019108500e-01, 1.1074851796e+00, 1.5778190697e+00 - 2.1525000000e+00, -1.6066218400e+00, 8.3310467000e-01, 1.1504972327e+00, 1.8462177141e+00 - 2.1600000000e+00, -1.5970234800e+00, 8.2576127500e-01, 1.1869828128e+00, 2.0943932751e+00 - 2.1675000000e+00, -1.5897822700e+00, 8.2258458000e-01, 1.1914918638e+00, 1.9491568159e+00 - 2.1750000000e+00, -1.5801827300e+00, 8.1458734500e-01, 1.2363519078e+00, 2.2920063431e+00 - 2.1825000000e+00, -1.5702924300e+00, 8.0774668500e-01, 1.2651687205e+00, 2.4095378779e+00 - 2.1900000000e+00, -1.5612255800e+00, 8.0015641500e-01, 1.2959543424e+00, 2.7257033807e+00 - 2.1975000000e+00, -1.5517378400e+00, 7.9245131500e-01, 1.3303052331e+00, 2.9911092386e+00 - 2.2050000000e+00, -1.5414217900e+00, 7.8386986500e-01, 1.3616345135e+00, 3.2709224617e+00 - 2.2125000000e+00, -1.5311952500e+00, 7.7542827000e-01, 1.3967503062e+00, 3.5346202097e+00 - 2.2200000000e+00, -1.5207608300e+00, 7.6709755000e-01, 1.4142386201e+00, 3.6842337809e+00 - 2.2275000000e+00, -1.5085855600e+00, 7.5403383500e-01, 1.4805730257e+00, 4.3251769608e+00 - 2.2350000000e+00, -1.4977753400e+00, 7.4437916000e-01, 1.5106261750e+00, 4.6648177016e+00 - 2.2425000000e+00, -1.4887390800e+00, 7.3872244000e-01, 1.5080687017e+00, 4.6014703216e+00 - 2.2500000000e+00, -1.4746719800e+00, 7.2296431000e-01, 1.5595119252e+00, 5.2158607318e+00 - 2.2575000000e+00, -1.4649236800e+00, 7.1438349500e-01, 1.5626649105e+00, 5.4095787458e+00 - 2.2650000000e+00, -1.4539727000e+00, 7.0392335500e-01, 1.5999803560e+00, 5.7811835162e+00 - 2.2725000000e+00, -1.4383957600e+00, 6.8648458000e-01, 1.6273389853e+00, 6.2658670226e+00 - 2.2800000000e+00, -1.4272485800e+00, 6.7498559500e-01, 1.6373926199e+00, 6.5424849241e+00 - 2.2875000000e+00, -1.4161097600e+00, 6.6328622500e-01, 1.6482649119e+00, 6.9396325071e+00 - 2.2950000000e+00, -1.4030803200e+00, 6.4952940000e-01, 1.6526274190e+00, 7.1626056968e+00 - 2.3025000000e+00, -1.3903670400e+00, 6.3425026500e-01, 1.6614736902e+00, 7.5951852895e+00 - 2.3100000000e+00, -1.3765267400e+00, 6.1661350500e-01, 1.6813621383e+00, 8.1293299007e+00 - 2.3175000000e+00, -1.3668244500e+00, 6.0868480000e-01, 1.6696332535e+00, 8.0990867312e+00 - 2.3250000000e+00, -1.3526192200e+00, 5.9227348500e-01, 1.6505297564e+00, 8.2942300802e+00 - 2.3325000000e+00, -1.3409542100e+00, 5.7865409000e-01, 1.6452483426e+00, 8.5101960774e+00 - 2.3400000000e+00, -1.3276466700e+00, 5.6070534000e-01, 1.6405201796e+00, 8.8590319138e+00 - 2.3475000000e+00, -1.3168887100e+00, 5.4946903500e-01, 1.6045170261e+00, 8.8441925199e+00 - 2.3550000000e+00, -1.3057160100e+00, 5.3701756500e-01, 1.5837572842e+00, 8.8493960945e+00 - 2.3625000000e+00, -1.2933918900e+00, 5.2257067000e-01, 1.5611608836e+00, 8.9655506973e+00 - 2.3700000000e+00, -1.2803815800e+00, 5.0420808000e-01, 1.5367494666e+00, 9.1530057152e+00 - 2.3775000000e+00, -1.2710140700e+00, 4.9720522000e-01, 1.5026191797e+00, 8.8744373257e+00 - 2.3850000000e+00, -1.2587865200e+00, 4.7992953500e-01, 1.4696452314e+00, 9.0276609408e+00 - 2.3925000000e+00, -1.2478516100e+00, 4.6678417500e-01, 1.4487901457e+00, 9.0244578382e+00 diff --git a/src/fox_output/phase_transition/wide/1M/size_40.txt b/src/fox_output/phase_transition/wide/1M/size_40.txt deleted file mode 100644 index 564d253..0000000 --- a/src/fox_output/phase_transition/wide/1M/size_40.txt +++ /dev/null @@ -1,40 +0,0 @@ - 2.1000000000e+00, -1.6619871300e+00, 8.6870624250e-01, 9.6278777845e-01, 9.3662906498e-01 - 2.1075000000e+00, -1.6547203325e+00, 8.6437105750e-01, 9.8311077964e-01, 1.0346128731e+00 - 2.1150000000e+00, -1.6473785300e+00, 8.6017528750e-01, 1.0109861749e+00, 1.1150123281e+00 - 2.1225000000e+00, -1.6395897775e+00, 8.5516811625e-01, 1.0474455741e+00, 1.2971060290e+00 - 2.1300000000e+00, -1.6312599425e+00, 8.4947010125e-01, 1.0722753911e+00, 1.5035213400e+00 - 2.1375000000e+00, -1.6241147400e+00, 8.4585219625e-01, 1.0785852968e+00, 1.4006910648e+00 - 2.1450000000e+00, -1.6154353900e+00, 8.3964061750e-01, 1.1196777363e+00, 1.6977945481e+00 - 2.1525000000e+00, -1.6066602000e+00, 8.3351204375e-01, 1.1542721941e+00, 1.8895368271e+00 - 2.1600000000e+00, -1.5979234975e+00, 8.2748378125e-01, 1.1841299918e+00, 2.0149041234e+00 - 2.1675000000e+00, -1.5890679950e+00, 8.2065594000e-01, 1.2279168915e+00, 2.3928382622e+00 - 2.1750000000e+00, -1.5797961850e+00, 8.1368810125e-01, 1.2559737783e+00, 2.6842134240e+00 - 2.1825000000e+00, -1.5703906325e+00, 8.0578926750e-01, 1.3035057782e+00, 3.2167249489e+00 - 2.1900000000e+00, -1.5600478750e+00, 7.9750457875e-01, 1.3416942292e+00, 3.4242736182e+00 - 2.1975000000e+00, -1.5496240950e+00, 7.8796541000e-01, 1.3925225739e+00, 4.1589450169e+00 - 2.2050000000e+00, -1.5397732300e+00, 7.7816155750e-01, 1.4422836947e+00, 5.4907415132e+00 - 2.2125000000e+00, -1.5283743325e+00, 7.6732785125e-01, 1.4880825139e+00, 5.9318420661e+00 - 2.2200000000e+00, -1.5170016200e+00, 7.5565237250e-01, 1.5595766066e+00, 6.8132399420e+00 - 2.2275000000e+00, -1.5045914675e+00, 7.3986621875e-01, 1.6280834980e+00, 8.9798473767e+00 - 2.2350000000e+00, -1.4913784100e+00, 7.2382233000e-01, 1.7009293790e+00, 1.0593416364e+01 - 2.2425000000e+00, -1.4781115425e+00, 7.0516521750e-01, 1.8020081436e+00, 1.3620485402e+01 - 2.2500000000e+00, -1.4675678350e+00, 6.9745757625e-01, 1.7598437012e+00, 1.2270503961e+01 - 2.2575000000e+00, -1.4534174775e+00, 6.7418916000e-01, 1.8682062103e+00, 1.6229736752e+01 - 2.2650000000e+00, -1.4389895100e+00, 6.5277034250e-01, 1.9199774739e+00, 1.8545079735e+01 - 2.2725000000e+00, -1.4241354725e+00, 6.2800997875e-01, 1.9579403322e+00, 2.1378318014e+01 - 2.2800000000e+00, -1.4090535575e+00, 6.0315022375e-01, 2.0032088190e+00, 2.4018275994e+01 - 2.2875000000e+00, -1.3927315250e+00, 5.7404195500e-01, 2.0214801295e+00, 2.5782649418e+01 - 2.2950000000e+00, -1.3787226450e+00, 5.4834878500e-01, 2.0266913149e+00, 2.8290948302e+01 - 2.3025000000e+00, -1.3632748550e+00, 5.2135817250e-01, 1.9811668806e+00, 2.8714880199e+01 - 2.3100000000e+00, -1.3464988650e+00, 4.8466357500e-01, 1.9810374067e+00, 3.1760898790e+01 - 2.3175000000e+00, -1.3367379275e+00, 4.7629435000e-01, 1.9081949871e+00, 3.0196817119e+01 - 2.3250000000e+00, -1.3193239250e+00, 4.3652890125e-01, 1.8332484766e+00, 3.0891702871e+01 - 2.3325000000e+00, -1.3071566800e+00, 4.1625584750e-01, 1.7815090084e+00, 3.0666290088e+01 - 2.3400000000e+00, -1.2941572625e+00, 3.9459272000e-01, 1.6840398641e+00, 2.8966338994e+01 - 2.3475000000e+00, -1.2791096525e+00, 3.5942566625e-01, 1.6063090325e+00, 2.8297691660e+01 - 2.3550000000e+00, -1.2699687225e+00, 3.5410390250e-01, 1.5488284969e+00, 2.6883308021e+01 - 2.3625000000e+00, -1.2589335250e+00, 3.3307430750e-01, 1.4942018868e+00, 2.6036581637e+01 - 2.3700000000e+00, -1.2481282425e+00, 3.1721209750e-01, 1.4215856448e+00, 2.4527287084e+01 - 2.3775000000e+00, -1.2352952825e+00, 2.9286225500e-01, 1.3454562572e+00, 2.2568838891e+01 - 2.3850000000e+00, -1.2258446225e+00, 2.8075654750e-01, 1.3150251213e+00, 2.1757694808e+01 - 2.3925000000e+00, -1.2161956225e+00, 2.6596321875e-01, 1.2462566469e+00, 1.9885203794e+01 diff --git a/src/fox_output/phase_transition/wide/1M/size_60.txt b/src/fox_output/phase_transition/wide/1M/size_60.txt deleted file mode 100644 index 9cb7c99..0000000 --- a/src/fox_output/phase_transition/wide/1M/size_60.txt +++ /dev/null @@ -1,40 +0,0 @@ - 2.1000000000e+00, -1.6622080778e+00, 8.6888685056e-01, 9.6194394754e-01, 9.5119481140e-01 - 2.1075000000e+00, -1.6549873878e+00, 8.6473504722e-01, 9.7994266077e-01, 9.8953379786e-01 - 2.1150000000e+00, -1.6475207911e+00, 8.6025093389e-01, 1.0081474312e+00, 1.1194559870e+00 - 2.1225000000e+00, -1.6396569767e+00, 8.5545978444e-01, 1.0333044324e+00, 1.2136054089e+00 - 2.1300000000e+00, -1.6315560089e+00, 8.5013030556e-01, 1.0679225878e+00, 1.4175829026e+00 - 2.1375000000e+00, -1.6237534878e+00, 8.4521926944e-01, 1.0902339720e+00, 1.5064789046e+00 - 2.1450000000e+00, -1.6156567900e+00, 8.4024911278e-01, 1.1126210431e+00, 1.5751093021e+00 - 2.1525000000e+00, -1.6069039722e+00, 8.3401459222e-01, 1.1504921905e+00, 1.8536979986e+00 - 2.1600000000e+00, -1.5979708833e+00, 8.2729493611e-01, 1.1859309121e+00, 2.1365010597e+00 - 2.1675000000e+00, -1.5888628356e+00, 8.1998504278e-01, 1.2389330968e+00, 3.0662066078e+00 - 2.1750000000e+00, -1.5794593678e+00, 8.1268006056e-01, 1.2669134996e+00, 2.9580405964e+00 - 2.1825000000e+00, -1.5703313700e+00, 8.0580660333e-01, 1.2987511848e+00, 3.2538479975e+00 - 2.1900000000e+00, -1.5605616589e+00, 7.9825073389e-01, 1.3239144859e+00, 3.3816598902e+00 - 2.1975000000e+00, -1.5503053800e+00, 7.8854590444e-01, 1.3941392783e+00, 4.8355208524e+00 - 2.2050000000e+00, -1.5392911122e+00, 7.7778305833e-01, 1.4627414876e+00, 5.4704647774e+00 - 2.2125000000e+00, -1.5275480522e+00, 7.6369925111e-01, 1.5397805627e+00, 8.2040122202e+00 - 2.2200000000e+00, -1.5158014478e+00, 7.5233748833e-01, 1.5820501294e+00, 8.3633477024e+00 - 2.2275000000e+00, -1.5044431100e+00, 7.3805987833e-01, 1.6702105765e+00, 1.1444973767e+01 - 2.2350000000e+00, -1.4908134933e+00, 7.1846408611e-01, 1.7747717739e+00, 1.7025836469e+01 - 2.2425000000e+00, -1.4794267867e+00, 7.0642548556e-01, 1.8065580310e+00, 1.6643128591e+01 - 2.2500000000e+00, -1.4632736244e+00, 6.7601601611e-01, 1.9665471598e+00, 2.5780870106e+01 - 2.2575000000e+00, -1.4474902822e+00, 6.4792024944e-01, 2.0638894153e+00, 3.2332279841e+01 - 2.2650000000e+00, -1.4342776511e+00, 6.2667603278e-01, 2.1160524277e+00, 3.6569069734e+01 - 2.2725000000e+00, -1.4168885311e+00, 5.8519766833e-01, 2.2426448595e+00, 4.8256403563e+01 - 2.2800000000e+00, -1.4014866000e+00, 5.5902506222e-01, 2.1794665372e+00, 4.7820963877e+01 - 2.2875000000e+00, -1.3828889500e+00, 5.0619922444e-01, 2.2575163767e+00, 6.0784816323e+01 - 2.2950000000e+00, -1.3672035722e+00, 4.7189277611e-01, 2.1713590434e+00, 6.0308487671e+01 - 2.3025000000e+00, -1.3522221378e+00, 4.3997953944e-01, 2.0883776065e+00, 6.1576347491e+01 - 2.3100000000e+00, -1.3364808467e+00, 3.9876774722e-01, 1.9739688332e+00, 6.1903828300e+01 - 2.3175000000e+00, -1.3221950333e+00, 3.6735453056e-01, 1.8578001992e+00, 5.7978537200e+01 - 2.3250000000e+00, -1.3086082244e+00, 3.3554781833e-01, 1.7701015699e+00, 5.5854275464e+01 - 2.3325000000e+00, -1.2954145244e+00, 3.0691911056e-01, 1.6541848788e+00, 5.1358474505e+01 - 2.3400000000e+00, -1.2817812289e+00, 2.7302543333e-01, 1.5532130609e+00, 4.6243909101e+01 - 2.3475000000e+00, -1.2717813078e+00, 2.5766299167e-01, 1.4776751965e+00, 4.2145442090e+01 - 2.3550000000e+00, -1.2605244911e+00, 2.3634089833e-01, 1.3752785899e+00, 3.7570993341e+01 - 2.3625000000e+00, -1.2509552244e+00, 2.2662395778e-01, 1.3451900581e+00, 3.5327196969e+01 - 2.3700000000e+00, -1.2414042567e+00, 2.1529288222e-01, 1.2933073896e+00, 3.2094216452e+01 - 2.3775000000e+00, -1.2317764800e+00, 2.0266740167e-01, 1.2435481044e+00, 2.9164970244e+01 - 2.3850000000e+00, -1.2215126278e+00, 1.8771133444e-01, 1.2131660649e+00, 2.6453223909e+01 - 2.3925000000e+00, -1.2132305378e+00, 1.8020770889e-01, 1.1864433534e+00, 2.4390477910e+01 diff --git a/src/fox_output/phase_transition/wide/1M/size_80.txt b/src/fox_output/phase_transition/wide/1M/size_80.txt deleted file mode 100644 index 09bdf05..0000000 --- a/src/fox_output/phase_transition/wide/1M/size_80.txt +++ /dev/null @@ -1,40 +0,0 @@ - 2.1000000000e+00, -1.6611152931e+00, 8.6340949031e-01, 1.0618085269e+00, 1.0852443221e+01 - 2.1075000000e+00, -1.6544204275e+00, 8.6155289688e-01, 1.0400128767e+00, 6.9729031007e+00 - 2.1150000000e+00, -1.6470948250e+00, 8.5867193781e-01, 1.0299036529e+00, 3.1948548627e+00 - 2.1225000000e+00, -1.6394780825e+00, 8.5489989063e-01, 1.0439477101e+00, 1.4796682043e+00 - 2.1300000000e+00, -1.6314147313e+00, 8.4997307438e-01, 1.0605627746e+00, 1.4245900259e+00 - 2.1375000000e+00, -1.6236637081e+00, 8.4527533875e-01, 1.0878527046e+00, 1.4851799529e+00 - 2.1450000000e+00, -1.6151988531e+00, 8.3900120594e-01, 1.1216531827e+00, 2.1654786567e+00 - 2.1525000000e+00, -1.6070250831e+00, 8.3389557844e-01, 1.1526268945e+00, 1.9005170940e+00 - 2.1600000000e+00, -1.5979811812e+00, 8.2628487844e-01, 1.2084423726e+00, 4.1500628183e+00 - 2.1675000000e+00, -1.5893568400e+00, 8.2104097906e-01, 1.2197362514e+00, 2.4855215778e+00 - 2.1750000000e+00, -1.5794394906e+00, 8.1176008719e-01, 1.3044598514e+00, 4.6511834081e+00 - 2.1825000000e+00, -1.5698832044e+00, 8.0493701562e-01, 1.3006449037e+00, 3.4793099999e+00 - 2.1900000000e+00, -1.5602829925e+00, 7.9736358125e-01, 1.3515457585e+00, 4.2266771835e+00 - 2.1975000000e+00, -1.5497925406e+00, 7.8729946469e-01, 1.4068414325e+00, 5.0638834998e+00 - 2.2050000000e+00, -1.5390119863e+00, 7.7730014344e-01, 1.4643494037e+00, 5.4405468776e+00 - 2.2125000000e+00, -1.5285699319e+00, 7.6719935906e-01, 1.5034112406e+00, 6.4625759488e+00 - 2.2200000000e+00, -1.5171142294e+00, 7.5523221031e-01, 1.5589756465e+00, 7.9371988287e+00 - 2.2275000000e+00, -1.5035502256e+00, 7.3538620594e-01, 1.7201950942e+00, 1.3498598046e+01 - 2.2350000000e+00, -1.4910877356e+00, 7.1870979875e-01, 1.7818562021e+00, 2.0507727756e+01 - 2.2425000000e+00, -1.4776374137e+00, 6.9932284188e-01, 1.9029441484e+00, 2.2569586704e+01 - 2.2500000000e+00, -1.4636506756e+00, 6.7520944500e-01, 1.9715358853e+00, 3.3397397123e+01 - 2.2575000000e+00, -1.4498004187e+00, 6.5661284406e-01, 2.0279597161e+00, 3.1129033200e+01 - 2.2650000000e+00, -1.4317030163e+00, 6.0636967406e-01, 2.2454520636e+00, 6.2220582560e+01 - 2.2725000000e+00, -1.4147509600e+00, 5.6623702656e-01, 2.3519954807e+00, 7.6723434936e+01 - 2.2800000000e+00, -1.3968917619e+00, 5.1493388594e-01, 2.3328505260e+00, 8.9280561280e+01 - 2.2875000000e+00, -1.3791728538e+00, 4.6936874656e-01, 2.2624154006e+00, 9.4482771597e+01 - 2.2950000000e+00, -1.3621004525e+00, 4.1199624188e-01, 2.2062854440e+00, 1.0416939932e+02 - 2.3025000000e+00, -1.3458815494e+00, 3.6842100406e-01, 2.0855720994e+00, 1.0027555856e+02 - 2.3100000000e+00, -1.3308837706e+00, 3.2742871469e-01, 1.9522472057e+00, 9.4090337065e+01 - 2.3175000000e+00, -1.3158857756e+00, 2.8343087094e-01, 1.7976773482e+00, 8.3386605815e+01 - 2.3250000000e+00, -1.3036166513e+00, 2.6015766219e-01, 1.6843061082e+00, 7.5527393718e+01 - 2.3325000000e+00, -1.2922514694e+00, 2.3355912187e-01, 1.5553827112e+00, 6.4357603143e+01 - 2.3400000000e+00, -1.2804114387e+00, 2.1177449906e-01, 1.4768744131e+00, 5.6788424831e+01 - 2.3475000000e+00, -1.2691234206e+00, 1.8963526813e-01, 1.3907998757e+00, 4.6811613355e+01 - 2.3550000000e+00, -1.2595190206e+00, 1.8371780219e-01, 1.3492275159e+00, 4.4324984005e+01 - 2.3625000000e+00, -1.2491626106e+00, 1.6985965719e-01, 1.3084232730e+00, 3.9259174175e+01 - 2.3700000000e+00, -1.2402516969e+00, 1.6480554062e-01, 1.2540739089e+00, 3.6080819148e+01 - 2.3775000000e+00, -1.2306922350e+00, 1.5086369813e-01, 1.2400549904e+00, 3.1139240148e+01 - 2.3850000000e+00, -1.2213978969e+00, 1.4087769937e-01, 1.2043695902e+00, 2.8199665682e+01 - 2.3925000000e+00, -1.2127243256e+00, 1.3146204156e-01, 1.1581351182e+00, 2.4633682284e+01 diff --git a/src/main.cpp b/src/main.cpp index ce838a6..1d307ba 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -13,31 +13,47 @@ #include "monte_carlo.hpp" #include "utils.hpp" -#include -#include -#include -#include +#include +/** @brief Create the data for the burn-in time for temperatures 1.0 and 2.4 + * for both unordered and ordered initial states. + * */ void create_burn_in_time_data() { // Test burn-in time - monte_carlo_progression(1.0, 20, 20000, - "output/burn_in_time/unordered_1_0.txt"); - monte_carlo_progression(1.0, 20, 20000, 1, - "output/burn_in_time/ordered_1_0.txt"); - monte_carlo_progression(2.4, 20, 20000, - "output/burn_in_time/unordered_2_4.txt"); - monte_carlo_progression(2.4, 20, 20000, 1, - "output/burn_in_time/ordered_2_4.txt"); + montecarlo::progression(1.0, 20, 20000, + "../output/burn_in_time/unordered_1_0.txt"); + montecarlo::progression(1.0, 20, 20000, 1, + "../output/burn_in_time/ordered_1_0.txt"); + montecarlo::progression(2.4, 20, 20000, + "../output/burn_in_time/unordered_2_4.txt"); + montecarlo::progression(2.4, 20, 20000, 1, + "../output/burn_in_time/ordered_2_4.txt"); } +/** @brief Create the data used to estimate the probability distribution + * for tempratures 1.0 anbd 2.4. + * */ void create_pd_estimate_data() { // Estimate pd - pd_estimate(1.0, 20, 1000000, "output/pd_estimate/estimate_1_0.txt"); - pd_estimate(2.4, 20, 1000000, "output/pd_estimate/estimate_2_4.txt"); + montecarlo::pd_estimate(1.0, 20, 1000000, + "../output/pd_estimate/estimate_1_0.txt"); + montecarlo::pd_estimate(2.4, 20, 1000000, + "../output/pd_estimate/estimate_2_4.txt"); } +void test_burn_in_time() +{ + montecarlo::phase_transition( + 100, 2.1, 2.4, 40, 1e5, montecarlo::mcmc_serial, + "../output/test_burn_in_time/no_burn_in.txt", 0); + montecarlo::phase_transition( + 100, 2.1, 2.4, 40, 1e5, montecarlo::mcmc_serial, + "../output/test_burn_in_time/burn_in.txt", 5000); +} + +/** @brief Test how much Openmp speeds up.*/ void test_parallel_speedup() { // Test the openmp speedup @@ -46,10 +62,10 @@ void test_parallel_speedup() int tries = 5; t0 = omp_get_wtime(); for (size_t i = 0; i < tries; i++) - monte_carlo_serial(20, 1.0, 10000); + montecarlo::mcmc_serial(20, 1.0, 10000); t1 = omp_get_wtime(); for (size_t i = 0; i < tries; i++) - monte_carlo_parallel(20, 1.0, 10000); + montecarlo::mcmc_parallel(20, 1.0, 10000); t2 = omp_get_wtime(); std::cout << "Time serial : " << (t1 - t0) / tries << " seconds" @@ -59,54 +75,98 @@ void test_parallel_speedup() std::cout << "Speedup parallel: " << (t1 - t0) / (t2 - t1) << '\n'; } +/** @brief Create data for studying phase transition. + * */ void create_phase_transition_data() { double t0, t1; t0 = omp_get_wtime(); // Phase transition - phase_transition(20, 2.1, 2.4, 40, monte_carlo_parallel, - "output/phase_transition/size_20.txt"); - phase_transition(40, 2.1, 2.4, 40, monte_carlo_parallel, - "output/phase_transition/size_40.txt"); - phase_transition(60, 2.1, 2.4, 40, monte_carlo_parallel, - "output/phase_transition/size_60.txt"); - phase_transition(80, 2.1, 2.4, 40, monte_carlo_parallel, - "output/phase_transition/size_80.txt"); - phase_transition(100, 2.1, 2.4, 40, monte_carlo_parallel, - "output/phase_transition/size_100.txt"); + montecarlo::phase_transition(20, 2.1, 2.4, 40, 1e4, + montecarlo::mcmc_parallel, + "../output/phase_transition/size_20.txt"); + montecarlo::phase_transition(40, 2.1, 2.4, 40, 1e4, + montecarlo::mcmc_parallel, + "../output/phase_transition/size_40.txt"); + montecarlo::phase_transition(60, 2.1, 2.4, 40, 1e4, + montecarlo::mcmc_parallel, + "../output/phase_transition/size_60.txt"); + montecarlo::phase_transition(80, 2.1, 2.4, 40, 1e4, + montecarlo::mcmc_parallel, + "../output/phase_transition/size_80.txt"); + montecarlo::phase_transition(100, 2.1, 2.4, 40, 1e4, + montecarlo::mcmc_parallel, + "../output/phase_transition/size_100.txt"); t1 = omp_get_wtime(); std::cout << "Time: " << t1 - t0 << std::endl; } +void usage(std::string filename) +{ + std::cout << "Usage: " << filename << " OPTION ...\n" + << "At least one option should be used.\n\n" + << "\t[ -h | --help ]\n" + << "\t[ --all ]\n" + << "\t[ --create-burn-in-data ]\n" + << "\t[ --create-pd-estimate-data ]\n" + << "\t[ --create-phase-transition-data ]\n" + << "\t[ --test-parallel-speedup ]\n" + << "\t[ --test-burn-in-time ]\n"; + exit(-1); +} + /** @brief The main function.*/ int main(int argc, char **argv) { - if (argc < 2) { - std::cout << "Need at least 1 argument, got " << argc - 1 - << " arguments." << std::endl; - abort(); - } + static struct option long_options[] = { + {"all", no_argument, 0, 0}, + {"create-burn-in-data", no_argument, 0, 0}, + {"create-pd-estimate-data", no_argument, 0, 0}, + {"test-parallel-speedup", no_argument, 0, 0}, + {"create-phase-transition-data", no_argument, 0, 0}, + {"test-burn-in-time", no_argument, 0, 0}, + {"help", no_argument, 0, 0}}; - int arg = atoi(argv[1]); + int option_index = -1; + int c; - switch (arg) { - case 1: - create_burn_in_time_data(); - break; - case 2: - create_pd_estimate_data(); - break; - case 3: - test_parallel_speedup(); - break; - case 4: - create_phase_transition_data(); - break; - default: - std::cout << "Not a valid option!" << std::endl; - abort(); + while (true) { + c = getopt_long(argc, argv, "h", long_options, &option_index); + + if (c == -1) + break; + else if (c == 'h') + usage(argv[0]); + + switch (option_index) { + case 0: + create_burn_in_time_data(); + create_pd_estimate_data(); + test_parallel_speedup(); + create_phase_transition_data(); + test_burn_in_time(); + break; + case 1: + create_burn_in_time_data(); + break; + case 2: + create_pd_estimate_data(); + break; + case 3: + test_parallel_speedup(); + break; + case 4: + create_phase_transition_data(); + break; + case 5: + test_burn_in_time(); + break; + case 6: // Not a mistake. This just goes to the default. + default: + usage(argv[0]); + } } return 0; diff --git a/src/mcmc_progression.cpp b/src/mcmc_progression.cpp new file mode 100644 index 0000000..e6982d5 --- /dev/null +++ b/src/mcmc_progression.cpp @@ -0,0 +1,79 @@ +/** @file mcmc_progression.cpp + * + * @author Cory Alexander Balaton (coryab) + * @author Janita Ovidie Sandtrøen Willumsen (janitaws) + * + * @version 1.0 + * + * @brief Execute the mcmc algorithm and write data to file after each + * Monte Carlo cycle. + * + * @bug No known bugs + * */ +#include "data_type.hpp" +#include "monte_carlo.hpp" +#include "utils.hpp" + +#include +#include +#include + +void usage(std::string filename) +{ + std::cout << "Usage: " << filename + << " " + " \n\n" + << "\t[ -h | --help ]\n"; + exit(-1); +} + +/** @brief The main function + * + * */ +int main(int argc, char **argv) +{ + // Command options + struct option long_options[] = {{"help", 0, 0, 0}, {NULL, 0, NULL, 0}}; + + int option_index = -1; + int c; + + while (true) { + c = getopt_long(argc, argv, "h", long_options, &option_index); + + if (c == -1) + break; + + switch (c) { + case 0: + switch (option_index) { + case 0: // Not a mistake. This just goes to the default. + default: + usage(argv[0]); + } + break; + case 'h': + default: + usage(argv[0]); + } + } + // Check that the number of arguments is at least 8. + if (argc < 6) { + usage(argv[0]); + } + + // Timing variables + double t0, t1; + t0 = omp_get_wtime(); + + // Define/initialize variables + double temp = atoi(argv[1]); + int L = atoi(argv[2]), cycles = atoi(argv[3]), burn_in_time = atoi(argv[4]); + std::string outfile = argv[5]; + + montecarlo::progression(temp, L, cycles, outfile, burn_in_time); + + t1 = omp_get_wtime(); + + std::cout << "Time: " << t1 - t0 << " seconds\n"; +} diff --git a/src/monte_carlo.cpp b/src/monte_carlo.cpp index 4f64092..542ffb5 100644 --- a/src/monte_carlo.cpp +++ b/src/monte_carlo.cpp @@ -11,11 +11,9 @@ * */ #include "monte_carlo.hpp" -#include -#include - -void monte_carlo_progression(double T, int L, int cycles, - const std::string filename) +namespace montecarlo { +void progression(double T, int L, int cycles, const std::string filename, + int burn_in_time) { // Set some variables data_t data, tmp; @@ -38,6 +36,10 @@ void monte_carlo_progression(double T, int L, int cycles, utils::mkpath(directory); ofile.open(filename); + for (size_t i = 0; i < burn_in_time; i++) { + ising.Metropolis(); + } + // Loop through cycles for (size_t i = 1; i <= cycles; i++) { data += ising.Metropolis(); @@ -48,8 +50,8 @@ void monte_carlo_progression(double T, int L, int cycles, ofile.close(); } -void monte_carlo_progression(double T, int L, int cycles, int value, - const std::string filename) +void progression(double T, int L, int cycles, int value, + const std::string filename, int burn_in_time) { // Set some variables data_t data, tmp; @@ -68,6 +70,10 @@ void monte_carlo_progression(double T, int L, int cycles, int value, IsingModel ising(L, T, value); + for (size_t i = 0; i < burn_in_time; i++) { + ising.Metropolis(); + } + // Create path and open file utils::mkpath(directory); ofile.open(filename); @@ -82,7 +88,8 @@ void monte_carlo_progression(double T, int L, int cycles, int value, ofile.close(); } -void pd_estimate(double T, int L, int cycles, const std::string filename) +void pd_estimate(double T, int L, int cycles, const std::string filename, + int burn_in_time) { // Set some variables data_t data, tmp; @@ -94,6 +101,10 @@ void pd_estimate(double T, int L, int cycles, const std::string filename) IsingModel ising(L, T); + for (size_t i = 0; i < burn_in_time; i++) { + ising.Metropolis(); + } + // Create path and open file utils::mkpath(directory); ofile.open(filename); @@ -108,12 +119,12 @@ void pd_estimate(double T, int L, int cycles, const std::string filename) } // Code for seeing phase transitions. -data_t monte_carlo_serial(int L, double T, int cycles) +data_t mcmc_serial(int L, double T, int cycles, int burn_in_time) { data_t data; IsingModel model(L, T); - for (size_t i = 0; i < BURN_IN_TIME; i++) { + for (size_t i = 0; i < burn_in_time; i++) { model.Metropolis(); } @@ -122,10 +133,12 @@ data_t monte_carlo_serial(int L, double T, int cycles) data += model.Metropolis(); } - return data; + double norm = 1. / (double)cycles; + + return data * norm; } -data_t monte_carlo_parallel(int L, double T, int cycles) +data_t mcmc_parallel(int L, double T, int cycles, int burn_in_time) { data_t data; #pragma omp parallel @@ -135,7 +148,7 @@ data_t monte_carlo_parallel(int L, double T, int cycles) // Each thread runs the Metropolis algorithm before starting to collect // samples - for (size_t i = 0; i < BURN_IN_TIME; i++) { + for (size_t i = 0; i < burn_in_time; i++) { model.Metropolis(); } @@ -153,12 +166,11 @@ data_t monte_carlo_parallel(int L, double T, int cycles) return data * norm; } -void phase_transition(int L, double start, double end, int points, - std::function monte_carlo, - std::string outfile) +void phase_transition(int L, double start, double end, int points, int cycles, + std::function monte_carlo, + std::string outfile, int burn_in_time) { double dt = (end - start) / (double)points; - int cycles = 10000; int N = L * L; std::ofstream ofile; @@ -172,7 +184,7 @@ void phase_transition(int L, double start, double end, int points, using utils::scientific_format; for (size_t i = 0; i < points; i++) { temp = start + dt * i; - data = monte_carlo(L, temp, cycles); + data = monte_carlo(L, temp, cycles, burn_in_time); E_var = (data.E2 - data.E * data.E) / (double)N; M_var = (data.M2 - data.M_abs * data.M_abs) / (double)N; @@ -184,3 +196,4 @@ void phase_transition(int L, double start, double end, int points, } ofile.close(); } +} // namespace montecarlo diff --git a/src/output/phase_transition/size_100.txt b/src/output/phase_transition/size_100.txt deleted file mode 100644 index bcde6dc..0000000 --- a/src/output/phase_transition/size_100.txt +++ /dev/null @@ -1,40 +0,0 @@ - 2.1000000000e+00, -1.6616612000e+00, 8.6845856000e-01, 9.4100476771e-01, 9.2611616536e-01 - 2.1075000000e+00, -1.6522619200e+00, 8.5556304000e-01, 1.0885182281e+00, 6.2097137365e+00 - 2.1150000000e+00, -1.6450188800e+00, 8.5863764000e-01, 1.0051205105e+00, 1.1164081666e+00 - 2.1225000000e+00, -1.6406554400e+00, 8.5708034000e-01, 1.0481548841e+00, 1.1354312626e+00 - 2.1300000000e+00, -1.6314204800e+00, 8.4259230000e-01, 1.1469635314e+00, 8.0975087357e+00 - 2.1375000000e+00, -1.6252202400e+00, 8.4671010000e-01, 1.0810915946e+00, 1.5210895812e+00 - 2.1450000000e+00, -1.6080992800e+00, 7.9870434000e-01, 1.8949133454e+00, 5.3880876556e+01 - 2.1525000000e+00, -1.6066215600e+00, 8.3430166000e-01, 1.1854322436e+00, 1.9078239686e+00 - 2.1600000000e+00, -1.5991931600e+00, 8.2884634000e-01, 1.1037735280e+00, 1.8624890769e+00 - 2.1675000000e+00, -1.5869127200e+00, 8.1961586000e-01, 1.2827221432e+00, 2.5047507657e+00 - 2.1750000000e+00, -1.5791830000e+00, 8.1272506000e-01, 1.2050122235e+00, 3.2841970575e+00 - 2.1825000000e+00, -1.5730697200e+00, 8.1061152000e-01, 1.3352587672e+00, 3.0416805099e+00 - 2.1900000000e+00, -1.5586000000e+00, 7.9394982000e-01, 1.5040491066e+00, 5.1375076437e+00 - 2.1975000000e+00, -1.5530342000e+00, 7.9374470000e-01, 1.3980794130e+00, 3.4212906390e+00 - 2.2050000000e+00, -1.5400480400e+00, 7.7650606000e-01, 1.6090248079e+00, 8.6469559514e+00 - 2.2125000000e+00, -1.5298885200e+00, 7.6979156000e-01, 1.3391708594e+00, 4.1109351809e+00 - 2.2200000000e+00, -1.5153519600e+00, 7.4769800000e-01, 1.8315356143e+00, 1.1986798072e+01 - 2.2275000000e+00, -1.5070038400e+00, 7.4774300000e-01, 1.5984249634e+00, 6.7165310662e+00 - 2.2350000000e+00, -1.4943889600e+00, 7.3272992000e-01, 1.6567373324e+00, 9.9477863839e+00 - 2.2425000000e+00, -1.4753911600e+00, 6.9432892000e-01, 1.6591079321e+00, 1.5680878750e+01 - 2.2500000000e+00, -1.4601691600e+00, 6.6492324000e-01, 1.9208987356e+00, 3.5072118133e+01 - 2.2575000000e+00, -1.4457509200e+00, 6.0376080000e-01, 2.0357565112e+00, 9.0224699957e+01 - 2.2650000000e+00, -1.4302972000e+00, 6.0609998000e-01, 2.2499889111e+00, 4.7045403196e+01 - 2.2725000000e+00, -1.4100019600e+00, 5.0428324000e-01, 2.1557455058e+00, 1.6732088283e+02 - 2.2800000000e+00, -1.3907180000e+00, 4.7789794000e-01, 2.4267635503e+00, 1.0874765437e+02 - 2.2875000000e+00, -1.3735967600e+00, 4.1401948000e-01, 1.9969682463e+00, 1.2049807285e+02 - 2.2950000000e+00, -1.3600215200e+00, 3.5448808000e-01, 2.1722089584e+00, 1.8777969503e+02 - 2.3025000000e+00, -1.3481357600e+00, 3.1820508000e-01, 1.9715023164e+00, 1.5610941445e+02 - 2.3100000000e+00, -1.3263405600e+00, 2.5287380000e-01, 1.7729846196e+00, 8.9267094206e+01 - 2.3175000000e+00, -1.3139676800e+00, 2.4298084000e-01, 1.6114389146e+00, 8.9676470476e+01 - 2.3250000000e+00, -1.2996625200e+00, 1.6751352000e-01, 1.4075663392e+00, 5.6094786483e+01 - 2.3325000000e+00, -1.2914345200e+00, 1.8588992000e-01, 1.6378368083e+00, 9.6569006553e+01 - 2.3400000000e+00, -1.2813640800e+00, 1.8015172000e-01, 1.4544992142e+00, 5.4078397936e+01 - 2.3475000000e+00, -1.2734780400e+00, 1.9836830000e-01, 1.3780637345e+00, 6.6896915080e+01 - 2.3550000000e+00, -1.2635410400e+00, 1.7695188000e-01, 1.4476311443e+00, 5.6028240630e+01 - 2.3625000000e+00, -1.2494541200e+00, 1.2496568000e-01, 1.2647141874e+00, 3.1529301800e+01 - 2.3700000000e+00, -1.2394643200e+00, 1.5048016000e-01, 1.1510490252e+00, 3.0554582677e+01 - 2.3775000000e+00, -1.2293178000e+00, 1.0967874000e-01, 1.2391695651e+00, 2.4567612181e+01 - 2.3850000000e+00, -1.2191653600e+00, 9.4664220000e-02, 1.2004491947e+00, 2.2120109685e+01 - 2.3925000000e+00, -1.2149322000e+00, 1.2173828000e-01, 1.1764940625e+00, 3.1745025265e+01 diff --git a/src/output/phase_transition/size_20.txt b/src/output/phase_transition/size_20.txt deleted file mode 100644 index 864870c..0000000 --- a/src/output/phase_transition/size_20.txt +++ /dev/null @@ -1,40 +0,0 @@ - 2.1000000000e+00, -1.6598520000e+00, 8.6903650000e-01, 9.4464744635e-01, 7.4897127005e-01 - 2.1075000000e+00, -1.6458020000e+00, 8.5760800000e-01, 1.0514672010e+00, 1.0797339665e+00 - 2.1150000000e+00, -1.6315070000e+00, 8.4308550000e-01, 1.2006352420e+00, 2.0424713361e+00 - 2.1225000000e+00, -1.6313900000e+00, 8.4965600000e-01, 1.0433573006e+00, 1.2756931287e+00 - 2.1300000000e+00, -1.6255200000e+00, 8.4137750000e-01, 1.1779011748e+00, 2.4043784026e+00 - 2.1375000000e+00, -1.6244600000e+00, 8.4615500000e-01, 1.0913446429e+00, 1.2282331649e+00 - 2.1450000000e+00, -1.6168130000e+00, 8.4386200000e-01, 1.0459280731e+00, 1.0647263321e+00 - 2.1525000000e+00, -1.6071950000e+00, 8.3859900000e-01, 1.0750851067e+00, 1.1950127199e+00 - 2.1600000000e+00, -1.5886640000e+00, 8.1737200000e-01, 1.3026041756e+00, 2.6233164104e+00 - 2.1675000000e+00, -1.5838610000e+00, 8.0889850000e-01, 1.3124442841e+00, 3.6793936236e+00 - 2.1750000000e+00, -1.5744680000e+00, 8.0841800000e-01, 1.2149614037e+00, 2.3584592691e+00 - 2.1825000000e+00, -1.5585060000e+00, 7.9957750000e-01, 1.3228347822e+00, 2.2388277652e+00 - 2.1900000000e+00, -1.5636250000e+00, 8.0394850000e-01, 1.3253726465e+00, 2.6088533055e+00 - 2.1975000000e+00, -1.5514580000e+00, 7.9011500000e-01, 1.3316639825e+00, 3.5286037361e+00 - 2.2050000000e+00, -1.5186210000e+00, 7.3827400000e-01, 1.7608094042e+00, 7.4166686483e+00 - 2.2125000000e+00, -1.5417970000e+00, 7.9086450000e-01, 1.3004856211e+00, 2.3257672569e+00 - 2.2200000000e+00, -1.5330880000e+00, 7.8716800000e-01, 1.2604045334e+00, 2.0807990587e+00 - 2.2275000000e+00, -1.5178710000e+00, 7.7343450000e-01, 1.3209627022e+00, 2.6685533934e+00 - 2.2350000000e+00, -1.4962780000e+00, 7.4105800000e-01, 1.4867019376e+00, 5.0671866910e+00 - 2.2425000000e+00, -1.4739140000e+00, 7.0868750000e-01, 1.7547592416e+00, 6.6533038740e+00 - 2.2500000000e+00, -1.4627830000e+00, 7.0466550000e-01, 1.6726427584e+00, 6.3720827751e+00 - 2.2575000000e+00, -1.4686890000e+00, 7.2736300000e-01, 1.5403886907e+00, 4.6689534850e+00 - 2.2650000000e+00, -1.4564000000e+00, 7.0956300000e-01, 1.5733001964e+00, 5.6768660540e+00 - 2.2725000000e+00, -1.4381360000e+00, 6.8393150000e-01, 1.6393288388e+00, 6.4395671389e+00 - 2.2800000000e+00, -1.4154900000e+00, 6.4684500000e-01, 1.7695352339e+00, 8.5883975395e+00 - 2.2875000000e+00, -1.4123420000e+00, 6.5538000000e-01, 1.6178242197e+00, 7.1716154055e+00 - 2.2950000000e+00, -1.3993750000e+00, 6.4449800000e-01, 1.6991739644e+00, 7.5718776464e+00 - 2.3025000000e+00, -1.3805900000e+00, 6.0508100000e-01, 1.6894045461e+00, 9.4780661783e+00 - 2.3100000000e+00, -1.4013220000e+00, 6.4880900000e-01, 1.6342326655e+00, 7.9289413886e+00 - 2.3175000000e+00, -1.3333570000e+00, 5.3317650000e-01, 1.7196331036e+00, 1.0631406662e+01 - 2.3250000000e+00, -1.3479140000e+00, 5.8198900000e-01, 1.5853595915e+00, 8.2767318502e+00 - 2.3325000000e+00, -1.3527870000e+00, 6.0035200000e-01, 1.6053639832e+00, 8.3844434891e+00 - 2.3400000000e+00, -1.3102890000e+00, 5.1906650000e-01, 1.5040811220e+00, 9.2006104406e+00 - 2.3475000000e+00, -1.3101820000e+00, 5.2633900000e-01, 1.6223738349e+00, 9.7134410358e+00 - 2.3550000000e+00, -1.3071970000e+00, 5.4159300000e-01, 1.5280041609e+00, 8.4706118643e+00 - 2.3625000000e+00, -1.2982060000e+00, 5.3302700000e-01, 1.5375409424e+00, 8.5385908607e+00 - 2.3700000000e+00, -1.3007300000e+00, 5.5500250000e-01, 1.5508958393e+00, 7.9608485222e+00 - 2.3775000000e+00, -1.2935320000e+00, 5.3950050000e-01, 1.5186371515e+00, 8.1562823133e+00 - 2.3850000000e+00, -1.2627090000e+00, 4.9112400000e-01, 1.5239475456e+00, 8.8409470229e+00 - 2.3925000000e+00, -1.2596860000e+00, 4.9474400000e-01, 1.5000845880e+00, 8.5441303179e+00 diff --git a/src/output/phase_transition/size_40.txt b/src/output/phase_transition/size_40.txt deleted file mode 100644 index 25490bf..0000000 --- a/src/output/phase_transition/size_40.txt +++ /dev/null @@ -1,40 +0,0 @@ - 2.1000000000e+00, -1.6622477500e+00, 8.6962387500e-01, 9.5482838819e-01, 8.7060209427e-01 - 2.1075000000e+00, -1.6528100000e+00, 8.6497887500e-01, 9.6061965668e-01, 8.9528898504e-01 - 2.1150000000e+00, -1.6440230000e+00, 8.5769550000e-01, 9.6771227774e-01, 1.0033025284e+00 - 2.1225000000e+00, -1.6406022500e+00, 8.5612487500e-01, 1.0334473280e+00, 1.2160945583e+00 - 2.1300000000e+00, -1.6270730000e+00, 8.4193112500e-01, 1.2709793634e+00, 3.3307966948e+00 - 2.1375000000e+00, -1.6240462500e+00, 8.4505800000e-01, 1.1058693922e+00, 1.5359694117e+00 - 2.1450000000e+00, -1.6209500000e+00, 8.4736050000e-01, 1.0356135861e+00, 1.0002868828e+00 - 2.1525000000e+00, -1.6049040000e+00, 8.2888212500e-01, 1.0822900750e+00, 1.8817852817e+00 - 2.1600000000e+00, -1.5961087500e+00, 8.2564250000e-01, 1.2517609905e+00, 2.3736377361e+00 - 2.1675000000e+00, -1.5830047500e+00, 8.1563162500e-01, 1.2104208765e+00, 2.0052401060e+00 - 2.1750000000e+00, -1.5758420000e+00, 8.1094087500e-01, 1.1868832676e+00, 2.1355557962e+00 - 2.1825000000e+00, -1.5702980000e+00, 8.0920462500e-01, 1.2922826269e+00, 2.5744623394e+00 - 2.1900000000e+00, -1.5629395000e+00, 7.9839187500e-01, 1.3799780955e+00, 3.6256936276e+00 - 2.1975000000e+00, -1.5470925000e+00, 7.8091500000e-01, 1.4528140878e+00, 4.4826211331e+00 - 2.2050000000e+00, -1.5381340000e+00, 7.7698362500e-01, 1.5229812414e+00, 4.2970560639e+00 - 2.2125000000e+00, -1.5202347500e+00, 7.5881575000e-01, 1.5772094768e+00, 6.5815891901e+00 - 2.2200000000e+00, -1.5164275000e+00, 7.5749312500e-01, 1.4233888463e+00, 4.6801912948e+00 - 2.2275000000e+00, -1.5039520000e+00, 7.4367162500e-01, 1.6606996189e+00, 6.5202563061e+00 - 2.2350000000e+00, -1.4911152500e+00, 7.2318075000e-01, 1.6656857194e+00, 9.1894997884e+00 - 2.2425000000e+00, -1.4858975000e+00, 7.2555662500e-01, 1.6199707813e+00, 1.0568383509e+01 - 2.2500000000e+00, -1.4565592500e+00, 6.5360500000e-01, 2.1638579720e+00, 2.7007307271e+01 - 2.2575000000e+00, -1.4549862500e+00, 6.8092137500e-01, 1.9209408182e+00, 1.5243127557e+01 - 2.2650000000e+00, -1.4452682500e+00, 6.7375587500e-01, 1.9785147566e+00, 1.5479642912e+01 - 2.2725000000e+00, -1.4290732500e+00, 6.3807887500e-01, 1.7632081706e+00, 1.8749991461e+01 - 2.2800000000e+00, -1.3930357500e+00, 5.2863275000e-01, 2.4096240680e+00, 4.1182353072e+01 - 2.2875000000e+00, -1.4073907500e+00, 6.3121550000e-01, 1.7561623512e+00, 1.3384410752e+01 - 2.2950000000e+00, -1.3936680000e+00, 5.8342912500e-01, 2.3216858172e+00, 2.9345086934e+01 - 2.3025000000e+00, -1.3747870000e+00, 5.6014675000e-01, 2.1315397694e+00, 2.7445519888e+01 - 2.3100000000e+00, -1.3630377500e+00, 5.4062925000e-01, 1.9621357021e+00, 2.7470731373e+01 - 2.3175000000e+00, -1.3160432500e+00, 4.1791387500e-01, 1.8266053830e+00, 3.1014074081e+01 - 2.3250000000e+00, -1.3009480000e+00, 3.4608100000e-01, 1.5911262941e+00, 3.0830415829e+01 - 2.3325000000e+00, -1.3027607500e+00, 4.1481575000e-01, 1.7101600990e+00, 2.8963900400e+01 - 2.3400000000e+00, -1.2959500000e+00, 3.9819487500e-01, 1.7095547520e+00, 3.1322434268e+01 - 2.3475000000e+00, -1.2723565000e+00, 3.1645725000e-01, 1.5660810714e+00, 2.7110038243e+01 - 2.3550000000e+00, -1.2766535000e+00, 3.7403687500e-01, 1.5273020768e+00, 2.5986788567e+01 - 2.3625000000e+00, -1.2675355000e+00, 3.8625325000e-01, 1.4957771590e+00, 2.3569588564e+01 - 2.3700000000e+00, -1.2513625000e+00, 3.3003737500e-01, 1.2960910378e+00, 2.1014545998e+01 - 2.3775000000e+00, -1.2345217500e+00, 2.8915137500e-01, 1.3849745046e+00, 2.3145841635e+01 - 2.3850000000e+00, -1.2288950000e+00, 2.8929037500e-01, 1.3831921839e+00, 2.2626322449e+01 - 2.3925000000e+00, -1.2201917500e+00, 2.8640725000e-01, 1.3348775479e+00, 2.1361827350e+01 diff --git a/src/output/phase_transition/size_60.txt b/src/output/phase_transition/size_60.txt deleted file mode 100644 index a1f434a..0000000 --- a/src/output/phase_transition/size_60.txt +++ /dev/null @@ -1,40 +0,0 @@ - 2.1000000000e+00, -1.6613387778e+00, 8.6700266667e-01, 9.8953239203e-01, 1.0699734481e+00 - 2.1075000000e+00, -1.6537862222e+00, 8.6546483333e-01, 9.6591795799e-01, 8.4932459898e-01 - 2.1150000000e+00, -1.6443730000e+00, 8.5563977778e-01, 1.0961097697e+00, 1.8369787326e+00 - 2.1225000000e+00, -1.6396867778e+00, 8.5500361111e-01, 1.0545968670e+00, 1.2768479821e+00 - 2.1300000000e+00, -1.6336394444e+00, 8.5266350000e-01, 1.0673404500e+00, 1.3001974896e+00 - 2.1375000000e+00, -1.6241756667e+00, 8.4603188889e-01, 1.0924699581e+00, 1.3403208656e+00 - 2.1450000000e+00, -1.6209743333e+00, 8.4728655556e-01, 1.0986832489e+00, 1.1065559132e+00 - 2.1525000000e+00, -1.6073412222e+00, 8.3473350000e-01, 1.1320164633e+00, 1.8585539233e+00 - 2.1600000000e+00, -1.5993016667e+00, 8.2938355556e-01, 1.1164175504e+00, 1.6131587386e+00 - 2.1675000000e+00, -1.5872531111e+00, 8.1882055556e-01, 1.2783043835e+00, 2.3387864519e+00 - 2.1750000000e+00, -1.5812011111e+00, 8.1604355556e-01, 1.2409264118e+00, 2.0130288702e+00 - 2.1825000000e+00, -1.5701661111e+00, 8.0855566667e-01, 1.3409997868e+00, 2.7171006949e+00 - 2.1900000000e+00, -1.5646777778e+00, 8.0595138889e-01, 1.2298621334e+00, 2.1682645580e+00 - 2.1975000000e+00, -1.5524960000e+00, 7.9312072222e-01, 1.3894429793e+00, 4.7759422782e+00 - 2.2050000000e+00, -1.5410658889e+00, 7.8306861111e-01, 1.3612099152e+00, 4.1291742241e+00 - 2.2125000000e+00, -1.5281797778e+00, 7.6989494444e-01, 1.3431769195e+00, 4.1666956641e+00 - 2.2200000000e+00, -1.5201344444e+00, 7.6245111111e-01, 1.4850322025e+00, 4.9721909189e+00 - 2.2275000000e+00, -1.5050777778e+00, 7.4589372222e-01, 1.5306801453e+00, 5.3579309063e+00 - 2.2350000000e+00, -1.4969530000e+00, 7.3281466667e-01, 1.7103614758e+00, 9.1282788919e+00 - 2.2425000000e+00, -1.4805877778e+00, 7.1001361111e-01, 1.8310596600e+00, 1.2817252620e+01 - 2.2500000000e+00, -1.4740681111e+00, 7.1202200000e-01, 1.7856521326e+00, 1.0574857142e+01 - 2.2575000000e+00, -1.4521638889e+00, 6.7947227778e-01, 1.7906769186e+00, 1.1396062601e+01 - 2.2650000000e+00, -1.4445025556e+00, 6.7037166667e-01, 1.8929231410e+00, 1.2877020279e+01 - 2.2725000000e+00, -1.4125830000e+00, 5.6741011111e-01, 2.1392045197e+00, 5.3505581039e+01 - 2.2800000000e+00, -1.4082453333e+00, 5.9600305556e-01, 2.0045278268e+00, 3.8886069625e+01 - 2.2875000000e+00, -1.3718706667e+00, 4.4930322222e-01, 1.9884186957e+00, 5.8477129900e+01 - 2.2950000000e+00, -1.3608665556e+00, 4.2163466667e-01, 2.0523093574e+00, 5.8514230299e+01 - 2.3025000000e+00, -1.3445835556e+00, 4.5535366667e-01, 1.7174216185e+00, 3.8290280681e+01 - 2.3100000000e+00, -1.3329410000e+00, 3.9839755556e-01, 2.2015707855e+00, 5.1851243019e+01 - 2.3175000000e+00, -1.3285797778e+00, 3.7385922222e-01, 2.3168788814e+00, 7.1446656094e+01 - 2.3250000000e+00, -1.2973382222e+00, 2.3950777778e-01, 1.4871673288e+00, 3.8524940695e+01 - 2.3325000000e+00, -1.2977494444e+00, 3.5139644444e-01, 1.7231099606e+00, 4.9062631900e+01 - 2.3400000000e+00, -1.2941190000e+00, 3.5662944444e-01, 1.8595086968e+00, 5.4672241458e+01 - 2.3475000000e+00, -1.2780476667e+00, 3.0606766667e-01, 1.4965090214e+00, 4.2154607069e+01 - 2.3550000000e+00, -1.2642865556e+00, 2.1905666667e-01, 1.4932305230e+00, 3.6185369849e+01 - 2.3625000000e+00, -1.2384407778e+00, 1.7432338889e-01, 1.1418252238e+00, 2.1932584983e+01 - 2.3700000000e+00, -1.2403674444e+00, 2.0313983333e-01, 1.1963210529e+00, 2.4566414059e+01 - 2.3775000000e+00, -1.2349775556e+00, 2.3801527778e-01, 1.2657836056e+00, 3.0891783500e+01 - 2.3850000000e+00, -1.2167504444e+00, 1.5986083333e-01, 1.0575283462e+00, 1.7886016189e+01 - 2.3925000000e+00, -1.2095602222e+00, 1.6857472222e-01, 1.1797725063e+00, 2.1714548942e+01 diff --git a/src/output/phase_transition/size_80.txt b/src/output/phase_transition/size_80.txt deleted file mode 100644 index f71606b..0000000 --- a/src/output/phase_transition/size_80.txt +++ /dev/null @@ -1,40 +0,0 @@ - 2.1000000000e+00, -1.6606303750e+00, 8.6838653125e-01, 9.2642218029e-01, 8.3043621976e-01 - 2.1075000000e+00, -1.6535017500e+00, 8.6306259375e-01, 9.7997826334e-01, 1.0924931257e+00 - 2.1150000000e+00, -1.6472357500e+00, 8.6053359375e-01, 1.0260530379e+00, 1.0971778203e+00 - 2.1225000000e+00, -1.6392534375e+00, 8.5527271875e-01, 1.0383625271e+00, 1.2283240562e+00 - 2.1300000000e+00, -1.6293148750e+00, 8.4739800000e-01, 1.1393911843e+00, 1.6739477885e+00 - 2.1375000000e+00, -1.6241703125e+00, 8.4597940625e-01, 1.0644412127e+00, 1.3307805606e+00 - 2.1450000000e+00, -1.6153835000e+00, 8.3855371875e-01, 1.0730173684e+00, 1.7043744144e+00 - 2.1525000000e+00, -1.6066513750e+00, 8.3126046875e-01, 1.1812335974e+00, 2.2419152665e+00 - 2.1600000000e+00, -1.5999156250e+00, 8.2921900000e-01, 1.1845140898e+00, 2.1536533563e+00 - 2.1675000000e+00, -1.5914480000e+00, 8.2441396875e-01, 1.2989428542e+00, 2.4490961793e+00 - 2.1750000000e+00, -1.5811176875e+00, 8.1646168750e-01, 1.2893980622e+00, 2.2627734279e+00 - 2.1825000000e+00, -1.5672116875e+00, 7.9771962500e-01, 1.3785245817e+00, 4.8296748202e+00 - 2.1900000000e+00, -1.5609194375e+00, 8.0002296875e-01, 1.3333132987e+00, 3.2768044229e+00 - 2.1975000000e+00, -1.5502496250e+00, 7.8657206250e-01, 1.4570426781e+00, 4.6716107121e+00 - 2.2050000000e+00, -1.5419920625e+00, 7.8535234375e-01, 1.3313811728e+00, 3.2074588559e+00 - 2.2125000000e+00, -1.5271748750e+00, 7.6338796875e-01, 1.4272655709e+00, 6.0756025926e+00 - 2.2200000000e+00, -1.5169920625e+00, 7.5174237500e-01, 1.7539382044e+00, 9.8815370171e+00 - 2.2275000000e+00, -1.5069028125e+00, 7.4762450000e-01, 1.4969402819e+00, 5.8870957007e+00 - 2.2350000000e+00, -1.4936225625e+00, 7.2508162500e-01, 1.5775871581e+00, 9.2299438408e+00 - 2.2425000000e+00, -1.4776068750e+00, 6.9782115625e-01, 1.9048143677e+00, 1.5726468822e+01 - 2.2500000000e+00, -1.4601178750e+00, 6.7580275000e-01, 1.8298615457e+00, 1.8641819796e+01 - 2.2575000000e+00, -1.4527608125e+00, 6.7376740625e-01, 1.7529375127e+00, 1.3971923643e+01 - 2.2650000000e+00, -1.4226138750e+00, 5.6230887500e-01, 2.6189104782e+00, 7.0682415713e+01 - 2.2725000000e+00, -1.4243563750e+00, 6.2368125000e-01, 1.8378755469e+00, 2.2435434818e+01 - 2.2800000000e+00, -1.3966361250e+00, 5.2922218750e-01, 2.2151701116e+00, 7.9046483026e+01 - 2.2875000000e+00, -1.3806289375e+00, 4.7494931250e-01, 2.5280692097e+00, 1.0638113543e+02 - 2.2950000000e+00, -1.3648488750e+00, 4.3785006250e-01, 2.2913318870e+00, 9.7818464911e+01 - 2.3025000000e+00, -1.3464034375e+00, 3.9013850000e-01, 2.2167457738e+00, 9.8311563565e+01 - 2.3100000000e+00, -1.3306034375e+00, 3.2805518750e-01, 1.6248476930e+00, 8.1979780653e+01 - 2.3175000000e+00, -1.3180689375e+00, 2.9584621875e-01, 2.1627892711e+00, 8.4487271083e+01 - 2.3250000000e+00, -1.3045561250e+00, 2.7329250000e-01, 1.7669577597e+00, 8.0298367662e+01 - 2.3325000000e+00, -1.2854631875e+00, 1.9012815625e-01, 1.4365753827e+00, 5.6300061178e+01 - 2.3400000000e+00, -1.2826543750e+00, 2.5288318750e-01, 1.3635677328e+00, 5.3249058235e+01 - 2.3475000000e+00, -1.2708397500e+00, 2.0455650000e-01, 1.4769694899e+00, 5.7008853374e+01 - 2.3550000000e+00, -1.2606108125e+00, 1.8845587500e-01, 1.3704216014e+00, 4.7082233690e+01 - 2.3625000000e+00, -1.2501659375e+00, 1.6914740625e-01, 1.4548011130e+00, 4.6090071979e+01 - 2.3700000000e+00, -1.2418494375e+00, 1.6229450000e-01, 1.4913941085e+00, 5.2611770032e+01 - 2.3775000000e+00, -1.2284095000e+00, 1.5403759375e-01, 1.1653729675e+00, 2.7702194413e+01 - 2.3850000000e+00, -1.2202897500e+00, 1.4005340625e-01, 1.3145366415e+00, 2.8318188442e+01 - 2.3925000000e+00, -1.2107930000e+00, 1.4127065625e-01, 1.0963607086e+00, 2.3230480755e+01 diff --git a/src/pd_estimate.cpp b/src/pd_estimate.cpp new file mode 100644 index 0000000..0ed73c7 --- /dev/null +++ b/src/pd_estimate.cpp @@ -0,0 +1,79 @@ +/** @file pd_estimate.cpp + * + * @author Cory Alexander Balaton (coryab) + * @author Janita Ovidie Sandtrøen Willumsen (janitaws) + * + * @version 1.0 + * + * @brief execute the mcmc algorithm and write data to file after each + * Monte Carlo cycles. + * + * @bug No known bugs + * */ +#include "data_type.hpp" +#include "monte_carlo.hpp" +#include "utils.hpp" + +#include +#include +#include + +void usage(std::string filename) +{ + std::cout << "Usage: " << filename + << " " + " \n\n" + << "\t[ -h | --help ]\n"; + exit(-1); +} + +/** @brief The main function + * + * */ +int main(int argc, char **argv) +{ + // Command options + struct option long_options[] = {{"help", 0, 0, 0}, {NULL, 0, NULL, 0}}; + + int option_index = -1; + int c; + + while (true) { + c = getopt_long(argc, argv, "h", long_options, &option_index); + + if (c == -1) + break; + + switch (c) { + case 0: + switch (option_index) { + case 0: // Not a mistake. This just goes to the default. + default: + usage(argv[0]); + } + break; + case 'h': + default: + usage(argv[0]); + } + } + // Check that the number of arguments is at least 8. + if (argc < 6) { + usage(argv[0]); + } + + // Timing variables + double t0, t1; + t0 = omp_get_wtime(); + + // Define/initialize variables + double temp = atoi(argv[1]); + int L = atoi(argv[2]), cycles = atoi(argv[3]), burn_in_time = atoi(argv[4]); + std::string outfile = argv[5]; + + montecarlo::pd_estimate(temp, L, cycles, outfile, burn_in_time); + + t1 = omp_get_wtime(); + + std::cout << "Time: " << t1 - t0 << " seconds\n"; +} diff --git a/src/phase_transition.cpp b/src/phase_transition.cpp new file mode 100644 index 0000000..f829405 --- /dev/null +++ b/src/phase_transition.cpp @@ -0,0 +1,84 @@ +/** @file phase_transition.cpp + * + * @author Cory Alexander Balaton (coryab) + * @author Janita Ovidie Sandtrøen Willumsen (janitaws) + * + * @version 1.0 + * + * @brief Sweep over different temperatures and generate data. + * + * @details This program takes in 4 arguments: the start temperature, + * the end temperature, the amount of temperature points to simulate, and + * the amount of monte carlo samples to collect, in that order. + * + * @bug No known bugs + * */ +#include "data_type.hpp" +#include "monte_carlo.hpp" +#include "utils.hpp" + +#include +#include +#include + +void usage(std::string filename) +{ + std::cout << "Usage: " << filename + << " " + " \n\n" + << "\t[ -h | --help ]\n"; + exit(-1); +} + +/** @brief The main function + * + * */ +int main(int argc, char **argv) +{ + // Command options + struct option long_options[] = {{"help", 0, 0, 0}, {NULL, 0, NULL, 0}}; + + int option_index = -1; + int c; + + while (true) { + c = getopt_long(argc, argv, "h", long_options, &option_index); + + if (c == -1) + break; + + switch (c) { + case 0: + switch (option_index) { + case 0: // Not a mistake. This just goes to the default. + default: + usage(argv[0]); + } + break; + case 'h': + default: + usage(argv[0]); + } + } + // Check that the number of arguments is at least 8. + if (argc < 8) { + usage(argv[0]); + } + + // Timing variables + double t0, t1; + t0 = omp_get_wtime(); + + // Define/initialize variables + double start = atof(argv[1]), end = atof(argv[2]); + int points = atoi(argv[3]), cycles = atoi(argv[5]), L = atoi(argv[4]), + burn_in_time = atoi(argv[6]), N = L * L; + std::string outfile = argv[7]; + + montecarlo::phase_transition(L, start, end, points, cycles, + montecarlo::mcmc_parallel, outfile, burn_in_time); + + t1 = omp_get_wtime(); + + std::cout << "Time: " << t1 - t0 << " seconds\n"; +} diff --git a/src/phase_transition_mpi.cpp b/src/phase_transition_mpi.cpp index ce197f6..e5fa30e 100644 --- a/src/phase_transition_mpi.cpp +++ b/src/phase_transition_mpi.cpp @@ -7,38 +7,81 @@ * * @brief Sweep over different temperatures and generate data. * + * @details This program takes in 4 arguments: the start temperature, + * the end temperature, the amount of temperature points to simulate, and + * the amount of monte carlo samples to collect, in that order. + * * @bug No known bugs * */ #include "data_type.hpp" #include "monte_carlo.hpp" #include "utils.hpp" -#include -#include -#include -#include +#include #include -#include +#include -/** @brief The main function*/ +void usage(std::string filename) +{ + std::cout + << "Usage: " << filename + << " " + " \n" + << "This should be used with mpiexec or mpirun for maximum " + "performance\n\n" + << "\t[ -h | --help ]\n"; + exit(-1); +} + +/** @brief The main function + * + * */ int main(int argc, char **argv) { - if (argc < 5) { - std::cout << "You need at least 4 arguments" << std::endl; - abort(); + // Command options + struct option long_options[] = {{"help", 0, 0, 0}, {NULL, 0, NULL, 0}}; + + int option_index = -1; + int c; + + while (true) { + c = getopt_long(argc, argv, "h", long_options, &option_index); + + if (c == -1) + break; + + switch (c) { + case 0: + switch (option_index) { + case 0: // Not a mistake. This just goes to the default. + default: + usage(argv[0]); + } + break; + case 'h': + default: + usage(argv[0]); + } } + // Check that the number of arguments is at least 8. + if (argc < 8) { + usage(argv[0]); + } + + // Timing variables double t0, t1; t0 = MPI_Wtime(); - double start = atof(argv[1]), end = atof(argv[2]); - int points = atoi(argv[3]), N; - int lattice_sizes[] = {20, 40, 60, 80, 100}; - double dt = (end - start) / points; - int cycles = atoi(argv[4]); - std::ofstream ofile; + // Define/initialize variables + double start = atof(argv[1]), end = atof(argv[2]); + int points = atoi(argv[3]), cycles = atoi(argv[5]), L = atoi(argv[4]), + burn_in_time = atoi(argv[6]), N = L * L; + double dt = (end - start) / points; + std::ofstream ofile; + std::string outfile = argv[7]; data_t data[points]; - // MPI stuff + // MPI specific variables int rank, cluster_size; // Initialize MPI @@ -49,8 +92,9 @@ int main(int argc, char **argv) MPI_Comm_rank(MPI_COMM_WORLD, &rank); int remainder = points % cluster_size; - double i_start; - int i_points; + double i_start; // What temperature to start from + int i_points; // How many points to simulate + // Distribute temperature points if (rank < remainder) { i_points = points / cluster_size + 1; @@ -61,61 +105,65 @@ int main(int argc, char **argv) i_start = start + dt * (i_points * rank + remainder); } + // Initialize array to contains data for each temperature point data_t i_data[i_points]; - std::cout << "Rank " << rank << ": " << i_points << ',' << i_start << '\n'; - for (int L : lattice_sizes) { - N = L * L; - for (size_t i = 0; i < i_points; i++) { - i_data[i] = monte_carlo_parallel(L, i_start + dt * i, cycles); - } + // Simulate and save data to array + for (size_t i = 0; i < i_points; i++) { + i_data[i] = montecarlo::mcmc_parallel(L, i_start + dt * i, cycles, + burn_in_time); + } - if (rank == 0) { - std::copy_n(i_data, i_points, data); - for (size_t i = 1; i < cluster_size; i++) { - if (rank < remainder) { - MPI_Recv((void *)i_data, - sizeof(data_t) * (points / cluster_size + 1), - MPI_CHAR, i, MPI_ANY_TAG, MPI_COMM_WORLD, - MPI_STATUS_IGNORE); - std::copy_n(i_data, points / cluster_size + 1, - data + (points / cluster_size) * i); - } - else { - MPI_Recv((void *)i_data, - sizeof(data_t) * (points / cluster_size), MPI_CHAR, - i, MPI_ANY_TAG, MPI_COMM_WORLD, MPI_STATUS_IGNORE); - std::copy_n(i_data, points / cluster_size, - data + (points / cluster_size) * i + remainder); - } + // Rank 0 collects all the data and copies it to the "master" + // data array. + if (rank == 0) { + // Copy its own i_data to the data array + std::copy_n(i_data, i_points, data); + + // Collect i_data from other ranks in order and copy to data. + for (size_t i = 1; i < cluster_size; i++) { + if (rank < remainder) { + MPI_Recv((void *)i_data, + sizeof(data_t) * (points / cluster_size + 1), MPI_CHAR, + i, MPI_ANY_TAG, MPI_COMM_WORLD, MPI_STATUS_IGNORE); + std::copy_n(i_data, points / cluster_size + 1, + data + (points / cluster_size) * i); } - std::stringstream outfile; - outfile << "output/phase_transition/size_" << L << ".txt"; - utils::mkpath(utils::dirname(outfile.str())); - ofile.open(outfile.str()); - - double temp, CV, X; - - using utils::scientific_format; - for (size_t i = 0; i < points; i++) { - temp = start + dt * i; - CV = (data[i].E2 - data[i].E * data[i].E) - / ((double)N * temp * temp); - X = (data[i].M2 - data[i].M_abs * data[i].M_abs) - / ((double)N * temp); - - ofile << scientific_format(temp) << ',' - << scientific_format(data[i].E / N) << ',' - << scientific_format(data[i].M_abs / N) << ',' - << scientific_format(CV) << ',' << scientific_format(X) - << '\n'; + else { + MPI_Recv((void *)i_data, + sizeof(data_t) * (points / cluster_size), MPI_CHAR, i, + MPI_ANY_TAG, MPI_COMM_WORLD, MPI_STATUS_IGNORE); + std::copy_n(i_data, points / cluster_size, + data + (points / cluster_size) * i + remainder); } - ofile.close(); } - else { - MPI_Send(i_data, i_points * sizeof(data_t), MPI_CHAR, 0, rank, - MPI_COMM_WORLD); + + // Write everything from data to file + utils::mkpath(utils::dirname(outfile)); + ofile.open(outfile); + + double temp, CV, X; + + using utils::scientific_format; + for (size_t i = 0; i < points; i++) { + temp = start + dt * i; + CV = (data[i].E2 - data[i].E * data[i].E) + / ((double)N * temp * temp); + X = (data[i].M2 - data[i].M_abs * data[i].M_abs) + / ((double)N * temp); + + ofile << scientific_format(temp) << ',' + << scientific_format(data[i].E / N) << ',' + << scientific_format(data[i].M_abs / N) << ',' + << scientific_format(CV) << ',' << scientific_format(X) + << '\n'; } + ofile.close(); + } + // For all other ranks, send the data to rank 0 + else { + MPI_Send(i_data, i_points * sizeof(data_t), MPI_CHAR, 0, rank, + MPI_COMM_WORLD); } t1 = MPI_Wtime(); diff --git a/src/scripts/burn_in_time.py b/src/scripts/burn_in_time.py deleted file mode 100644 index 0a6c90f..0000000 --- a/src/scripts/burn_in_time.py +++ /dev/null @@ -1,70 +0,0 @@ -import matplotlib.pyplot as plt -import seaborn as sns - -sns.set_theme() -params = { - "font.family": "Serif", - "font.serif": "Roman", - "text.usetex": True, - "axes.titlesize": "large", - "axes.labelsize": "large", - "xtick.labelsize": "large", - "ytick.labelsize": "large", - "legend.fontsize": "medium" -} -plt.rcParams.update(params) - -def plot_from_file(): - files = [ - # "output/burn_in_time/unordered_1_0_1421110368.txt", - # "output/burn_in_time/ordered_1_0_611577739.txt", - "output/burn_in_time/unordered_2_4_1212892317.txt", - "output/burn_in_time/ordered_2_4_2408603856.txt", - ] - labels = [ - "Unordered", - "Ordered", - # "2.4, unordered", - # "2.4, ordered" - ] - colors = [ - "darkred", - "seagreen", - # "steelblue", - # "darkred", - # "darkgoldenrod", - ] - - fig1, ax1 = plt.subplots() - fig2, ax2 = plt.subplots() - - for infile, label, color in zip(files, labels, colors): - with open(infile) as f: - lines = f.readlines() - - t = [] - energy = [] - magnetization = [] - for line in lines: - items = line.strip().split(",") - t.append(int(items[0])) - energy.append(float(items[1])) - magnetization.append(float(items[5])) - - ax1.plot(t, energy, label=f"{label}", color=color) - ax2.plot(t, magnetization, label=f"{label}", color=color) - - ax1.set_xlabel("t") - ax1.set_ylabel(r"$\langle \epsilon \rangle$") - ax1.legend(title="Initial state", loc="upper right") - fig1.savefig("../latex/images/burn_in_time_energy_2_4.pdf", bbox_inches="tight") - ax2.set_ylabel(r"$\langle |m| \rangle$") - ax2.set_xlabel("t") - ax2.legend(title="Initial state", loc="upper right") - fig2.savefig("../latex/images/burn_in_time_magnetization_2_4.pdf", bbox_inches="tight") - -def main(): - plot_from_file() - -if __name__ == "__main__": - main() diff --git a/src/scripts/phase_transition.py b/src/scripts/phase_transition.py deleted file mode 100644 index 3ac6327..0000000 --- a/src/scripts/phase_transition.py +++ /dev/null @@ -1,149 +0,0 @@ -from pathlib import Path - -import matplotlib.pyplot as plt -import numpy as np -from scipy.stats import linregress -import seaborn as sns - -sns.set_theme() -params = { - "font.family": "Serif", - "font.serif": "Roman", - "text.usetex": True, - "axes.titlesize": "large", - "axes.labelsize": "large", - "xtick.labelsize": "large", - "ytick.labelsize": "large", - "legend.fontsize": "medium" -} -plt.rcParams.update(params) - - -def plot_phase_transition(indir, outdir): - files = [ - "size_20.txt", - "size_40.txt", - "size_60.txt", - "size_80.txt", - "size_100.txt", - ] - labels = [ - "20", - "40", - "60", - "80", - "100", - ] - colors = [ - "indianred", - "sandybrown", - "mediumseagreen", - "steelblue", - "mediumpurple" - ] - - figure1, ax1 = plt.subplots() - figure2, ax2 = plt.subplots() - figure3, ax3 = plt.subplots() - figure4, ax4 = plt.subplots() - figure5, ax5 = plt.subplots() - - # For linear regression - L = [] - Tc = [] - size = 20 - - for file, label, color in zip(files, labels, colors): - t = [] - e = [] - m = [] - CV = [] - X = [] - - # Append the lattice size - L.append(size) - size += 20 - - with open(Path(indir, file)) as f: - lines = f.readlines() - for line in lines: - l = line.strip().split(",") - t.append(float(l[0])) - e.append(float(l[1])) - m.append(float(l[2])) - CV.append(float(l[3])) - X.append(float(l[4])) - - # Append the critical temp for the current lattice size - Tc.append(t[X.index(max(X))]) - - ax1.plot(t, e, label=label, color=color) - ax2.plot(t, m, label=label, color=color) - ax3.plot(t, CV, label=label, color=color) - ax4.plot(t, X, label=label, color=color) - - # Attempt linear regression - x = np.linspace(0, 1/20, 1001) - inv_L = [1/x for x in L] - regression = linregress(inv_L, Tc) - f = lambda x: regression[0] * x + regression[1] - - stats = (f"$\\beta_0 = $ {regression[1]:.4f}\n" - f"$\\beta_1 = $ {regression[0]:.4f}") - bbox = dict(boxstyle="round", pad=0.3, fc="white", alpha=0.5) - ax5.text(0.64, 0.64, stats, bbox=bbox, transform=ax1.transAxes, ha="right", va="center") - ax5.scatter(inv_L, Tc, color="steelblue") - # txt = f"$\\beta_1$ {regression[0]:.4f} \n$\\beta_0$ {regression[1]:.4f}" - ax5.plot(x, f(x), color="mediumseagreen", linestyle="dashed") - - ax1.legend(title="Lattice size", loc="upper right") - ax1.set_xlabel(r"$T$ $[J / k_{B}]$") - ax1.set_ylabel(r"$\langle \epsilon \rangle$") - ax2.legend(title="Lattice size", loc="upper right") - ax2.set_xlabel(r"$T$ $[J / k_{B}]$") - ax2.set_ylabel(r"$\langle |m| \rangle$") - ax3.legend(title="Lattice size", loc="upper right") - ax3.set_xlabel(r"$T$ $[J / k_{B}]$") - ax2.set_ylabel(r"$C_{V}$ $[k_{B}]$") - ax4.legend(title="Lattice size", loc="upper right") - ax4.set_xlabel(r"$T$ $[J / k_{B}]$") - ax4.set_ylabel(r"$\chi$ $[1 / J]$") - ax5.set_xlabel(r"$1 / L$") - ax5.set_ylabel(r"$T_C(L)$") - - figure1.savefig(Path(outdir, "energy.pdf"), bbox_inches="tight") - figure2.savefig(Path(outdir, "magnetization.pdf"), bbox_inches="tight") - figure3.savefig(Path(outdir, "heat_capacity.pdf"), bbox_inches="tight") - figure4.savefig(Path(outdir, "susceptibility.pdf"), bbox_inches="tight") - figure5.savefig(Path(outdir, "linreg.pdf"), bbox_inches="tight") - - plt.close(figure1) - plt.close(figure2) - plt.close(figure3) - plt.close(figure4) - plt.close(figure5) - - -if __name__ == "__main__": - plot_phase_transition( - "fox_output/phase_transition/wide/10M/", - "../latex/images/phase_transition/fox/wide/10M/", - ) - plot_phase_transition( - "fox_output/phase_transition/wide/1M/", - "../latex/images/phase_transition/fox/wide/1M/", - ) - plot_phase_transition( - "fox_output/phase_transition/narrow/10M/", - "../latex/images/phase_transition/fox/narrow/10M/", - ) - plot_phase_transition( - "output/phase_transition/", "../latex/images/phase_transition/hp/" - ) - plot_phase_transition( - "output/phase_transition/", "../latex/images/phase_transition/hp/" - ) - plot_phase_transition( - "output/phase_transition/", - "../latex/images/phase_transition/hp/", - ) diff --git a/src/test_suite.cpp b/src/test_suite.cpp index 6305451..a9cd8c5 100644 --- a/src/test_suite.cpp +++ b/src/test_suite.cpp @@ -12,8 +12,6 @@ #include "IsingModel.hpp" #include "testlib.hpp" -#include - #define EPS_2 (-2 * std::sinh(8.)) / (std::cosh(8.) + 3) #define MAG_2 (std::exp(8.) + 1) / (2 * (cosh(8.) + 3)) @@ -29,7 +27,7 @@ * */ class IsingModelTest { public: - /** @brief Test That initializing works as intended. + /** @brief Test that initializing works as intended. * */ void test_init_functions() { @@ -84,15 +82,9 @@ public: int arr[]{0, 0, 0, 0}; // Loop through cycles - //std::ofstream ofile; - //ofile.open("output/test_2x2.txt"); while (cycles++ < max_cycles) { data += test.Metropolis(); tmp = data / cycles; - //ofile << cycles << ',' << tmp.E / n_spins << ',' - //<< tmp.M_abs / n_spins << ',' - //<< (tmp.E2 - tmp.E * tmp.E) / (T * T) / n_spins << ',' - //<< (tmp.M2 - tmp.M_abs * tmp.M_abs) / T / n_spins << '\n'; if (testlib::close_to(EPS_2, tmp.E / n_spins, tol) && testlib::close_to(MAG_2, tmp.M_abs / n_spins, tol) && testlib::close_to(CV_2, (tmp.E2 - tmp.E * tmp.E) / (T * T) @@ -102,44 +94,6 @@ public: return cycles; } } - //std::cout << EPS_2 << ',' << MAG_2 << ',' << CV_2 << ',' << X_2 - //<< std::endl; - //ofile.close(); - // cycles = 0; - // data = 0; - // IsingModel test_mag(L, T); - // while (cycles++ < max_cycles) { - // data += test.Metropolis(); - // tmp = data / (cycles * n_spins); - // if (testlib::close_to(MAG_2, tmp.M, tol)) { - // arr[1] = cycles; - // break; - //} - //} - // cycles = 0; - // data = 0; - // IsingModel test_CV(L, T); - // while (cycles++ < max_cycles) { - // data += test.Metropolis(); - // tmp = data / (cycles * n_spins); - // if (testlib::close_to(CV_2, (tmp.E2 - tmp.E * tmp.E) / (T * T), - // tol)) { - // arr[2] = cycles; - // break; - //} - //} - // cycles = 0; - // data = 0; - // IsingModel test_X(L, T); - // while (cycles++ < max_cycles) { - // data += test.Metropolis(); - // tmp = data / (cycles * n_spins); - // if (testlib::close_to(X_2, (tmp.M2 - tmp.M_abs * tmp.M_abs) / T, - // tol)) { - // arr[3] = cycles; - // break; - //} - //} return 0; } }; @@ -150,18 +104,23 @@ int main() IsingModelTest test; test.test_init_functions(); + int res = 0; int tmp; - for (size_t i=0; i < 1000; i++) { + int iterations = 10000; + int accepted_values = 0; + + // Run through the test multiple times to get a better estimate. + for (size_t i=0; i < iterations; i++) { tmp = test.test_2x2_lattice(1e-2, 1e5); if (tmp == 0) { - std::cout << "not enough cycles\n"; - break; + continue; } + accepted_values++; res += tmp; } - std::cout << "Res: " << res / 1000 << std::endl; + std::cout << "Res: " << res / accepted_values << std::endl; return 0; } diff --git a/src/time.cpp b/src/time.cpp new file mode 100644 index 0000000..afbb8bd --- /dev/null +++ b/src/time.cpp @@ -0,0 +1,115 @@ +/** @file time.cpp + * + * @author Cory Alexander Balaton (coryab) + * @author Janita Ovidie Sandtrøen Willumsen (janitaws) + * + * @version 0.1 + * + * @brief Timing various things + * + * @bug No known bugs + * */ +#include "data_type.hpp" +#include "monte_carlo.hpp" +#include "utils.hpp" + +#include +#include +#include + +void time_lattice_sizes() +{ + std::string outfile = "output/timing/lattice_sizes.txt"; + std::ofstream ofile; + + int lattice_sizes[] = {20, 40, 60, 80, 100}; + + utils::mkpath(utils::dirname(outfile)); + ofile.open(outfile); + double t0, t1; + for (int L : lattice_sizes) { + t0 = omp_get_wtime(); + montecarlo::phase_transition(L, 2.1, 2.4, 40, 100000, + montecarlo::mcmc_parallel, "/dev/null"); + t1 = omp_get_wtime(); + ofile << utils::scientific_format(L) << ',' + << utils::scientific_format(t1 - t0) << '\n'; + } + ofile.close(); +} + +void time_sample_sizes() +{ + std::string outfile = "output/timing/sample_sizes.txt"; + std::ofstream ofile; + + int sample_sizes[] = {1000, 10000, 100000}; + + utils::mkpath(utils::dirname(outfile)); + ofile.open(outfile); + double t0, t1; + for (int samples : sample_sizes) { + t0 = omp_get_wtime(); + montecarlo::phase_transition(20, 2.1, 2.4, 40, samples, + montecarlo::mcmc_parallel, "/dev/null"); + t1 = omp_get_wtime(); + ofile << utils::scientific_format(samples) << ',' + << utils::scientific_format(t1 - t0) << '\n'; + } + ofile.close(); +} + +void usage(std::string filename) +{ + std::cout << "Usage: " << filename << " OPTION ...\n" + << "At least one option should be used.\n\n" + << "\t[ -h | --help ]\n" + << "\t[ --all ]\n" + << "\t[ --time-lattice-sizes ]\n" + << "\t[ --time-sample-sizes ]\n"; + exit(-1); +} + +int main(int argc, char **argv) +{ + struct option long_options[] = {{"all", 0, 0, 0}, + {"time-lattice-sizes", 0, 0, 0}, + {"time-sample-sizes", 0, 0, 0}, + {"help", 0, 0, 0}, + {NULL, 0, NULL, 0}}; + + int option_index = -1; + int c; + + while (true) { + c = getopt_long(argc, argv, "h", long_options, &option_index); + + if (c == -1) + break; + + switch (c) { + case 0: + switch (option_index) { + case 0: + time_lattice_sizes(); + time_sample_sizes(); + break; + case 1: + time_lattice_sizes(); + break; + case 2: + time_sample_sizes(); + break; + case 3: // Not a mistake. This just goes to the default. + default: + usage(argv[0]); + } + break; + case 'h': + default: + usage(argv[0]); + } + } + + return 0; +} diff --git a/src/utils.cpp b/src/utils.cpp index b51fa72..554ee31 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -60,4 +60,14 @@ std::string dirname(const std::string &path) return path.substr(0, path.find_last_of("/")); } +std::string concatpath(const std::string &left, const std::string &right) +{ + if (left.back() != '/' and right.front() != '/') { + return left + '/' + right; + } + else { + return left + right; + } +} + } // namespace utils