OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
i23buce.F File Reference
#include "implicit_f.inc"
#include "comlock.inc"
#include "com01_c.inc"
#include "units_c.inc"
#include "warn_c.inc"
#include "lockon.inc"
#include "lockoff.inc"

Go to the source code of this file.

Functions/Subroutines

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)

Function/Subroutine Documentation

◆ i23buce()

subroutine i23buce ( x,
integer, dimension(4,*) irect,
integer, dimension(*) nsv,
integer inacti,
integer nrtm,
integer nsn,
integer, dimension(*) cand_e,
integer, dimension(*) cand_n,
gap,
integer noint,
integer ii_stok,
tzinf,
maxbox,
minbox,
integer ncontact,
integer nb_n_b,
integer eshift,
cand_p,
integer ncont,
integer ild,
integer, dimension(*) weight,
stfn,
integer nin,
stf,
integer igap,
gap_s,
gapmin,
gapmax,
integer icurv,
integer num_imp,
integer itask,
integer i_mem,
integer, dimension(*) msr,
gap_m,
integer nsnr,
curv_max,
integer, dimension(*) renum,
integer nsnrold,
integer, dimension(*) ifpen,
integer, dimension(*) mwag,
bminma,
integer nmn,
integer, dimension(4,*) irectg,
bgapsmx,
integer, intent(in) intheat,
integer, intent(in) idt_therm,
integer, intent(in) nodadt_therm )

Definition at line 35 of file i23buce.F.

46C-----------------------------------------------
47C M o d u l e s
48C-----------------------------------------------
49 USE tri7box
50 USE message_mod
51C-----------------------------------------------
52C I m p l i c i t T y p e s
53C-----------------------------------------------
54#include "implicit_f.inc"
55#include "comlock.inc"
56C-----------------------------------------------
57C C o m m o n B l o c k s
58C-----------------------------------------------
59#include "com01_c.inc"
60#include "units_c.inc"
61#include "warn_c.inc"
62C-----------------------------------------------
63C D u m m y A r g u m e n t s
64C-----------------------------------------------
65 INTEGER NRTM, NSN, NOINT, INACTI, NIN, NSNR, NSNROLD, NMN, ITASK
66 INTEGER IRECT(4,*), NSV(*), NUM_IMP, IRECTG(4,*)
67 INTEGER CAND_E(*),CAND_N(*),MSR(*),MWAG(*),RENUM(*),IFPEN(*)
68 INTEGER NCONTACT,ESHIFT,ILD,NB_N_B, I_MEM,IGAP,ICURV,NCONT,
69 . WEIGHT(*),II_STOK
70 INTEGER, INTENT(IN) :: INTHEAT
71 INTEGER, INTENT(IN) :: IDT_THERM
72 INTEGER, INTENT(IN) :: NODADT_THERM
73C REAL
75 . gap,tzinf,maxbox,minbox,
76 . gapmin, gapmax, bminma(6),curv_max(nrtm), bgapsmx
78 . x(3,*), stfn(*), stf(*), gap_s(*), gap_m(*),
79 . cand_p(*)
80C-----------------------------------------------
81C L o c a l V a r i a b l e s
82C-----------------------------------------------
83 INTEGER I_ADD_MAX
84 parameter(i_add_max = 1001)
85C
86 INTEGER I, I_ADD, IP0, IP1, MAXSIZ,
87 . ADD(2,I_ADD_MAX), ISZNSNR
88C REAL
90 . xyzm(6,i_add_max-1), marge, aaa
91C-----------------------------------------------
92C PROV
93C-----------------------------------------------
94cc INTEGER INIVOXEL, VOXEL(LVOXEL),NBX,NBY,NBZ
95c INTEGER INIVOXEL, VOXEL(1),NBX,NBY,NBZ
96cc SAVE INIVOXEL, VOXEL
97cc DATA INIVOXEL /1/
98 INTEGER NBX,NBY,NBZ
99 INTEGER (KIND=8) :: NBX8,NBY8,NBZ8,RES8,LVOXEL8
100
101C-----------------------------------------------
102C S o u r c e L i n e s
103C-----------------------------------------------
104C
105C----- sorting of elements and nodes by boxes
106C
107C-----------------------------------------------
108C if there is not enough memory for the stacks, the sorting is restarted
109C by increasing nb_n_b (number of nodes per finished box)
110C POINTEUR NOM TAILLE
111C p0........ nsn + 3 [+ nsnrold in the case of spmd]
112C P1........Elt Bas Pile NRTM
113C P2........Elt PILE 2*NRTM
114C P21.......BPN NSN
115C P22.......PN NSN
116C P31.......ADDI 2*I_ADD_MAX
117 maxsiz = 3*(nrtm+100)
118C
119 ip0 = 1
120 ip1 = ip0 + nsn + nsnrold + 3
121C
122C-----initialization of addresses and x, y, z
123C
124C ADDE ADDN X Y Z
125C 1 1 XMIN YMIN ZMIN
126C 1 1 XMAX YMAX ZMAX
127C
128 add(1,1) = 0
129 add(2,1) = 0
130 add(1,2) = 0
131 add(2,2) = 0
132 i_add = 1
133C
134C----- BORNES DU DOMAINE DEJA CALCULEES
135C
136 xyzm(1,i_add) = bminma(4)
137 xyzm(2,i_add) = bminma(5)
138 xyzm(3,i_add) = bminma(6)
139 xyzm(4,i_add) = bminma(1)
140 xyzm(5,i_add) = bminma(2)
141 xyzm(6,i_add) = bminma(3)
142 i_mem = 0
143C
144 isznsnr = nsnr
145C
146C-----start of the sorting phase
147C
148C SEPARER B ET N EN TWO
149C
150 marge = tzinf - sqrt(three)*gap
151c CALL I23TRI(
152c 1 ADD ,NSN ,IRECT ,X ,STF ,
153c 2 STFN ,XYZM ,I_ADD ,MAXSIZ ,II_STOK ,
154c 3 CAND_N ,CAND_E ,NCONTACT ,NOINT ,TZINF ,
155c 4 MAXBOX ,MINBOX ,I_MEM ,NB_N_B ,I_ADD_MAX,
156c 5 ESHIFT ,INACTI ,NRTM ,IGAP ,GAP ,
157c 6 GAP_S ,GAPMIN ,GAPMAX ,MARGE ,CURV_MAX ,
158c 7 DEPTH ,DRAD ,MSR ,GAP_M ,
159c 8 RENUM ,NSNR ,ISZNSNR ,NSNROLD ,MWAG(IP0),
160c 9 IFPEN ,CAND_P ,NSV ,ITAGP ,IRECTG )
161
162
163 aaa = sqrt(nmn /
164 . ((bminma(1)-bminma(4))*(bminma(2)-bminma(5))
165 . +(bminma(2)-bminma(5))*(bminma(3)-bminma(6))
166 . +(bminma(3)-bminma(6))*(bminma(1)-bminma(4))))
167
168 aaa = 0.75*aaa
169
170 nbx = nint(aaa*(bminma(1)-bminma(4)))
171 nby = nint(aaa*(bminma(2)-bminma(5)))
172 nbz = nint(aaa*(bminma(3)-bminma(6)))
173 nbx = max(nbx,1)
174 nby = max(nby,1)
175 nbz = max(nbz,1)
176
177 nbx8=nbx
178 nby8=nby
179 nbz8=nbz
180 res8=(nbx8+2)*(nby8+2)*(nbz8+2)
181 lvoxel8 = lvoxel
182
183 IF(res8 > lvoxel8) THEN
184 aaa = lvoxel
185 aaa = aaa/((nbx8+2)*(nby8+2)*(nbz8+2))
186 aaa = aaa**(third)
187 nbx = int((nbx+2)*aaa)-2
188 nby = int((nby+2)*aaa)-2
189 nbz = int((nbz+2)*aaa)-2
190 nbx = max(nbx,1)
191 nby = max(nby,1)
192 nbz = max(nbz,1)
193 ENDIF
194
195 nbx8=nbx
196 nby8=nby
197 nbz8=nbz
198 res8=(nbx8+2)*(nby8+2)*(nbz8+2)
199
200 IF(res8 > lvoxel8) THEN
201 nbx = min(100,max(nbx8,1))
202 nby = min(100,max(nby8,1))
203 nbz = min(100,max(nbz8,1))
204 ENDIF
205
206C complete initialization of voxel
207C (in // SMP there is possibility of processing redundancy but no pb)
208 DO i=inivoxel,(nbx+2)*(nby+2)*(nbz+2)
209 voxel1(i)=0
210 ENDDO
211 inivoxel = max(inivoxel,(nbx+2)*(nby+2)*(nbz+2)+1)
212
213 CALL i23trivox(
214 1 nsn ,renum ,nsnr ,isznsnr ,i_mem ,
215 2 irect ,x ,stf ,stfn ,xyzm ,
216 3 nsv ,ii_stok ,cand_n ,eshift ,cand_e ,
217 4 ncontact,noint ,tzinf ,msr ,
218 5 voxel1 ,nbx ,nby ,nbz ,
219 6 inacti ,mwag(ip0),cand_p ,ifpen ,
220 7 nrtm ,nsnrold ,igap ,gap ,gap_s ,
221 8 gap_m ,gapmin ,gapmax ,marge ,curv_max,
222 9 nin ,itask ,bgapsmx ,intheat,idt_therm,nodadt_therm)
223
224C
225C I_MEM = 1 ==> PAS ASSEZ DE MEMOIRE PILE
226C I_MEM = 2 ==> PAS ASSEZ DE MEMOIRE CANDIDATES
227C I_MEM = 3 ==> TROP NIVEAUX PILE
228 IF (i_mem ==2) RETURN
229 IF(i_mem==1)THEN
230 nb_n_b = nb_n_b + 1
231 IF ( nb_n_b > nsn) THEN
232 IF (istamping == 1)THEN
233 CALL ancmsg(msgid=101,anmode=aninfo,
234 . i1=noint,i2=noint)
235 ELSE
236 CALL ancmsg(msgid=85,anmode=aninfo,
237 . i1=noint)
238 ENDIF
239 CALL arret(2)
240 ENDIF
241 ild = 1
242 ELSEIF(i_mem==2) THEN
243 IF(debug(1)>=1) THEN
244 iwarn = iwarn+1
245#include "lockon.inc"
246 WRITE(istdo,*)' **WARNING INTERFACE/MEMORY'
247 WRITE(iout,*)' **WARNING INTERFACE NB:',noint
248 WRITE(iout,*)' TOO MANY POSSIBLE IMPACTS'
249 WRITE(iout,*)' SIZE OF INFLUENCE ZONE IS'
250 WRITE(iout,*)' MULTIPLIED BY 0.75'
251#include "lockoff.inc"
252 ENDIF
253 RETURN
254 tzinf = three_over_4*tzinf
255C unconassed gearbox size
256C MINBOX= THREE_OVER_4*MINBOX
257C MAXBOX= THREE_OVER_4*MAXBOX
258 IF( tzinf<=gap ) THEN
259 CALL ancmsg(msgid=98,anmode=aninfo,
260 . i1=noint,c1='(I23BUCE)')
261 CALL arret(2)
262 ENDIF
263 ild = 1
264 ELSEIF(i_mem==3)THEN
265 nb_n_b = nb_n_b + 1
266 IF ( nb_n_b > ncont) THEN
267 CALL ancmsg(msgid=100,anmode=aninfo,
268 . i1=noint)
269 CALL arret(2)
270 ENDIF
271 ild = 1
272 ENDIF
273C
274 RETURN
#define my_real
Definition cppsort.cpp:32
subroutine i23trivox(nsn, renum, nsnr, isznsnr, i_mem, irect, x, stf, stfn, xyzm, nsv, ii_stok, cand_n, eshift, cand_e, mulnsn, noint, tzinf, msr, voxel, nbx, nby, nbz, inacti, cand_a, cand_p, ifpen, nrtm, nsnrold, igap, gap, gap_s, gap_m, gapmin, gapmax, marge, curv_max, nin, itask, bgapsmx, intheat, idt_therm, nodadt_therm)
Definition i23trivox.F:44
#define min(a, b)
Definition macros.h:20
#define max(a, b)
Definition macros.h:21
integer, dimension(lvoxel) voxel1
Definition tri7box.F:53
integer inivoxel
Definition tri7box.F:53
integer lvoxel
Definition tri7box.F:51
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:895
subroutine arret(nn)
Definition arret.F:86