29 SUBROUTINE snorm3 (NEL, NFT, JALE, IXS, XGRID, WGRID,
39#include
"implicit_f.inc"
47 INTEGER,
INTENT(IN) :: NEL, NFT, JALE, IXS(NIXS, *)
49 . xgrid(3, *), wgrid(*)
50 my_real,
INTENT(OUT) :: wfac(3, 6, nel), surf(6, nel)
55 INTEGER :: II, NODE1, NODE2, NODE3, NODE4, NODE5, NODE6, NODE7, NODE8, KFACE
57 . x1(3), x2(3), x3(3), x4(3), x5(3), x6(3), x7(3), x8(3),
58 . w1(3), w2(3), w3(3), w4(3), w5(3), w6(3), w7(3), w8(3)
63 node1 = ixs(2, ii + nft)
64 node2 = ixs(3, ii + nft)
65 node3 = ixs(4, ii + nft)
66 node4 = ixs(5, ii + nft)
67 node5 = ixs(6, ii + nft)
68 node6 = ixs(7, ii + nft)
69 node7 = ixs(8, ii + nft)
70 node8 = ixs(9, ii + nft)
72 x1(1:3) = xgrid(1:3, node1)
73 x2(1:3) = xgrid(1:3, node2)
74 x3(1:3) = xgrid(1:3, node3)
75 x4(1:3) = xgrid(1:3, node4)
76 x5(1:3) = xgrid(1:3, node5)
77 x6(1:3) = xgrid(1:3, node6)
78 x7(1:3) = xgrid(1:3, node7)
79 x8(1:3) = xgrid(1:3, node8)
82 w1(1:3) = wgrid(3 * (node1 - 1) + 1 : 3 * (node1 - 1) + 3)
83 w2(1:3) = wgrid(3 * (node2 - 1) + 1 : 3 * (node2 - 1) + 3)
84 w3(1:3) = wgrid(3 * (node3 - 1) + 1 : 3 * (node3 - 1) + 3)
85 w4(1:3) = wgrid(3 * (node4 - 1) + 1 : 3 * (node4 - 1) + 3)
86 w5(1:3) = wgrid(3 * (node5 - 1) + 1 : 3 * (node5 - 1) + 3)
87 w6(1:3) = wgrid(3 * (node6 - 1) + 1 : 3 * (node6 - 1) + 3)
88 w7(1:3) = wgrid(3 * (node7 - 1) + 1 : 3 * (node7 - 1) + 3)
89 w8(1:3) = wgrid(3 * (node8 - 1) + 1 : 3 * (node8 - 1) + 3)
104 norm(1, kface, ii) = half * ((x3(2) - x1(2)) * (x2(3) - x4(3)) -
105 . (x3(3) - x1(3)) * (x2(2) - x4(2)))
106 norm(2, kface, ii) = half * ((x3(3) - x1(3)) * (x2(1) - x4(1)) -
107 . (x3(1) - x1(1)) * (x2(3) - x4(3)))
108 norm(3, kface, ii) = half * ((x3(1) - x1(1)) * (x2(2) - x4(2)) -
109 . (x3(2) - x1(2)) * (x2(1) - x4(1)))
110 nx =>
norm(1, kface, ii)
111 ny =>
norm(2, kface, ii)
112 nz =>
norm(3, kface, ii)
113 surf(kface, ii) = sqrt(nx * nx + ny * ny + nz * nz)
114 nx = nx / surf(kface, ii)
115 ny = ny / surf(kface, ii)
116 nz = nz / surf(kface, ii)
119 norm(1, kface, ii) = half * ((x7(2) - x4(2)) * (x3(3) - x8(3)) -
120 . (x7(3) - x4(3)) * (x3(2) - x8(2)))
121 norm(2, kface, ii) = half * ((x7(3) - x4(3)) * (x3(1) - x8(1)) -
122 . (x7(1) - x4(1)) * (x3(3) - x8(3)))
123 norm(3, kface, ii) = half * ((x7(1) - x4(1)) * (x3(2) - x8(2)) -
124 . (x7(2) - x4(2)) * (x3(1) - x8(1)
125 nx =>
norm(1, kface, ii)
126 ny =>
norm(2, kface, ii
127 nz =>
norm(3, kface, ii)
128 surf(kface, ii) = sqrt(nx * nx + ny * ny + nz * nz)
129 nx = nx / surf(kface, ii)
130 ny = ny / surf(kface, ii)
131 nz = nz / surf(kface, ii)
134 norm(1, kface, ii) = half * ((x6(2) - x8(2)) * (x7(3) - x5(3)) -
135 . (x6(3) - x8(3)) * (x7(2) - x5(2)))
136 norm(2, kface, ii) = half * ((x6(3) - x8(3)) * (x7(1) - x5(1)) -
137 . (x6(1) - x8(1)) * (x7(3) - x5(3)))
138 norm(3, kface, ii) = half * ((x6(1) - x8(1)) * (x7(2) - x5(2)) -
140 nx =>
norm(1, kface, ii)
141 ny =>
norm(2, kface, ii)
142 nz =>
norm(3, kface, ii)
143 surf(kface, ii) = sqrt(nx * nx + ny * ny + nz * nz)
144 nx = nx / surf(kface, ii)
145 ny = ny / surf(kface, ii)
146 nz = nz / surf(kface, ii)
149 norm(1, kface, ii) = half * ((x2(2) - x5(2)) * (x6(3) - x1(3)) -
150 . (x2(3) - x5(3)) * (x6(2) - x1(2)))
151 norm(2, kface, ii) = half * ((x2(3) - x5(3)) * (x6(1) - x1(1)) -
152 . (x2(1) - x5(1)) * (x6(3) - x1(3)))
153 norm(3, kface, ii) = half * ((x2(1) - x5(1)) * (x6(2) - x1(2)) -
154 . (x2(2) - x5(2)) * (x6(1) - x1(1)))
155 nx =>
norm(1, kface, ii)
156 ny =>
norm(2, kface, ii)
157 nz =>
norm(3, kface, ii)
158 surf(kface, ii) = sqrt(nx * nx + ny * ny + nz * nz)
159 nx = nx / surf(kface, ii)
160 ny = ny / surf(kface, ii)
161 nz = nz / surf(kface, ii)
164 norm(1, kface, ii) = half * ((x7(2) - x2(2)) * (x6(3) - x3(3)) -
165 . (x7(3) - x2(3)) * (x6(2) - x3(2)))
166 norm(2, kface, ii) = half * ((x7(3) - x2(3)) * (x6(1) - x3(1)) -
167 . (x7(1) - x2(1)) * (x6(3) - x3(3)))
168 norm(3, kface, ii) = half * ((x7(1) - x2(1)) * (x6(2) - x3(2)) -
169 . (x7(2) - x2(2)) * (x6(1) - x3(1)))
170 nx =>
norm(1, kface, ii)
171 ny =>
norm(2, kface, ii)
172 nz =>
norm(3, kface, ii)
173 surf(kface, ii) = sqrt(nx * nx + ny * ny + nz * nz)
174 nx = nx / surf(kface, ii)
175 ny = ny / surf(kface, ii)
176 nz = nz / surf(kface, ii)
179 norm(1, kface, ii) = half * ((x8(2) - x1(2)) * (x4(3) - x5(3)) -
180 . (x8(3) - x1(3)) * (x4(2) - x5(2)))
181 norm(2, kface, ii) = half * ((x8(3) - x1(3)) * (x4(1) - x5(1)) -
182 . (x8(1) - x1(1)) * (x4(3) - x5(3)))
183 norm(3, kface, ii) = half * ((x8(1) - x1(1)) * (x4(2) - x5(2)) -
184 . (x8(2) - x1(2)) * (x4(1) - x5(1)))
185 nx =>
norm(1, kface, ii)
186 ny =>
norm(2, kface, ii)
187 nz =>
norm(3, kface, ii)
188 surf(kface, ii) = sqrt(nx * nx + ny * ny + nz * nz)
189 nx = nx / surf(kface, ii)
190 ny = ny / surf(kface, ii)
193 wfac(1:3, 1, ii) = fourth * (w1(1:3) + w2(1:3) + w3(1:3) + w4(1:3))
195 wfac(1:3, 2, ii) = fourth * (w3(1:3) + w4(1:3) + w8(1:3) + w7(1:3))
197 wfac(1:3, 3, ii) = fourth * (w5(1:3) + w6(1:3) + w7(1:3) + w8(1:3))
199 wfac(1:3, 4, ii) = fourth * (w1(1:3) + w2(1:3) + w6(1:3) + w5(1:3))
201 wfac(1:3, 5, ii) = fourth * (w2(1:3) + w3(1:3) + w7(1:3) + w6(1:3))
203 wfac(1:3, 6, ii) = fourth * (w1(1:3) + w4(1:3) + w8(1:3) + w5(1:3))