Suggested Exercises

  1. Modify the code so that when samples are taken in accumulating statistics for $ \left<s_1\right>$ and $ \left<\epsilon\right>$, the current sample values are output to the terminal. You'll want to find the right place to add the following line: fprintf(stdout,"%i %.5lf %.5lf $ \backslash$n",c,s,e);
  2. The current version of the code initializes the Ising lattice with random spins. What temperature does this correspond to? Modify the code so that the initial lattice has two well-defined domains, all spin-up for $ i < L/2$ and all spin-down for $ i > L/2$. Re-run at the various temperatures. Do you see any differences?
  3. (Advanced) Modify the code ising.c to compute the quantity $ \left<s_is_j\right> - \left<s_i\right>\left<s_j\right>$ as a function of various distances between spins $ i$ and $ j$.



cfa22@drexel.edu