-
Notifications
You must be signed in to change notification settings - Fork 0
/
latinit.f
73 lines (72 loc) · 1.84 KB
/
latinit.f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
subroutine latinit(
1 lattype, L, L_p,
2 ConcInit,
1 ijatom )
c
c Initialises lattice and buffer layer.
c ijatom(i,j) = 1 or -1
c
implicit none
integer lattype, L, L_p
real*8 ConcInit
integer ijatom(0:L_p+1,0:L_p+1)
integer itype
integer i,j
integer nexttype
cc Periodic Boundary: ijatom
c (1,1)=(1,L+1)=(L+1,1)=(L+1,L+1)
itype=nexttype(ConcInit)
ijatom(1,1)=itype
ijatom(1,L+1)=itype
ijatom(L+1,1)=itype
ijatom(L+1,L+1)=itype
c (1,L)=(1,0)=(L+1,0)=(L+1,L)
itype=nexttype(ConcInit)
ijatom(1,L)=itype
ijatom(1,0)=itype
ijatom(L+1,0)=itype
ijatom(L+1,L)=itype
c (L,1)=(0,1)=(0,L+1)=(L,L+1)
itype=nexttype(ConcInit)
ijatom(L,1)=itype
ijatom(0,1)=itype
ijatom(0,L+1)=itype
ijatom(L,L+1)=itype
c (L,L)=(0,0)=(0,L)=(L,0)
itype=nexttype(ConcInit)
ijatom(L,L)=itype
ijatom(0,0)=itype
ijatom(0,L)=itype
ijatom(L,0)=itype
c (1,j)=(L+1,j)
do 5 j=2,L-1
itype=nexttype(ConcInit)
ijatom(1,j)=itype
ijatom(L+1,j)=itype
5 continue
c (L,j)=(0,j)
do 6 j=2,L-1
itype=nexttype(ConcInit)
ijatom(L,j)=itype
ijatom(0,j)=itype
6 continue
c (i,1)=(i,L+1)
do 7 i=2,L-1
itype=nexttype(ConcInit)
ijatom(i,1)=itype
ijatom(i,L+1)=itype
7 continue
c (i,L)=(i,0)
do 8 i=2,L-1
itype=nexttype(ConcInit)
ijatom(i,L)=itype
ijatom(i,0)=itype
8 continue
cc (i,j): ijatom(i,j) = 1 or -1
do 91 i=2,L-1
do 92 j=2,L-1
ijatom(i,j)=nexttype(ConcInit)
92 continue
91 continue
return
end