OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
i21main_tri.F
Go to the documentation of this file.
1Copyright> OpenRadioss
2Copyright> Copyright (C) 1986-2025 Altair Engineering Inc.
3Copyright>
4Copyright> This program is free software: you can redistribute it and/or modify
5Copyright> it under the terms of the GNU Affero General Public License as published by
6Copyright> the Free Software Foundation, either version 3 of the License, or
7Copyright> (at your option) any later version.
8Copyright>
9Copyright> This program is distributed in the hope that it will be useful,
10Copyright> but WITHOUT ANY WARRANTY; without even the implied warranty of
11Copyright> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12Copyright> GNU Affero General Public License for more details.
13Copyright>
14Copyright> You should have received a copy of the GNU Affero General Public License
15Copyright> along with this program. If not, see <https://www.gnu.org/licenses/>.
16Copyright>
17Copyright>
18Copyright> Commercial Alternative: Altair Radioss Software
19Copyright>
20Copyright> As an alternative to this open-source version, Altair also offers Altair Radioss
21Copyright> software under a commercial license. Contact Altair to discuss further if the
22Copyright> commercial version may interest you: https://www.altair.com/radioss/.
23!||====================================================================
24!|| i21main_tri ../engine/source/interfaces/intsort/i21main_tri.F
25!||--- called by ------------------------------------------------------
26!|| inttri ../engine/source/interfaces/intsort/inttri.f
27!||--- calls -----------------------------------------------------
28!|| check_sorting_criteria ../engine/source/interfaces/intsort/check_sorting_criteria.F90
29!|| i21buce ../engine/source/interfaces/intsort/i21buce.F
30!|| i21fpen ../engine/source/interfaces/int21/i21fpen.F
31!|| i21xsave ../engine/source/interfaces/int21/i21xsave.F
32!|| my_barrier ../engine/source/system/machine.F
33!|| startime ../engine/source/system/timer_mod.F90
34!|| stoptime ../engine/source/system/timer_mod.F90
35!|| update_struct_int21 ../engine/source/interfaces/int21/update_struct_int21.F
36!|| upgrade_multimp ../common_source/interf/upgrade_multimp.F
37!||--- uses -----------------------------------------------------
38!|| check_sorting_criteria_mod ../engine/source/interfaces/intsort/check_sorting_criteria.F90
39!|| intbufdef_mod ../common_source/modules/interfaces/intbufdef_mod.F90
40!|| intstamp_mod ../engine/share/modules/intstamp_mod.F
41!|| timer_mod ../engine/source/system/timer_mod.F90
42!||====================================================================
43 SUBROUTINE i21main_tri(TIMERS,
44 1 IPARI ,X ,NIN ,
45 2 ITASK ,WEIGHT ,RETRI ,NUM_IMP ,IND_IMP ,
46 3 INTSTAMP,MWAG ,INTBUF_TAB, nspmd)
47C-----------------------------------------------
48C M o d u l e s
49C-----------------------------------------------
50 USE timer_mod
51 USE intstamp_mod
52 USE intbufdef_mod
53 use check_sorting_criteria_mod , only : check_sorting_criteria
54C-----------------------------------------------
55C I m p l i c i t T y p e s
56C-----------------------------------------------
57#include "implicit_f.inc"
58#include "comlock.inc"
59C-----------------------------------------------
60C C o m m o n B l o c k s
61C-----------------------------------------------
62#include "com04_c.inc"
63#include "com08_c.inc"
64#include "param_c.inc"
65#include "task_c.inc"
66#include "timeri_c.inc"
67 COMMON /i21mainc/result21,i_memg
68 INTEGER RESULT21,I_MEMG
69C-----------------------------------------------
70C D u m m y A r g u m e n t s
71C-----------------------------------------------
72 TYPE(timer_) :: TIMERS
73 integer, intent(in) :: nspmd !< number of processor
74 INTEGER NIN ,ITASK, RETRI, NUM_IMP ,IND_IMP(*),
75 . ipari(npari,ninter),
76 . weight(*), mwag(*)
77 TYPE(intstamp_data) INTSTAMP
78C REAL
79 my_real
80 . x(*)
81
82 TYPE(intbuf_struct_) INTBUF_TAB
83C-----------------------------------------------
84C L o c a l V a r i a b l e s
85C-----------------------------------------------
86 INTEGER J17_T,
87 . I, IP0, IP1, IP2, IP21, K11_T, I_SK_OLD,
88 . ADD1, NB_N_B, INIT, NOINT, INACTI, MULTIMP, IGAP, I_STOK,
89 . intth , adxloc
90 INTEGER
91 . NRTM_T,ESHIFT,ILD, NCONTACT, NRTM_L,
92 . I_MEM,CAND_N_OLD, IROT
93C REAL
94 my_real
95 . gap,maxbox,minbox,tzinf,
96 . xmax, ymax, zmax, xmin, ymin, zmin, gapmin, gapmax,
97 . dd(3)
98 INTEGER :: NRTM,NSN,NTY,NMN
99 logical :: need_computation
100C-----------------------------------------------
101 ! --------------
102 ! check if the current interface needs to be sorted
103 call check_sorting_criteria( need_computation,nin,npari,nspmd,
104 . itask,ipari(1,nin),tt,intbuf_tab )
105 if( .not.need_computation ) return
106 ! --------------
107 i_mem = 0
108 i_memg = 0
109C
110 nrtm =ipari(4,nin)
111 nsn =ipari(5,nin)
112 nty =ipari(7,nin)
113 noint =ipari(15,nin)
114 nmn =ipari(8,nin)
115 intth = ipari(47,nin)
116
117 inacti =ipari(22,nin)
118 multimp=ipari(23,nin)
119
120 ncontact=multimp*nsn
121C
122 gap =intbuf_tab%VARIABLES(2)
123 gapmin=intbuf_tab%VARIABLES(13)
124 gapmax=intbuf_tab%VARIABLES(16)
125C
126 IF(nsn > 0) THEN
127 adxloc = 1+3*(nsn+2)
128 ELSE
129 adxloc = 1
130 ENDIF
131C
132C -------------------------------------------------------------
133C
134 retri=1
135C
136 dd(1)=intstamp%D(1)
137 dd(2)=intstamp%D(2)
138 dd(3)=intstamp%D(3)
139C sauvegarde de XSAV (tableau BUFIN(JD(19)))
140 irot=intstamp%IROT
141 CALL i21xsave(
142 1 x ,intbuf_tab%NSV,nsn ,itask ,intbuf_tab%XSAV,
143 2 dd ,irot ,intstamp%ROT,intstamp%BRACKET)
144C -------------------------------------------------------------
145C
146 maxbox = intbuf_tab%VARIABLES(9)
147 minbox = intbuf_tab%VARIABLES(12)
148 tzinf = intbuf_tab%VARIABLES(8)
149C
150C -------------------------------------------------------------
151 i_sk_old=0
152 intbuf_tab%I_STOK(1)=zero
153C BARRIER II_STOK et RESULT
154 result21 = 0
155C
156 cand_n_old = intbuf_tab%I_STOK(1)
157 40 CONTINUE
158 CALL my_barrier
159C
160 inacti = ipari(22,nin)
161C -------------------------------------------------------------
162 nrtm_t=nrtm/nthread
163C eshift : decalage sur cand_e
164 eshift = itask*nrtm_t
165C il faut conserver K11 global
166
167 k11_t = 1+4*itask*nrtm_t
168
169 j17_t = 1+itask*nrtm_t
170 IF(itask==nthread-1)nrtm_t=nrtm-(nthread-1)*(nrtm/nthread)
171 init = 1
172 ild = 0
173 50 CONTINUE
174C
175 IF (imonm > 0) CALL startime(timers,30)
176 IF(nrtm_t/=0) THEN
177 CALL i21buce(
178 1 x ,intbuf_tab%IRECTM(k11_t),intbuf_tab%NSV ,ipari(22,nin),
179 2 nrtm_t ,nsn ,intbuf_tab%CAND_E ,intbuf_tab%CAND_N ,gap,
180 3 noint ,intbuf_tab%I_STOK(1) ,tzinf ,maxbox ,minbox ,
181 4 ncontact ,xmin ,xmax ,ymin ,
182 5 ymax ,zmin ,zmax ,nb_n_b ,eshift ,
183 6 ild ,init ,weight ,intbuf_tab%STFNS ,nin ,
184 7 intbuf_tab%STF(j17_t) ,ipari(21,nin),intbuf_tab%GAP_S,gapmin,gapmax ,
185 8 ipari(39,nin),num_imp ,intbuf_tab%XM0 ,intbuf_tab%NOD_NORMAL ,
186 9 intbuf_tab%VARIABLES(23) ,intbuf_tab%VARIABLES(22) ,intbuf_tab%VARIABLES(27) ,
187 . intbuf_tab%VARIABLES(28) ,intbuf_tab%VARIABLES(29) ,
188 a nrtm_l ,intbuf_tab%XSAV(adxloc),i_mem,intbuf_tab%VARIABLES(32) ,
189 . nmn ,
190 b intth ,intbuf_tab%MNDD ,intbuf_tab%MSR_L ,itask,intbuf_tab%IRECTM,
191 c ipari(48,nin) ,intbuf_tab%VARIABLES(46))
192
193 ENDIF
194
195C Upgrade MultiMP
196 IF (i_mem == 2)THEN
197#include "lockon.inc"
198 i_memg = i_mem
199#include "lockoff.inc"
200 ENDIF
201C New barrier needed for Dynamic MultiMP
202 CALL my_barrier
203
204 IF(i_memg /=0)THEN
205!$OMP SINGLE
206 multimp = ipari(23,nin) + 4
207 CALL upgrade_multimp(nin,multimp,intbuf_tab)
208!$OMP END SINGLE
209 i_memg = 0
210 i_mem = 0
211 intbuf_tab%I_STOK(1) =cand_n_old
212 multimp=ipari(23,nin)
213 ncontact=multimp*nsn
214 GOTO 40
215 ENDIF
216
218 1 intbuf_tab%CAND_E, intbuf_tab%I_STOK(1), ipari(48,nin) , nin , nmn,
219 2 intth, intbuf_tab%MNDD, intbuf_tab%MSR_L , intbuf_tab%IRECTM )
220
221 IF (imonm > 0) CALL stoptime(timers,30)
222C
223#include "lockon.inc"
224 intbuf_tab%VARIABLES(9) = min(maxbox,intbuf_tab%VARIABLES(9))
225 intbuf_tab%VARIABLES(12) = min(minbox,intbuf_tab%VARIABLES(12))
226 intbuf_tab%VARIABLES(8) = min(tzinf,intbuf_tab%VARIABLES(8))
227c +1 en 21 :
228 intbuf_tab%VARIABLES(5) = ep30
229 result21 = result21 + ild
230#include "lockoff.inc"
231C--------------------------------------------------------------
232C--------------------------------------------------------------
233 CALL my_barrier
234 IF (result21/=0) THEN
235 CALL my_barrier
236 IF (itask==0) THEN
237 intbuf_tab%I_STOK(1) = i_sk_old
238 result21 = 0
239 ENDIF
240 CALL my_barrier
241 ild = 0
242 init = 0
243 maxbox = intbuf_tab%VARIABLES(9)
244 minbox = intbuf_tab%VARIABLES(12)
245 tzinf = intbuf_tab%VARIABLES(8)
246
247 CALL my_barrier
248 GOTO 50
249 ENDIF
250C-----------------------------------------------------------
251C Remise a 0 de IFPEN pour les nds qui ne sont plus candidats
252C--------------------------------------------------------------
253 IF(itask==0)THEN
254 ip0 = 1
255 ip1 = ip0 + nsn + 3
256C MWA = MWAG SUR TASK 0
257 i_stok = intbuf_tab%I_STOK(1)
258 CALL i21fpen(
259 1 nsn ,i_stok ,intbuf_tab%CAND_N,intbuf_tab%CAND_E,
260 . intbuf_tab%PENIS,
261 2 intbuf_tab%FTSAVX,intbuf_tab%FTSAVY,intbuf_tab%FTSAVZ,mwag(ip0) ,
262 . intbuf_tab%IFPEN,
263 3 inacti)
264 ENDIF
265C--------------------------------------------------------------
266
267C
268 RETURN
269 END
subroutine i21buce(x, irect, nsv, inacti, nrtm, nsn, cand_e, cand_n, gap, noint, ii_stok, tzinf, maxbox, minbox, ncontact, xmin, xmax, ymin, ymax, zmin, zmax, nb_n_b, eshift, ild, init, weight, stfn, nin, stf, igap, gap_s, gapmin, gapmax, icurv, num_imp, xm0, nod_normal, depth, margeref, lxm, lym, lzm, nrtm_l, xloc, i_mem, drad, nmn, intth, mndd, msr_l, itask, irectt, iform, dgapload)
Definition i21buce.F:49
subroutine i21fpen(nsn, i_stok, cand_n, cand_e, peni, ftxsav, ftysav, ftzsav, cand_tag, ifpen, inacti)
Definition i21fpen.F:32
subroutine i21main_tri(timers, ipari, x, nin, itask, weight, retri, num_imp, ind_imp, intstamp, mwag, intbuf_tab, nspmd)
Definition i21main_tri.F:47
subroutine i21xsave(x, nsv, nsn, itask, xsav, dd, irot, rot, bracket)
Definition i21xsave.F:31
subroutine inttri(timers, ipari, x, w, errors, v, ms, in, iad_elem, fr_elem, vr, isendto, irecvfrom, newfront, itask, wag, dt2t, itab, neltst, ityptst, weight, intlist, nbintc, kinet, dretri, islen7, irlen7, islen11, irlen11, temp, igrbric, igrsh3n, eminx, ixs, ixs16, ixs20, islen17, irlen17, irlen7t, islen7t, num_imp, ind_imp, intstamp, thknod, irlen20, islen20, irlen20t, islen20t, irlen20e, islen20e, renum, nsnfiold, xslv, xmsr, vslv, vmsr, size_t, nodnx_sms, dxancg, ikine, diag_sms, count_remslv, count_remslve, ale_connectivity, ixtg, sensors, delta_pmax_gap, intbuf_tab, delta_pmax_gap_node, iad_frnor, fr_nor, nb25_candt, nb25_impct, nb25_dst1, nb25_dst2, intlist25, iad_fredg, fr_edg, main_proc, nativ_sms, i_opt_stok, multi_fvm, iparg, elbuf_tab, h3d_data, t2main_sms, lskyi_sms_new, forneqs, int7itied, idel7nok_sav, maxdgap, t2fac_sms, icodt, iskew, fskyn25, addcsrect, procnor, inter_struct, sort_comm, renum_siz, nodnx_sms_siz, temp_siz, interfaces, glob_therm, component)
Definition inttri.F:133
subroutine ymax(idn, fac, npc, pld, stiffmin, stiffmax, stiffini, stiffavg)
Definition law100_upd.F:272
#define min(a, b)
Definition macros.h:20
subroutine my_barrier
Definition machine.F:31
subroutine startime(event, itask)
Definition timer.F:93
subroutine stoptime(event, itask)
Definition timer.F:135
subroutine update_struct_int21(cand_e, ii_stok, iform, nin, nmn, intth, mndd, msr_l, irectt)
subroutine upgrade_multimp(ni, multimp_parameter, intbuf_tab)