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