Repository navigation
Expand file tree
/
Copy pathrotateIndicesModule.f90
More file actions
115 lines (108 loc) · 2.18 KB
/
Copy pathrotateIndicesModule.f90
File metadata and controls
115 lines (108 loc) · 2.18 KB
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
module rotateIndicesModule
use definitions
contains
subroutine rotateIndices(i,j,k,nx,ny,nz,izone,icell,jcell,kcell)
implicit none
integer, intent(in) :: i, j, k, nx, ny, nz
integer(1), intent(in) :: izone
integer, intent(out) :: icell, jcell, kcell
select case (izone)
case(1)
icell = i
jcell = j
kcell = k
case(2)
icell = j
jcell = k
kcell = i
case(3)
icell = k
jcell = i
kcell = j
case(4)
icell = i
jcell = k
kcell = nz + 1 - j
case(5)
icell = j
jcell = i
kcell = nz + 1 - k
case(6)
icell = k
jcell = j
kcell = nz + 1 - i
case(7)
icell = i
jcell = ny + 1 - j
kcell = nz + 1 - k
case(8)
icell = j
jcell = ny + 1 - k
kcell = nz + 1 - i
case(9)
icell = k
jcell = ny + 1 - i
kcell = nz + 1 - j
case(10)
icell = i
jcell = ny + 1 - k
kcell = j
case(11)
icell = j
jcell = ny + 1 - i
kcell = k
case(12)
icell = k
jcell = ny + 1 - j
kcell = i
case(13)
icell = nx + 1 - i
jcell = j
kcell = k
case(14)
icell = nx + 1 - j
jcell = k
kcell = i
case(15)
icell = nx + 1 - k
jcell = i
kcell = j
case(16)
icell = nx + 1 - i
jcell = k
kcell = nz + 1 - j
case(17)
icell = nx + 1 - j
jcell = i
kcell = nz + 1 - k
case(18)
icell = nx + 1 - k
jcell = j
kcell = nz + 1 - i
case(19)
icell = nx + 1 - i
jcell = ny + 1 - j
kcell = nz + 1 - k
case(20)
icell = nx + 1 - j
jcell = ny + 1 - k
kcell = nz + 1 - i
case(21)
icell = nx + 1 - k
jcell = ny + 1 - i
kcell = nz + 1 - j
case(22)
icell = nx + 1 - i
jcell = ny + 1 - k
kcell = j
case(23)
icell = nx + 1 - j
jcell = ny + 1 - i
kcell = k
case(24)
icell = nx + 1 - k
jcell = ny + 1 - j
kcell = i
end select
end subroutine rotateIndices
end module rotateIndicesModule