Findes index of a boundary element.
34
35 implicit none
36
37 integer*4 :: nfac, v1, v2, v3, v4, nl_dg, ind
38 integer*4 :: i, j
39
40 integer*4 :: tag_dg(nl_dg)
41
42 integer*4, dimension(nfac,5) :: cn_bc
43
44
45 ind = 0
46
47 do i = 1, nfac
48
49
50 if(cn_bc(i,2) .eq. v1 .and. &
51 cn_bc(i,3) .eq. v2 .and. &
52 cn_bc(i,4) .eq. v3 .and. &
53 cn_bc(i,5) .eq. v4) then
54
55 do j = 1, nl_dg
56 if(cn_bc(i,1) .eq. tag_dg(j)) then
57 ind = j
58 return
59 endif
60 enddo
61
62 endif
63
64
65 if(cn_bc(i,2) .eq. v2 .and. &
66 cn_bc(i,3) .eq. v3 .and. &
67 cn_bc(i,4) .eq. v4 .and. &
68 cn_bc(i,5) .eq. v1) then
69
70 do j = 1, nl_dg
71 if(cn_bc(i,1) .eq. tag_dg(j)) then
72 ind = j
73 return
74 endif
75 enddo
76
77 endif
78
79
80 if(cn_bc(i,2) .eq. v3 .and. &
81 cn_bc(i,3) .eq. v4 .and. &
82 cn_bc(i,4) .eq. v1 .and. &
83 cn_bc(i,5) .eq. v2) then
84
85 do j = 1, nl_dg
86 if(cn_bc(i,1) .eq. tag_dg(j)) then
87 ind = j
88 return
89 endif
90 enddo
91
92 endif
93
94
95 if(cn_bc(i,2) .eq. v4 .and. &
96 cn_bc(i,3) .eq. v1 .and. &
97 cn_bc(i,4) .eq. v2 .and. &
98 cn_bc(i,5) .eq. v3) then
99
100 do j = 1, nl_dg
101 if(cn_bc(i,1) .eq. tag_dg(j)) then
102 ind = j
103 return
104 endif
105 enddo
106
107 endif
108
109
110 if(cn_bc(i,2) .eq. v1 .and. &
111 cn_bc(i,3) .eq. v4 .and. &
112 cn_bc(i,4) .eq. v3 .and. &
113 cn_bc(i,5) .eq. v2) then
114
115 do j = 1, nl_dg
116 if(cn_bc(i,1) .eq. tag_dg(j)) then
117 ind = j
118 return
119 endif
120 enddo
121
122 endif
123
124
125 if(cn_bc(i,2) .eq. v2 .and. &
126 cn_bc(i,3) .eq. v1 .and. &
127 cn_bc(i,4) .eq. v4 .and. &
128 cn_bc(i,5) .eq. v3) then
129
130 do j = 1, nl_dg
131 if(cn_bc(i,1) .eq. tag_dg(j)) then
132 ind = j
133 return
134 endif
135 enddo
136
137 endif
138
139
140 if(cn_bc(i,2) .eq. v3 .and. &
141 cn_bc(i,3) .eq. v2 .and. &
142 cn_bc(i,4) .eq. v1 .and. &
143 cn_bc(i,5) .eq. v4) then
144
145 do j = 1, nl_dg
146 if(cn_bc(i,1) .eq. tag_dg(j)) then
147 ind = j
148 return
149 endif
150 enddo
151
152 endif
153
154
155 if(cn_bc(i,2) .eq. v4 .and. &
156 cn_bc(i,3) .eq. v3 .and. &
157 cn_bc(i,4) .eq. v2 .and. &
158 cn_bc(i,5) .eq. v1) then
159
160 do j = 1, nl_dg
161 if(cn_bc(i,1) .eq. tag_dg(j)) then
162 ind = j
163 return
164 endif
165 enddo
166
167 endif
168
169
170
171 enddo
172
173