projects
/
physik
/
ising.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
62002d5
)
e^0 = 1 ...
author
hackbard
<hackbard>
Mon, 26 May 2003 21:24:10 +0000
(21:24 +0000)
committer
hackbard
<hackbard>
Mon, 26 May 2003 21:24:10 +0000
(21:24 +0000)
ising.c
patch
|
blob
|
history
diff --git
a/ising.c
b/ising.c
index
e1444d8
..
0b34233
100644
(file)
--- a/
ising.c
+++ b/
ising.c
@@
-153,7
+153,7
@@
int main(int argc, char **argv)
if((*(atom+((max_x+x_c-1)%max_x)+y_c*max_x))&1) ++count_p;
if(((*(atom+x_c+y_c*max_x))&1)==0) count_p=4-count_p;
delta_e=(2*count_p-4)*s;
- if(delta_e<0) *(atom+x_c+y_c*max_x)=(*(atom+x_c+y_c*max_x)+1)&1;
+ if(delta_e<
=
0) *(atom+x_c+y_c*max_x)=(*(atom+x_c+y_c*max_x)+1)&1;
else
{
if(1.0*rand()/RAND_MAX<exp(-1.0*delta_e*beta))