31 SUBROUTINE snorm3 (NEL, NFT, JALE, IXS, XGRID, WGRID,
33 use element_mod ,
only : nixs
42#include "implicit_f.inc"
50 INTEGER,
INTENT(IN) :: NEL, NFT, JALE, IXS(NIXS, *)
52 . xgrid(3, *), wgrid(*)
53 my_real,
INTENT(OUT) :: wfac(3, 6, nel), surf(6, nel)
58 INTEGER :: II, NODE1, NODE2, NODE3, NODE4, NODE5, NODE6, NODE7, NODE8, KFACE
60 . x1(3), x2(3), x3(3), x4(3), x5(3),
61 . w1(3), w2(3), w3(3), w4(3), w5(3), w6(3), w7(3), w8(3)
66 node1 = ixs(2, ii + nft)
67 node2 = ixs(3, ii + nft)
68 node3 = ixs(4, ii + nft)
69 node4 = ixs(5, ii + nft)
70 node5 = ixs(6, ii + nft)
71 node6 = ixs(7, ii + nft)
72 node7 = ixs(8, ii + nft)
73 node8 = ixs(9, ii + nft)
75 x1(1:3) = xgrid(1:3, node1)
76 x2(1:3) = xgrid(1:3, node2)
77 x3(1:3) = xgrid(1:3, node3)
78 x4(1:3) = xgrid(1:3, node4)
79 x5(1:3) = xgrid(1:3, node5)
80 x6(1:3) = xgrid(1:3, node6)
81 x7(1:3) = xgrid(1:3, node7)
82 x8(1:3) = xgrid(1:3, node8)
85 w1(1:3) = wgrid(3 * (node1 - 1) + 1 : 3 * (node1 - 1) + 3)
86 w2(1:3) = wgrid(3 * (node2 - 1) + 1 : 3 * (node2 - 1) + 3)
87 w3(1:3) = wgrid(3 * (node3 - 1) + 1 : 3 * (node3 - 1) + 3)
88 w4(1:3) = wgrid(3 * (node4 - 1) + 1 : 3 * (node4 - 1) + 3)
89 w5(1:3) = wgrid(3 * (node5 - 1) + 1 : 3 * (node5 - 1) + 3)
90 w6(1:3) = wgrid(3 * (node6 - 1) + 1 : 3 * (node6 - 1) + 3)
91 w7(1:3) = wgrid(3 * (node7 - 1) + 1 : 3 * (node7 - 1) + 3)
92 w8(1:3) = wgrid(3 * (node8 - 1) + 1 : 3 * (node8 - 1) + 3)
107 norm(1, kface, ii) = half * ((x3(2) - x1(2)) * (x2(3) - x4(3)) -
108 . (x3(3) - x1(3)) * (x2(2) - x4(2)))
109 norm(2, kface, ii) = half * ((x3(3) - x1(3)) * (x2(1) - x4(1)) -
110 . (x3(1) - x1(1)) * (x2(3) - x4(3)))
111 norm(3, kface, ii) = half * ((x3(1) - x1(1)) * (x2(2) - x4(2)) -
112 . (x3(2) - x1(2)) * (x2(1) - x4(1)))
113 nx =>
norm(1, kface, ii)
114 ny =>
norm(2, kface, ii)
115 nz =>
norm(3, kface, ii)
116 surf(kface, ii) = sqrt(nx * nx + ny * ny + nz * nz)
117 nx = nx / surf(kface, ii)
118 ny = ny / surf(kface, ii)
119 nz = nz / surf(kface, ii)
122 norm(1, kface, ii) = half * ((x7(2) - x4(2)) * (x3(3) - x8(3)) -
123 . (x7(3) - x4(3)) * (x3(2) - x8(2)))
124 norm(2, kface, ii) = half * ((x7(3) - x4(3)) * (x3(1) - x8(1)) -
125 . (x7(1) - x4(1)) * (x3(3) - x8(3)))
126 norm(3, kface, ii) = half * ((x7(1) - x4(1)) * (x3(2) - x8(2)) -
127 . (x7(2) - x4(2)) * (x3(1) - x8(1)))
128 nx =>
norm(1, kface, ii)
129 ny =>
norm(2, kface, ii)
130 nz =>
norm(3, kface, ii)
131 surf(kface, ii) = sqrt(nx * nx + ny * ny + nz * nz)
132 nx = nx / surf(kface, ii)
133 ny = ny / surf(kface, ii)
134 nz = nz / surf(kface, ii)
137 norm(1, kface, ii) = half * ((x6(2) - x8(2)) * (x7(3) - x5(3)) -
138 . (x6(3) - x8(3)) * (x7(2) - x5(2)))
139 norm(2, kface, ii) = half * ((x6(3) - x8(3)) * (x7(1) - x5(1)) -
140 . (x6(1) - x8(1)) * (x7(3) - x5(3)))
141 norm(3, kface, ii) = half * ((x6(1) - x8(1)) * (x7(2) - x5(2)) -
142 . (x6(2) - x8(2)) * (x7(1) - x5(1)))
143 nx =>
norm(1, kface, ii)
144 ny =>
norm(2, kface, ii)
145 nz =>
norm(3, kface, ii)
146 surf(kface, ii) = sqrt(nx * nx + ny * ny + nz * nz)
147 nx = nx / surf(kface, ii)
148 ny = ny / surf(kface, ii)
149 nz = nz / surf(kface, ii)
152 norm(1, kface, ii) = half * ((x2(2) - x5(2)) * (x6(3) - x1(3)) -
153 . (x2(3) - x5(3)) * (x6(2) - x1(2)))
154 norm(2, kface, ii) = half * ((x2(3) - x5(3)) * (x6(1) - x1(1)) -
155 . (x2(1) - x5(1)) * (x6(3) - x1(3)))
156 norm(3, kface, ii) = half * ((x2(1) - x5(1)) * (x6(2) - x1(2)) -
157 . (x2(2) - x5(2)) * (x6(1) - x1(1)))
158 nx =>
norm(1, kface, ii)
159 ny =>
norm(2, kface, ii)
160 nz =>
norm(3, kface, ii)
161 surf(kface, ii) = sqrt(nx * nx + ny * ny + nz * nz)
162 nx = nx / surf(kface, ii)
163 ny = ny / surf(kface, ii)
164 nz = nz / surf(kface, ii)
167 norm(1, kface, ii) = half * ((x7(2) - x2(2)) * (x6(3) - x3(3)) -
168 . (x7(3) - x2(3)) * (x6(2) - x3(2)))
169 norm(2, kface, ii) = half * ((x7(3) - x2(3)) * (x6(1) - x3(1)) -
170 . (x7(1) - x2(1)) * (x6(3) - x3(3)))
171 norm(3, kface, ii) = half * ((x7(1) - x2(1)) * (x6(2) - x3(2)) -
172 . (x7(2) - x2(2)) * (x6(1) - x3(1)))
173 nx =>
norm(1, kface, ii)
174 ny =>
norm(2, kface, ii)
175 nz =>
norm(3, kface, ii)
176 surf(kface, ii) = sqrt(nx * nx + ny * ny + nz * nz)
177 nx = nx / surf(kface, ii)
178 ny = ny / surf(kface, ii)
179 nz = nz / surf(kface, ii)
182 norm(1, kface, ii) = half * ((x8(2) - x1(2)) * (x4(3) - x5(3)) -
183 . (x8(3) - x1(3)) * (x4(2) - x5(2)))
184 norm(2, kface, ii) = half * ((x8(3) - x1(3)) * (x4(1) - x5(1)) -
185 . (x8(1) - x1(1)) * (x4(3) - x5(3)))
186 norm(3, kface, ii) = half * ((x8(1) - x1(1)) * (x4(2) - x5(2)) -
187 . (x8(2) - x1(2)) * (x4(1) - x5(1)))
188 nx =>
norm(1, kface, ii)
189 ny =>
norm(2, kface, ii)
190 nz =>
norm(3, kface, ii)
191 surf(kface, ii) = sqrt(nx * nx + ny * ny + nz * nz)
192 nx = nx / surf(kface, ii)
193 ny = ny / surf(kface, ii)
194 nz = nz / surf(kface, ii)
196 wfac(1:3, 1, ii) = fourth * (w1(1:3) + w2(1:3) + w3(1:3) + w4(1:3))
198 wfac(1:3, 2, ii) = fourth * (w3(1:3) + w4(1:3) + w8(1:3) + w7(1:3))
200 wfac(1:3, 3, ii) = fourth * (w5(1:3) + w6(1:3) + w7(1:3) + w8(1:3))
202 wfac(1:3, 4, ii) = fourth * (w1(1:3) + w2(1:3) + w6(1:3) + w5(1:3))
204 wfac(1:3, 5, ii) = fourth * (w2(1:3) + w3(1:3) + w7(1:3) + w6(1:3))
206 wfac(1:3, 6, ii) = fourth * (w1(1:3) + w4(1:3) + w8(1:3) + w5(1:3))