12#ifndef __MONTE_CARLO__
13#define __MONTE_CARLO__
24#define BURN_IN_TIME 5000
26#pragma omp declare reduction(+: data_t: omp_out += omp_in)
45 const std::string filename);
56 const std::string filename);
65void pd_estimate(
double T,
int L,
int cycles,
const std::string filename);
99 int L,
double start_T,
double end_T,
int points_T,
100 std::function<
data_t(
int,
double,
int)> monte_carlo,
101 std::string outfile);
The definition of the Ising model.
Header for the data_t type.
void phase_transition(int L, double start_T, double end_T, int points_T, std::function< data_t(int, double, int)> monte_carlo, std::string outfile)
Perform the MCMC algorithm using a range of temperatures.
data_t monte_carlo_serial(int L, double T, int cycles)
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)
Estimate the probability distribution for the energy.
int test_2x2_lattice(double tol, int max_cycles)
Test numerical data with analytical data.
void monte_carlo_progression(double T, int L, int cycles, const std::string filename)
Write the expected values for each Monte Carlo cycles to file.
data_t monte_carlo_parallel(int L, double T, int cycles)
Execute the Metropolis algorithm for a certain amount of Monte Carlo cycles in parallel.
Function prototypes and macros that are useful.