38 use element_mod , only : nixs
39
40
41
42#include "implicit_f.inc"
43
44
45
46#include "com01_c.inc"
47#include "com04_c.inc"
48#include "units_c.inc"
49#include "param_c.inc"
50
51
52
53 INTEGER NSFLSW, NTFLSW
54 INTEGER NEFLSW(*), NNFLSW(8,*), IXS(NIXS,*), IPARG(NPARG,*), ITMP(*)
56
57
58
59 INTEGER IL, I, IS, NEL, J, K, IE, II, NG, ITY, LFT, LLT, NFT, NB1,
60 . N, I2, I1, NE, N1, N2, N3, N4
62 . crx, cry, crz, surs, x1, y1, z1, x2, y2, z2, x3, y3, z3, x4,
63 . y4, z4, sfx, sfy, sfz, sfm, surv
64
65
66
67 INTEGER NINTRN
68
69 il = 0
70 WRITE (iout, 1000)
71 DO 200 i = 1, nsflsw
72
73
74
75 READ (iin, '(2I5,3F10.0)') is, nel, crx, cry, crz
76
77
78
79
80 neflsw(i) = nel
81 crflsw(1,i) = crx
82 crflsw(2,i) = cry
83 crflsw(3,i) = crz
84 DO 100 j = 1, nel
85 il = il + 1
86 READ(iin, '(6I5)') nnflsw(7,il),(nnflsw(k,il),k=2,6)
87 100 CONTINUE
88 200 CONTINUE
89
90
91
92 IF (il /= ntflsw) THEN
93 CALL ancmsg(msgid=16,anmode=aninfo,
94 . i1=il,i2=ntflsw)
96 END IF
97
98
99
100
101
102
103
104
105
106
107 DO 300 i = 1, numels
108 itmp(i) = 0
109 300 CONTINUE
110
111 DO 310 il = 1, ntflsw
112 ie = nnflsw(7,il)
113 ii =
nintrn(ie,ixs,11,numels)
114 itmp(ii) = il
115 IF (nnflsw(6,il) == 0) nnflsw(6,il) = 4
116 310 CONTINUE
117
118 DO 350 ng=1,ngroup
119 ity = iparg(5,ng)
120 IF(ity>1) GO TO 350
121 lft = 1
122 llt = iparg(2,ng)
123 nft = iparg(3,ng)
124 nb1 = iparg(4,ng)
125 DO 330 i = lft,llt
126 n = i+nft
127 il = itmp(n)
128 IF (il > 0) THEN
129 nnflsw(7,il) = nb1 + llt + 6*i - 6
130 nnflsw(8,il) = nb1 + 7*llt + i - 1
131 nnflsw(1,il) = llt
132 END IF
133 330 CONTINUE
134 350 CONTINUE
135
136
137
138 il = 0
139 i2 = 0
140 DO 500 is = 1, nsflsw
141 surs = 0.
142 nel = neflsw(is)
143 i1 = i2 + 1
144 i2 = i2 + nel
145 DO 400 i = i1, i2
146 ne = nnflsw(1,i)
147 n1 = nnflsw(2,i)
148 n2 = nnflsw(3,i)
149 n3 = nnflsw(4,i)
150 n4 = nnflsw(5,i)
151
152 x1 = x(1,n1)
153 y1 = x(2,n1)
154 z1 = x(3,n1)
155 x2 = x(1,n2)
156 y2 = x(2,n2)
157 z2 = x(3,n2)
158 x3 = x(1,n3)
159 y3 = x(2,n3)
160 z3 = x(3,n3)
161 x4 = x(1,n4)
162 y4 = x(2,n4)
163 z4 = x(3,n4)
164
165 sfx = half*((y3-y1)*(z4-z2)-
166 1 (z3-z1)*(y4-y2))
167 sfy = half*((z3-z1)*(x4-x2)-
168 1 (x3-x1)*(z4-z2))
169 sfz = half*((x3-x1)*(y4-y2)-
170 1 (y3-y1)*(x4-x2))
171 sfm = sqrt(sfx*sfx+sfy*sfy+sfz*sfz)
172
173 crflsw(4,is) = crflsw(4,is) + sfx
174 crflsw(5,is) = crflsw(5,is) + sfy
175 crflsw(6,is) = crflsw(6,is) + sfz
176 surs = surs + sfm
177
178 400 CONTINUE
179
180 surv = sqrt(crflsw(4,is)**2+crflsw(5,is)**2+crflsw(6,is)**2)
181 crflsw(4,is) = crflsw(4,is)/surv
182 crflsw(5,is) = crflsw(5,is)/surv
183 crflsw(6,is) = crflsw(6,is)/surv
184
185 WRITE (iout, 1100) is, nel, (crflsw(k,is),k=1,6),surv,surs
186 WRITE (iout, 1200)
187 1 (j,(nnflsw(k,il-nel+j),k=1,8),j=1,nel,nel-1)
188 500 CONTINUE
189
190 1000 FORMAT (///' FLUX AND SWIRL CALCULATION'/
191 1 ' --------------------------'/)
192 1100 FORMAT (/
193 1 ' SET NUMBER . . . . . . . . . . ',i5/
194 1 ' NUMBER OF ELEMENTS. . . . . ',i5/
195 1 ' SWIRL CENTER. . . . . . . . ',3e12.4/
196 1 ' SWIRL AXIS. . . . . . . . . ',3e12.4/
197 1 ' VECTORIAL TOTAL SURFACE . . ',e12.4 /
198 1 ' SCALAR TOTAL SURFACE. . . . ',e12.4 /
199 1 1h ,16hfirst/last numb.,6hi.e.n.,4x,6hnode-1,4x,6hnode-2,4x,
200 2 6hnode-3,4x,6hnode-4,4x,6h ndiv )
201 1200 FORMAT (2h ,10i10)
202 RETURN
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)
integer function nintrn(iext, ntn, m, n, id, titr)