ssa20 {SPSL} | R Documentation |
Site cluster on Square Anisotropic 2D lattice with (1,0)-neighborhood
Description
ssa20()
function provides sites labeling of the anisotropic cluster on 2D square lattice with von Neumann (1,0)-neighborhood.
Usage
ssa20(x=33, p=runif(4, max=0.9),
set=(x^2+1)/2, all=TRUE, shape=c(1,1))
Arguments
x |
a linear dimension of 2D square percolation lattice. |
p |
a vector of relative fractions |
set |
a vector of linear indexes of a starting sites subset. |
all |
logical; if |
shape |
a vector with two shape parameters of beta-distributed random variables, weighting the percolation lattice sites. |
Details
The percolation is simulated on 2D square lattice with uniformly weighted sites acc
and the vector p
, distributed over the lattice directions.
The anisotropic cluster is formed from the accessible sites connected with the initial subset, and depends on the direction in 2D square lattice.
To form the cluster the condition acc[set+e[n]]<p[n]
is iteratively tested for sites of the von Neumann (1,0)-neighborhood e
for the current cluster perimeter set
, where n
is equal to direction in 2D square lattice.
Von Neumann (1,0)-neighborhood on 2D square lattice consists of sites, only one coordinate of which is different from the current site by one: e=c(-1,
1,
-x,
x)
.
Forming cluster ends with the exhaustion of accessible sites in von Neumann (1,0)-neighborhood of the current cluster perimeter.
Value
acc |
an accessibility matrix for 2D square percolation lattice: |
Author(s)
Pavel V. Moskalev
References
[1] Moskalev, P.V. Percolation modeling of porous structures. Moscow: URSS, 2018. 240 pp; in Russian.
See Also
fssa20, ssa30, ssi20, ssi30, ssa2d, ssa3d
Examples
set.seed(20120507)
x <- y <- seq(33)
image(x, y, ssa20(), zlim=c(0,2),
main="Anisotropic (1,0)-cluster")
abline(h=17, lty=2); abline(v=17, lty=2)