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