Reference
This package doesn't export any symbols. It is recommended to import as:
import IsingModels as IsingIsingModels.βc — ConstantβcCritical temperature of the 2-dimensional infinite lattice Ising model determined by Onsager.
IsingModels.binary — Methodbinary(s)Converts to Boolean representation.
IsingModels.dynamic_hybrid! — Methoddynamic_hybrid!(σ, β; steps, save_interval)Same as hybrid!, but adjusts numbers of Metropolis and Wolff steps dynamically.
IsingModels.energy — Functionenergy(σ, h = 0; f)Computes the energy of σ in the Ising model.
IsingModels.flip — Methodflip(σ)Flips a spin.
IsingModels.hybrid! — Methodhybrid!(σ, β; steps = 1, save_interval = length(σ), local_steps = length(σ))Hybrid sampler, performing local_steps of Metropolis sampling, then one Wolff cluster move, then another local_steps of Metropolis sampling, one more Wolff cluster move, and so on.
IsingModels.kramers_wannier — Methodkramers_wannier(β)Returns the Kramers-Wannier dual inverse-temperature of β.
IsingModels.magnetization — Methodmagnetization(σ)Computes the magnetization of a set of spins.
IsingModels.metropolis! — Functionmetropolis!(σ, β, h = 0; steps = 1, save_interval = length(σ))Performs one or more Metropolis MC steps from the configuration σ, at inverse temperature β. Returns three lists: σ_t, M, E, where σ_t contains configurations sampled at intervals save_interval (by default equals the number of sites), M is the record of magnetizations, and E the record of energies.
IsingModels.mf_energy — Functionmf_energy(σ, h = 0; f = nothing)IsingModels.mf_random_configurations — Functionmf_random_configurations(N, β, h = 0; f, B = 1)Generates B random configurations of the Curie-Weiss model.
IsingModels.mf_random_magnetizations — Functionmf_random_magnetizations(N, β, h = 0; f = nothing, B = 1)Generates a random magnetization of the Curie-Weiss model, that is, a value of
\[M = \sum_{i=1}^N s_i\]
that follows the statistics of the mean-field (MF) Curie-Weiss model, with energy function:
\[E = -\sum_{i < j} s_i s_j - h * \sum_i s_i + f(M)\]
By default f(M) = 0.
B controls the number of samples generated.
IsingModels.mf_random_magnetized_configuration! — Methodmf_random_magnetized_configuration!(σ, M)Random configuration with magnetization equal to M.
IsingModels.mf_random_magnetized_configuration — Methodmf_random_magnetized_configuration(N, M)Random Curie-Weiss configuration with N spind, with magnetization equal to M.
IsingModels.onsager_heat_capacity — Methodonsager_heat_capacity(β)Specific heat capacity of the two-dimensional Ising model, derived by Onsager in the thermodynamic limit.
IsingModels.onsager_internal_energy — Methodonsager_internal_energy(β)Internal energy per site of the two-dimensional Ising model, derived by Onsager in the thermodynamic limit.
IsingModels.onsager_magnetization — Methodonsager_magnetization(β)Analytical magnetization of the two-dimensional Ising model found by Onsager in the thermodynamic limit.
IsingModels.random_magnetized_configuration! — Methodrandom_magnetized_configuration!(σ, M)Generate a random spin configuration with magnetization equal to M. You must make sure that the given value M is feasible.
IsingModels.spin — Methodspin(σ)Returns +1 or -1 spin value, from a boolean σ representation.
IsingModels.sum_neighbors — Methodsum_neighbors(σ, i)Sum of spins in neighbor sites of i.
IsingModels.wolff! — Methodwolff!(σ, β; steps = 1, save_interval = 1)Perfoms one or more Wolff MC steps from the configuration σ, at inverse temperature β.