-
Notifications
You must be signed in to change notification settings - Fork 0
/
nncoords.f
56 lines (50 loc) · 1.14 KB
/
nncoords.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
subroutine nncoords(
1 lattype,
1 nnnumber, nnnum_p,
2 idx, jdy )
implicit none
integer lattype
integer nnnumber, nnnum_p
integer idx(nnnum_p), jdy(nnnum_p)
if( lattype .eq. 1 )then
write(6,*) ' Simple square lattice '
nnnumber=4
idx(1)=1
jdy(1)=0
idx(2)=0
jdy(2)=1
idx(3)=-1
jdy(3)=0
idx(4)=0
jdy(4)=-1
else if( lattype .eq. 2 )then
write(6,*) ' Triangular lattice '
nnnumber=6
idx(1)=1
jdy(1)=0
idx(2)=0
jdy(2)=1
idx(3)=-1
jdy(3)=1
idx(4)=-1
jdy(4)=0
idx(5)=0
jdy(5)=-1
idx(6)=1
jdy(6)=-1
else
write(6,*) ' Rombohedral lattice '
nnnumber=2
idx(1)=1
jdy(1)=0
idx(2)=-1
jdy(2)=0
end if
return
end
subroutine random_initial(iseed)
integer iseed
real*8 r_int
common /rand/r_int
r_int = iseed
end