39
40
41
42 USE my_alloc_mod
49
50
51
52#include "implicit_f.inc"
53
54
55
56#include "com01_c.inc"
57#include "com04_c.inc"
58#include "units_c.inc"
59#include "scr17_c.inc"
60#include "param_c.inc"
61#include "r2r_c.inc"
62
63
64
65 INTEGER, INTENT(INOUT) :: IPARTL(LIPART1,NPART)
66
67
68
69 INTEGER :: STAT,I,J,LEN1,LEN2,NUM,P,N
70 INTEGER :: K,ADD,COMPT,NB_PART,F2,IGTYP,L,PID,COMPT_STACK_TOT,COMPT_STACK
71 INTEGER :: COMPT_STACK_REMOV,COMPT_PCOMP_TOT,COMPT_PCOMP,COMPT_PCOMP_REMOV
72 INTEGER, DIMENSION(:), ALLOCATABLE :: NUMGEOSTACK1_TEMP,NUMGEOSTACK2_TEMP
73 INTEGER, DIMENSION(:,:), ALLOCATABLE :: IPM_TEMP,IGEO_TEMP
74 CHARACTER(LEN=NCHARTITLE) TITR
76 my_real,
DIMENSION(:,:),
ALLOCATABLE :: pm_temp,geo_temp
77 my_real,
DIMENSION(:,:,:),
ALLOCATABLE :: ddw_temp
78
79
80 nummat0 = nummat
81 numgeo0 = numgeo
82
83
84 ALLOCATE (pm_r2r(nummat+npart+1),stat=stat)
85 IF (stat /= 0)
CALL ancmsg(msgid=268,anmode=aninfo,msgtype=msgerror,c1=
'PM_R2R')
86 DO i=1,nummat
87 pm_r2r(i) = pm(npropm*(i-1)+20)
88 END DO
89
90 IF (ipid==0) nsubdom = 1
91
92
93
94 DO p=1,nsubdom
95 n = p
96 IF (ipid==0) n = iddom
98 DO k=1,npart
102 ENDIF
103 ENDDO
104 END DO
105 END DO
106
107 IF (ipid==0) THEN
108 DO p=1,npart
111 ELSE
113 ENDIF
114 END DO
115 ENDIF
116
117
118 compt = 0
119 compt_pcomp_tot = 0
120 compt_pcomp_remov = 0
121 compt_stack_tot = 0
122 compt_stack_remov = 0
123 ipart_pcompp = 0
124 ipart_stack = 0
125
126 DO k=1,npart
130 igtyp =
igeo(npropgi*(ipartl(2,k)-1)+11)
131 IF (igtyp==51) compt_stack_tot = compt_stack_tot + 1
132 IF (igtyp==52) compt_pcomp_tot = compt_pcomp_tot + 1
135 compt=compt+1
136 IF ((igtyp==11).OR.(igtyp==16)) THEN
137
139 ELSEIF (igtyp.EQ.52) THEN
140
142 compt_pcomp_remov = compt_pcomp_remov + 1
143 ELSEIF (igtyp.EQ.51) THEN
144
146 compt_stack_remov = compt_stack_remov + 1
147 ENDIF
148 ENDIF
149 END DO
150
151 compt_pcomp = compt_pcomp_tot - compt_pcomp_remov
152 IF (compt_pcomp > 0) ipart_pcompp = 1
153 compt_stack = compt_stack_tot - compt_stack_remov
154 IF (compt_stack > 0) ipart_stack = 1
155
156 IF (compt==0) GOTO 150
157
158 WRITE(iout,1200)
159
160
161
162 nb_part = compt
163
164 ALLOCATE (ipm_temp(npropmi,nummat+nb_part),stat=stat)
165 IF (stat /= 0)
CALL ancmsg(msgid=268,anmode=aninfo,msgtype=msgerror,c1=
'IPM_TEMP')
166 ALLOCATE (pm_temp(npropm,nummat+nb_part),stat=stat)
167 IF (stat /= 0)
CALL ancmsg(msgid=268,anmode=aninfo,msgtype=msgerror,c1=
'PM_TEMP')
168 ALLOCATE (ddw_temp(2,2,nummat+nb_part+1),stat=stat)
169 IF (stat /= 0)
CALL ancmsg(msgid=268,anmode=aninfo,msgtype=msgerror,c1=
'DDW_TEMP')
170
171 ipm_temp(:,:)=0
172 pm_temp(:,:)=0
173 ddw_temp(:,:,:)=0
174
175
176
177 DO i=1,nummat
178 DO j=1,npropmi
179 ipm_temp(j,i)=
ipm(npropmi*(i-1)+j)
180 END DO
181 END DO
182
183 DO i=1,nummat
184 DO j=1,npropm
185 pm_temp(j,i)=pm(npropm*(i-1)+j)
186 END DO
187 END DO
188
189 DO i=1,nummat
190 DO j=1,2
191 DO l=1,2
192 ddw_temp(j,l,i)=ddweights(j,l,i)
193 ENDDO
194 END DO
195 END DO
196
197 DO j=1,2
198 DO l=1,2
199 ddw_temp(j,l,nummat+nb_part+1)=ddweights(j,l,nummat+1)
200 ENDDO
201 END DO
202
203
204 num = 0
205 DO i=1,nummat
206 IF (num<=ipm_temp(1,i)) num=ipm_temp(1,i)
207 END DO
208
209
210
211 DO k=1,npart
213
214 num = num+1
215 nummat = nummat+1
216
218
219 f2 = ipartl(1,k)
220 pm_temp(1,nummat)= 1e-20
221 pm_temp(19,nummat) =zero
222 pm_temp(20,nummat) = pm_temp(20,f2)
223 pm_r2r(nummat)= pm_temp(20,f2)
224 pm_temp(21,nummat) = pm_temp(21,f2)
225 pm_temp(32,nummat) = pm_temp(32,f2)
226 pm_temp(70,nummat) =zero
227 pm_temp(71,nummat) =zero
228 pm_temp(72,nummat) =zero
229 pm_temp(75,nummat) = pm_temp(75,f2)
230 pm_temp(76,nummat) = pm_temp(76,f2)
231 pm_temp(89,nummat) = pm_temp(1,nummat)
232 pm_temp(100,nummat) = pm_temp(100,f2)
233
234 ELSE
235
236 pm_temp(1,nummat)= 1e-20
237 pm_temp(19,nummat) =zero
238 pm_temp(70,nummat) =zero
239 pm_temp(71,nummat) =zero
240 pm_temp(72,nummat) =zero
241 pm_temp(89,nummat) = pm_temp(1,nummat)
242
243 DO i=1,
igeo(npropgi*(ipartl(2,k)-1)+4)
244 f2 =
igeo(npropgi*(ipartl(2,k)-1)+100+i)
245 alphai = geo(npropg*(ipartl(2,k)-1)+300+i)
246 pm_temp(20,nummat) = pm_temp(20,nummat) + alphai*pm_temp(20,f2)
247 pm_r2r(nummat)= pm_r2r(nummat) + alphai*pm_temp(20,f2)
248 pm_temp(21,nummat) = pm_temp(21,nummat) + alphai*pm_temp(21,f2)
249 pm_temp(32,nummat) = pm_temp(32,nummat) + alphai*pm_temp(32,f2)
250 pm_temp(75,nummat) = pm_temp(75,nummat) + alphai*pm_temp(75,f2)
251 pm_temp(76,nummat) = pm_temp(76,nummat) + alphai*pm_temp(76,f2)
252 pm_temp(100,nummat) = pm_temp(100,nummat) + alphai*pm_temp(100,f2)
253 END DO
254
255 ENDIF
256
257 ipm_temp(1,nummat)= num
258 ipm_temp(2,nummat)= 0
259 titr = "Multidomains void material"
260 CALL fretitl(titr,ipm_temp(npropmi-ltitr,nummat),ltitr)
261
262 WRITE(iout,1300) num,pm_temp(1,nummat)
263 . ,pm_temp(20,nummat),pm_temp(21,nummat),ipartl(4,k)
264
265 ipartl(5,k)= num
266 ipartl(1,k)= nummat
267
268 ENDIF
269
270 END DO
271
272
273
274 len1 = npropmi*nummat
275 len2 = npropm*nummat
276
277 DEALLOCATE(
ipm,pm,ddweights)
278 ALLOCATE (
ipm(len1),stat=stat)
279 IF (stat /= 0)
CALL ancmsg(msgid=268,anmode=aninfo, msgtype=msgerror, c1=
'IPM')
280 ALLOCATE (pm(len2),stat=stat)
281 IF (stat /= 0)
CALL ancmsg(msgid=268,anmode=aninfo, msgtype=msgerror, c1=
'PM'
283
284 DO i=1,nummat
285 DO j=1,npropmi
286 ipm(npropmi*(i-1)+j)=ipm_temp(j,i)
287 END DO
288 END DO
289
290 DO i=1,nummat
291 DO j=1,npropm
292 pm(npropm*(i-1)+j)=pm_temp(j,i)
293 END DO
294 END DO
295
296 DO i=1,nummat+1
297 DO j=1,2
298 DO l=1,2
299 ddweights(j,l,i)=ddw_temp(j,l,i)
300 ENDDO
301 END DO
302 END DO
303
304 DEALLOCATE(ipm_temp,pm_temp,ddw_temp
305
306
307
308 DO k=1,npart
310
311 pid =
igeo(npropgi*(ipartl(2,k)-1)+1)
312
313
314
315 nb_part = 1
316
317 CALL my_alloc (igeo_temp,npropgi,numgeo+nb_part)
318 CALL my_alloc (geo_temp,npropg,numgeo+nb_part)
319 CALL my_alloc (numgeostack1_temp,numgeo+nb_part)
320 CALL my_alloc (numgeostack2_temp,numstack)
321
322 igeo_temp(:,:)=0
323 geo_temp(:,:)=0
324 numgeostack1_temp(:)=0
325 numgeostack2_temp(:)=0
326
327
328
329 DO i=1,numgeo
330 DO j=1,npropgi
331 igeo_temp(j,i)=
igeo(npropgi*(i-1)+j)
332 END DO
333 END DO
334
335 DO i=1,numgeo
336 DO j=1,npropg
337 geo_temp(j,i)=geo(npropg*(i-1)+j)
338 END DO
339 END DO
340
341 DO i=1,numgeo
343 END DO
344
345 DO i=1,numstack
347 END DO
348
349
350 num = 0
351 DO i=1,numgeo
352 IF (num.LE.igeo_temp(1,i)) num=igeo_temp(1,i)+1
353 END DO
354
355
356
357 f2 = ipartl(2,k)
358 numgeo = numgeo+1
359
360 igeo_temp(1,numgeo)=num
361 geo_temp(1,numgeo)=geo_temp(1,f2)
362 numgeostack1_temp(numgeo)=0
363
364 titr = "Multidomains void property"
365 CALL fretitl(titr,igeo_temp(npropgi-ltitr,numgeo),ltitr)
366
367 WRITE(iout,1400) num,geo_temp(1,numgeo),ipartl(4,k)
368
369
370 ipartl(6,k)= num
371 ipartl(2,k)= numgeo
372
373
374
375 len1 = npropgi*numgeo
376 len2 = npropg*numgeo
377
379 CALL my_alloc (
igeo,len1)
380 CALL my_alloc (geo,len2)
382
383 DO i=1,numgeo
384 DO j=1,npropgi
385 igeo(npropgi*(i-1)+j)=igeo_temp(j,i)
386 END DO
387 END DO
388
389 DO i=1,numgeo
390 DO j=1,npropg
391 geo(npropg*(i-1)+j)=geo_temp(j,i)
392 END DO
393 END DO
394
395 DO i=1,numgeo
397 END DO
398
399 DO i=1,numstack
401 END DO
402
403 DEALLOCATE(igeo_temp,geo_temp,numgeostack1_temp,numgeostack2_temp)
404
405 ENDIF
406
407 END DO
408
409
411
412
413150 CONTINUE
414
415 RETURN
416 1200 FORMAT(
417 . //' MULTIDOMAINS SPECIAL TREATMENTS '/
418 . ' --------------------------------- '/)
419 1300 FORMAT(
420 & 5x,40hvoid material created ,/,
421 & 5x,40h ----------- ,/,
422 & 5x,40hmaterial
id . . . . . . . . . . . . .=,i10/,
423 & 5x,40hdensity . . . . . . . . . . . . . . .=,e12.4/,
424 & 5x,40hyoung'S MODULUS . . . . . . . . . . . .=,E12.4/,
425 & 5X,40HPOISSON's ratio . . . . . . . . . . . .=,e12.4/,
426 & 5x,40happlied on part . . . . . . . . . . . =,i10//)
427 1400 FORMAT(
428 & 5x,40hvoid property created ,/,
429 & 5x,40h ----------- ,/,
430 & 5x,40hproperty
id . . . . .
431 & 5x,40hthickness. . . . . . . . . . . . . . .=,e12.4/,
432 & 5x,40happlied on part . . . . . . . . . . . =,i10//)
433
434 RETURN
integer, parameter nchartitle
integer, dimension(:), allocatable tag_part
integer, dimension(:), allocatable isubdom_part
integer, dimension(:,:), allocatable ipart_r2r
integer, dimension(:,:), allocatable isubdom
integer, dimension(:), allocatable ipm
integer, dimension(:), allocatable igeo
integer, dimension(:), allocatable numgeostack
subroutine init_mat_weight(nummat)
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)