55#include
"implicit_f.inc"
65 INTEGER,
INTENT(IN) :: NUMSPH
69 INTEGER ID,IE,EL,IP,EL_FIRST,,SIZE,IND,SZELMAX,I
71 INTEGER,
DIMENSION(:),
ALLOCATABLE :: ,SORT
73 szelmax =
max(numels,numelq,numelc,numeltg,numeltria,numelt,numelp,numelr,numsph)
74 ALLOCATE(indx(szelmax*2))
75 ALLOCATE(sort(szelmax))
80 DO id=1,clause%NB_PART
82 el_first = inv_group%INDPARTS(ip)
83 el_last = inv_group%INDPARTS(ip+1)
84 SIZE =
SIZE + el_last - el_first
86 clause%NB_SOLID =
SIZE
87 ALLOCATE( clause%SOLID(size) )
90 DO id=1,clause%NB_PART
92 el_first = inv_group%INDPARTS(ip)
93 el_last = inv_group%INDPARTS(ip+1)-1
94 DO el=el_first,el_last
96 ie = inv_group%PARTS(el)
97 clause%SOLID(ind) = ie
102 sort(1:clause%NB_SOLID) = clause%SOLID(1:clause%NB_SOLID)
103 CALL my_orders(0,iwork,sort,indx,clause%NB_SOLID,1)
105 DO i=1,clause%NB_SOLID
106 clause%SOLID(i) = sort(indx(i))
114 DO id=1,clause%NB_PART
116 el_first = inv_group%INDPARTSPH(ip)
117 el_last = inv_group%INDPARTSPH(ip+1)
118 SIZE =
SIZE + el_last - el_first
120 clause%NB_SPHCEL =
SIZE
121 ALLOCATE( clause%SPHCEL(size) )
124 DO id=1,clause%NB_PART
126 el_first = inv_group%INDPARTSPH(ip)
127 el_last = inv_group%INDPARTSPH(ip+1)-1
128 DO el=el_first,el_last
130 ie = inv_group%PARTSPH(el)
131 clause%SPHCEL(ind) = ie
136 sort(1:clause%NB_SPHCEL) = clause%SPHCEL(1:clause%NB_SPHCEL)
137 CALL my_orders(0,iwork,sort,indx,clause%NB_SPHCEL,1)
139 DO i=1,clause%NB_SPHCEL
140 clause%SPHCEL(i) = sort(indx(i))
147 DO id=1,clause%NB_QUAD
149 el_first = inv_group%INDPARTQ(ip)
150 el_last = inv_group%INDPARTQ(ip+1)
151 SIZE =
SIZE + el_last - el_first
153 clause%NB_QUAD =
SIZE
154 ALLOCATE( clause%QUAD(size) )
157 DO id=1,clause%NB_QUAD
159 el_first = inv_group%INDPARTQ(ip)
160 el_last = inv_group%INDPARTQ(ip+1)-1
161 DO el=el_first,el_last
163 ie = inv_group%PARTQ(el)
164 clause%QUAD(ind) = ie
169 sort(1:clause%NB_QUAD) = clause%QUAD(1:clause%NB_QUAD)
170 CALL my_orders(0,iwork,sort,indx,clause%NB_QUAD,1)
172 DO i=1,clause%NB_QUAD
173 clause%QUAD(i) = sort(indx(i))
181 DO id=1,clause%NB_PART
183 el_first = inv_group%INDPARTC(ip)
184 el_last = inv_group%INDPARTC(ip+1)
185 SIZE =
SIZE + el_last - el_first
187 clause%NB_SH4N =
SIZE
188 ALLOCATE( clause%SH4N(size) )
191 DO id=1,clause%NB_PART
193 el_first = inv_group%INDPARTC(ip)
194 el_last = inv_group%INDPARTC(ip+1)-1
195 DO el=el_first,el_last
197 ie = inv_group%PARTC(el)
198 clause%SH4N(ind) = ie
203 sort(1:clause%NB_SH4N) = clause%SH4N(1:clause%NB_SH4N)
204 CALL my_orders(0,iwork,sort,indx,clause%NB_SH4N,1)
206 DO i=1,clause%NB_SH4N
207 clause%SH4N(i) = sort(indx(i))
214 IF (numeltg > 0)
THEN
216 DO id=1,clause%NB_PART
218 el_first = inv_group%INDPARTTG(ip)
219 el_last = inv_group%INDPARTTG(ip+1)
220 SIZE =
SIZE + el_last - el_first
222 clause%NB_SH3N =
SIZE
223 ALLOCATE( clause%SH3N(size) )
226 DO id=1,clause%NB_PART
228 el_first = inv_group%INDPARTTG(ip)
229 el_last = inv_group%INDPARTTG(ip+1)-1
230 DO el=el_first,el_last
232 ie = inv_group%PARTTG(el)
233 clause%SH3N(ind) = ie
237 sort(1:clause%NB_SH3N) = clause%SH3N(1:clause%NB_SH3N)
238 CALL my_orders(0,iwork,sort,indx,clause%NB_SH3N,1)
240 DO i=1,clause%NB_SH3N
241 clause%SH3N(i) = sort(indx(i))
248 IF (numeltria > 0)
THEN
250 DO id=1,clause%NB_PART
252 el_first = inv_group%INDPARTTRIA(ip)
253 el_last = inv_group%INDPARTTRIA(ip+1)
254 SIZE =
SIZE + el_last - el_first
256 clause%NB_TRIA =
SIZE
257 ALLOCATE( clause%TRIA(size) )
260 DO id=1,clause%NB_PART
262 el_first = inv_group%INDPARTTRIA(ip)
263 el_last = inv_group%INDPARTTRIA(ip+1)-1
264 DO el=el_first,el_last
266 ie = inv_group%PARTTRIA(el)
267 clause%TRIA(ind) = ie
271 sort(1:clause%NB_TRIA) = clause%SH3N(1:clause%NB_TRIA)
272 CALL my_orders(0,iwork,sort,indx,clause%NB_TRIA,1)
274 DO i=1,clause%NB_TRIA
275 clause%SH3N(i) = sort(indx(i))
283 DO id=1,clause%NB_PART
285 el_first = inv_group%INDPARTT(ip)
286 el_last = inv_group%INDPARTT(ip+1)
287 SIZE =
SIZE + el_last - el_first
289 clause%NB_TRUSS =
SIZE
290 ALLOCATE( clause%TRUSS(size) )
293 DO id=1,clause%NB_PART
295 el_first = inv_group%INDPARTT(ip)
296 el_last = inv_group%INDPARTT(ip+1)-1
297 DO el=el_first,el_last
299 ie = inv_group%PARTT(el)
300 clause%TRUSS(ind) = ie
305 sort(1:clause%NB_TRUSS) = clause%TRUSS(1:clause%NB_TRUSS)
306 CALL my_orders(0,iwork,sort,indx,clause%NB_TRUSS,1)
308 DO i=1,clause%NB_TRUSS
309 clause%TRUSS(i) = sort(indx(i))
318 DO id=1,clause%NB_PART
320 el_first = inv_group%INDPARTP(ip)
321 el_last = inv_group%INDPARTP(ip+1)
322 SIZE =
SIZE + el_last - el_first
325 clause%NB_BEAM =
SIZE
326 ALLOCATE( clause%BEAM(size) )
329 DO id=1,clause%NB_PART
331 el_first = inv_group%INDPARTP(ip)
332 el_last = inv_group%INDPARTP(ip+1)-1
333 DO el=el_first,el_last
335 ie = inv_group%PARTP(el)
336 clause%BEAM(ind) = ie
340 sort(1:clause%NB_BEAM) = clause%BEAM(1:clause%NB_BEAM)
341 CALL my_orders(0,iwork,sort,indx,clause%NB_BEAM,1)
343 DO i=1,clause%NB_BEAM
344 clause%BEAM(i) = sort(indx(i))
355 DO id=1,clause%NB_PART
357 el_first = inv_group%INDPARTR(ip)
358 el_last = inv_group%INDPARTR(ip+1)
359 SIZE =
SIZE + el_last - el_first
362 clause%NB_SPRING =
SIZE
363 ALLOCATE( clause%SPRING(size) )
366 DO id=1,clause%NB_PART
368 el_first = inv_group%INDPARTR(ip)
369 el_last = inv_group%INDPARTR(ip+1)-1
370 DO el=el_first,el_last
372 ie = inv_group%PARTR(el)
373 clause%SPRING(ind) = ie
377 sort(1:clause%NB_SPRING) = clause%SPRING(1:clause%NB_SPRING)
378 CALL my_orders(0,iwork,sort,indx,clause%NB_SPRING,1)
380 DO i=1,clause%NB_SPRING
381 clause%SPRING(i) = sort(indx(i))