Performs simulations based on the given parameters of the Ising model
kinetic_ising(
x,
B,
J,
updates = 1,
iter,
rule = "glauber",
inertia = 0,
version = 1,
progress = FALSE
)
SpatRaster or matrix containing two values: -1 and 1
External pressure (positive or negative): it tries to align cells' values with its sign
Strength of the local autocorrelation tendency (always positive): it tries to align signs of neighboring cells
Specifies how many sets of iterations are performed on the input object.
The output of this function has as many layers as the updates
value.
Specifies how many iterations are performed on the input object. By default it equals to the number of values in the input object.
IM temporal evolution rule: either "glauber"
(default) or "metropolis"
Represents the modification of the algorithm aimed at suppressing the salt-and-pepper noise of the focus category present when simulating evolution of a coarse-textured pattern. With Q > 0, small patches of the focus category are not generated, thus eliminating the salt-and-pepper noise of the focus category
By default, 1
, the x
object is converted into a matrix
(fast, but can be memory consuming); version = 2
has a lower RAM impact, but
is much slower
TRUE/FALSE
Object of the same class as x
with the number of layers specified by updates
Ising, E., 1924. Beitrag zur theorie des ferro-und paramagnetismus. Ph.D. thesis, Grefe & Tiedemann.
Onsager, L., 1944. Crystal statistics. I. A two-dimensional model with an order-disorder transition. Physical Review 65 (3-4), 117.
Brush, S. G., 1967. History of the Lenz-Ising model. Reviews of modern physics 39 (4), 883.
Cipra, B. A., 1987. An introduction to the Ising model. The American Mathematical Monthly 94 (10), 937–959.
data(r_start, package = "spatialising")
ts1 = kinetic_ising(r_start, B = -0.3, J = 0.7)
ts10 = kinetic_ising(r_start, B = -0.3, J = 0.7, updates = 10)
# \donttest{
r1 = terra::rast(system.file("raster/r_start.tif", package = "spatialising"))
terra::plot(r1)
r2 = kinetic_ising(r1, B = -0.3, J = 0.7)
terra::plot(r2)
library(terra)
ri1 = kinetic_ising(r1, B = -0.3, J = 0.7, updates = 9)
plot(ri1)
ri2 = kinetic_ising(r1, B = 0.3, J = 0.7, updates = 9)
plot(ri2)
ri3 = kinetic_ising(r1, B = -0.3, J = 0.4, updates = 9)
plot(ri3)
# }