29 integer,
parameter,
dimension(3,6) :: &
35 -1, 0, 0 /), (/3, 6/))
38 integer,
parameter,
dimension(3,8) :: &
46 -1, -1, -1 /), (/3, 8/))
49 integer,
parameter,
dimension(3,12) :: &
61 -1, 0, -1 /), (/3, 12/))
77 integer,
dimension(4) :: site
80 site(2) = floor(
genrand()*2.0_real64*real(setup%n_1)) +1
81 site(3) = floor(
genrand()*2.0_real64*real(setup%n_2)) +1
82 site(4) = floor(
genrand()*2.0_real64*real(setup%n_3)) +1
100 integer,
dimension(4),
intent(in) :: site
101 integer,
dimension(4) :: nbr
105 n = floor(6.0_real64*
genrand())+1
108 nbr(2:) = site(2:) +
sc_nbrs(:,n)
112 nbr(2) = modulo(nbr(2)-1, 2*setup%n_1) + 1
113 nbr(3) = modulo(nbr(3)-1, 2*setup%n_2) + 1
114 nbr(4) = modulo(nbr(4)-1, 2*setup%n_3) + 1
130 integer,
dimension(4) :: site
133 site(4) = floor(2.0_real64*
genrand()*real(setup%n_3,
real64)) +1
135 + 2 - modulo(site(4), 2)
137 + 2 - modulo(site(4), 2)
155 integer,
dimension(4),
intent(in) :: site
156 integer,
dimension(4) :: nbr
160 n = floor(8.0_real64*
genrand())+1
167 nbr(2) = modulo(nbr(2)-1, 2*setup%n_1) + 1
168 nbr(3) = modulo(nbr(3)-1, 2*setup%n_2) + 1
169 nbr(4) = modulo(nbr(4)-1, 2*setup%n_3) + 1
185 integer,
dimension(4) :: site
188 site(4) = floor(2.0_real64*
genrand()*real(setup%n_3,
real64)) + 1
189 site(2) = floor(2.0_real64*
genrand()*real(setup%n_1,
real64)) + 1
191 + modulo((site(2)-modulo(site(4),2)), 2)
209 integer,
dimension(4),
intent(in) :: site
210 integer,
dimension(4) :: nbr
214 n = floor(12.0_real64*
genrand())+1
221 nbr(2) = modulo(nbr(2)-1, 2*setup%n_1) + 1
222 nbr(3) = modulo(nbr(3)-1, 2*setup%n_2) + 1
223 nbr(4) = modulo(nbr(4)-1, 2*setup%n_3) + 1
240 integer(array_int),
dimension(:,:,:,:) ::
config
241 integer,
dimension(4),
intent(in) :: idx1, idx2
242 integer(array_int) :: species1, species2
244 species1 =
config(idx1(1), idx1(2), idx1(3), idx1(4))
245 species2 =
config(idx2(1), idx2(2), idx2(3), idx2(4))
247 config(idx1(1), idx1(2), idx1(3), idx1(4)) = species2
248 config(idx2(1), idx2(2), idx2(3), idx2(4)) = species1
integer, parameter real64
Longer "double" (64 bit, approx -1.8e308 to 1.8e308 and covering values down to about 2e-308 magnitud...
pure integer function, dimension(4), public simple_cubic_random_site(setup)
Function to get a random site on the simple cubic lattice.
pure integer function, dimension(4), public fcc_random_nbr(setup, site)
Function to get a random neighbour of a site on the fcc lattice.
integer, dimension(3, 12), parameter fcc_nbrs
integer, dimension(3, 6), parameter sc_nbrs
pure integer function, dimension(4), public simple_cubic_random_nbr(setup, site)
Function to get a random neighbour of a site on the simple cubic lattice.
subroutine, public pair_swap(config, idx1, idx2)
Function to swap a pair of lattice site occupancies.
integer, dimension(3, 8), parameter bcc_nbrs
pure integer function, dimension(4), public bcc_random_site(setup)
Function to get a random site on the bcc lattice.
pure integer function, dimension(4), public bcc_random_nbr(setup, site)
Function to get a random neighbour of a site on the bcc lattice.
pure integer function, dimension(4), public fcc_random_site(setup)
Function to get a random site on the fcc lattice.
integer(array_int), dimension(:,:,:,:), allocatable config
Derived type for parameters specifying general simulation parameters which are common to all sampling...