Fix burn-in time bug

This commit is contained in:
Cory Balaton 2023-12-04 13:28:14 +01:00
parent 370d72176f
commit 54e4d9243d
No known key found for this signature in database
GPG Key ID: 3E5FCEBFD80F432B
2 changed files with 5 additions and 5 deletions

View File

@ -124,7 +124,7 @@ 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();
}
@ -148,7 +148,7 @@ data_t mcmc_parallel(int L, double T, int cycles, int burn_in_time)
// 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();
}

View File

@ -24,8 +24,8 @@
void usage(std::string filename)
{
std::cout << "Usage: " << filename
<< " <start temperature> <end temperature> <lattice size> "
"<points> <cycles> <burn-in-time> <output file>\n\n"
<< " <start temperature> <end temperature> <points> "
"<lattice size> <cycles> <burn-in-time> <output file>\n\n"
<< "\t[ -h | --help ]\n";
exit(-1);
}
@ -76,7 +76,7 @@ int main(int argc, char **argv)
std::string outfile = argv[7];
montecarlo::phase_transition(L, start, end, points, cycles,
montecarlo::mcmc_parallel, outfile);
montecarlo::mcmc_parallel, outfile, burn_in_time);
t1 = omp_get_wtime();