24 std::cout <<
"Usage: " << filename
25 <<
" <temperature> <lattice size> "
26 "<cycles> <burn-in-time> <output file>\n\n"
27 <<
"\t[ -h | --help ]\n";
32int main(
int argc,
char **argv)
35 struct option long_options[] = {
36 {
"help", 0, 0, 0}, {NULL, 0, NULL, 0}};
38 int option_index = -1;
42 c = getopt_long(argc, argv,
"h", long_options, &option_index);
49 switch (option_index) {
76 double temp = atoi(argv[1]);
77 int L = atoi(argv[2]), cycles = atoi(argv[3]), burn_in_time = atoi(argv[4]);
78 std::string outfile = argv[5];
82 montecarlo::progression(temp, L, cycles, 1, outfile, burn_in_time);
85 montecarlo::progression(temp, L, cycles, outfile, burn_in_time);
90 std::cout <<
"Time: " << t1 - t0 <<
" seconds\n";
Header for the data_t type.
void usage(std::string filename)
A function that displays how to use the program and quits.
Functions for Monte Carlo simulations.
int main()
The main function.
Function prototypes and macros that are useful.
#define DEBUG(msg)
Writes a debug message.