Description Usage Arguments Value Author(s) Examples
View source: R/isingLibWrapper.R
Given a vector of flip sites, 1s or -1s, representing up and down spins respectively, and an other flip sites, perform Metropolis Monte Carlo applying periodic boundary conditions, i.e., cyclic. This function calls the C function 'isPerform1D'.
1 | isPerform1D(ikBT, x, J, H, nstep, ensembleM, probSel)
|
ikBT |
1/kB*T (Boltzmann factor) |
x |
1D Spin sites on the lattice. |
J |
Interaction strength |
H |
External field |
nstep |
Number of MC steps requested |
ensembleM |
Value of the theoretical magnetization (could be thermodynamic limit value) |
probSel |
Which transition probability to use. 1 for Metropolis 2 for Glauber |
Returns a pair list containing values for omegaM, Fluctuating metric vector for Magnetisation (length of naccept), naccept, number of MC steps accepted and nreject, number of MC steps rejected and times as accepted time steps. Times corresponds to times where flips occur, this is so-called transition times ('metropolis time' or 'single flip time') to judge the timings between two accepted steps.
Mehmet Suzen <mehmet.suzen@physics.org>
1 2 3 4 | n <- 10 # 10 spin sites
mySites <- genConfig1D(n) # Generate sites
output <- isPerform1D(1.0, mySites, 1.0, 0.0, 10, 0.5, 1) # Metropolis
output <- isPerform1D(1.0, mySites, 1.0, 0.0, 10, 0.5, 2) # Glauber
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.