isPerform1D: Perform metropolis MC on 1D Ising model

Description Usage Arguments Value Author(s) Examples

View source: R/isingLibWrapper.R

Description

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'.

Usage

1
  isPerform1D(ikBT, x, J, H, nstep, ensembleM, probSel)

Arguments

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

Value

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.

Author(s)

Mehmet Suzen <mehmet.suzen@physics.org>

Examples

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

Example output



isingLenzMC documentation built on May 2, 2019, 2:31 p.m.