38
39
40
41 USE elbufdef_mod
42
43
44
45#include "implicit_f.inc"
46
47
48
49#include "com01_c.inc"
50#include "com04_c.inc"
51#include "param_c.inc"
52#include "scr17_c.inc"
53#include "sphcom.inc"
54#include "units_c.inc"
55#include "sms_c.inc"
56
57
58
59 INTEGER NATIV_SMS(*),IPART(LIPART1,*),
60 . IXS(NIXS,*),IXS10(6,*) ,IXS16(8,*) ,IXS20(12,*),
61 . IXQ(NIXQ,*),IXC(NIXC,*), IXT(NIXT,*), IXP(NIXP,*),
62 . IXR(NIXR,*),IXTG(NIXTG,*),IPARTS(*),IPARTQ(*),IPARTC(*),
63 . IPARTT(*),IPARTP(*),IPARTR(*),IPARTG(*),IPARTX(*),
64 . IPARG(NPARG,NGROUP),IGEO(NPROPGI,*),IDDLEVEL, TAGPRT_SMS(*)
66 . dtelem(*)
67
68 TYPE(ELBUF_STRUCT_), TARGET, DIMENSION(NGROUP) :: ELBUF_TAB
69
70
71
72 INTEGER I,NEL,IAD,NFT,ITY,ISOL,NG,NUMEL,
73 . COMPT_PART(NPART),COMPT_TOT_PART(NPART),COMPT(7),COMPT_TOT,
74 . NUME(7),DT_INDEX(7)
75 CHARACTER FILNAM*109, KEYA*80, KEYA2*80
76 CHARACTER*12 :: TYPE_ELEM(7)
78 . ratio
79
80
81
82 TYPE(G_BUFEL_) ,POINTER :: GBUF
83
84
85
86
87
88
89
90
91
92
93
94
95 IF(isms_selec==1 .OR. isms_selec==2 .OR. isms_selec==4)THEN
96
97 DO ng=1,ngroup
98
99 nel = iparg(2,ng)
100 nft = iparg(3,ng)
101 iad = iparg(4,ng)
102 ity = iparg(5,ng)
103 isol = iparg(28,ng)
104 gbuf => elbuf_tab(ng)%GBUF
105
106 IF(ity==1)THEN
107 DO i=1,nel
108 IF(tagprt_sms(iparts(nft+i))/=0) gbuf%ISMS(i)=1
109 END DO
110 ELSEIF(ity==3)THEN
111 DO i=1,nel
112 IF(tagprt_sms(ipartc(nft+i))/=0) gbuf%ISMS(i)=1
113 END DO
114 ELSEIF(ity==7)THEN
115 DO i=1,nel
116 IF(tagprt_sms(ipartg(nft+i))/=0) gbuf%ISMS(i)=1
117 END DO
118 ELSEIF(ity==4)THEN
119 DO i=1,nel
120 IF(tagprt_sms(ipartt(nft+i))/=0) gbuf%ISMS(i)=1
121 END DO
122 ELSEIF(ity==5)THEN
123 DO i=1,nel
124 IF(tagprt_sms(ipartp(nft+i))/=0) gbuf%ISMS(i)=1
125 END DO
126 ELSEIF(ity==6)THEN
127 DO i=1,nel
128 IF(tagprt_sms(ipartr(nft+i))/=0) gbuf%ISMS(i)=1
129 END DO
130 END IF
131 END DO
132
133 IF(isms_selec==1 .OR. isms_selec==2) RETURN
134
135 END IF
136
137
138
139
140
141 numel= numelc+numels+numelt+numelq+numelp+numelr+numeltg
142 . +numelx+numsph+numelig3d
143
144 nume(1) = numels
145 nume(2) = numelq
146 nume(3) = numelc
147 nume(4) = numelt
148 nume(5) = numelp
149 nume(6) = numelr
150 nume(7) = numeltg
151 dt_index(1) = 0
152 DO i=2,7
153 dt_index(i) = dt_index(i-1) + nume(i-1)
154 END DO
155
156 compt(1:7) = 0
157 compt_part(1:npart) = 0
158 compt_tot_part(1:npart) = 0
159
160 type_elem(1)='SOLID'
161 type_elem(3)='SHELL-4NODES'
162 type_elem(4)='TRUSS'
163 type_elem(5)='BEAM'
164 type_elem(6)='SPRING'
165 type_elem(7)='SHELL-3NODES'
166
167
168
169
170
171 DO ng=1,ngroup
172
173 nel = iparg(2,ng)
174 nft = iparg(3,ng)
175 iad = iparg(4,ng)
176 ity = iparg(5,ng)
177 isol = iparg(28,ng)
178 gbuf => elbuf_tab(ng)%GBUF
179
180 IF (ity == 1) THEN
181
182 CALL nod_sms_dt(numnod,gbuf%ISMS,nel,nft,nixs ,1 ,8 ,
183 . ixs ,nativ_sms,dtelem,ity,dt_index(ity),
184 . iparts,compt(ity),compt_part,compt_tot_part,igeo,ipart,tagprt_sms)
185
186
187
188 IF (isol==10)
CALL nod_sms_dt_sol(numnod,gbuf%ISMS,nel,nft,6 ,numels8,
189 . ixs10 ,nativ_sms)
190 IF (isol==20)
CALL nod_sms_dt_sol(numnod,gbuf%ISMS,nel,nft,12,numels8+numels10,
191 . ixs20 ,nativ_sms)
192 IF (isol==16)
CALL nod_sms_dt_sol(numnod,gbuf%ISMS,nel,nft,8 ,numels8+numels10+numels20,
193 . ixs16 ,nativ_sms)
194
195 ELSEIF (ity==3) THEN
196
197 CALL nod_sms_dt(numnod,gbuf%ISMS,nel,nft,nixc ,1 ,4 ,
198 . ixc ,nativ_sms,dtelem,ity,dt_index(ity),
199 . ipartc,compt(ity),compt_part,compt_tot_part,igeo,ipart,tagprt_sms)
200
201 ELSEIF (ity==7) THEN
202
203 CALL nod_sms_dt(numnod,gbuf%ISMS,nel,nft,nixtg,1 ,3 ,
204 . ixtg,nativ_sms,dtelem,ity,dt_index(ity),
205 . ipartg,compt(ity),compt_part,compt_tot_part,igeo,ipart,tagprt_sms)
206
207 ELSEIF (ity==4) THEN
208
209 CALL nod_sms_dt(numnod,gbuf%ISMS,nel,nft,nixt ,1 ,2 ,
210 . ixt ,nativ_sms,dtelem,ity,dt_index(ity),
211 . ipartt,compt(ity),compt_part,compt_tot_part,igeo,ipart,tagprt_sms)
212
213 ELSEIF (ity==5) THEN
214
215 CALL nod_sms_dt(numnod,gbuf%ISMS,nel,nft,nixp ,1 ,2 ,
216 . ixp ,nativ_sms,dtelem,ity,dt_index(ity),
217 . ipartp,compt(ity),compt_part,compt_tot_part,igeo,ipart,tagprt_sms)
218
219 ELSEIF (ity==6) THEN
220
221 CALL nod_sms_dt(numnod,gbuf%ISMS,nel,nft,nixr ,1 ,2 ,
222 . ixr ,nativ_sms,dtelem,ity,dt_index(ity),
223 . ipartr,compt(ity),compt_part,compt_tot_part,igeo,ipart,tagprt_sms)
224
225 ENDIF
226
227 ENDDO
228
229 compt_tot = 0
230 DO i=1,7
231 compt_tot = compt_tot + compt(i)
232 ENDDO
233
234
235
236
237
238 IF (iddlevel == 0) THEN
239
240 WRITE(iout,1000)
241 WRITE(iout,1001)
242 IF (compt_tot>0) THEN
243 WRITE(iout,2000) compt_tot
244 ratio = 100*real(compt_tot)/real(
max(1,numel))
245 WRITE(iout,2001) ratio
246 WRITE(iout,2010)
247 WRITE(iout,2011)
248 DO i=1,7
249 IF (compt(i)>0) WRITE(iout,'(7X,A12,I10)') type_elem(i),compt(i)
250 END DO
251 WRITE(iout,2020)
252 WRITE(iout,2011)
253 WRITE(iout,2021)
254 DO i=1,npart
255 IF ((compt_part(i)>0).AND.(compt_tot_part(i)>0)) THEN
256 ratio = 100*real(compt_part(i))/real(compt_tot_part
257 WRITE(iout,'(4X,I10,19X,I10,12X,F16.1)') ipart(4,i),compt_part(i),ratio
258 ENDIF
259 ENDDO
260 ELSE
261 WRITE(iout,3000)
262 ENDIF
263
264 ENDIF
265
266
267 RETURN
268
269 1000 FORMAT(//,9x,'AUTOMATIC SELECTION OF ELEMENTS FOR AMS')
270 1001 FORMAT(9x,'---------------------------------------',/)
271
272 2000 FORMAT(3x,'TOTAL NUMBER OF ELEMENTS SELECTED ',i10)
273 2001 FORMAT(3x,'% OF ELEMENTS SELECTED IN THE MODEL',f16.1)
274 2010 FORMAT(/,3x,'REPARTITION OF SELECTED ELEMENTS BY TYPES')
275 2011 FORMAT(3x,'-----------------------------------------')
276 2020 FORMAT(/,3x,'REPARTITION OF SELECTED ELEMENTS BY PARTS')
277 2021 FORMAT(7x,'PART ID',6x,'NB OF ELEMENTS SELECTED',6x,'% OF ELEMENTS SELECTED')
278
279 3000 FORMAT(2x,'NO ELEMENTS SELECTED FOR AMS ACTIVATION')
280
subroutine nod_sms_dt(numnod, tagel_sms, nel, nft, nix, mix, lix_input, ix, tagn_sms, dtelem, ity, dt_index, ipart, compt, compt_part, compt_tot_part, igeo, ipartg, tagprt_sms)
subroutine nod_sms_dt_sol(numnod, tagel_sms, nel, nft, nix, offset, ixs, tagn_sms)