MonteCarlo.jl
MonteCarlo.jl copied to clipboard
IsingModel: generalize to arbitrary lattices
trafficstars
Although <:AbstractLattice is allowed as a type parameter it doesn't currently work for arbitrary lattices.
Among others, rand is assuming a cubic lattice.
julia> m = IsingModel(L=3, dims=2, l=l, neighs=zeros(Int, 0,0))
2D-Ising model, L=3 (36 sites)
julia> mc = MC(m, T=0.1234)
Monte Carlo simulation
Model: 2D-Ising model, L=3 (36 sites)
Beta: 8.1 (T ≈ 0.123)