OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
i23main_tri.F File Reference
#include "implicit_f.inc"
#include "comlock.inc"
#include "com01_c.inc"
#include "com04_c.inc"
#include "com08_c.inc"
#include "param_c.inc"
#include "task_c.inc"
#include "timeri_c.inc"
#include "lockon.inc"
#include "lockoff.inc"

Go to the source code of this file.

Functions/Subroutines

subroutine i23main_tri (timers, ipari, x, intbuf_tab, v, ms, nin, itask, mwag, weight, isendto, ircvfrom, retri, iad_elem, fr_elem, itab, kinet, nrtm_t, renum, nsnfiold, eshift, num_imp, ind_imp, nodnx_sms, h3d_data, multi_fvm, intheat, idt_therm, nodadt_therm)

Function/Subroutine Documentation

◆ i23main_tri()

subroutine i23main_tri ( type(timer_), intent(inout) timers,
integer, dimension(npari,ninter) ipari,
x,
type(intbuf_struct_) intbuf_tab,
v,
ms,
integer nin,
integer itask,
integer, dimension(*) mwag,
integer, dimension(*) weight,
integer, dimension(ninter+1,*) isendto,
integer, dimension(ninter+1,*) ircvfrom,
integer retri,
integer, dimension(2,*) iad_elem,
integer, dimension(*) fr_elem,
integer, dimension(*) itab,
integer, dimension(*) kinet,
integer nrtm_t,
integer, dimension(*) renum,
integer, dimension(nspmd) nsnfiold,
integer eshift,
integer num_imp,
integer, dimension(*) ind_imp,
integer, dimension(*) nodnx_sms,
type(h3d_database) h3d_data,
type(multi_fvm_struct), intent(inout) multi_fvm,
integer, intent(in) intheat,
integer, intent(in) idt_therm,
integer, intent(in) nodadt_therm )

Definition at line 52 of file i23main_tri.F.

59C-----------------------------------------------
60C M o d u l e s
61C-----------------------------------------------
62 USE timer_mod
63 USE tri7box
64 USE message_mod
65 USE intbufdef_mod
66 USE h3d_mod
67 USE multi_fvm_mod
68 use check_sorting_criteria_mod , only : check_sorting_criteria
69C-----------------------------------------------
70C I m p l i c i t T y p e s
71C-----------------------------------------------
72#include "implicit_f.inc"
73#include "comlock.inc"
74C-----------------------------------------------
75C C o m m o n B l o c k s
76C-----------------------------------------------
77#include "com01_c.inc"
78#include "com04_c.inc"
79#include "com08_c.inc"
80#include "param_c.inc"
81#include "task_c.inc"
82#include "timeri_c.inc"
83C common pour variable globale en memoire partagee
84 COMMON /i7mainc/bminma,curv_max_max,result,nsnr,nsnrold,i_memg,nmn_g
85 INTEGER RESULT,NSNR,NSNROLD,I_MEMG,NMN_G
86 my_real
87 . bminma(6),curv_max_max
88C-----------------------------------------------
89C D u m m y A r g u m e n t s
90C-----------------------------------------------
91 TYPE(TIMER_), INTENT(INOUT) :: TIMERS
92 INTEGER NIN ,ITASK, RETRI, NRTM_T,ESHIFT,
93 . NUM_IMP ,IND_IMP(*),
94 . ITAB(*), KINET(*),
95 . IPARI(NPARI,NINTER), MWAG(*),
96 . ISENDTO(NINTER+1,*),IRCVFROM(NINTER+1,*),
97 . WEIGHT(*), IAD_ELEM(2,*) ,FR_ELEM(*),
98 . RENUM(*), NSNFIOLD(NSPMD), NODNX_SMS(*)
99 INTEGER, INTENT(IN) :: INTHEAT
100 INTEGER, INTENT(IN) :: IDT_THERM
101 INTEGER, INTENT(IN) :: NODADT_THERM
102C REAL
103 my_real
104 . x(*), v(*), ms(*)
105 TYPE(INTBUF_STRUCT_) INTBUF_TAB
106 TYPE(H3D_DATABASE) :: H3D_DATA
107 TYPE(MULTI_FVM_STRUCT), INTENT(INOUT) :: MULTI_FVM
108C-----------------------------------------------
109C L o c a l V a r i a b l e s
110C-----------------------------------------------
111 INTEGER LOC_PROC, IFQ, INTTH, ITIED,
112 . I, IP0, IP1, IP2, IP21, I_SK_OLD,
113 . ADD1, NB_N_B, NOINT, INACTI, MULTIMP, IGAP, I_STOK ,NMN_L
114 INTEGER
115 . ILD, NCONTACT,NCONT,INTFRIC,
116 . I_MEM,CAND_N_OLD,IDUM1(1),ILEV, IVIS2
117C REAL
118 my_real
119 . gap,maxbox,minbox,tzinf,
120 . xmaxl, ymaxl, zmaxl, xminl, yminl, zminl, gapmin, gapmax,
121 . sx,sy,sz,sx2,sy2,sz2,
122 . c_maxl,curv_max(nrtm_t),rdum1(1)
123 INTEGER :: NMN,NSN,NTY
124 logical :: need_computation
125C-----------------------------------------------
126 ! --------------
127 ! check if the current interface needs to be sorted
128 call check_sorting_criteria( need_computation,nin,npari,nspmd,
129 . itask,ipari(1,nin),tt,intbuf_tab )
130 if( .not.need_computation ) return
131 ! --------------
132 i_mem = 0
133 i_memg = 0
134 nmn_g = 0
135 nmn_l = 0
136! INTFRIC is a local variable (local to each thread in OMP //)
137 intfric = 0
138C
139C Specific TYPE7 :
140 itied = 0
141C
142 loc_proc=ispmd+1
143 nsn =ipari(5,nin)
144 nmn =ipari(6,nin)
145 nty =ipari(7,nin)
146 ivis2 =ipari(14,nin)
147 noint =ipari(15,nin)
148 ncont =ipari(18,nin)
149 ilev =ipari(20,nin)
150 inacti =ipari(22,nin)
151 multimp=ipari(23,nin)
152
153 ncontact=multimp*ncont
154C
155 nsnrold = ipari(24,nin)
156C
157 gap =intbuf_tab%VARIABLES(2)
158 gapmin=intbuf_tab%VARIABLES(13)
159 gapmax=intbuf_tab%VARIABLES(16)
160C
161C
162C -------------------------------------------------------------
163C
164 retri = 1
165C
166C -------------------------------------------------------------
167C
168 maxbox = intbuf_tab%VARIABLES(9)
169 minbox = intbuf_tab%VARIABLES(12)
170 tzinf = intbuf_tab%VARIABLES(8)
171 bminma(1)=-ep30
172 bminma(2)=-ep30
173 bminma(3)=-ep30
174 bminma(4)=ep30
175 bminma(5)=ep30
176 bminma(6)=ep30
177 curv_max_max = zero
178C
179C -------------------------------------------------------------
180C STOCKAGE DES ANCIENS CANDIDATS
181C -------------------------------------------------------------
182C
183C Barriere dans tous les cas pour bminma [et cur_max_max]
184C
185 CALL my_barrier
186C
187 IF(itask==0)THEN
188 ip0 = 1
189 ip1 = ip0 + nsn + nsnrold + 3
190C MWA = MWAG SUR TASK 0
191 i_sk_old = intbuf_tab%I_STOK(1)
192 CALL i23trc(
193 1 nsn+nsnrold ,i_sk_old ,intbuf_tab%CAND_N,intbuf_tab%CAND_E,
194 2 intbuf_tab%CAND_P,intbuf_tab%FTSAVX,intbuf_tab%FTSAVY,intbuf_tab%FTSAVZ,
195 3 mwag(ip0) ,intbuf_tab%IFPEN)
196C
197 intbuf_tab%I_STOK(1)=i_sk_old
198 ENDIF
199C -------------------------------------------------------------
200C CALCUL BORNE DOMAINE REMONTE DANS I7XSAVE
201C -------------------------------------------------------------
202C eshift : decalage sur cand_e
203 CALL i7xsave(
204 1 x ,intbuf_tab%NSV,intbuf_tab%MSR,nsn ,nmn ,
205 2 itask ,intbuf_tab%XSAV,xminl ,yminl ,zminl ,
206 3 xmaxl ,ymaxl ,zmaxl ,c_maxl,curv_max,
207 4 ipari(39,nin),intbuf_tab%IRECTM(1+4*eshift) ,nrtm_t,sx ,sy ,
208 5 sz ,sx2 ,sy2 ,sz2 ,nmn_l)
209#include "lockon.inc"
210 bminma(1) = max(bminma(1),xmaxl)
211 bminma(2) = max(bminma(2),ymaxl)
212 bminma(3) = max(bminma(3),zmaxl)
213 bminma(4) = min(bminma(4),xminl)
214 bminma(5) = min(bminma(5),yminl)
215 bminma(6) = min(bminma(6),zminl)
216 curv_max_max = max(curv_max_max,c_maxl)
217 nmn_g = nmn_g + nmn_l
218#include "lockoff.inc"
219
220 result = 0
221C BARRIER II_STOK et RESULT
222 CALL my_barrier
223 IF(itask==0)THEN
224 IF(abs(bminma(6)-bminma(3))>2*ep30.OR.
225 + abs(bminma(5)-bminma(2))>2*ep30.OR.
226 + abs(bminma(4)-bminma(1))>2*ep30)THEN
227 CALL ancmsg(msgid=87,anmode=aninfo,
228 . i1=noint,c1='(I23BUCE)')
229 CALL arret(2)
230 END IF
231C
232 bminma(1)=bminma(1)+tzinf+curv_max_max
233 bminma(2)=bminma(2)+tzinf+curv_max_max
234 bminma(3)=bminma(3)+tzinf+curv_max_max
235 bminma(4)=bminma(4)-tzinf-curv_max_max
236 bminma(5)=bminma(5)-tzinf-curv_max_max
237 bminma(6)=bminma(6)-tzinf-curv_max_max
238
239 IF(nspmd > lrvoxelp)THEN
240 CALL ancmsg(msgid=36,anmode=aninfo,
241 . c1='(I7MAINTRI)')
242 CALL arret(2)
243 END IF
244
245 nsnr = 0
246
247 END IF
248
249
250 IF(nspmd > 1) THEN
251
252 IF(itask==0) crvoxel(0:lrvoxel,0:lrvoxel,loc_proc)=0
253c goto 150
254 CALL my_barrier
255
256 IF (imonm > 0 .AND. itask == 0) CALL startime(timers,26)
257 CALL spmd_tri23vox0(
258 1 x ,bminma ,ipari(21,nin),nrtm_t,intbuf_tab%STFM(1+eshift),
259 2 tzinf ,curv_max,gapmin ,gapmax,intbuf_tab%GAP_M(1+eshift),
260 3 intbuf_tab%IRECTM(1+4*eshift),gap ,intbuf_tab%VARIABLES(7) ,intbuf_tab%MSR)
261
262 CALL my_barrier
263 IF (imonm > 0 .AND. itask == 0) CALL stoptime(timers,26)
264c 150 continue
265 IF(itask==0)THEN
266C
267C recuperation des noeuds remote NSNR stockes dans XREM
268C
269 ifq =0
270 intth=0
271 IF (imonm > 0 .AND. itask == 0) CALL startime(timers,25)
272
273 CALL spmd_tri7vox(
274 1 intbuf_tab%NSV,nsn ,x ,v ,ms ,
275 2 bminma ,weight ,intbuf_tab%STFNS,nin ,isendto,
276 3 ircvfrom ,iad_elem,fr_elem ,nsnr ,ipari(21,nin),
277 4 intbuf_tab%GAP_S,itab ,kinet ,ifq ,inacti ,
278 5 nsnfiold,intth,idum1,rdum1,rdum1 ,
279 6 num_imp ,nodnx_sms,rdum1,nty ,idum1 ,
280 7 rdum1 ,rdum1,rdum1,rdum1 ,idum1 ,ilev,idum1,
281 8 intfric ,idum1 ,itied, ivis2, intbuf_tab%IF_ADH)
282 IF (imonm > 0 .AND. itask == 0) CALL stoptime(timers,25)
283
284c 300 continue
285C
286C renumerotation locale des anciens candidats
287C
288 CALL spmd_rnumcd(
289 1 intbuf_tab%CAND_N,renum ,intbuf_tab%I_STOK(1), nin, nsn,
290 2 nsnfiold ,nsnrold)
291 END IF
292 END IF
293C
294 cand_n_old = intbuf_tab%I_STOK(1)
295 40 CONTINUE
296
297 ild = 0
298 nb_n_b = 1
299C
300C Barrier comm spmd_tri7box + BMINMA + Retour I7BUCE
301C
302 50 CALL my_barrier
303
304 IF (imonm > 0 .AND. itask == 0) CALL startime(timers,30)
305 CALL i23buce(
306 1 x ,intbuf_tab%IRECTM(1+4*eshift),intbuf_tab%NSV ,ipari(22,nin),
307 2 nrtm_t ,nsn ,intbuf_tab%CAND_E ,intbuf_tab%CAND_N,gap ,
308 3 noint ,intbuf_tab%I_STOK(1),tzinf ,maxbox ,minbox ,
309 4 ncontact ,nb_n_b ,eshift ,intbuf_tab%CAND_P,ncont ,
310 6 ild ,weight ,intbuf_tab%STFNS,nin ,
311 7 intbuf_tab%STFM(1+eshift) ,ipari(21,nin),intbuf_tab%GAP_S,gapmin,gapmax,
312 8 ipari(39,nin),num_imp ,itask,
313 9 i_mem ,intbuf_tab%MSR,intbuf_tab%GAP_M(1+eshift),nsnr ,curv_max ,
314 a renum ,nsnrold ,intbuf_tab%IFPEN,mwag ,bminma ,
315 b nmn ,intbuf_tab%IRECTM,intbuf_tab%VARIABLES(7),
316 c intheat,idt_therm,nodadt_therm )
317
318C Upgrade MultiMP
319 IF (i_mem == 2)THEN
320#include "lockon.inc"
321 i_memg = i_mem
322#include "lockoff.inc"
323 ENDIF
324
325C New barrier needed for Dynamic MultiMP
326 CALL my_barrier
327
328 IF(i_memg /=0)THEN
329C CARE : JINBUF & JBUFIN array are reallocated in
330C UPGRADE_MULTIMP routine !!!!
331
332
333
334!$OMP SINGLE
335 multimp = ipari(23,nin) + 4
336 CALL upgrade_multimp(nin,multimp,intbuf_tab)
337!$OMP END SINGLE
338 i_mem = 0
339 i_memg = 0
340 intbuf_tab%I_STOK(1)=cand_n_old
341 multimp=ipari(23,nin)
342 ncontact=multimp*ncont
343C eshift : decalage sur cand_e
344 GOTO 40
345 ENDIF
346
347C
348 IF (imonm > 0 .AND. itask == 0) CALL stoptime(timers,30)
349C
350#include "lockon.inc"
351 intbuf_tab%VARIABLES(9) = min(maxbox,intbuf_tab%VARIABLES(9))
352 intbuf_tab%VARIABLES(12) = min(minbox,intbuf_tab%VARIABLES(12))
353 intbuf_tab%VARIABLES(8) = min(tzinf,intbuf_tab%VARIABLES(8))
354 intbuf_tab%VARIABLES(5) = intbuf_tab%VARIABLES(8)-sqrt(three)*gap
355 result = result + ild
356#include "lockoff.inc"
357C--------------------------------------------------------------
358C--------------------------------------------------------------
359 CALL my_barrier
360 IF (result/=0) THEN
361 CALL my_barrier
362 IF (itask==0) THEN
363C utile si on revient
364 intbuf_tab%I_STOK(1) = i_sk_old
365 result = 0
366 ENDIF
367 CALL my_barrier
368 ild = 0
369 maxbox = intbuf_tab%VARIABLES(9)
370 minbox = intbuf_tab%VARIABLES(12)
371 tzinf = intbuf_tab%VARIABLES(8)
372 GOTO 50
373 ENDIF
374C mise a - de dist temporairement pour reperage dans partie frontiere
375 IF(nspmd>1)THEN
376C mono tache
377!$OMP SINGLE
378 IF (imonm > 0) CALL startime(timers,26)
379 intbuf_tab%VARIABLES(5) = -intbuf_tab%VARIABLES(5)
380C
381 CALL spmd_tri7gat(
382 1 result ,nsn ,intbuf_tab%CAND_N,intbuf_tab%I_STOK(1),nin,
383 2 ipari(21,nin),nsnr,multimp ,nty,ipari(47,nin),
384 3 ilev ,nsnfiold, ipari, h3d_data,intfric,
385 4 multi_fvm,nodadt_therm)
386 ipari(24,nin) = nsnr
387C
388 IF (num_imp>0)
389 . CALL imp_rnumcd(intbuf_tab%CAND_N,nin,nsn,num_imp,ind_imp )
390C
391 IF (imonm > 0) CALL stoptime(timers,26)
392!$OMP END SINGLE
393 END IF
394C
395 RETURN
#define my_real
Definition cppsort.cpp:32
subroutine i23buce(x, irect, nsv, inacti, nrtm, nsn, cand_e, cand_n, gap, noint, ii_stok, tzinf, maxbox, minbox, ncontact, nb_n_b, eshift, cand_p, ncont, ild, weight, stfn, nin, stf, igap, gap_s, gapmin, gapmax, icurv, num_imp, itask, i_mem, msr, gap_m, nsnr, curv_max, renum, nsnrold, ifpen, mwag, bminma, nmn, irectg, bgapsmx, intheat, idt_therm, nodadt_therm)
Definition i23buce.F:46
subroutine i23trc(nsn, i_stok, cand_n, cand_e, cand_p, cand_fx, cand_fy, cand_fz, cand_a, ifpen)
Definition i23trc.F:31
subroutine i7xsave(x, nsv, msr, nsn, nmn, itask, xsav, xmin, ymin, zmin, xmax, ymax, zmax, c_max, curv_max, icurv, irect, nrtm_t, sx, sy, sz, sx2, sy2, sz2, nmn_l)
Definition i7xsave.F:40
subroutine imp_rnumcd(cand_n, nin, nsn, num_imp, index)
Definition imp_int_k.F:1542
#define min(a, b)
Definition macros.h:20
#define max(a, b)
Definition macros.h:21
integer, dimension(0:lrvoxel, 0:lrvoxel) crvoxel
Definition tri7box.F:56
integer lrvoxelp
Definition tri7box.F:522
integer lrvoxel
Definition tri7box.F:54
subroutine spmd_rnumcd(cand_n, renum, ii_stok, nin, nsn, nsnfiold, nsnrold)
subroutine spmd_tri7gat(result, nsn, cand_n, i_stok, nin, igap, nsnr, multimp, ity, intth, ilev, nsnfiold, ipari, h3d_data, intfric, multi_fvm, nodadt_therm)
Definition spmd_int.F:3002
subroutine spmd_tri7vox(nsv, nsn, x, v, ms, bminmal, weight, stifn, nin, isendto, ircvfrom, iad_elem, fr_elem, nsnr, igap, gap_s, itab, kinet, ifq, inacti, nsnfiold, intth, ielec, areas, temp, num_imp, nodnx_sms, gap_s_l, ityp, irtlm, i24_time_s, i24_frfi, i24_pene_old, i24_stif_old, nbinflg, ilev, i24_icont_i, intfric, ipartfrics, itied, ivis2, if_adh)
Definition spmd_int.F:220
subroutine spmd_tri23vox0(x, bminmal, igap, nrtm, stf, tzinf, curv_max, gapmin, gapmax, gap_m, irect, gap, bgapsmx, msr)
Definition spmd_int.F:5391
subroutine ancmsg(msgid, msgtype, anmode, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, r1, r2, r3, r4, r5, r6, r7, r8, r9, c1, c2, c3, c4, c5, c6, c7, c8, c9, prmode)
Definition message.F:889
subroutine arret(nn)
Definition arret.F:87
subroutine my_barrier
Definition machine.F:31
subroutine startime(event, itask)
Definition timer.F:93
subroutine stoptime(event, itask)
Definition timer.F:135
subroutine upgrade_multimp(ni, multimp_parameter, intbuf_tab)