37
38
39
40 USE elbufdef_mod
41 USE my_alloc_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 "scr16_c.inc"
53#include "scr17_c.inc"
54#include "spmd_c.inc"
55#include "task_c.inc"
56#include "units_c.inc"
57
58
59
60 INTEGER ITAB(*),IPART(LIPART1,*),IXR(NIXR,*),IPARTR(*),
61 . IPART_STATE(*),NODTAG(*), STAT_INDXR(*),IPARG(NPARG,*)
62 INTEGER LENGR,IDEL
63 TYPE (ELBUF_STRUCT_), DIMENSION(NGROUP), TARGET :: ELBUF_TAB
64
65
66
67 INTEGER I,N,JJ,IPRT,BUF,IPRT0,K,II
68 INTEGER NG,NEL,NFT,LFT,LLT,ITY,IOFF
69 INTEGER WORK(70000)
70 TYPE(G_BUFEL_) ,POINTER :: GBUF
71 INTEGER,DIMENSION(:),ALLOCATABLE :: IADD
72 INTEGER,DIMENSION(:,:),ALLOCATABLE :: IADG
73 INTEGER,DIMENSION(:),ALLOCATABLE :: NP
74 INTEGER,DIMENSION(:),ALLOCATABLE :: NPGLOB
75 INTEGER,DIMENSION(:,:),ALLOCATABLE :: CLEF
76
77
78
79 CALL my_alloc(iadg,nspmd,npart)
80 CALL my_alloc(iadd,npart+1)
81 CALL my_alloc(np,5*numelr)
82 CALL my_alloc(npglob,7*lengr)
83 CALL my_alloc(clef,2,numelrg)
84
85 iadd = 0
86 npglob(1:7*lengr) = 0
87
88 jj = 0
89 ii = 0
90 DO ng=1,ngroup
91 ity = iparg(5,ng)
92 IF (ity == 6) THEN
93 nel = iparg(2,ng)
94 nft = iparg(3,ng)
95 gbuf => elbuf_tab(ng)%GBUF
96 lft=1
97 llt=nel
98
99 DO i=lft,llt
100 n = i + nft
101 iprt=ipartr(n)
102 IF (ipart_state(iprt) == 0) cycle
103
104 np(jj+1) = ixr(nixr,n)
105 np(jj+2) = itab(ixr(2,n))
106 np(jj+3) = itab(ixr(3,n))
107 np(jj+4) = iprt
108 np(jj+5) = iabs(nint(gbuf%OFF(i)))
109
110 ii = ii + 1
111
112 jj = jj + 5
113
114 stat_numelr = stat_numelr + 1
115
116 nodtag(ixr(2,n))=1
117 nodtag(ixr(3,n))=1
118 ENDDO
119 ENDIF
120 ENDDO
121
122 stat_numelr_g = 0
124 . iadg,npglob,stat_indxr)
125
126 IF (ispmd == 0) THEN
127 DO n=1,stat_numelr_g
128 stat_indxr(n)=n
129 clef(1,n)=npglob(5*(n-1)+5)
130 clef(2,n)=npglob(5*(n-1)+1)
131 ENDDO
132 CALL my_orders(0,work,clef,stat_indxr,stat_numelr_g,2)
133
134 iprt0=0
135 DO n=1,stat_numelr_g
136 k=stat_indxr(n)
137 jj=5*(k-1)
138 iprt=npglob(jj+4)
139 ioff=npglob(jj+5)
140 IF (idel==0 .OR. (idel==1 .AND. ioff >= 1)) THEN
141 IF (iprt /= iprt0) THEN
142 WRITE(iugeo,'(A,I10)')'/SPRING/',ipart(4,iprt)
143 WRITE(iugeo,'(A)')
144 . '#SPRING_ID NOD1 NOD2'
145 iprt0=iprt
146 ENDIF
147 WRITE(iugeo,'(3I10)'
148 ENDIF
149 ENDDO
150 ENDIF
151
152 DEALLOCATE(iadd)
153 DEALLOCATE(iadg)
154 DEALLOCATE(np)
155 DEALLOCATE(npglob)
156 DEALLOCATE(clef)
157 RETURN
void my_orders(int *mode, int *iwork, int *data, int *index, int *n, int *irecl)
subroutine spmd_iget_partn_sta(size, stat_numel, stat_lenelg, leng, np, iadg, npglob, stat_indx)