OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
deallocate_buffer.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!|| deallocate_elbuf ../starter/source/elements/elbuf_init/deallocate_buffer.F
25!||--- called by ------------------------------------------------------
26!|| lectur ../starter/source/starter/lectur.F
27!||--- calls -----------------------------------------------------
28!|| deallocate_one_element_group ../starter/source/elements/elbuf_init/deallocate_one_element_group.F
29!||--- uses -----------------------------------------------------
30!|| elbuftag_mod ../starter/share/modules1/elbuftag_mod.F
31!|| message_mod ../starter/share/message_module/message_mod.F
32!||====================================================================
33 SUBROUTINE deallocate_elbuf(
34 . ELBUF_TAB ,IGEO ,IPARG , IXS ,IXC ,IXTG ,
35 . FLAG_XFEM ,IXT ,IXP ,IXR ,KXX )
36C-----------------------------------------------
37C M o d u l e s
38C-----------------------------------------------
39 USE elbufdef_mod
40 USE elbuftag_mod
41 USE message_mod
42 use element_mod , only : nixs,nixq,nixc,nixt,nixp,nixr,nixtg
43! USE STACK_MOD
44C-----------------------------------------------
45C I m p l i c i t T y p e s
46C-----------------------------------------------
47#include "implicit_f.inc"
48C-----------------------------------------------
49C C o m m o n B l o c k s
50C-----------------------------------------------
51#include "param_c.inc"
52#include "com01_c.inc"
53#include "com04_c.inc"
54#include "scr23_c.inc"
55#include "sphcom.inc"
56#include "tablen_c.inc"
57C-----------------------------------------------
58C D u m m y A r g u m e n t s
59C-----------------------------------------------
60 INTEGER IPARG(NPARG,NGROUP),IGEO(NPROPGI,NUMGEO),IXS(NIXS,NUMELS),IXC(NIXC,NUMELC),IXTG(NIXTG,NUMELTG),FLAG_XFEM,
61 . IXT(NIXT,NUMELT),IXP(NIXP,NUMELP),IXR(NIXR,NUMELR),KXX(NIXX,*)
62 TYPE(elbuf_struct_),TARGET ,DIMENSION(NGROUP) :: ELBUF_TAB
63C-----------------------------------------------
64C L o c a l V a r i a b l e s
65C-----------------------------------------------
66 INTEGER I,J,K,IL,IR,IS,IT,NG,BUFLEN,IRUPT,IPID,IMID,IPRT,
67 . NEL,NPT,NPG,MLW,ISORTH,ISRATE,ISROT,IREP,ISVIS,NLAY,
68 . istra,ifail,nfail,ngfail,ieos,ixfem,nptr,npts,nptt,ishplyxfem,
69 . nft,nft0,kfts,ity,jale,off,ismstr,icpre,nsg,icnod,isnod,jeul,
70 . jtur,jthe,jlag,irs,ire,icstr,nvc,jmult,iadm1,iadm2,iadm3,
71 . mmat1,mmat2,mmat3,jhbe,jivf,jpor,ipla,proc,jclos,codconv,
72 . iint,jcvt,icsen,ilev,iexpan,igre,jsms,maxflay,ivisc,law_vis,
73 . nuvarm,nuvarv,igtyp,tshell,tsh_ort,lintloc,
74 . npar_lay,npar_tab,npar_lbuf,nintlay,limat,
75 . lifail,lloc,lfail,lvisc,lmat,lporo,leos,nctrl,
76 . isubstack,
77 . ipmat,nuvarn,law,iboltp,inloc
78 INTEGER, ALLOCATABLE, DIMENSION(:) :: IMAT
79 TYPE(ELBUF_STRUCT_), POINTER :: ELBUF
80 TYPE(buf_lay_) , POINTER :: BUFLY
81 TYPE(buf_intlay_) , POINTER :: INTLAY
82 TYPE(g_bufel_) , POINTER :: GBUF
83 TYPE(l_bufel_) , POINTER :: LBUF
84 TYPE(buf_intloc_) , POINTER :: ILBUF
85 TYPE(fail_loc_) , POINTER :: FLOC
86C-----------------------------------------------
87C S o u r c e L i n e s
88C-----------------------------------------------
89 DO ng = 1,ngroup
90c
91 mlw = iparg(1,ng) ! material law type
92 nel = iparg(2,ng)
93 nft = iparg(3,ng)
94 ity = iparg(5,ng)
95 npt = iparg(6,ng)
96 jale = iparg(7,ng)
97 off = iparg(8,ng)
98 ismstr = iparg(9,ng)
99 icpre = iparg(10,ng)
100 nsg = icpre
101 icnod = iparg(11,ng)
102 jeul = icnod
103 jtur = iparg(12,ng)
104 jthe = iparg(13,ng)
105 jlag = iparg(14,ng)
106 irs = iparg(15,ng)
107 ire = iparg(16,ng)
108 icstr = iparg(17,ng)
109 nvc = iparg(19,ng)
110 jmult = iparg(20,ng)
111 iadm1 = iparg(21,ng)
112 iadm2 = iparg(22,ng)
113 jhbe = iparg(23,ng)
114 jivf = iparg(24,ng)
115 mmat1 = iparg(25,ng)
116 mmat2 = iparg(26,ng)
117 jpor = iparg(27,ng)
118 isnod = iparg(28,ng)
119 ipla = iparg(29,ng)
120 kfts = iparg(30,ng)
121 nft0 = iparg(31,ng)
122 proc = iparg(32,ng)
123 jclos = iparg(33,ng)
124 codconv = iparg(34,ng) ! pm(10)
125 irep = iparg(35,ng)
126 iint = iparg(36,ng)
127 jcvt = iparg(37,ng)
128 igtyp = iparg(38,ng)
129 icsen = iparg(39,ng)
130 israte = iparg(40,ng)
131 isrot = iparg(41,ng)
132 isorth = iparg(42,ng)
133 ifail = iparg(43,ng)
134 istra = iparg(44,ng)
135 ilev = iparg(45,ng)
136 npg = iparg(48,ng)
137 iexpan = iparg(49,ng)
138 ishplyxfem = iparg(50,ng)
139 igre = iparg(51,ng)
140 jsms = iparg(52,ng)
141 invol = iparg(53,ng)
142 ixfem = iparg(54,ng) ! flag XFEM
143 ieos = iparg(55,ng)
144 nptr = iparg(56,ng)
145 npts = iparg(57,ng)
146 nptt = iparg(58,ng)
147 nlay = iparg(59,ng)
148 isvis = iparg(60,ng) ! viscous stress flag
149 ivisc = iparg(61,ng) ! /VISC models flag
150 ipid = iparg(62,ng) ! property number
151 nctrl = iparg(63,ng) ! Control point number , iso-geometric elements
152 isubstack = iparg(71,ng)
153 iboltp = iparg(72,ng) ! Bolt preloading flag
154 inloc = iparg(78,ng) ! Non-local regularization flag
155 nintlay = 0
156cc NXEL = 0
157c----
158 npar_tab = 9 ! number of integer parameters at top structure level
159 npar_lay = 11 ! number of integer parameters at layer level
160 npar_lbuf = 2 ! number of integer parameters at LBUF layer
161
162 buflen = 0
163 nfail = 0
164 lfail = 0
165 lvisc = 0
166 lmat = 0
167 lporo = 0
168 leos = 0
169 limat = 0
170 lifail = 0
171 nuvarn = 0
172
173 IF (ixfem == 0 .AND. flag_xfem == 1) cycle ! no "XFEM_TAB" buffer for non xfem PARTS
174c------------------------------------------------------
175 IF (ity == 1 .OR. ity == 2 .OR. ity == 51 .OR. ity == 101 ) THEN ! solids, quads & SPH cells
176c------------------------------------------------------
177 tshell = 0
178 tsh_ort = 0
179 IF (igtyp==20 .OR. igtyp==21 .OR. igtyp==22 .OR. isnod == 16) tshell = 1
180 IF (igtyp==21 .OR. igtyp==22) tsh_ort = 1
181c
182c---------ELEMENT PROPERTY
183 IF (ity == 101) THEN
184 nlay = 1
185 ELSEIF (npt == 1) THEN
186 nptr = 1
187 npts = 1
188 nptt = 1
189 IF (jmult > 0) THEN ! multimateriau
190 nlay = 2
191 ELSE
192 nlay = 1
193 ENDIF
194C Multifluid law
195 IF (mlw == 151) THEN
196 nlay = iparg(20, ng)
197 ENDIF
198 ELSEIF (tshell == 1) THEN ! NLAY >= 1
199 npts = npt/100
200 nptt = mod(npt/10,10)
201 nptr = mod(npt,10)
202 IF (jhbe==15) THEN ! Thick shell HSPH
203 nlay = npt
204 nptr = 1
205 npts = 1
206 nptt = 1
207 ELSEIF (jhbe == 14) THEN ! Thick shell H8
208c plan = (r,s), layers = t
209c ICS=ICSIG/100
210c ICT=MOD(ICSIG/10,10)
211c ICR=MOD(ICSIG,10)
212 IF (tsh_ort == 0) THEN
213 nlay = nptt
214 nptt = 1
215 ELSEIF (icstr == 1) THEN
216 nlay = nptr
217 nptr = npts
218 npts = nptt
219 nptt = 1
220 ELSEIF (icstr == 100) THEN
221 nlay = npts
222 npts = nptr
223 nptr = nptt
224 nptt = 1
225 ELSE
226 nlay = nptt
227 nptt = 1
228 ENDIF
229 IF (nlay == 0) THEN
230 ipid = ixs(10,nft+1)
231 nlay = igeo(15,ipid)
232 ENDIF
233 ELSEIF (jhbe==16) THEN ! Thick shell 16 nodes
234 nptr = npt/100
235 npts = mod(npt/10,10)
236 nptt = mod(npt,10)
237c IF (TSH_ORT == 0) THEN
238c NLAY = NPTT
239c NPTT = 1
240c ELSE
241 nlay = npts
242 npts = 1
243c ENDIF
244 ENDIF
245c---------
246 ELSE ! Solid property
247 nlay = 1
248 IF (jhbe == 16 .AND. isnod == 20) THEN
249 nptr = npt/100
250 npts = mod(npt/10,10)
251 nptt = mod(npt,10)
252 ELSEIF (jhbe == 14) THEN
253 npts = abs(npt)/100
254 nptt = mod(abs(npt)/10,10)
255 nptr = mod(abs(npt),10)
256 ELSEIF (jhbe == 12) THEN
257 nptr = 1
258 npts = 1
259 nptt = npt
260 npg = npt
261 ELSEIF (jhbe == 17) THEN
262 npts = 2
263 nptt = 2
264 nptr = 2
265 ELSE
266 nptr = npt
267 npts = 1
268 nptt = 1
269 ENDIF
270 IF (n2d > 0 .AND. (jhbe == 17.OR.jhbe == 22)) THEN
271 npts = 2
272 nptt = 1
273 nptr = 2
274 npg = npt
275 END IF
276 ENDIF
277
278 CALL deallocate_one_element_group(elbuf_tab,nlay,nptr,npts,nptt,nintlay,nel,npt,ng,ngroup,ity,igtyp)
279
280 DO il = 1, nlay
281 nuvarm = elbuf_tab(ng)%BUFLY(il)%NVAR_MAT
282 nuvarv = elbuf_tab(ng)%BUFLY(il)%NVAR_VISC
283 nfail = elbuf_tab(ng)%BUFLY(il)%NFAIL
284 DO ir = 1,nptr
285 DO is = 1,npts
286 DO it = 1,nptt
287 lmat = lmat + nuvarm*nel
288 lvisc = lvisc + nuvarv*nel
289 DO j = 1,nfail
290 floc=>elbuf_tab(ng)%BUFLY(il)%FAIL(ir,is,it)%FLOC(j)
291 IF(ASSOCIATED(floc%VAR)) DEALLOCATE(floc%VAR)
292 IF(ASSOCIATED(floc%DAM)) DEALLOCATE(floc%DAM)
293 IF(ASSOCIATED(floc%DAMMX)) DEALLOCATE(floc%DAMMX)
294 IF(ASSOCIATED(floc%DAMINI)) DEALLOCATE(floc%DAMINI)
295 IF(ASSOCIATED(floc%TDEL)) DEALLOCATE(floc%TDEL)
296 IF(ASSOCIATED(floc%INDX)) DEALLOCATE(floc%INDX)
297 IF(ASSOCIATED(floc%OFF)) DEALLOCATE(floc%OFF)
298 ENDDO
299 IF(ASSOCIATED(elbuf_tab(ng)%BUFLY(il)%MAT(ir,is,it)%VAR)) DEALLOCATE(elbuf_tab(ng)%BUFLY(il)%MAT(ir,is,it)%VAR)
300 IF(ASSOCIATED(elbuf_tab(ng)%BUFLY(il)%VISC(ir,is,it)%VAR)) DEALLOCATE(elbuf_tab(ng)%BUFLY(il)%VISC(ir,is,it)%VAR)
301 IF(ASSOCIATED(elbuf_tab(ng)%BUFLY(il)%FAIL(ir,is,it)%FLOC))DEALLOCATE(elbuf_tab(ng)%BUFLY(il)%FAIL(ir,is,it)%FLOC)
302 IF(ASSOCIATED(elbuf_tab(ng)%BUFLY(il)%EOS(ir,is,it)%VAR))DEALLOCATE(elbuf_tab(ng)%BUFLY(il)%EOS(ir,is,it)%VAR)
303 IF(ASSOCIATED(elbuf_tab(ng)%BUFLY(il)%EOS(ir,is,it)%VARTMP))DEALLOCATE(elbuf_tab(ng)%BUFLY(il)%EOS(ir,is,it)%VARTMP)
304 ENDDO
305 ENDDO
306 ENDDO
307 ENDDO
308
309 DO il = 1, nlay
310 bufly => elbuf_tab(ng)%BUFLY(il)
311 IF(ASSOCIATED(bufly%LBUF)) DEALLOCATE(bufly%LBUF)
312 IF(ASSOCIATED(bufly%MAT)) DEALLOCATE(bufly%MAT)
313 IF(ASSOCIATED(bufly%FAIL)) DEALLOCATE(bufly%FAIL)
314 IF(ASSOCIATED(bufly%PROP)) DEALLOCATE(bufly%PROP)
315 IF(ASSOCIATED(bufly%EOS)) DEALLOCATE(bufly%EOS)
316 IF(ASSOCIATED(bufly%VISC)) DEALLOCATE(bufly%VISC)
317 IF(ASSOCIATED(bufly%PORO)) DEALLOCATE(bufly%PORO)
318 ENDDO
319
320 IF(ASSOCIATED(elbuf_tab(ng)%INTLAY)) DEALLOCATE(elbuf_tab(ng)%INTLAY)
321 IF(ASSOCIATED(elbuf_tab(ng)%BUFLY)) DEALLOCATE(elbuf_tab(ng)%BUFLY)
322
323c------------------------------------------------------
324 ELSEIF (ity == 3 .OR. ity == 7) THEN ! shell properties
325c------------------------------------------------------
326 IF (ity == 3) THEN
327 imid = ixc(1,nft+1)
328 ipid = ixc(6,nft+1)
329 ELSEIF (ity == 7) THEN
330 imid = ixtg(1,nft+1)
331 ipid = ixtg(5,nft+1)
332 ENDIF
333
334 nptt = 1
335 IF (ity == 3 .and. jhbe == 11) THEN
336 nptr = 2
337 npts = 2
338 ELSEIF (ity==7 .and. jhbe == 30) THEN
339 nptr = 3
340 npts = 1
341 ELSE ! One Gauss Point We Surface
342 nptr = 1
343 npts = 1
344 ENDIF
345 IF (igtyp == 10 .or. igtyp == 11 .or. igtyp == 16 .or. igtyp == 17 .or. igtyp == 51 .or. igtyp == 52) THEN
346 nlay = max(1,npt)
347 nptt = 1
348 ELSE ! IGTYP = 1 .or. IGTYP = 9
349 nlay = 1
350 nptt = max(1,npt) ! attention to global integration
351 ENDIF
352 IF (igtyp == 17 .and. ishplyxfem == 1) nintlay = nlay-1
353 IF (ity == 7 .AND. mlw == 151) THEN
354 nlay = iparg(20, ng)
355 ENDIF
356
357 npg = nptr*npts
358c-------------------------------------------------
359 IF (igtyp == 51 .OR. igtyp == 52) THEN
360 npt = npg*npt
361 ELSE
362 npt = npg*nlay*nptt
363 ENDIF
364c-----------------------------------------------------
365c deallocation of the sub-structures of the element buffer
366c-----------------------------------------------------
367 CALL deallocate_one_element_group(elbuf_tab,nlay,nptr,npts,nptt,nintlay,nel,npt,ng,ngroup,ity,igtyp)
368
369 DO il = 1, nintlay
370 nuvarm = elbuf_tab(ng)%INTLAY(il)%NVAR_MAT
371 nfail = elbuf_tab(ng)%INTLAY(il)%NFAIL
372 DO ir = 1,nptr
373 DO is = 1,npts
374C
375 DO j = 1,nfail
376 floc=>elbuf_tab(ng)%BUFLY(il)%FAIL(ir,is,it)%FLOC(j)
377 IF(ASSOCIATED(floc%VAR)) DEALLOCATE(floc%VAR)
378 ENDDO
379
380 IF(ASSOCIATED(elbuf_tab(ng)%INTLAY(il)%MAT(ir,is)%VAR))DEALLOCATE(elbuf_tab(ng)%INTLAY(il)%MAT(ir,is)%VAR)
381 IF(ASSOCIATED(elbuf_tab(ng)%INTLAY(il)%FAIL(ir,is)%FLOC))DEALLOCATE(elbuf_tab(ng)%INTLAY(il)%FAIL(ir,is)%FLOC)
382 ENDDO
383 ENDDO
384 ENDDO
385
386 DO il = 1, nlay
387 nfail = elbuf_tab(ng)%BUFLY(il)%NFAIL
388 nptt = elbuf_tab(ng)%BUFLY(il)%NPTT
389 DO ir = 1,nptr
390 DO is = 1,npts
391 DO it = 1,nptt
392 DO j = 1,nfail
393 floc=>elbuf_tab(ng)%BUFLY(il)%FAIL(ir,is,it)%FLOC(j)
394 IF(ASSOCIATED(floc%VAR)) DEALLOCATE(floc%VAR)
395 IF(ASSOCIATED(floc%DAM)) DEALLOCATE(floc%DAM)
396 IF(ASSOCIATED(floc%DAMMX)) DEALLOCATE(floc%DAMMX)
397 IF(ASSOCIATED(floc%DAMINI)) DEALLOCATE(floc%DAMINI)
398 IF(ASSOCIATED(floc%TDEL)) DEALLOCATE(floc%TDEL)
399 IF(ASSOCIATED(floc%INDX)) DEALLOCATE(floc%INDX)
400 IF(ASSOCIATED(floc%OFF)) DEALLOCATE(floc%OFF)
401 ENDDO
402 IF(ASSOCIATED(elbuf_tab(ng)%BUFLY(il)%MAT(ir,is,it)%VAR))DEALLOCATE(elbuf_tab(ng)%BUFLY(il)%MAT(ir,is,it)%VAR)
403 IF(ASSOCIATED(elbuf_tab(ng)%BUFLY(il)%VISC(ir,is,it)%VAR))DEALLOCATE(elbuf_tab(ng)%BUFLY(il)%VISC(ir,is,it)%VAR)
404 IF(ASSOCIATED(elbuf_tab(ng)%BUFLY(il)%FAIL(ir,is,it)%FLOC))DEALLOCATE(elbuf_tab(ng)%BUFLY(il)%FAIL(ir,is,it)%FLOC)
405 ENDDO
406 ENDDO
407 ENDDO
408 ENDDO
409
410 DO i = 1, nintlay
411 intlay => elbuf_tab(ng)%INTLAY(i)
412 IF(ASSOCIATED(intlay%ILBUF)) DEALLOCATE(intlay%ILBUF)
413 IF(ASSOCIATED(intlay%MAT)) DEALLOCATE(intlay%MAT)
414 IF(ASSOCIATED(intlay%FAIL))DEALLOCATE(intlay%FAIL)
415 ENDDO
416
417 IF(ASSOCIATED(elbuf_tab(ng)%INTLAY))DEALLOCATE(elbuf_tab(ng)%INTLAY)
418
419 DO i = 1, nlay
420 bufly => elbuf_tab(ng)%BUFLY(i)
421 nptt = bufly%NPTT
422 IF(ASSOCIATED(bufly%LBUF))DEALLOCATE(bufly%LBUF)
423 IF(ASSOCIATED(bufly%MAT)) DEALLOCATE(bufly%MAT)
424 IF(ASSOCIATED(bufly%FAIL))DEALLOCATE(bufly%FAIL)
425 IF(ASSOCIATED(bufly%PROP))DEALLOCATE(bufly%PROP)
426 IF(ASSOCIATED(bufly%EOS)) DEALLOCATE(bufly%EOS)
427 IF(ASSOCIATED(bufly%VISC))DEALLOCATE(bufly%VISC)
428 IF(ASSOCIATED(bufly%PORO))DEALLOCATE(bufly%PORO)
429 ENDDO
430
431 IF(ASSOCIATED(elbuf_tab(ng)%BUFLY)) DEALLOCATE(elbuf_tab(ng)%BUFLY)
432
433 ! Non-local table for regularization in the shell thickness
434 IF ((inloc>0).AND.(nptt>1)) THEN
435 ! Deallocating the buffer
436 DO ir = 1,nptr
437 DO is = 1,npts
438 IF(ASSOCIATED(elbuf_tab(ng)%NLOC(ir,is)%MASSTH))
439 * DEALLOCATE(elbuf_tab(ng)%NLOC(ir,is)%MASSTH)
440 IF(ASSOCIATED(elbuf_tab(ng)%NLOC(ir,is)%UNLTH))
441 * DEALLOCATE(elbuf_tab(ng)%NLOC(ir,is)%UNLTH)
442 IF(ASSOCIATED(elbuf_tab(ng)%NLOC(ir,is)%VNLTH))
443 * DEALLOCATE(elbuf_tab(ng)%NLOC(ir,is)%VNLTH)
444 IF(ASSOCIATED(elbuf_tab(ng)%NLOC(ir,is)%FNLTH))
445 * DEALLOCATE(elbuf_tab(ng)%NLOC(ir,is)%FNLTH)
446 ENDDO
447 ENDDO
448 IF(ASSOCIATED(elbuf_tab(ng)%NLOC)) DEALLOCATE(elbuf_tab(ng)%NLOC)
449 ENDIF
450c---
451c 1-D elements (TRUSS, BEAM, SPRING)
452c---
453 ELSEIF (ity == 4 .OR. ity == 5 .OR. ity == 6 .OR. ity == 100) THEN
454c------------------------------------------------------
455 IF (ity == 4) THEN ! TRUSS
456 imid = ixt(1,nft+1)
457 ipid = ixt(4,nft+1)
458 ELSEIF (ity == 5) THEN ! BEAM
459 imid = ixp(1,nft+1)
460 ipid = ixp(5,nft+1)
461 ELSEIF (ity == 6) THEN ! SPRING
462 ipid = ixr(1,nft+1)
463 ELSEIF (ity == 100) THEN ! MULTIBRIN
464 ipid = kxx(2,nft+1)
465 ENDIF
466
467 igtyp = 0
468 IF(ipid > 0)THEN
469 igtyp = igeo(11,ipid)
470 ENDIF
471C----
472 gbuf => elbuf_tab(ng)%GBUF
473
474 CALL deallocate_one_element_group(elbuf_tab,nlay,nptr,npts ,nptt, nintlay,
475 . nel ,npt ,ng ,ngroup,ity, igtyp)
476
477 IF (nlay > 0) THEN ! integrated beam (NLAY = 1)
478c
479c--- User Mat Buffer, Fail buffer, Visc buffer : alloc + init
480c
481 DO il = 1,nlay
482 nuvarm = elbuf_tab(ng)%BUFLY(il)%NVAR_MAT
483 nptt = elbuf_tab(ng)%BUFLY(il)%NPTT
484 DO ir = 1,nptr
485 DO is = 1,npts
486 DO it = 1,nptt
487
488 IF (ASSOCIATED(elbuf_tab(ng)%BUFLY(il)%MAT(ir,is,it)%VAR))
489 . DEALLOCATE(elbuf_tab(ng)%BUFLY(il)%MAT(ir,is,it)%VAR)
490 ENDDO
491 ENDDO
492 ENDDO
493 ENDDO
494
495 DO il = 1,nlay
496 bufly => elbuf_tab(ng)%BUFLY(il)
497
498 IF (ASSOCIATED(bufly%LBUF)) DEALLOCATE(bufly%MAT)
499 IF (ASSOCIATED(bufly%MAT)) DEALLOCATE(bufly%MAT)
500 ENDDO
501
502 IF (ASSOCIATED(elbuf_tab(ng)%BUFLY)) DEALLOCATE(elbuf_tab(ng)%BUFLY)
503 ENDIF ! IF (NLAY > 0)
504
505 ELSE
506 IF (ASSOCIATED(elbuf_tab(ng)%BUFLY)) DEALLOCATE(elbuf_tab(ng)%BUFLY)
507 ENDIF ! ITY = 1,2,51,101 (solid group)
508
509 ENDDO ! NG = 1,NGROUP
510
511 RETURN
512
513 END
514
subroutine deallocate_elbuf(elbuf_tab, igeo, iparg, ixs, ixc, ixtg, flag_xfem, ixt, ixp, ixr, kxx)
subroutine deallocate_one_element_group(elbuf_tab, nlay, nptr, npts, nptt, nintlay, nel, npt, ng, ngroup, ity, igtyp)
#define max(a, b)
Definition macros.h:21