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