41
42
43
44 USE elbufdef_mod
46 USE my_alloc_mod
47 use element_mod , only : nixc,nixtg
48
49
50
51#include "implicit_f.inc"
52
53
54
55#include "com01_c.inc"
56#include "com04_c.inc"
57#include "param_c.inc"
58#include "scr16_c.inc"
59#include "scr17_c.inc"
60#include "spmd_c.inc"
61#include "task_c.inc"
62#include "units_c.inc"
63
64
65
66 INTEGER ITAB(*), ITABG(*), LENG, IPART(LIPART1,*),
67 . IGEO(NPROPGI,*), IXC(NIXC,*), IXTG(NIXTG,*),
68 . IPARTC(*), IPARTTG(*), IPART_STATE(*),
69 . NODTAG(*), STAT_INDXC(*), STAT_INDXTG(*),
70 . LENGC, LENGTG, IPARG(NPARG,*),IDEL
71 TYPE (ELBUF_STRUCT_), DIMENSION(NGROUP), TARGET :: ELBUF_TAB
73 . thke(*)
74
75
76
77 INTEGER I, N, , IPRT, IPRT0, K, II
78 INTEGER NG, NEL, NFT, LFT, LLT, ITY, LEN, ITHK, MLW,IOFF
79 INTEGER WORK(70000)
80 INTEGER THK_LEN,THK0_LEN
81 INTEGER,DIMENSION(:),ALLOCATABLE :: IADD
82 INTEGER,DIMENSION(:,:),ALLOCATABLE :: IADG
83 INTEGER,DIMENSION(:),ALLOCATABLE :: NP
84 INTEGER,DIMENSION(:),ALLOCATABLE :: NPGLOB
85 INTEGER,DIMENSION(:,:),ALLOCATABLE :: CLEF
86 DOUBLE PRECISION, DIMENSION(:), ALLOCATABLE :: THK
87 DOUBLE PRECISION, DIMENSION(:), ALLOCATABLE :: THK0
88 TYPE(G_BUFEL_) ,POINTER :: GBUF
89
90 CALL my_alloc(np,
max(7*numelc,6*numeltg
91 CALL my_alloc(npglob,
max(7*lengc,6*lengtg))
92 CALL my_alloc(clef,2,
max(numelcg,numeltgg))
93 CALL my_alloc(iadg,nspmd,npart)
94 CALL my_alloc(iadd,npart+1)
95
96
97
98 thk_len =
max(1,
max(numelc,numeltg))
99 ALLOCATE(thk(thk_len))
100 IF (ispmd == 0) THEN
101 thk0_len =
max(1,
max(numelcg,numeltgg))
102 ELSE
103 thk0_len=1
104 ENDIF
105 ALLOCATE(thk0(thk0_len))
106
107
108
109 iadd = 0
110 npglob(1:
max(7*lengc,6*lengtg)) = 0
111
112 jj = 0
113 ii = 0
114 DO ng=1,ngroup
115 ity =iparg(5,ng)
116 IF(ity==3) THEN
117 nel =iparg(2,ng)
118 nft =iparg(3,ng)
119 gbuf => elbuf_tab(ng)%GBUF
120 mlw
121 ithk =iparg(28,ng)
122 lft=1
123 llt=nel
124 DO i=lft,llt
125 n = i + nft
126
127 iprt=ipartc(n)
128 IF(ipart_state(iprt)==0)cycle
129
130 np(jj+1) = ixc(nixc,n)
131 np(jj+2) = itab(ixc(2,n
132 np(jj+3) = itab(ixc(3,n))
133 np(jj+4) = itab(ixc(4,n))
134 np(jj+5) = itab(ixc(5,n))
135 np(jj+6) = iprt
136 np(jj+7) = iabs(nint(gbuf%OFF(i)))
137 ii = ii + 1
138 IF (mlw /= 0 .AND. mlw /= 13) THEN
139 IF (ithk >0 ) THEN
140 thk(ii) = gbuf%THK(i)
141 ELSE
142 thk(ii) = thke(n)
143 END IF
144 ELSE
145 thk(ii) = zero
146 ENDIF
147 jj = jj + 7
148
149 stat_numelc =stat_numelc+1
150
151 nodtag(ixc(2,n))=1
152 nodtag(ixc(3,n))=1
153 nodtag(ixc(4,n))=1
154 nodtag(ixc(5,n))=1
155 END DO
156 END IF
157 END DO
158
159 stat_numelc_g=0
161 . iadg,npglob,stat_indxc)
162 len = 0
164
165
166 IF (ispmd==0) THEN
167 DO n=1,stat_numelc_g
168 stat_indxc(n)=n
169 clef(1,n)=npglob(7*(n-1)+7)
170 clef(2,n)=npglob(7*(n-1)+1)
171 END DO
172 CALL my_orders(0,work,clef,stat_indxc,stat_numelc_g,2)
173
174 iprt0=0
175 DO n=1,stat_numelc_g
176 k=stat_indxc(n)
177 jj=7*(k-1)
178 iprt=npglob(jj+6)
179 ioff=npglob(jj+7)
180 IF(idel==0.OR.(idel==1.AND.ioff >= 1)) THEN
181 IF(iprt /= iprt0)THEN
182 WRITE(iugeo,'(A,I10)')'/SHELL/',ipart(4,iprt)
183 WRITE(iugeo,'(A)')
184 . '# SHELLID NOD1 NOD2 NOD3 NOD4 THK'
185 iprt0=iprt
186 END IF
187 WRITE(iugeo,'(5I10,30X,1PE20.13)')
188 . npglob(jj+1),
189 . npglob(jj+2),npglob(jj+3),npglob(jj+4),npglob(jj+5),thk0(k)
190 ENDIF
191 END DO
192 ENDIF
193
194
195
196 iadd = 0
197
198 jj = 0
199 ii = 0
200 DO ng=1,ngroup
201 ity =iparg(5,ng)
202 IF(ity==7) THEN
203 nel =iparg(2,ng)
204 nft =iparg(3,ng)
205 gbuf => elbuf_tab(ng)%GBUF
206 mlw =iparg(1,ng)
207 ithk =iparg(28,ng)
208 lft=1
209 llt=nel
210
211 DO i=lft,llt
212 n = i + nft
213
214 iprt=iparttg(n)
215 IF(ipart_state(iprt)==0)cycle
216
217 np(jj+1) = ixtg(nixtg,n)
218 np(jj+2) = itab(ixtg(2,n))
219 np(jj+3) = itab(ixtg(3,n))
220 np(jj+4) = itab(ixtg(4,n))
221 np(jj+5) = iprt
222 np(jj+6) = iabs(nint(gbuf%OFF(i)))
223 ii = ii + 1
224 IF (mlw /= 0 .AND. mlw /= 13) THEN
225 IF (ithk >0 ) THEN
226 thk(ii) = gbuf%THK(i)
227 ELSE
228 thk(ii) = thke(n)
229 END IF
230 ELSE
231 thk(ii) = zero
232 ENDIF
233
234 jj = jj + 6
235
236 stat_numeltg =stat_numeltg+1
237
238 nodtag(ixtg(2,n))=1
239 nodtag(ixtg(3,n))=1
240 nodtag(ixtg(4,n))=1
241 END DO
242 END IF
243 END DO
244
245 stat_numeltg_g=0
247 . iadg,npglob,stat_indxtg)
248 len = 0
250
251 IF (ispmd==0) THEN
252 DO n=1,stat_numeltg_g
253 stat_indxtg(n)=n
254 clef(1,n)=npglob(6*(n-1)+6)
255 clef(2,n)=npglob(6*(n-1)+1)
256 END DO
257 CALL my_orders(0,work,clef,stat_indxtg,stat_numeltg_g,2)
258
259 iprt0=0
260 DO n=1,stat_numeltg_g
261 k=stat_indxtg(n)
262 jj=6*(k-1)
263 iprt=npglob(jj+5)
264 ioff=npglob(jj+6)
265 IF(idel==0.OR.(idel==1.AND.ioff >= 1)) THEN
266 IF(iprt /= iprt0)THEN
267 WRITE(iugeo,'(A,I10)')'/SH3N/',ipart(4,iprt)
268 WRITE(iugeo,'(A)')
269 . '# SH3NID NOD1 NOD2 NOD3 THK'
270 iprt0=iprt
271 END IF
272 WRITE(iugeo,'(4I10,40X,1PE20.13)')
273 . npglob(jj+1),
274 . npglob(jj+2),npglob(jj+3),npglob(jj+4),thk0(k)
275 ENDIF
276 END DO
277 ENDIF
278
279 DEALLOCATE(thk)
280 DEALLOCATE(thk0)
281 DEALLOCATE(np)
282 DEALLOCATE(npglob)
283 DEALLOCATE(clef)
284 DEALLOCATE(iadg)
285 DEALLOCATE(iadd)
286
287 RETURN
void my_orders(int *mode, int *iwork, int *data, int *index, int *n, int *irecl)
subroutine spmd_rgather9_dp(v, len, vp0, lenp0, iad)
subroutine spmd_iget_partn_sta(size, stat_numel, stat_lenelg, leng, np, iadg, npglob, stat_indx)