50
51
52
53 USE my_alloc_mod
63
64
65
66#include "implicit_f.inc"
67
68
69
70#include "com01_c.inc"
71#include "com04_c.inc"
72#include "scr17_c.inc"
73#include "r2r_c.inc"
74#include "tabsiz_c.inc"
75#include "sphcom.inc"
76#include "param_c.inc"
77
78
79
80 TYPE(SUBMODEL_DATA) LSUBMODEL(NSUBMOD)
81 INTEGER BUF_NOD(
82
83
84
85
86INTEGER, INTENT(INOUT) :: IWORKSH(3,NUMELC+NUMELTG)
87 INTEGER ,INTENT(IN) :: NB_SEATBELT_SHELLS
88 INTEGER ,INTENT(IN) :: SEATBELT_SHELL_TO_SPRING(,2)
89 TYPE (SUBSET_) , DIMENSION(NSUBS) :: SUBSET
90 TYPE (SURF_) , DIMENSION(NSURF) :: IGRSURF
91 TYPE (SURF_) , DIMENSION(NSLIN) :: IGRSLIN
92 TYPE (GROUP_) , DIMENSION(NGRNOD) :: IGRNOD
93 TYPE (GROUP_) , DIMENSION(NGRBRIC) :: IGRBRIC
94 TYPE (GROUP_) , DIMENSION(NGRQUAD) :: IGRQUAD
95 TYPE (GROUP_) , DIMENSION(NGRSHEL) :: IGRSH4N
96 TYPE (GROUP_) , DIMENSION(NGRSH3N) :: IGRSH3N
97 TYPE (GROUP_) , DIMENSION(NGRTRUS) :: IGRTRUSS
98 TYPE (GROUP_) , DIMENSION(NGRBEAM) :: IGRBEAM
99 TYPE (GROUP_) , DIMENSION(NGRSPRI) :: IGRSPRING
100 TYPE (GROUP_) , DIMENSION(NGRPART) :: IGRPART
101
102
103
104 INTEGER NLOCAL
106
107
108
109 INTEGER I,K,J,ADD,,CUR_ID,TPP,CCPL,NF1,NF2,TYP2
110 INTEGER COMPT,NSEG,FSKW,IDOM,NUMNOD_OLD
111 INTEGER ISUR,ISURS,NTOT,NB_NOD_SUB,NB_NOD_CPL,NB_NOD
112 INTEGER MAXN,MAXANUS,SIXSN,ID_INTER,NUL,TAG,COMPTB
113 INTEGER COMPT10,COMPT20,COMPT16,COMPT8,J10,J20,J16,JJ
114 INTEGER G1,G2,GRS,GRM,GRS2,LN1,LN2,NI,ID_MON,IAD3,IO_ERR
115 INTEGER LNM,LNS,NEW_ID,SIPART0,SIPARTTH,COMPT_IP,COMPT_IP_TMP,L0
116 INTEGER ID_PROP,COEFF,NUMSPHA,NSPHRESN,FIRST_CELL,NOD_ID,PART_RES,INOD
117 INTEGER JJB,IUN,,NRBODY_OLD
118 CHARACTER TITR*40
119 INTEGER, DIMENSION(:), POINTER :: PART1,PART2
120 INTEGER, DIMENSION(:), ALLOCATABLE :: BUF_TEMP,ITAB_TEMP,IX_TEMP
121 INTEGER, DIMENSION(:), ALLOCATABLE :: CORESN,CORESC,CORESTG,COREST
122 INTEGER, DIMENSION(:), ALLOCATABLE :: CORESPA,CORESR,CORESP,CORESS,CORESSP
123 INTEGER, DIMENSION(:), ALLOCATABLE :: ,IWA_TEMP
124 INTEGER, DIMENSION(:), ALLOCATABLE :: IPM_TEMP,IGEO_TEMP,CORESMA
125 INTEGER, DIMENSION(:), ALLOCATABLE :: CORESPRO,TAGNO_TEMP
126 INTEGER, DIMENSION(:), ALLOCATABLE
127INTEGER, DIMENSION(:), ALLOCATABLE :: IX16_TEMP,CORESQ,ITAB_SUP
128 INTEGER, DIMENSION(:), ALLOCATABLE :: KXSP_TEMP,RES_TEMP,NALE_R2R_TEMP
129 INTEGER, DIMENSION(:,:), ALLOCATABLE :: RBY_MSN_TEMP,
130 my_real,
DIMENSION(:,:),
ALLOCATABLE :: x_temp
131 my_real,
DIMENSION(:),
ALLOCATABLE :: thk_tmp,pm_temp
132 my_real,
DIMENSION(:),
ALLOCATABLE :: eani_temp,geo_temp
133 CHARACTER MESS*40
134 CHARACTER(LEN=NCHARKEY) :: OPT,KEY
135 DATA mess/'MULTIDOMAIN INITIALIZATION'/
136 DATA iun/1/
137
138
139
140
141
142
143 n_part = npart
144
145
146
147
148
149 IF (flag==0) THEN
150
151
152
153
154
156 ALLOCATE(
tag_surf(numelc+numeltg+numels+npart))
157
161
162
165
166
171 DO i=1,numels
173 END DO
174 DO i=1,numelc
176 END DO
177
178
179
180
181
182 IF (iddom/=0) THEN
184 DO k=1,npart
188 ENDIF
189 ENDDO
190 END DO
191 ENDIF
192
193
194
195 IF (iddom == 0) THEN
196
197 DO idom=1,nsubdom
199 DO k=1,npart
203 ENDIF
204 ENDDO
205 END DO
206 END DO
207
208
209 DO k=1,npart
212 ELSE
214 ENDIF
215 END DO
216
217 ENDIF
218
219
220
221
222
223
224
225
226
227
228
229
230
231 DO j=1,nsubs
232 DO k=1,subset(j)%NTPART
234
235 ENDDO
236 ENDDO
237
238
239
240 DO k=1,npart
251
254 ENDIF
255 END DO
256
257
258
259
260
261 sipart0 = lipart1*npart+lipart1*nthpart
262 sipartth= 2*9*npart+2*9*nthpart
263 l0 =sipartth+sipart0+1
264
266 l0 = l0+numels
267
269 l0 = l0+numelq
270
272 l0 = l0+numelc
273
275 l0 = l0+numelt
276
278 l0 = l0+numelp
279
281 l0 = l0+numelr
282
284 l0 = l0+numeltg+numelx
285
287
288
290
291
292
293
294
295 compt = 0
296 nnodn = 0
297 nodsupr = 0
298 nsphn = 0
299 nelcn = 0
300 neltgn = 0
301 neltn = 0
302 nelrn = 0
303 nelpn = 0
304 nelqn = 0
305 nelsn = 0
306 nels10n = 0
307 nels20n = 0
308 nels16n = 0
309 ninletn = 0
310 siz_ipm_new = npropmi
311 siz_pm_new = npropm
312 siz_igeo_new = npropgi
313 siz_geo_new = npropg
314
315
316 DO j=1,nummat
318 siz_ipm_new = siz_ipm_new + npropmi
319 siz_pm_new = siz_pm_new + npropm
320 ENDIF
321 ENDDO
322
323 DO j=1,numgeo
325 siz_igeo_new = siz_igeo_new + npropgi
326 siz_geo_new = siz_geo_new + npropg
327 ENDIF
328 ENDDO
329
330 DO j=1,numnod
331 IF (
tagno(j+npart)>=0)
THEN
332 nnodn = nnodn+1
333 ELSE
334 nodsupr = nodsupr+1
335 ENDIF
336 ENDDO
337
338 DO j=1,npart
340 nparn = nparn+1
341 ENDIF
342 ENDDO
343
344 nnodn = nnodn+1
345
346 DO j=1,numelc
348 nelcn = nelcn+1
349 ENDIF
350 ENDDO
351
352 DO j=1,numeltg
354 neltgn = neltgn+1
355 ENDIF
356 ENDDO
357
358 DO j=1,numelt
360 neltn = neltn+1
361 ENDIF
362 ENDDO
363
364 DO j=1,numelr
366 nelrn = nelrn+1
367 ENDIF
368 ENDDO
369
370 DO j=1,numelp
372 nelpn = nelpn+1
373 ENDIF
374 ENDDO
375
376 DO j=1,numelq
378 nelqn = nelqn+1
379 ENDIF
380 ENDDO
381
382 DO j=1,numels
384 nelsn = nelsn+1
385 IF (eani2(j)==10) nels10n = nels10n+1
386 IF (eani2(j)==20) nels20n = nels20n+1
387 IF (eani2(j)==16) nels16n = nels16n+1
388 ENDIF
389 ENDDO
390
391 DO j=1,numsph
393 nsphn = nsphn+1
394 ENDIF
395 ENDDO
396
397 first_cell = first_sphres
398 DO j=1,nbpartinlet
399 IF (
tag_elsp(first_cell+npart)/=0)
THEN
400 ninletn = ninletn + 1
401 ENDIF
402 first_cell = first_cell + reservep(j)
403 ENDDO
404
405
406 ENDIF
407
408
409
410
411
412 IF (flag==1) THEN
413
414
415
416
417
418 ALLOCATE (ipm_temp(npropmi*nummat),pm_temp(npropm*nummat))
419 ALLOCATE(coresma(nummat))
420 DO i=1,nummat
421 DO j=1,npropmi
422 ipm_temp(npropmi*(i-1)+j)=
ipm(npropmi*(i-1)+j)
423 END DO
424 END DO
425 DO i=1,nummat
426 DO j=1,npropm
427 pm_temp(npropm*(i-1)+j)=pm(npropm*(i-1)+j)
428 END DO
429 END DO
431
432
433
434 ALLOCATE(
ipm(siz_ipm_new),pm(siz_pm_new))
435 compt = 0
436 DO j=1,nummat
437 IF ((
tag_mat(j)/=0).OR.(j==nummat))
THEN
438 compt = compt+1
439 coresma(j)=compt
440 DO k=1,npropmi
441 ipm(npropmi*(compt-1)+k)=ipm_temp(npropmi*(j-1)+k)
442 END DO
443 DO k=1,npropm
444 pm(npropm*(compt-1)+k)=pm_temp(npropm*(j-1)+k)
445 END DO
446 ENDIF
447 ENDDO
448
449 nummat = compt
450 DEALLOCATE(ipm_temp,pm_temp)
451
452
453
454
455
456 ALLOCATE (igeo_temp(npropgi*numgeo),geo_temp(npropg*numgeo))
457 ALLOCATE(corespro(numgeo))
458 DO i=1,numgeo
459 DO j=1,npropgi
460 igeo_temp(npropgi*(i-1)+j)=
igeo(npropgi*(i-1)+j)
461 END DO
462 END DO
463 DO i=1,numgeo
464 DO j=1,npropg
465 geo_temp(npropg*(i-1)+j)=geo(npropg*(i-1)+j)
466 END DO
467 END DO
469
470
471
472 ALLOCATE(
igeo(siz_igeo_new),geo(siz_geo_new))
473 compt = 0
474 maxanus = 0
475 DO j=1,numgeo
477 compt = compt+1
478 corespro(j)=compt
479 DO k=1,npropgi
480 maxanus = npropgi*(compt-1)+k
481 igeo(npropgi*(compt-1)+k)=igeo_temp(npropgi*(j-1)+k)
482 END DO
483 DO k=1,npropg
484 geo(npropg*(compt-1)+k)=geo_temp(npropg*(j-1)+k)
485 END DO
486 ENDIF
487 ENDDO
488
489 numgeo = compt
490 DEALLOCATE(igeo_temp,geo_temp)
491
492
493
494
495
496 DO j=1,npart
497 ipart(lipart1*(j-1)+1)=coresma(
ipart(lipart1*(j-1)+1))
498 ipart(lipart1*(j-1)+2)=corespro(
ipart(lipart1*(j-1)+2))
499 ENDDO
500
501
502
503
504
505 ALLOCATE(coresn(numnod),x_temp(3,numnod))
506 ALLOCATE(itab_temp(numnod))
507 DO j=1,numnod
509 x_temp(1,j)=x(3*(j-1)+1)
510 x_temp(2,j)=x(3*(j-1)+2)
511 x_temp(3,j)=x(3*(j-1)+3)
512 END DO
514
515
516 ALLOCATE(
itab(nnodn),x(3*nnodn),itab_sup(nodsupr))
521 compt = 0
522 comptb = 0
523 maxn=0
524 DO j=1,numnod
525 IF (
tagno(j+npart)>=0)
THEN
526 compt = compt+1
527 itab(compt)=itab_temp(j)
528 IF (
itab(compt)>maxn) maxn =
itab(compt)
529 coresn(j)=compt
530 x(3*(compt-1)+1)=x_temp(1,j)
531 x(3*(compt-1)+2)=x_temp(2,j)
532 x(3*(compt-1)+3)=x_temp(3,j)
533
537 ENDIF
538
539
540
541 IF (
tagno(j+npart)>1)
THEN
542 ms(compt)=1e-20
543 IF (iroddl==1) in(compt)=1e-20
544 ENDIF
545 ELSE
546 comptb = comptb+1
547 itab_sup(comptb)=itab_temp(j)
548 ENDIF
549 ENDDO
550
551
552 DO j=1,numskw
553 DO k=1,3
554 IF (
iskwn(liskn*j+k)>0)
556 END DO
557 ENDDO
558
559
560 jj = siskwn-siframe
561 IF (nsphn==numsph) THEN
562 DO j=1,numfram
563 DO k=1,3
564 IF (
iskwn(jj+liskn*j+k)>0)
565 .
iskwn(jj+liskn*j+k)=coresn(
iskwn(jj+liskn*j+k))
566 END DO
567 ENDDO
568 ELSE
569
570 jjb = siskwn-siframe-
min(iun,nspcond0)*(numsph
571 DO j=1,numfram
572 DO k=1,3
573 IF (
iskwn(jj+liskn*j+k)>0)
THEN
574 iskwn(jjb+liskn*j+k)=coresn(
iskwn(jj+liskn*j+k))
575 ENDIF
576 END DO
577 DO k=4,liskn
579 END DO
580 END DO
581 ENDIF
582
583 numnod_old = numnod
584 numnod = compt
585 numnod0 = compt
586 DEALLOCATE(itab_temp,x_temp)
587
588
589 part1 =>
itabm1(1:2*numnod)
591
592
593 IF (nodsupr/=0) THEN
594 part2 =>
itabm1(2*numnod+1:2*numnod_old)
595 CALL constit(itab_sup,part2,nodsupr)
596 DEALLOCATE(itab_sup)
597 ENDIF
598
599
600
601
602
603 IF (
ale%GLOBAL%SNALE>0)
THEN
604
605 ALLOCATE(nale_r2r_temp(
ale%GLOBAL%SNALE))
606 DO j=1,numnod_old
607 nale_r2r_temp(j)=nale_r2r(j)
608 END DO
609
610
611 nale_r2r(:) = 0
612 compt = 0
613 DO j=1,numnod_old
614 IF (
tagno(j+npart)>=0)
THEN
615 compt = compt+1
616 nale_r2r(compt) = nale_r2r_temp(j)
617 ENDIF
618 END DO
619 DEALLOCATE(nale_r2r_temp)
620
621 ENDIF
622
623
624
625
626
627 ntot = nelsn+nelcn+neltgn+nelqn
628 ALLOCATE(eani_temp(seani))
629 compt = 0
630
631 DO j=1,seani
632 eani_temp(j)=eani2(j)
633 eani2(j)=0
634 END DO
635
636 seani = ntot
637
638 DO j=1,numels
640 compt = compt + 1
641 eani2(compt)=eani_temp(j)
642 ENDIF
643 END DO
644
645 compt = nelsn+nelcn+nelqn
646 DO j=1,numeltg
648 compt = compt + 1
649 eani2(compt)=eani_temp(numels+numelq+numelc+j)
650 ENDIF
651 END DO
652
653
654
655
656
657 sipart0 = lipart1*npart+lipart1*nthpart
658 sipartth= 2*9*npart+2*9*nthpart
659 ALLOCATE(ipart_temp(sipart))
660
661 DO j=1,sipart
662 ipart_temp(j)=
ipart(j)
663 END DO
664
666 sipart = sipart0+sipartth+nelsn+nelqn+nelcn+neltn+nelpn
667 . + nelrn+neltgn+numelx+numsph
668 ALLOCATE(
ipart(sipart))
669
670 DO j=1,sipart0+sipartth
671 ipart(j)=ipart_temp(j)
672 END DO
673
674 compt_ip = sipart0+sipartth
675 compt_ip_tmp = sipart0+sipartth
676
677
678
679
680
681 ALLOCATE(ix_temp(sixs),coress(numels))
682
683 DO j=1,numels
684 DO k=1,nixs
685 ix_temp(nixs*(j-1)+k)=
ixs(nixs*(j-1)+k)
686 END DO
687 END DO
688
689
690
691 DO j=numels+1,sixs
693 END DO
694
696
697
698
699 sixsn = nelsn*nixs+nels10n*6+nels20n*12+nels16n*8
702 compt = 0
703 compt8 = 0
704 compt10 = 0
705 compt20 = 0
706 compt16 = 0
707 j10 = 0
708 j20 = 0
709 j16 = 0
710
711 DO j=1,numels
712 compt_ip_tmp=compt_ip_tmp+1
713 IF (eani_temp(j)==10) j10 = j10+1
714 IF (eani_temp(j)==20) j20 = j20+1
715 IF (eani_temp(j)==16) j16 = j16+1
717 compt_ip=compt_ip+1
718 compt = compt+1
719 coress(j)=compt
720 ipart(compt_ip)=ipart_temp(compt_ip_tmp)
721 DO k=1,nixs
722 ixs(nixs*(compt-1)+k)=ix_temp(nixs*(j-1)+k)
723 END DO
724 ixs(nixs*(compt-1)+1)=coresma(ix_temp(nixs*(j-1)+1))
725 ixs(nixs*(compt-1)+10)=corespro(ix_temp(nixs*(j-1)+10))
726 DO k=2,9
727 ixs(nixs*(compt-1)+k)=coresn(ix_temp(nixs*(j-1)+k))
728 END DO
730 IF (eani_temp(j)==10) THEN
731 compt10 = compt10+1
732 DO k=1,6
733 ixs(nixs*nelsn+6*(compt10-1)+k)=
734 . coresn(ix_temp(nixs*numels+6*(j10-1)+k))
735 END DO
736 ELSEIF (eani_temp(j)==20) THEN
737 compt20 = compt20+1
738 DO k=1,12
739 ixs((nixs*nelsn+6*nels10n)+12*(compt20-1)+k)=
740 . coresn(ix_temp((nixs*numels+6*numels10)+
741 . 12*(j20-1)+k))
742 END DO
743 ELSEIF (eani_temp(j)==16) THEN
744 compt16 = compt16+1
745 DO k=1,8
746 ixs((nixs*nelsn+6*nels10n+12*nels20n)+8*(compt16-1)+k)=
747 . coresn(ix_temp((nixs*numels+6*numels10+
748 . 12*numels20)+8*(j16-1)+k))
749 END DO
750 ELSE
751 compt8 = compt8+1
752 ENDIF
753
754 ENDIF
755 ENDDO
756
757 numels8 = compt8
758 numels10 = compt10
759 numels20 = compt20
760 numels16 = compt16
761 numels = compt
762
763 DEALLOCATE(ix_temp)
764
765
766
767
768
769
770 ALLOCATE(ix_temp(numelq*nixq),coresq(numelq))
771 DO j=1,numelq
772 DO k=1,nixq
773 ix_temp(nixq*(j-1)+k)=
ixq(nixq*(j-1)+k)
774 END DO
775 END DO
777
778
779
780 ALLOCATE(
ixq(nelqn*nixq))
781 compt = 0
782 DO j=1,numelq
783 compt_ip_tmp=compt_ip_tmp+1
785 compt_ip=compt_ip+1
786 compt = compt+1
787 coresq(j)=compt
788 ipart(compt_ip)=ipart_temp(compt_ip_tmp)
789 DO k=1,nixq
790 ixq(nixq*(compt-1)+k)=ix_temp(nixq*(j-1)+k)
791 END DO
792 ixq(nixq*(compt-1)+1)=coresma(ix_temp(nixq*(j-1)+1))
793 ixq(nixq*(compt-1)+6)=corespro(ix_temp(nixq*(j-1)+6))
794 DO k=2,5
795 ixq(nixq*(compt-1)+k)=coresn(ix_temp(nixq*(j-1)+k))
796 END DO
797 ENDIF
798 ENDDO
799
800 numelq = compt
801 DEALLOCATE(ix_temp)
802
803
804
805
806
807 numelc0 = numelc
808 ALLOCATE(ix_temp(numelc*nixc),coresc(numelc))
809 CALL my_alloc (iworksh_temp,3,numelc)
810 DO j=1,numelc
811 DO k=1,nixc
812 ix_temp(nixc*(j-1)+k)=
ixc(nixc*(j-1)+k)
813 END DO
814 iworksh_temp(1,j) = iworksh(1,j)
815 iworksh_temp(2,j) = iworksh(2,j)
816 iworksh_temp(3,j) = iworksh(3,j)
817 END DO
819
820
823 compt = 0
824 DO j=1,numelc
825 compt_ip_tmp=compt_ip_tmp+1
827 compt_ip=compt_ip+1
828 compt = compt+1
829 coresc(j)=compt
830 ipart(compt_ip)=ipart_temp(compt_ip_tmp)
831 DO k=1,nixc
832 ixc(nixc*(compt-1)+k)=ix_temp(nixc*(j-1)+k)
833 END DO
834 ixc(nixc*(compt-1)+1)=coresma(ix_temp(nixc*(j-1)+1))
835 ixc(nixc*(compt-1)+6)=corespro(ix_temp(nixc*(j-1)+6))
836 DO k=2,5
837 ixc(nixc*(compt-1)+k)=coresn(ix_temp(nixc*(j-1)+k))
838 END DO
841 iworksh(1,compt)=iworksh_temp(1,j)
842 iworksh(2,compt)=iworksh_temp(2,j)
843 iworksh(3,compt)=iworksh_temp(3,j)
844 ELSE
845 iworksh(1,compt)=zero
846 iworksh(2,compt)=zero
847 iworksh(3,compt)=zero
848 ENDIF
849 ENDIF
850 ENDDO
851
852 numelc = compt
853 DEALLOCATE(ix_temp,iworksh_temp)
854
855
856
857
858
859 ALLOCATE(ix_temp(numelt*nixt),corest(numelt))
860 DO j=1,numelt
861 DO k=1,nixt
862 ix_temp(nixt*(j-1)+k)=
ixt(nixt*(j-1)+k)
863 END DO
864 END DO
866
867
868
869 ALLOCATE(
ixt(neltn*nixt))
870 compt = 0
871 DO j=1,numelt
872 compt_ip_tmp=compt_ip_tmp+1
874 compt_ip=compt_ip+1
875 compt = compt+1
876 corest(j)=compt
877 ipart(compt_ip)=ipart_temp(compt_ip_tmp)
878 DO k=1,nixt
879 ixt(nixt*(compt-1)+k)=ix_temp(nixt*(j-1)+k)
880 END DO
881 ixt(nixt*(compt-1)+1)=coresma(ix_temp(nixt*(j-1)+1))
882 ixt(nixt*(compt-1)+4)=corespro(ix_temp(nixt*(j-1)+4))
883 DO k=2,3
884 ixt(nixt*(compt-1)+k)=coresn(ix_temp(nixt*(j-1)+k))
885 END DO
886 ENDIF
887 ENDDO
888
889 numelt = compt
890 DEALLOCATE(ix_temp)
891
892
893
894
895
896
897 ALLOCATE(ix_temp(numelp*nixp),coresp(numelp))
898 DO j=1,numelp
899 DO k=1,nixp
900 ix_temp(nixp*(j-1)+k)=
ixp(nixp*(j-1)+k)
901 END DO
902 END DO
904
905
906
907 ALLOCATE(
ixp(nelpn*nixp))
908 compt = 0
909 DO j=1,numelp
910 compt_ip_tmp=compt_ip_tmp+1
912 compt_ip=compt_ip+1
913 compt = compt+1
914 coresp(j)=compt
915 ipart(compt_ip)=ipart_temp(compt_ip_tmp)
916 DO k=1,nixp
917 ixp(nixp*(compt-1)+k)=ix_temp(nixp*(j-1)+k)
918 END DO
919 ixp(nixp*(compt-1)+1)=coresma(ix_temp(nixp*(j-1)+1))
920 ixp(nixp*(compt-1)+5)=corespro(ix_temp(nixp*(j-1)+5))
921 DO k=2,4
922 ixp(nixp*(compt-1)+k)=coresn(ix_temp(nixp*(j-1)+k))
923 END DO
924 ENDIF
925 ENDDO
926
927 numelp = compt
928 DEALLOCATE(ix_temp)
929
930
931
932
933
934
935 ALLOCATE(ix_temp(numelr*5+1))
936 DO j=1,numelr
937 DO k=1,5
938 ix_temp(5*(j-1)+k)=ixr_kj(5*(j-1)+k)
939 ixr_kj(5*(j-1)+k) = 0
940 END DO
941 END DO
942
943
944
945 compt = 0
946 comptb = 0
947 DO j=1,numelr
948 id_prop = corespro(
ixr(nixr
949 IF (
igeo(npropgi*(id_prop-1)+11)==45)
THEN
950 comptb = comptb + 1
952 compt = compt + 1
953 DO k=1,3
954 ixr_kj(5*(compt-1)+k)=coresn(ix_temp(5*(comptb-1)+k))
955 END DO
956 ixr_kj(5*(compt-1)+4)=ix_temp(5*(comptb-1)+4)
957 ixr_kj(5*(compt-1)+5)=0
958 ENDIF
959 ENDIF
960 ENDDO
961
962 ixr_kj(5*nelrn+1) = compt
963 DEALLOCATE(ix_temp)
964
965
966
967
968
969 ALLOCATE(ix_temp(numelr*nixr),coresr(numelr))
970 DO j=1,numelr
971 DO k=1,nixr
972 ix_temp(nixr*(j-1)+k)=
ixr(nixr*(j-1)+k)
973 END DO
974 END DO
976
977
978
979 ALLOCATE(
ixr(nelrn*nixr))
980 compt = 0
981 DO j=1,numelr
982 compt_ip_tmp=compt_ip_tmp+1
984 compt_ip=compt_ip+1
985 compt = compt+1
986 coresr(j)=compt
987 ipart(compt_ip)=ipart_temp(compt_ip_tmp)
988 DO k=1,nixr
989 ixr(nixr*(compt-1)+k)=ix_temp(nixr*(j-1)+k)
990 END DO
991 ixr(nixr*(compt-1)+1)=corespro(ix_temp(nixr*(j-1)+1))
992 DO k=2,3
993 ixr(nixr*(compt-1)+k)=coresn(ix_temp(nixr*(j-1)+k))
994 END DO
995 IF (
ixr(nixr*(compt-1)+4)/=0)
THEN
996 ixr(nixr*(compt-1)+4)=coresn(ix_temp(nixr*(j-1)+4))
997 ENDIF
998 ENDIF
999 ENDDO
1000
1001 numelr = compt
1002 DEALLOCATE(ix_temp)
1003
1004
1005
1006
1007
1008 numeltg0 = numeltg
1009 ALLOCATE(ix_temp(numeltg*nixtg),corestg(numeltg))
1010 DO j=1,numeltg
1011 DO k=1,nixtg
1012 ix_temp(nixtg*(j-1)+k)=
ixtg(nixtg*(j-1)+k)
1013 END DO
1014 END DO
1016
1017
1018
1019 ALLOCATE(
ixtg(neltgn*nixtg))
1020 compt = 0
1021 DO j=1,numeltg
1022 compt_ip_tmp=compt_ip_tmp+1
1024 compt_ip=compt_ip+1
1025 compt = compt+1
1026 corestg(j)=compt
1027 ipart(compt_ip)=ipart_temp(compt_ip_tmp)
1028 DO k=1,nixtg
1029 ixtg(nixtg*(compt-1)+k)=ix_temp(nixtg*(j-1)+k)
1030 END DO
1031 ixtg(nixtg*(compt-1)+1)=coresma(ix_temp(nixtg*(j-1)+1))
1032 ixtg(nixtg*(compt-1)+5)=corespro(ix_temp(nixtg*(j-1)+5))
1033 DO k=2,4
1034 ixtg(nixtg*(compt-1)+k)=coresn(ix_temp(nixtg*(j-1)+k))
1035 END DO
1036 ENDIF
1037 ENDDO
1038
1039 numeltg = compt
1040 DEALLOCATE(ix_temp)
1041
1042
1043
1044
1045
1046 ALLOCATE(res_temp(nbpartinlet))
1047 DO j=1,nbpartinlet
1048 res_temp(j) = reservep(j)
1049 END DO
1050
1051
1052 compt = 0
1053 part_res = 0
1054 first_cell = first_sphres
1055 DO j=1,nbpartinlet
1056 IF (
tag_elsp(first_cell+npart)/=0)
THEN
1057 compt = compt + 1
1058 reservep(compt) = res_temp(j)
1059 ENDIF
1060 DO k=1,res_temp(j)
1061 inod =
kxsp(nisp*(first_cell-1)+3)
1062 first_cell = first_cell+1
1063 ENDDO
1064 ENDDO
1065
1066 nbpartinlet = compt
1067 DEALLOCATE(res_temp)
1068
1069
1070
1071
1072
1073 coeff = 0
1074 IF (nsphn>0) coeff = 1
1075 numspha = numsph - nsphres
1076
1077 ALLOCATE(kxsp_temp(nisp*numsph),coressp(numsph))
1078 DO j=1,numsph
1079 DO k=1,nisp
1080 kxsp_temp(nisp*(j-1)+k)=
kxsp(nisp*(j-1)+k)
1081 END DO
1082 END DO
1084
1085
1086 ALLOCATE(
ixsp(kvoisph,nsphn),
kxsp(nisp*nsphn),
nod2sp(coeff*numnod))
1087 ALLOCATE(spbuf(nspbuf*nsphn))
1088 compt = 0
1089 nsphresn = 0
1090 DO j=1,numsph
1091 compt_ip_tmp=compt_ip_tmp+1
1093 compt_ip=compt_ip+1
1094 compt = compt+1
1095 coressp(j)=compt
1096 IF (j>=first_sphres) nsphresn=nsphresn+1
1097 ipart(compt_ip)=ipart_temp(compt_ip_tmp)
1098 DO k=1,nisp
1099 kxsp(nisp*(compt-1)+k)=kxsp_temp(nisp*(j-1)+k)
1100 END DO
1101 kxsp(nisp*(compt-1)+3)=coresn(kxsp_temp(nisp*(j-1)+3))
1102 nod2sp(coresn(kxsp_temp(nisp*(j-1)+3))) = compt
1103 ENDIF
1104 ENDDO
1105 IF ((compt/=0).AND.(compt/=numsph)) THEN
1107 . msgtype=msgwarning,
1108 . anmode=aninfo_blind_1)
1109 ENDIF
1110 numsph = compt
1111 numspha = compt - nsphresn
1112 nsphres = nsphresn
1113 first_sphres = numspha + 1
1114 DEALLOCATE(kxsp_temp)
1115
1116
1117
1118 DEALLOCATE(ipart_temp)
1119
1120
1121
1122
1123
1124 ALLOCATE(thk_tmp(numeltg0+numelc0))
1125 DO j=1,numeltg0+numelc0
1126 thk_tmp(j)=thke(j)
1127 END DO
1128 DEALLOCATE(thke)
1129
1130
1131
1132 ALLOCATE(thke(numeltg+numelc))
1133 DO j=1,numelc0
1135 thke(coresc(j))=thk_tmp(j)
1136 ENDIF
1137 ENDDO
1138 DO j=1,numeltg0
1140 thke(corestg(j)+numelc)=thk_tmp(j+numelc0)
1141 ENDIF
1142 ENDDO
1143
1144 DEALLOCATE(thk_tmp)
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157 DO i=1,ngrbric
1158 compt = 0
1159 igrbric(i)%R2R_SHARE = 0
1160 DO j=1,igrbric(i)%NENTITY
1161 cur_id = igrbric(i)%ENTITY(j)
1162 IF (
tag_els(cur_id+npart)/=0)
THEN
1163 compt = compt+1
1164 igrbric(i)%ENTITY(compt) = coress(cur_id)
1166 . igrbric(i)%R2R_SHARE = igrbric(i)%R2R_SHARE + 1
1167 ENDIF
1168 ENDDO
1169 igrbric(i)%R2R_ALL = igrbric(i)%NENTITY
1170 igrbric(i)%NENTITY = compt
1171 ENDDO
1172
1173 DO i=1,ngrquad
1174 compt = 0
1175 igrquad(i)%R2R_SHARE = 0
1176 DO j=1,igrquad(i)%NENTITY
1177 cur_id = igrquad(i)%ENTITY(j)
1178 IF (
tag_elq(cur_id+npart)/=0)
THEN
1179 compt = compt+1
1180 igrquad(i)%ENTITY(compt) = coresq(cur_id)
1182 . igrquad(i)%R2R_SHARE = igrquad(i)%R2R_SHARE + 1
1183 ENDIF
1184 ENDDO
1185 igrquad(i)%R2R_ALL = igrquad(i)%NENTITY
1186 igrquad(i)%NENTITY = compt
1187 ENDDO
1188
1189 DO i=1,ngrshel
1190 compt = 0
1191 igrsh4n(i)%R2R_SHARE = 0
1192 DO j=1,igrsh4n(i)%NENTITY
1193 cur_id = igrsh4n(i)%ENTITY(j)
1194 IF (
tag_elc(cur_id+npart)/=0)
THEN
1195 compt = compt+1
1196 igrsh4n(i)%ENTITY(compt) = coresc(cur_id)
1198 . igrsh4n(i)%R2R_SHARE = igrsh4n(i)%R2R_SHARE + 1
1199 ENDIF
1200 ENDDO
1201 igrsh4n(i)%R2R_ALL = igrsh4n(i)%NENTITY
1202 igrsh4n(i)%NENTITY = compt
1203 ENDDO
1204
1205 DO i=1,ngrtrus
1206 compt = 0
1207 igrtruss(i)%R2R_SHARE = 0
1208 DO j=1,igrtruss(i)%NENTITY
1209 cur_id = igrtruss(i)%ENTITY(j)
1210 IF (
tag_elt(cur_id+npart)/=0)
THEN
1211 compt = compt+1
1212 igrtruss(i)%ENTITY(compt) = corest(cur_id)
1214 . igrtruss(i)%R2R_SHARE = igrtruss(i)%R2R_SHARE + 1
1215 ENDIF
1216 ENDDO
1217 igrtruss(i)%R2R_ALL = igrtruss(i)%NENTITY
1218 igrtruss(i)%NENTITY = compt
1219 ENDDO
1220
1221 DO i=1,ngrbeam
1222 compt = 0
1223 igrbeam(i)%R2R_SHARE = 0
1224 DO j=1,igrbeam(i)%NENTITY
1225 cur_id = igrbeam(i)%ENTITY(j)
1226 IF (
tag_elp(cur_id+npart)/=0)
THEN
1227 compt = compt+1
1228 igrbeam(i)%ENTITY(compt) = coresp(cur_id)
1230 . igrbeam(i)%R2R_SHARE = igrbeam(i)%R2R_SHARE + 1
1231 ENDIF
1232 ENDDO
1233 igrbeam(i)%R2R_ALL = igrbeam(i)%NENTITY
1234 igrbeam(i)%NENTITY = compt
1235 ENDDO
1236
1237 DO i=1,ngrspri
1238 compt = 0
1239 igrspring(i)%R2R_SHARE = 0
1240 DO j=1,igrspring(i)%NENTITY
1241 cur_id = igrspring(i)%ENTITY(j)
1242 IF (
tag_elr(cur_id+npart)/=0)
THEN
1243 compt = compt+1
1244 igrspring(i)%ENTITY(compt) = coresr(cur_id)
1246 . igrspring(i)%R2R_SHARE = igrspring(i)%R2R_SHARE + 1
1247 ENDIF
1248 ENDDO
1249 igrspring(i)%R2R_ALL = igrspring(i)%NENTITY
1250 igrspring(i)%NENTITY = compt
1251 ENDDO
1252
1253 DO i=1,ngrsh3n
1254 compt = 0
1255 igrsh3n(i)%R2R_SHARE = 0
1256 DO j=1,igrsh3n(i)%NENTITY
1257 cur_id = igrsh3n(i)%ENTITY(j)
1258 IF (
tag_elg(cur_id+npart)/=0)
THEN
1259 compt = compt+1
1260 igrsh3n(i)%ENTITY(compt) = corestg(cur_id)
1262 . igrsh3n(i)%R2R_SHARE = igrsh3n(i)%R2R_SHARE
1263 ENDIF
1264 ENDDO
1265 igrsh3n(i)%R2R_ALL = igrsh3n(i)%NENTITY
1266 igrsh3n(i)%NENTITY = compt
1267 ENDDO
1268
1269
1270
1271 DO i=1,ngrpart
1272 compt = 0
1273 DO j=1,igrpart(i)%NENTITY
1274 cur_id = igrpart(i)%ENTITY(j)
1276 compt = compt+1
1277 igrpart(i)%ENTITY(compt) = cur_id
1278 ENDIF
1279 ENDDO
1280 igrpart(i)%R2R_ALL = igrpart(i)%NENTITY
1281 igrpart(i)%NENTITY = compt
1282 ENDDO
1283
1284
1285
1286
1287 DO i=1,nb_surf
1288 nseg = 0
1289 ccpl = 0
1290 DO j=1,igrsurf(i)%NSEG
1291 nb_nod_sub=0
1292 nb_nod_cpl=0
1293 tag = 0
1294 cur_id = igrsurf(i)%ELEM(j)
1295 IF (igrsurf(i)%ELTYP(j) == 1) THEN
1296
1297 IF (
tag_els(cur_id+npart)/=0)
THEN
1298 new_id = coress(cur_id)
1299 tag = 1
1300 ENDIF
1301 ELSEIF (igrsurf(i)%ELTYP(j) == 2) THEN
1302
1303 IF (
tag_elq(cur_id+npart)/=0)
THEN
1304 new_id = coresq(cur_id)
1305 tag = 1
1306 ENDIF
1307 ELSEIF (igrsurf(i)%ELTYP(j) == 3) THEN
1308
1309 IF (
tag_elc(cur_id+npart)/=0)
THEN
1310 new_id = coresc(cur_id)
1311 tag = 1
1312 ENDIF
1313 ELSEIF (igrsurf(i)%ELTYP(j) == 7) THEN
1314
1315 IF (
tag_elg(cur_id+npart)/=0)
THEN
1316 new_id = corestg(cur_id)
1317 tag = 1
1318 ENDIF
1319 ELSEIF (igrsurf(i)%ELTYP(j) > 10) THEN
1320
1321 IF (igrsurf(i)%ELTYP(j) == 11) THEN
1322 IF (
tag_els(cur_id+npart)/=0) tag=1
1323 ELSEIF (igrsurf(i)%ELTYP(j) == 13) THEN
1324 IF (
tag_elc(cur_id+npart)/=0) tag=1
1325 ELSEIF (igrsurf(i)%ELTYP(j) == 17) THEN
1326 IF (
tag_elg(cur_id+npart)/=0) tag=1
1327 ENDIF
1328
1329 igrsurf(i)%ELTYP(j) = 0
1330 new_id = 0
1331 ELSEIF (igrsurf(i)%ELTYP(j) == 0) THEN
1332
1333 DO k=1,4
1334 nod_id = igrsurf(i)%NODES(j,k)
1335 IF (
tagno(nod_id+npart)/=-1) nb_nod_cpl=nb_nod_cpl+1
1336 END DO
1337 IF (nb_nod_cpl==4) THEN
1338 tag = 1
1339 new_id = 0
1340 ENDIF
1341 ENDIF
1342
1343 IF (tag == 1) THEN
1344 nseg = nseg + 1
1345 DO k=1,4
1346 cur_id = igrsurf(i)%NODES(j,k)
1347 IF (
tagno(cur_id+npart)>1) nb_nod_cpl=nb_nod_cpl+1
1348 igrsurf(i)%NODES(nseg,k) = coresn(cur_id)
1349 END DO
1350 IF (nb_nod_cpl==4) ccpl=ccpl+1
1351 igrsurf(i)%ELTYP(nseg) = igrsurf(i)%ELTYP(j)
1352 igrsurf(i)%ELEM(nseg) = new_id
1353 ENDIF
1354 END DO
1356 igrsurf(i)%NSEG = nseg
1358 END DO
1359
1360
1361
1362
1363 DO i=1,nb_line
1364 nseg = 0
1365 DO j=1,igrslin(i)%NSEG
1366 nb_nod_sub=0
1367 tag = 0
1368 cur_id = igrslin(i)%ELEM(j)
1369 IF (igrslin(i)%ELTYP(j)==1) THEN
1370
1371 IF (
tag_els(cur_id+npart)/=0)
THEN
1372 new_id = coress(cur_id)
1373 tag = 1
1374 ENDIF
1375 ELSEIF (igrslin(i)%ELTYP(j)==2) THEN
1376
1377 IF (
tag_elq(cur_id+npart)/=0)
THEN
1378 new_id = coresq(cur_id)
1379 tag = 2
1380 ENDIF
1381 ELSEIF (igrslin(i)%ELTYP(j)==3) THEN
1382
1383 IF (
tag_elc(cur_id+npart)/=0)
THEN
1384 new_id = coresc(cur_id)
1385 tag = 3
1386 ENDIF
1387 ELSEIF (igrslin(i)%ELTYP(j)==4) THEN
1388
1389 IF (
tag_elt(cur_id+npart)/=0)
THEN
1390 new_id = corest(cur_id)
1391
1392 ENDIF
1393 ELSEIF (igrslin(i)%ELTYP(j)==5) THEN
1394
1395 IF (
tag_elp(cur_id+npart)/=0)
THEN
1396 new_id = coresp(cur_id)
1397 tag = 5
1398 ENDIF
1399 ELSEIF (igrslin(i)%ELTYP(j)==6) THEN
1400
1401 IF (
tag_elr(cur_id+npart)/=0)
THEN
1402 new_id = coresr(cur_id)
1403 tag = 6
1404 ENDIF
1405 ELSEIF (igrslin(i)%ELTYP(j)==7) THEN
1406
1407 IF (
tag_elg(cur_id+npart)/=0)
THEN
1408 new_id = corestg(cur_id)
1409 tag = 7
1410 ENDIF
1411 ELSEIF (igrslin(i)%ELTYP(j)==0) THEN
1412
1413 new_id = 0
1414 DO k=1,2
1415 cur_id = igrslin(i)%NODES(j,k)
1416 IF (
tagno(cur_id+npart)>=0) nb_nod_sub=nb_nod_sub+1
1417 END DO
1418 IF (nb_nod_sub==2) tag = 8
1419 ENDIF
1420
1421 IF (tag > 0) THEN
1422 nseg = nseg + 1
1423 DO k=1,2
1424 cur_id = igrslin(i)%NODES(j,k)
1425 igrslin(i)%NODES(nseg,k) = coresn(cur_id)
1426 END DO
1427 igrslin(i)%ELTYP(nseg) = igrslin(i)%ELTYP(j)
1428 igrslin(i)%ELEM(nseg) = new_id
1429 ENDIF
1430 END DO
1431 igrslin(i)%NSEG_R2R_ALL = igrslin(i)%NSEG
1432 igrslin(i)%NSEG = nseg
1433 END DO
1434
1435
1436
1437
1438
1439 DO i=1,ngrnod
1440
1441 compt = 0
1442 ccpl = 0
1443 DO j=1,igrnod(i)%NENTITY
1444 cur_id = igrnod(i)%ENTITY(j)
1445 IF (
tagno(cur_id+npart) >= 0)
THEN
1446 compt = compt + 1
1447 igrnod(i)%ENTITY(compt) = coresn(cur_id)
1448 ENDIF
1449 IF (
tagno(cur_id+npart)>1) ccpl=ccpl+1
1450 ENDDO
1451 igrnod(i)%R2R_ALL = igrnod(i)%NENTITY
1452 igrnod(i)%R2R_SHARE = ccpl
1453 igrnod(i)%NENTITY = compt
1454 ENDDO
1455
1456
1457
1458
1459
1460 ALLOCATE(tagno_temp(2*numnod_old+npart))
1461 DO j=1,npart+2*numnod_old
1462 tagno_temp(j)=
tagno(j)
1463 END DO
1464
1466 ALLOCATE(
tagno(2*numnod+npart))
1467 DO j=1,npart
1468 tagno(j)=tagno_temp(j)
1469 END DO
1470 compt=0
1471 DO j=1,numnod_old
1472 IF (tagno_temp(j+npart)>=0)THEN
1473 compt=compt+1
1474 tagno(compt+npart)=tagno_temp(j+npart)
1475 tagno(compt+npart+numnod)=tagno_temp(j+npart+numnod_old)
1476 ENDIF
1477 ENDDO
1478
1479
1480
1481
1482
1485 2 igrbric ,igrquad ,igrsh4n ,igrsh3n ,igrtruss,
1486 3 igrbeam ,igrspring ,igrnod, lsubmodel ,seatbelt_shell_to_spring,
1487 4 nb_seatbelt_shells)
1488
1489
1490
1491
1492
1493 compt = 0
1494 DO i=1,nbgauge
1495 IF ((
taggau(i)>0).AND.(numels>0))
THEN
1496
1497 compt = compt + 1
1498 ELSEIF ((
taggau(i)<0).AND.(numsph>0))
THEN
1499
1501 compt = compt + 1
1502 ELSE
1504 ENDIF
1505 ENDDO
1506
1507 nbgauge = compt
1508
1509
1510
1511
1512
1513 nrbody_old =
SIZE(
tagrby)
1514 ALLOCATE(rby_msn_temp(2,nrbody_old))
1515 DO i=1,nrbody_old
1516 rby_msn_temp(1,i) = rby_msn(1,i)
1517 rby_msn_temp(2,i) = rby_msn(2,i)
1518 rby_msn(1,i) = 0
1519 rby_msn(2,i) = 0
1520 ENDDO
1521
1522
1523
1524 nrb =0
1525 DO i=1,nrbody_old
1527 nrb = nrb + 1
1528 rby_msn(1,nrb) = rby_msn_temp(1,i)
1529 rby_msn(2,nrb) = coresn(rby_msn_temp(2,i))
1530 END IF
1531 ENDDO
1532
1533
1534
1535 flg_split = 1
1536
1537 DEALLOCATE(coresc,coresn,corestg,corest)
1538 DEALLOCATE(corespro,coresr,coresp,coress)
1539 DEALLOCATE(coresq,eani_temp,tagno_temp)
1540
1541
1542
1545
1546
1547
1548
1549 DO k=1,npart
1552 ENDIF
1553 END DO
1554
1555
1556
1557 ENDIF
1558 RETURN
1559
subroutine constit(itab, itabm1, numnod)
integer, dimension(:), allocatable flagkin
integer, parameter ncharkey
integer, dimension(:), allocatable tag_els
integer, dimension(:), allocatable tag_elg
integer, dimension(:), allocatable tagno
integer, dimension(:), allocatable tag_prop
integer, dimension(:), allocatable tag_elq
integer, dimension(:), allocatable tagrby
integer, dimension(:), allocatable tag_elcf
integer, dimension(:), allocatable tag_elc
integer, dimension(:), allocatable tag_part
integer, dimension(:), allocatable tag_elr
integer, dimension(:), allocatable tag_mat
integer, dimension(:), allocatable flagkin_r2r
integer, dimension(:), allocatable tag_elt
integer, dimension(:), allocatable front_r2r
integer, dimension(:), allocatable tag_surf
integer, dimension(:), allocatable isubdom_part
integer, dimension(:,:), allocatable isurf_r2r
integer, dimension(:), allocatable tag_subs
integer, dimension(:), allocatable tag_elsf
integer, dimension(:), allocatable taggau
integer, dimension(:), allocatable tag_elsf2
integer, dimension(:), allocatable tag_elp
integer, dimension(:,:), allocatable isubdom
integer, dimension(:), allocatable tag_elsp
integer, dimension(:), allocatable tag_elcf2
integer, dimension(:), allocatable, target ixs
integer, dimension(:), allocatable ipm
integer, dimension(:), allocatable, target ipart
integer, dimension(:), allocatable ixt
integer, dimension(:), allocatable ixr
integer, dimension(:), allocatable, target ixtg
integer, dimension(:), allocatable kxsp
integer, dimension(:), allocatable, target itabm1
integer, dimension(:), allocatable, target iskwn
integer, dimension(:), allocatable itab
integer, dimension(:), allocatable nod2sp
integer, dimension(:), allocatable ixp
integer, dimension(:), allocatable, target nom_opt
integer, dimension(:), allocatable igeo
integer, dimension(:,:), allocatable ixsp
integer, dimension(:), allocatable ixq
integer, dimension(:), allocatable ixc
subroutine prelecsec(snstrf, ssecbuf, itabm1, flag_r2r, nom_opt, igrbric, igrquad, igrsh4n, igrsh3n, igrtruss, igrbeam, igrspring, igrnod, lsubmodel, seatbelt_shell_to_spring, nb_seatbelt_shells)
subroutine r2r_monvol(tagpart, tagpro, igrsurf, lsubmodel)
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)
subroutine tagelem_r2r(numel, ipart, tagbuf, npart)