SPEED
GET_TAG_BC.f90 File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine get_tag_bc (cn_bc, nfac, v1, v2, v3, v4, tag_dg, nl_dg, ind)
 Findes index of a boundary element.
 

Function/Subroutine Documentation

◆ get_tag_bc()

subroutine get_tag_bc ( integer*4, dimension(nfac,5)  cn_bc,
integer*4  nfac,
integer*4  v1,
integer*4  v2,
integer*4  v3,
integer*4  v4,
integer*4, dimension(nl_dg)  tag_dg,
integer*4  nl_dg,
integer*4  ind 
)

Findes index of a boundary element.

Author
Ilario Mazzieri
Date
September, 2013
Version
1.0
Parameters
[in]nfacnumber of boundary elements
[in]cn_bcconnectivity for boundary elements
[in]v1index of 1-vertex
[in]v2index of 2-vertex
[in]v3index of 3-vertex
[in]v4index of 4-vertex
[in]tag_dglabel for dg elements
[in]nl_dgnumber of dg labels
[out]indindex of the element found

Definition at line 31 of file GET_TAG_BC.f90.

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 !ordering 1 2 3 4
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 !ordering 2 3 4 1
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 !ordering 3 4 1 2
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 !ordering 4 1 2 3
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 !ordering 1 4 3 2
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 !ordering 2 1 4 3
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 !ordering 3 2 1 4
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 !ordering 4 3 2 1
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

Referenced by setup_dg_elem().

Here is the caller graph for this function: