From: hackbard Date: Mon, 12 May 2003 17:19:27 +0000 (+0000) Subject: added display rate & max_T -> 3.0 * S X-Git-Url: https://hackdaworld.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=df1676a27d7ddbdaa0755f38586af37860052c16;p=physik%2Fising.git added display rate & max_T -> 3.0 * S --- diff --git a/ising.c b/ising.c index b92cf99..b6c3a87 100644 --- a/ising.c +++ b/ising.c @@ -36,6 +36,7 @@ int usage(void) puts("-y \t # y lattice sites"); puts("-s \t spin interaction strength"); puts("-r \t run in interactive mode (still in work)"); + puts("-d \t refresh display rate"); return 1; } @@ -61,6 +62,7 @@ int main(int argc, char **argv) double delta_e; int runfree=0; double max_T; + int dr=1; /* random stuff*/ srand(time(0)); @@ -98,6 +100,9 @@ int main(int argc, char **argv) case 'r': runfree=1; break; + case 'd': + dr=atoi(argv[++i]); + break; default: usage(); return -1; @@ -123,7 +128,7 @@ int main(int argc, char **argv) /* begin at T=0 M=1 situation */ memset(atom,0,max_x*max_y*sizeof(unsigned char)); - max_T=1.3*s; + max_T=3.0*s; for(T=.05;T