2
3
4
5
6
7
8
9
10
11
12#ifndef __MONTE_CARLO__
13#define __MONTE_CARLO__
24#define BURN_IN_TIME 5000
28
29
30
31
32
33
34
35void progression(
double T,
int L,
int cycles,
const std::string filename,
39
40
41
42
43
44
45
46
47void progression(
double T,
int L,
int cycles,
int value,
48 const std::string filename,
int burn_in_time =
BURN_IN_TIME);
51
52
53
54
55
56
57
58void pd_estimate(
double T,
int L,
int cycles,
const std::string filename,
62
63
64
65
66
67
68
69
70
75
76
77
78
79
80
81
82
83
88
89
90
91
92
93
94
95
96
99 std::function<
data_t(
int,
double,
int,
int)> monte_carlo,
Type to use with the IsingModel class and montecarlo module.
void test_parallel_speedup()
Test how much Openmp speeds up.
int main(int argc, char **argv)
The main function.
void create_pd_estimate_data()
Create the data used to estimate the probability distribution for tempratures 1.0 anbd 2....
void create_burn_in_time_data()
Create the data for the burn-in time for temperatures 1.0 and 2.4 for both unordered and ordered init...
void test_burn_in_time()
Create data using the same parameters except one uses burn-in time, while the other doesn't.
void create_phase_transition_data()
Create data for studying phase transition.
void usage(std::string filename)
A function that displays how to use the program and quits.
void progression(double T, int L, int cycles, int value, const std::string filename, int burn_in_time=BURN_IN_TIME)
Write the expected values for each Monte Carlo cycles to file.
void phase_transition(int L, double start_T, double end_T, int points_T, int cycles, std::function< data_t(int, double, int, int)> monte_carlo, std::string outfile, int burn_in_time=BURN_IN_TIME)
Perform the MCMC algorithm using a range of temperatures.
void progression(double T, int L, int cycles, const std::string filename, int burn_in_time=BURN_IN_TIME)
Write the expected values for each Monte Carlo cycles to file.
data_t mcmc_parallel(int L, double T, int cycles, int burn_in_time=BURN_IN_TIME)
Execute the Metropolis algorithm for a certain amount of Monte Carlo cycles in parallel.
data_t mcmc_serial(int L, double T, int cycles, int burn_in_time=BURN_IN_TIME)
Execute the Metropolis algorithm for a certain amount of Monte Carlo cycles.
void pd_estimate(double T, int L, int cycles, const std::string filename, int burn_in_time=BURN_IN_TIME)
Estimate the probability distribution for the energy.