-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
38 lines (33 loc) · 829 Bytes
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#include <iostream>
#include <iomanip>
#include <math.h>
#include <fstream>
#include <ctime>
#include "utility.h"
#include "lattice.h"
#include "ising.h"
#include <stdio.h>
#define BOX_SIZE 100
#define N_CYCLES 3000
using namespace std;
int main()
{
srand(time(0));
cout << "generating lattice \n";
float deltaT =0.1;
cout << N_CYCLES/20 << endl;
for (size_t i=1; i<45; i++)
{
Lattice lattice (BOX_SIZE, 0., 1, i * deltaT);
// if (i==19)
lattice.setStorageOption(true);
// else
// lattice.setStorageOption(false);
printf("temp: %f\n", i * deltaT);
lattice.simulate(N_CYCLES);
printf("Done\n");
}
// Lattice lattice (BOX_SIZE, 0., 1, 0.1);
// lattice.setStorageOption(true);
// lattice.simulate(N_CYCLES);
}