OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
c_ixfloc.F File Reference
#include "implicit_f.inc"
#include "com01_c.inc"
#include "com04_c.inc"
#include "param_c.inc"

Go to the source code of this file.

Functions/Subroutines

subroutine c_ixfloc (numel, ixsf, ixqf, ixtgf, nsvois, nqvois, ntgvois, proc, iparg, cep, cel, ale_connectivity, ee_connect_l, ixs, ixq, ixtg, nodlocal, numels_l, numelq_l, numeltg_l, multi_fvm, id_global_vois, indx_s, indx_q, indx_tg, face_elm_s, face_elm_q, face_elm_tg, face_vois, ishadow)

Function/Subroutine Documentation

◆ c_ixfloc()

subroutine c_ixfloc ( integer numel,
integer, dimension(nixs,nsvois) ixsf,
integer, dimension(nixq,nqvois) ixqf,
integer, dimension(nixtg,ntgvois) ixtgf,
integer nsvois,
integer nqvois,
integer ntgvois,
integer proc,
integer, dimension(nparg,*) iparg,
integer, dimension(*) cep,
integer, dimension(*) cel,
type(t_ale_connectivity), intent(inout) ale_connectivity,
type(t_connectivity_ext1), intent(inout) ee_connect_l,
integer, dimension(nixs,*) ixs,
integer, dimension(nixq,*) ixq,
integer, dimension(nixtg,*) ixtg,
integer, dimension(*) nodlocal,
integer numels_l,
integer numelq_l,
integer numeltg_l,
type(multi_fvm_struct) multi_fvm,
integer, dimension(*), intent(out) id_global_vois,
integer, dimension(*), intent(in) indx_s,
integer, dimension(*), intent(in) indx_q,
integer, dimension(*), intent(in) indx_tg,
integer, dimension(6*numels,*), intent(in) face_elm_s,
integer, dimension(4*numelq,*), intent(in) face_elm_q,
integer, dimension(3*numeltg,*), intent(in) face_elm_tg,
integer, dimension(*), intent(out) face_vois,
logical, intent(in) ishadow )
Parameters
[in]ishadowshadowing option for detonators (Eikonal equation solver)

Definition at line 32 of file c_ixfloc.F.

36C-----------------------------------------------
37C M o d u l e s
38C-----------------------------------------------
39 USE multi_fvm_mod
41C-----------------------------------------------
42C I m p l i c i t T y p e s
43C-----------------------------------------------
44#include "implicit_f.inc"
45C-----------------------------------------------
46C C o m m o n B l o c k s
47C-----------------------------------------------
48#include "com01_c.inc"
49#include "com04_c.inc"
50#include "param_c.inc"
51C-----------------------------------------------
52C D u m m y A r g u m e n t s
53C-----------------------------------------------
54 INTEGER NSVOIS, NQVOIS, NTGVOIS, PROC, NUMEL,
55 . NUMELS_L,NUMELQ_L,NUMELTG_L,
56 . IXSF(NIXS,NSVOIS) ,IXQF(NIXQ,NQVOIS),IXTGF(NIXTG,NTGVOIS),
57 . IPARG(NPARG,*),CEP(*),CEL(*),
58 . IXS(NIXS,*), IXQ(NIXQ,*), IXTG(NIXTG,*),NODLOCAL(*)
59 INTEGER, DIMENSION(*), INTENT(OUT) :: ID_GLOBAL_VOIS,FACE_VOIS
60 TYPE(MULTI_FVM_STRUCT) :: MULTI_FVM
61 ! index for id of the remote connected element
62 INTEGER, DIMENSION(*), INTENT(in) :: INDX_S
63 INTEGER, DIMENSION(*), INTENT(in) :: INDX_Q
64 INTEGER, DIMENSION(*), INTENT(in) :: INDX_TG
65 ! id of the remote connected element
66 INTEGER, DIMENSION(6*NUMELS,*), INTENT(in) :: FACE_ELM_S
67 INTEGER, DIMENSION(4*NUMELQ,*), INTENT(in) :: FACE_ELM_Q
68 INTEGER, DIMENSION(3*NUMELTG,*), INTENT(in) :: FACE_ELM_TG
69 TYPE(t_ale_connectivity), INTENT(INOUT) :: ALE_CONNECTIVITY
70 TYPE(t_connectivity_ext1), INTENT(INOUT) :: ee_connect_l
71 LOGICAL, INTENT(IN) :: ISHADOW !< shadowing option for detonators (Eikonal equation solver)
72C-----------------------------------------------
73C L o c a l V a r i a b l e s
74C-----------------------------------------------
75 INTEGER I, J, K, NG, IFS, IFQ, IFTG,IE_LOC, IV_LOC
76 INTEGER JTUR,JTHE,ITY,IE,NFT,NEL,IV,PROC2,NFT_LOC,IAD1, LGTH, IAD2
77 INTEGER NUMEL_L, TMP, IALEUL
78 INTEGER, DIMENSION(:), ALLOCATABLE :: TAGE, nb_connect_l
79 LOGICAL IS_HEXA,IS_QUAD,IS_TRIA
80C-----------------------------------------------
81C S o u r c e L i n e s
82C-----------------------------------------------
83! Number of local elements
84 numel_l = 0
85 DO ng = 1, ngroup
86 IF (iparg(32, ng) == proc) THEN
87 nel = iparg(2, ng)
88 numel_l = numel_l + nel
89 ENDIF
90 ENDDO
91 ALLOCATE(ee_connect_l%iad_connect(numel_l + 1))
92 ee_connect_l%iad_connect(1:numel_l + 1) = 0
93 ALLOCATE(nb_connect_l(numel_l))
94 nb_connect_l(1:numel_l) = 0
95
96! Counting elements connected to local elements
97 nft_loc = 0
98 DO ng = 1, ngroup
99 IF (iparg(32, ng) == proc) THEN
100 nel = iparg(2, ng)
101 nft = iparg(3, ng)
102 ialeul = iparg(7, ng) + iparg(11, ng)
103 ity = iparg(5,ng)
104 is_hexa=.false.
105 is_quad=.false.
106 is_tria=.false.
107 IF(ity == 1)is_hexa=.true.
108 IF(ity == 2)is_quad=.true.
109 IF(ity == 7 .AND. n2d > 0)is_tria=.true.
110 IF(is_hexa .OR. is_quad .OR. is_tria)THEN !skip shell, sh3n, and other elem types
111 IF (ialeul /= 0 .OR. ishadow) THEN
112 DO i = 1, nel
113 ! Index of the element
114 ie = i + nft
115 ! Local index of the element
116 ie_loc = i + nft_loc
117 ! Number of neighbors
118 lgth = ale_connectivity%ee_connect%iad_connect(ie+1)-ale_connectivity%ee_connect%iad_connect(ie)
119 nb_connect_l(ie_loc) = lgth
120 ENDDO
121 ENDIF
122 ENDIF
123 nft_loc = nft_loc + nel
124 ENDIF
125 ENDDO
126 ee_connect_l%iad_connect(1) = 1
127 DO i = 2, numel_l + 1
128 ee_connect_l%iad_connect(i) = ee_connect_l%iad_connect(i - 1) + nb_connect_l(i - 1)
129 ENDDO
130 tmp = ee_connect_l%iad_connect(numel_l + 1) - 1
131 ALLOCATE(ee_connect_l%connected(tmp)) ; ee_connect_l%connected(1:tmp) = 0
132 ALLOCATE(ee_connect_l%type(tmp)) ; ee_connect_l%type(1:tmp) = 0
133 ALLOCATE(ee_connect_l%iface2(tmp)) ; ee_connect_l%iface2(1:tmp) = 0
134C
135 ALLOCATE(tage(numel))
136 DO i = 1, numel
137 tage(i) = 0
138 ENDDO
139 ifs = 0
140 ifq = 0
141 iftg = 0
142 nft_loc = 0
143C
144 DO ng=1,ngroup
145 jtur=iparg(12,ng)
146 jthe=iparg(13,ng)
147 IF(iparg(32,ng)==proc) THEN
148 nel = iparg(2,ng)
149 nft = iparg(3,ng)
150 ity = iparg(5,ng)
151C 3D
152 IF(ity==1) THEN
153 DO i = 1, nel
154 ie = i+nft
155 ie_loc = i+nft_loc
156 iad1 = ale_connectivity%ee_connect%iad_connect(ie)
157 lgth = ale_connectivity%ee_connect%iad_connect(ie+1)-ale_connectivity%ee_connect%iad_connect(ie)
158 tage(ie) = cel(ie)
159C IVOIS
160 DO j = 1, lgth
161 iv = ale_connectivity%ee_connect%connected(iad1 + j - 1)
162 iad2 = ee_connect_l%iad_connect(ie_loc) + j - 1
163 IF (iv>0) THEN
164 proc2 = cep(iv)
165 iv_loc = cel(iv)
166 IF(proc2/=proc) THEN
167C element frontiere
168 IF(tage(iv)==0) THEN
169 ifs = ifs + 1
170 tage(iv) = numels_l+ifs
171C recopie IXS + chgt no local des noeuds
172 DO k = 1,1
173 ixsf(k,ifs) = ixs(k,iv)
174 ENDDO
175 DO k = 2,9
176 ixsf(k,ifs) = nodlocal(ixs(k,iv))
177 ENDDO
178 DO k = 10,nixs
179 ixsf(k,ifs) = ixs(k,iv)
180 ENDDO
181 ENDIF
182C ivois
183 ee_connect_l%connected(iad2) = tage(iv)
184
185 id_global_vois( (ie_loc-1)*6+j ) = ixs(nixs,iv) ! pas sur le proc courant
186 DO k=1,indx_s(ie)
187 IF( ixs(nixs,iv)==face_elm_s(6*(ie-1)+k,2) ) THEN
188 face_vois( (ie_loc-1)*6+j ) = face_elm_s(6*(ie-1)+k,1) ! pas sur le proc courant
189 ENDIF
190 ENDDO
191 ELSE
192C element interne
193 ee_connect_l%connected(iad2) = iv_loc
194 id_global_vois( (ie_loc-1)*6+j ) = ixs(nixs,iv) ! sur le proc courant
195 ENDIF
196 ELSE
197 ee_connect_l%connected(iad2) = iv
198 id_global_vois( (ie_loc-1)*6+j ) = 0 ! pas de voisin
199 ENDIF
200 ee_connect_l%type(iad2) = ale_connectivity%ee_connect%type(iad1 + j - 1)
201 ee_connect_l%iface2(iad2) = ale_connectivity%ee_connect%iface2(iad1 + j - 1)
202 ENDDO
203 ENDDO
204 nft_loc = nft_loc + nel
205 ELSEIF(ity==2) THEN
206C 2D
207 DO i = 1, nel
208 ie = i+nft
209 ie_loc = i+nft_loc
210 iad1 = ale_connectivity%ee_connect%iad_connect(ie)
211 lgth = ale_connectivity%ee_connect%iad_connect(ie+1)-ale_connectivity%ee_connect%iad_connect(ie)
212 tage(ie) = cel(ie)
213C IVOIS
214 DO j = 1, lgth
215 iv = ale_connectivity%ee_connect%connected(iad1 + j - 1)
216 iad2 = ee_connect_l%iad_connect(ie_loc) + j - 1
217 IF (iv>0) THEN
218 proc2 = cep(iv)
219 iv_loc = cel(iv)
220 IF(proc2/=proc) THEN
221C element frontiere
222 IF(tage(iv)==0) THEN
223 ifq = ifq + 1
224 tage(iv) = numelq_l+ifq
225C recopie IXQ + chgt no local des noeuds
226 DO k = 1,1
227 ixqf(k,ifq) = ixq(k,iv)
228 ENDDO
229 DO k = 2,5
230 ixqf(k,ifq) = nodlocal(ixq(k,iv))
231 ENDDO
232 DO k = 6,nixq
233 ixqf(k,ifq) = ixq(k,iv)
234 ENDDO
235 ENDIF
236C ivois
237 ee_connect_l%connected(iad2) = tage(iv)
238 id_global_vois( (ie_loc-1)*4+j ) = ixq(nixq,iv)
239 DO k=1,indx_q(ie)
240 IF( ixq(nixq,iv)==face_elm_q(4*(ie-1)+k,2) ) THEN
241 face_vois( (ie_loc-1)*4+j ) = face_elm_q(4*(ie-1)+k,1) ! pas sur le proc courant
242 ENDIF
243 ENDDO
244 ELSE
245C element interne
246 ee_connect_l%connected(iad2) = iv_loc
247 id_global_vois( (ie_loc-1)*4+j ) = ixq(nixq,iv)
248 ENDIF
249 ELSE
250 ee_connect_l%connected(iad2) = iv
251 id_global_vois( (ie_loc-1)*4+j ) = 0
252 ENDIF
253 ee_connect_l%type(iad2) = ale_connectivity%ee_connect%type(iad1 + j - 1)
254 ee_connect_l%iface2(iad2) = ale_connectivity%ee_connect%iface2(iad1 + j - 1)
255 ENDDO
256 ENDDO
257 nft_loc = nft_loc + nel
258 ELSEIF(ity == 7 .AND. (n2d /= 0 .AND. multi_fvm%IS_USED)) THEN
259C 2D
260 DO i = 1, nel
261 ie = i+nft
262 ie_loc = i+nft_loc
263 iad1 = ale_connectivity%ee_connect%iad_connect(ie)
264 lgth = ale_connectivity%ee_connect%iad_connect(ie+1)-ale_connectivity%ee_connect%iad_connect(ie)
265 tage(ie) = cel(ie)
266C IVOIS
267 DO j = 1, 3
268 iv = ale_connectivity%ee_connect%connected(iad1 + j - 1)
269 iad2 = ee_connect_l%iad_connect(ie_loc) + j - 1
270 IF (iv>0) THEN
271 proc2 = cep(iv)
272 iv_loc = cel(iv)
273 IF(proc2/=proc) THEN
274C element frontiere
275 IF(tage(iv)==0) THEN
276 iftg = iftg + 1
277 tage(iv) = numeltg_l+iftg
278C recopie IXQ + chgt no local des noeuds
279 DO k = 1,1
280 ixtgf(k,iftg) = ixtg(k,iv)
281 ENDDO
282 DO k = 2,4
283 ixtgf(k,iftg) = nodlocal(ixtg(k,iv))
284 ENDDO
285 DO k = 5,nixtg
286 ixtgf(k,iftg) = ixtg(k,iv)
287 ENDDO
288 ENDIF
289C ivois
290 ee_connect_l%connected(iad2) = tage(iv)
291 id_global_vois( (ie_loc-1)*3+j ) = ixtg(nixtg,iv)
292
293 DO k=1,indx_tg(ie)
294 IF( ixtg(nixtg,iv)==face_elm_tg(3*(ie-1)+k,2) ) THEN
295 face_vois( (ie_loc-1)*3+j ) = face_elm_tg(3*(ie-1)+k,1) ! pas sur le proc courant
296 ENDIF
297 ENDDO
298
299 ELSE
300C element interne
301 ee_connect_l%connected(iad2) = iv_loc
302 id_global_vois( (ie_loc-1)*3+j ) = ixtg(nixtg,iv)
303 ENDIF
304 ELSE
305 ee_connect_l%connected(iad2) = iv
306 id_global_vois( (ie_loc-1)*3+j ) = 0
307 ENDIF
308 ee_connect_l%type(iad2) = ale_connectivity%ee_connect%type(iad1 + j - 1)
309 ee_connect_l%iface2(iad2) = ale_connectivity%ee_connect%iface2(iad1 + j - 1)
310 ENDDO
311 ENDDO
312 nft_loc = nft_loc + nel
313 ENDIF
314 ENDIF
315 ENDDO
316 DEALLOCATE(tage)
317 DEALLOCATE(nb_connect_l)
318 RETURN