45
46
47
49
50
51
52#include "implicit_f.inc"
53
54
55
56#include "parit_c.inc"
57#include "scr02_c.inc"
58#include "scr18_c.inc"
59
60
61
62 INTEGER, INTENT(IN) :: NFT
63 INTEGER :: NEL,IMAT,IP,ITASK
64 INTEGER, DIMENSION(NEL) :: NC1,NC2,NC3,NC4,NC5,NC6,NC7,NC8
65 my_real,
DIMENSION(NEL),
INTENT(IN) ::
66 . offg
68 . dt2t
69 my_real,
DIMENSION(NEL),
INTENT(IN) ::
70 . var_reg,px1,px2,px3,px4,px5,px6,px7,px8,
71 . py1,py2,py3,py4,py5,py6,py7,py8,pz1,pz2,
72 . pz3,pz4,pz5,pz6,pz7,pz8,vol,h(8),vol0
73 TYPE(NLOCAL_STR_), TARGET :: NLOC_DMG
75 . wi
76
77
78
79 INTEGER I,II,K,NNOD,N1,N2,N3,N4,N5,N6,N7,N8,L_NLOC
81 . dx, dy, dz, l2,xi,ntvar,a,
82 . b1,b2,b3,b4,b5,b6,b7,b8,
83 . a1,a2,a3,a4,a5,a6,a7,a8,c1,c2,c3,c4,c5,c6,c7,c8,
84 . zeta,sspnl,dtnl,le_max,maxstif,minmasscal
86 . f1,f2,f3,f4,f5,f6,f7,f8,lc
87 my_real,
DIMENSION(:) ,
ALLOCATABLE ::
88 . btb11,btb12,btb13,btb14,btb15,btb16,btb17,btb18,
89 . btb22,btb23,btb24,btb25,btb26,btb27,btb28,btb33,
90 . btb34,btb35,btb36,btb37,btb38,btb44,btb45,btb46,
91 . btb47,btb48,btb55,btb56,btb57,btb58,btb66,btb67,
92 . btb68,btb77,btb78,btb88,sti1,sti2,sti3,sti4,sti5,
93 . sti6,sti7,sti8
94 INTEGER, DIMENSION(:), ALLOCATABLE ::
95 . POS1,POS2,POS3,POS4,POS5,POS6,POS7,POS8
96 my_real,
POINTER,
DIMENSION(:) ::
97 . vnl,fnl,unl,stifnl,mass,mass0,vnl0
98
99 my_real,
PARAMETER :: cdamp = 0.7d0
100
101 NULLIFY(mass)
102 NULLIFY(mass0)
103 l2 = nloc_dmg%LEN(imat)**2
104 xi = nloc_dmg%DAMP(imat)
105 nnod = nloc_dmg%NNOD
106 l_nloc = nloc_dmg%L_NLOC
107 zeta = nloc_dmg%DENS(imat)
108 sspnl = nloc_dmg%SSPNL(imat)
109 le_max = nloc_dmg%LE_MAX(imat) ! maximal length of convergence
110 lc(1:nel) = zero
111 vnl => nloc_dmg%VNL(1:l_nloc)
112 vnl0 => nloc_dmg%VNL_OLD(1:l_nloc)
113 unl => nloc_dmg%UNL(1:l_nloc)
114 ALLOCATE(btb11(nel),btb12(nel),btb13(nel),btb14(nel),btb15(nel),
115 . btb16(nel),btb17(nel),btb18(nel),btb22(nel),btb23(nel),btb24(nel),
116 . btb25(nel),btb26(nel),btb27(nel),btb28(nel),btb33(nel),btb34(nel),
117 . btb35(nel),btb36(nel),btb37(nel),btb38(nel),btb44(nel),btb45(nel),
118 . btb46(nel),btb47(nel),btb48(nel),btb55(nel),btb56(nel),btb57(nel),
119 . btb58(nel),btb66(nel),btb67(nel),btb68(nel),btb77(nel),btb78(nel),
120 . btb88(nel),pos1(nel),pos2(nel),pos3(nel),pos4(nel),pos5(nel),
121 . pos6(nel),pos7(nel),pos8(nel))
122
123 IF (nodadt > 0) THEN
124
125 ALLOCATE(sti1(nel),sti2(nel),sti3(nel),sti4(nel),sti5(nel),sti6(nel),
126 . sti7(nel),sti8(nel))
127 mass => nloc_dmg%MASS(1:l_nloc)
128
129 mass => nloc_dmg%MASS(1:l_nloc)
130
131 mass0 => nloc_dmg%MASS0(1:l_nloc)
132 ENDIF
133
134
135
136
137 ! loop over elements
138# include "vectorize.inc"
139 DO i=1,nel
140
141
142 n1 = nloc_dmg%IDXI(nc1(i))
143 n2 = nloc_dmg%IDXI(nc2(i))
144 n3 = nloc_dmg%IDXI(nc3(i))
145 n4 = nloc_dmg%IDXI(nc4(i))
146 n5 = nloc_dmg%IDXI(nc5(i))
147 n6 = nloc_dmg%IDXI(nc6(i))
148 n7 = nloc_dmg%IDXI(nc7(i))
149 n8 = nloc_dmg%IDXI(nc8(i))
150
151 ! recovering
the position of
the non-local d.o.f.s
152 pos1(i) = nloc_dmg%POSI(n1)
153 pos2(i) = nloc_dmg%POSI(n2)
154 pos3(i) = nloc_dmg%POSI(n3)
155 pos4(i) = nloc_dmg%POSI(n4)
156 pos5(i) = nloc_dmg%POSI(n5)
157 pos6(i) = nloc_dmg%POSI(n6)
158 pos7(i) = nloc_dmg%POSI(n7)
159 pos8(i) = nloc_dmg%POSI(n8)
160
161
162 btb11(i) = px1(i)**2 + py1(i)**2 + pz1(i)**2
163 btb12(i) = px1(i)*px2(i) + py1(i)*py2(i) + pz1(i)*pz2(i)
164 btb13(i) = px1(i)*px3(i) + py1(i)*py3(i) + pz1(i)*pz3(i)
165 btb14(i) = px1(i)*px4(i) + py1(i)*py4(i) + pz1(i)*pz4(i)
166 btb15(i) = px1(i)*px5(i) + py1(i)*py5(i) + pz1(i)*pz5(i)
167 btb16(i) = px1(i)*px6(i) + py1(i)*py6(i) + pz1(i)*pz6(i)
168 btb17(i) = px1(i)*px7(i) + py1(i)*py7(i) + pz1(i)*pz7(i)
169 btb18(i) = px1(i)*px8(i) + py1(i)*py8(i) + pz1(i)*pz8(i)
170
171 btb23(i) = px2(i)*px3(i) + py2(i)*py3(i) + pz2(i)*pz3(i)
172 btb24(i) = px2(i)*px4(i) + py2(i)*py4(i) + pz2(i)*pz4(i)
173 btb25(i) = px2(i)*px5(i) + py2(i)*py5(i) + pz2(i)*pz5(i)
174 btb26(i) = px2(i)*px6(i) + py2(i)*py6(i) + pz2(i)*pz6(i)
175 btb27(i) = px2(i)*px7(i) + py2(i)*py7(i) + pz2(i)*pz7(i)
176 btb28(i) = px2(i)*px8(i) + py2(i)*py8(i) + pz2(i)*pz8(i)
177 btb33(i) = px3(i)**2 + py3(i)**2 + pz3(i)**2
178 btb34(i) = px3(i)*px4(i) + py3(i)*py4(i) + pz3(i)*pz4(i)
179 btb35(i) = px3(i)*px5(i) + py3(i)*py5(i) + pz3(i)*pz5(i)
180 btb36(i) = px3(i)*px6(i) + py3(i)*py6(i) + pz3(i)*pz6(i)
181 btb37(i) = px3(i)*px7(i) + py3(i)*py7(i) + pz3(i)*pz7(i)
182 btb38(i) = px3(i)*px8(i) + py3(i)*py8(i) + pz3(i)*pz8(i)
183 btb44(i) = px4(i)**2 + py4(i)**2 + pz4(i)**2
184 btb45(i) = px4(i)*px5(i) + py4(i)*py5(i) + pz4(i)*pz5(i)
185 btb46(i) = px4(i)*px6(i) + py4(i)*py6(i) + pz4(i)*pz6(i)
186 btb47(i) = px4(i)*px7(i) + py4(i)*py7(i) + pz4(i)*pz7(i)
187 btb48(i) = px4(i)*px8(i) + py4(i)*py8(i) + pz4(i)*pz8(i)
188 btb55(i) = px5(i)**2 + py5(i)**2 + pz5(i)**2
189 btb56(i) = px5(i)*px6(i) + py5(i)*py6(i) + pz5(i)*pz6(i)
190 btb57(i) = px5(i)*px7(i) + py5(i)*py7(i) + pz5(i)*pz7(i)
191 btb58(i) = px5(i)*px8(i) + py5(i)*py8(i
192 btb66(i) = px6(i)**2 + py6(i)**2 + pz6(i)**2
193 btb67(i) = px6(i)*px7(i) + py6(i)*py7(i) + pz6(i)*pz7(i)
194 btb68(i) = px6(i)*px8(i) + py6(i)*py8(i) + pz6(i)*pz8
195 btb77(i) = px7(i)**2 + py7(i)**2 + pz7(i)**2
196 btb78(i) = px7(i)*px8(i) + py7(i)*py8(i) + pz7(i)*pz8(i)
197 btb88(i) = px8(i)**2 + py8(i)**2 + pz8(i)**2
198
199 ENDDO
200
201
202
203
204
205# include "vectorize.inc"
206 DO i=1,nel
207
208
209 IF (offg(i)/=zero) THEN
210
211 a1 = vol(i) * (h(1)*h(1)*unl(pos1(i)) + h(1)*h(2)*unl(pos2(i)) + h(1)*h(3)*unl(pos3(i))
212 . + h(1)*h(4)*unl(pos4(i)) + h(1)*h(5)*unl(pos5(i)) + h(1)*h(6)*unl(pos6(i))
213 . + h(1)*h(7)*unl(pos7(i)) + h(1)*h(8)*unl(pos8(i)))
214
215 IF (nodadt == 0) THEN
216 a1 = a1 + vol(i) * xi * (h(1)*h(1)*vnl(pos1(i)) + h(1)*h(2)*vnl(pos2(i)) + h(1)*h(3)*vnl(pos3(i))
217 . + h(1)*h(4)*vnl(pos4(i)) + h(1)*h(5)*vnl(pos5(i)) + h(1)*h(6)*vnl(pos6(i))
218 . + h(1)*h(7)*vnl(pos7(i)) + h(1)*h(8)*vnl(pos8(i)))
219 ELSE
220 minmasscal =
min(sqrt(mass(pos1(i))/mass0(pos1(i))),
221 . sqrt(mass(pos2(i))/mass0(pos2(i))),
222 . sqrt(mass(pos3(i))/mass0(pos3(i))),
223 . sqrt(mass(pos4(i))/mass0(pos4(i))),
224 . sqrt(mass(pos5(i))/mass0(pos5(i))),
225 . sqrt(mass(pos6(i))/mass0(pos6(i))),
226 . sqrt(mass(pos7(i))/mass0(pos7(i))),
227 . sqrt(mass(pos8(i))/mass0(pos8(i))))
228 a1 = a1 + vol(i) * xi * (h(1)*h(1)*minmasscal*vnl(pos1(i)) +
229 . h(1)*h(2)*minmasscal*vnl(pos2(i)) +
230 . h(1)*h(3)*minmasscal*vnl(pos3(i)) +
231 . h(1)*h(4)*minmasscal*vnl(pos4(i)) +
232 . h(1)*h(5)*minmasscal*vnl(pos5(i)) +
233 . h(1)*h(6)*minmasscal*vnl(pos6(i)) +
234 . h(1)*h(7)*minmasscal*vnl(pos7(i)) +
235 . h(1)*h(8)*minmasscal*vnl(pos8(i)))
236 ENDIF
237
238 b1 = l2 * vol(i) * ( btb11(i)*unl(pos1(i)) + btb12(i)*unl(pos2(i))
239 . + btb13(i)*unl(pos3(i)) + btb14(i)*unl(pos4(i)) + btb15(i)*unl(pos5(i))
240 . + btb16(i)*unl(pos6(i)) + btb17(i)*unl(pos7(i)) + btb18(i)*unl(pos8(i)))
241
242 c1 = vol(i) * h(1) * var_reg(i)
243
244 a2 = vol(i) * (h(2)*h(1)*unl(pos1(i)) + h(2)*h(2)*unl(pos2(i)) + h(2)*h(3)*unl(pos3(i))
245 . + h(2)*h(4)*unl(pos4(i)) + h(2)*h(5)*unl(pos5(i)) + h(2)*h(6)*unl(pos6(i))
246 . + h(2)*h(7)*unl(pos7(i)) + h(2)*h(8)*unl(pos8(i)))
247
248 IF (nodadt == 0) THEN
249 a2 = a2 + vol(i) * xi * (h(2)*h(1)*vnl(pos1(i)) + h(2)*h(2)*vnl(pos2(i)) + h(2)*h(3)*vnl(pos3(i))
250 . + h(2)*h(4)*vnl(pos4(i)) + h(2)*h(5)*vnl(pos5(i)) + h(2)*h(6)*vnl(pos6(i))
251 . + h(2)*h(7)*vnl(pos7(i)) + h(2)*h(8)*vnl(pos8(i)))
252 ELSE
253 a2 = a2 + vol(i) * xi * (h(2)*h(1)*minmasscal*vnl(pos1(i)) +
254 . h(2)*h(2)*minmasscal*vnl(pos2(i)) +
255 . h(2)*h(3)*minmasscal*vnl(pos3(i)) +
256 . h(2)*h(4)*minmasscal*vnl(pos4(i)) +
257 . h(2)*h(5)*minmasscal*vnl(pos5(i)) +
258 . h(2)*h(6)*minmasscal*vnl(pos6(i)) +
259 . h(2)*h(7)*minmasscal*vnl(pos7(i)) +
260 . h(2)*h(8)*minmasscal*vnl(pos8(i)))
261 ENDIF
262
263 b2 = l2 * vol(i) * ( btb12(i)*unl(pos1(i)) + btb22(i)*unl(pos2(i))
264 . + btb23(i)*unl(pos3(i)) + btb24(i)*unl(pos4(i)) + btb25(i)*unl(pos5(i))
265 . + btb26(i)*unl(pos6(i)) + btb27(i)*unl(pos7(i)) + btb28(i)*unl(pos8(i)))
266
267 c2 = vol(i) * h(2) * var_reg(i)
268
269 a3 = vol(i) * (h(3)*h(1)*unl(pos1(i)) + h(3)*h(2)*unl(pos2(i)) + h(3)*h(3)*unl(pos3(i))
270 . + h(3)*h(4)*unl(pos4(i)) + h(3)*h(5)*unl(pos5(i)) + h(3)*h(6)*unl(pos6(i))
271 . + h(3)*h(7)*unl(pos7(i)) + h(3)*h(8)*unl(pos8(i)))
272
273 IF (nodadt == 0) THEN
274 a3 = a3 + vol(i) * xi * (h(3)*h(1)*vnl(pos1(i)) + h(3)*h(2)*vnl(pos2(i)) + h(3)*h(3)*vnl(pos3(i))
275 . + h(3)*h(4)*vnl(pos4(i)) + h(3)*h(5)*vnl(pos5(i)) + h(3)*h(6)*vnl(pos6(i))
276 . + h(3)*h(7)*vnl(pos7(i)) + h(3)*h(8)*vnl(pos8(i)))
277 ELSE
278 a3 = a3 + vol(i) * xi * (h(3)*h(1)*minmasscal*vnl(pos1(i)) +
279 . h(3)*h(2)*minmasscal*vnl(pos2(i)) +
280 . h(3)*h(3)*minmasscal*vnl(pos3(i)) +
281 . h(3)*h(4)*minmasscal*vnl(pos4(i)) +
282 . h(3)*h(5)*minmasscal*vnl(pos5(i)) +
283 . h(3)*h(6)*minmasscal*vnl(pos6(i)) +
284 . h(3)*h(7)*minmasscal*vnl(pos7(i)) +
285 . h(3)*h(8)*minmasscal*vnl(pos8(i)))
286 ENDIF
287
288 b3 = l2 * vol(i) * ( btb13(i)*unl(pos1(i)) + btb23(i)*unl(pos2(i))
289 . + btb33(i)*unl(pos3(i)) + btb34(i)*unl(pos4(i)) + btb35(i)*unl(pos5(i))
290 . + btb36(i)*unl(pos6(i)) + btb37(i)*unl(pos7(i)) + btb38(i)*unl(pos8(i)))
291
292 c3 = vol(i) * h(3) * var_reg(i)
293
294 a4 = vol(i) * (h(4)*h(1)*unl(pos1(i)) + h(4)*h(2)*unl(pos2(i)) + h(4)*h(3)*unl(pos3(i))
295 . + h(4)*h(4)*unl(pos4(i)) + h(4)*h(5)*unl(pos5(i)) + h(4)*h(6)*unl(pos6(i))
296 . + h(4)*h(7)*unl(pos7(i)) + h(4)*h(8)*unl(pos8(i)))
297
298 IF (nodadt == 0) THEN
299 a4 = a4 + vol(i) * xi * (h(4)*h(1)*vnl(pos1(i)) + h(4)*h(2)*vnl(pos2(i)) + h(4)*h(3)*vnl(pos3(i))
300 . + h(4)*h(4)*vnl(pos4(i)) + h(4)*h(5)*vnl(pos5(i)) + h(4)*h(6)*vnl(pos6(i))
301 . + h(4)*h(7)*vnl(pos7(i)) + h(4)*h(8)*vnl(pos8(i)))
302 ELSE
303 a4 = a4 + vol(i) * xi * (h(4)*h(1)*minmasscal*vnl(pos1(i)) +
304 . h(4)*h(2)*minmasscal*vnl(pos2(i)) +
305 . h(4)*h(3)*minmasscal*vnl(pos3(i)) +
306 . h(4)*h(4)*minmasscal*vnl(pos4(i)) +
307 . h(4)*h(5)*minmasscal*vnl(pos5(i)) +
308 . h(4)*h(6)*minmasscal*vnl(pos6(i)) +
309 . h(4)*h(7)*minmasscal*vnl(pos7(i)) +
310 . h(4)*h(8)*minmasscal*vnl(pos8(i)))
311 ENDIF
312
313 b4 = l2 * vol(i) * ( btb14(i)*unl(pos1(i)) + btb24(i)*unl(pos2(i))
314 . + btb34(i)*unl(pos3(i)) + btb44(i)*unl(pos4(i)) + btb45(i)*unl(pos5(i))
315 . + btb46(i)*unl(pos6(i)) + btb47(i)*unl(pos7(i)) + btb48(i)*unl(pos8(i)))
316
317 c4 = vol(i) * h(4) * var_reg(i)
318
319 a5 = vol(i) * (h(5)*h(1)*unl(pos1(i)) + h(5)*h(2)*unl(pos2(i)) + h(5)*h(3)*unl(pos3(i))
320 . + h(5)*h(4)*unl(pos4(i)) + h(5)*h(5)*unl(pos5(i)) + h(5)*h(6)*unl(pos6(i))
321 . + h(5)*h(7)*unl(pos7(i)) + h(5)*h(8)*unl(pos8(i)))
322
323 IF (nodadt == 0) THEN
324 a5 = a5 + vol(i) * xi * (h(5)*h(1)*vnl(pos1(i)) + h(5)*h(2)*vnl(pos2(i)) + h(5)*h(3)*vnl(pos3(i))
325 . + h(5)*h(4)*vnl(pos4(i)) + h(5)*h(5)*vnl(pos5(i)) + h(5)*h(6)*vnl(pos6(i))
326 . + h(5)*h(7)*vnl(pos7(i)) + h(5)*h(8)*vnl(pos8(i)))
327 ELSE
328 a5 = a5 + vol(i) * xi * (h(5)*h(1)*minmasscal*vnl(pos1(i)) +
329 . h(5)*h(2)*minmasscal*vnl(pos2(i)) +
330 . h(5)*h(3)*minmasscal*vnl(pos3(i)) +
331 . h(5)*h(4)*minmasscal*vnl(pos4(i)) +
332 . h(5)*h(5)*minmasscal*vnl(pos5(i)) +
333 . h(5)*h(6)*minmasscal*vnl(pos6(i)) +
334 . h(5)*h(7)*minmasscal*vnl(pos7(i)) +
335 . h(5)*h(8)*minmasscal*vnl(pos8(i)))
336 ENDIF
337
338 b5 = l2 * vol(i) * ( btb15(i)*unl(pos1(i)) + btb25(i)*unl(pos2(i))
339 . + btb35(i)*unl(pos3(i)) + btb45(i)*unl(pos4(i)) + btb55(i)*unl(pos5(i))
340 . + btb56(i)*unl(pos6(i)) + btb57(i)*unl(pos7(i)) + btb58(i)*unl(pos8(i)))
341
342 c5 = vol(i) * h(5) * var_reg(i)
343
344 a6 = vol(i) * (h(6)*h(1)*unl(pos1(i)) + h(6)*h(2)*unl(pos2(i)) + h(6)*h(3)*unl(pos3(i))
345 . + h(6)*h(4)*unl(pos4(i)) + h(6)*h(5)*unl(pos5(i)) + h(6)*h(6)*unl(pos6(i))
346 . + h(6)*h(7)*unl(pos7(i)) + h(6)*h(8)*unl(pos8(i)))
347
348 IF (nodadt == 0) THEN
349 a6 = a6 + vol(i) * xi * (h(6)*h(1)*vnl(pos1(i)) + h(6)*h(2)*vnl(pos2(i)) + h(6)*h(3)*vnl(pos3(i))
350 . + h(6)*h(4)*vnl(pos4(i)) + h(6)*h(5)*vnl(pos5(i)) + h(6)*h(6)*vnl(pos6(i))
351 . + h(6)*h(7)*vnl(pos7(i)) + h(6)*h(8)*vnl(pos8(i)))
352 ELSE
353 a6 = a6 + vol(i) * xi * (h(6)*h(1)*minmasscal*vnl(pos1(i)) +
354 . h(6)*h(2)*minmasscal*vnl(pos2(i)) +
355 . h(6)*h(3)*minmasscal*vnl(pos3(i)) +
356 . h(6)*h(4)*minmasscal*vnl(pos4(i)) +
357 . h(6)*h(5)*minmasscal*vnl(pos5(i)) +
358 . h(6)*h(6)*minmasscal*vnl(pos6(i)) +
359 . h(6)*h(7)*minmasscal*vnl(pos7(i)) +
360 . h(6)*h(8)*minmasscal*vnl(pos8(i)))
361 ENDIF
362
363 b6 = l2 * vol(i) * ( btb16(i)*unl(pos1(i)) + btb26(i)*unl(pos2(i))
364 . + btb36(i)*unl(pos3(i)) + btb46(i)*unl(pos4(i)) + btb56(i)*unl(pos5(i))
365 . + btb66(i)*unl(pos6(i)) + btb67(i)*unl(pos7(i)) + btb68(i)*unl(pos8(i)))
366
367 c6 = vol(i) * h(6) * var_reg(i)
368
369 a7 = vol(i) * (h(7)*h(1)*unl(pos1(i)) + h(7)*h(2)*unl(pos2(i)) + h(7)*h(3)*unl(pos3(i))
370 . + h(7)*h(4)*unl(pos4(i)) + h(7)*h(5)*unl(pos5(i)) + h(7)*h(6)*unl(pos6(i))
371 . + h(7)*h(7)*unl(pos7(i)) + h(7)*h(8)*unl(pos8(i)))
372
373 IF (nodadt == 0) THEN
374 a7 = a7 + vol(i) * xi * (h(7)*h(1)*vnl(pos1(i)) + h(7)*h(2)*vnl(pos2(i)) + h(7)*h(3)*vnl(pos3(i))
375 . + h(7)*h(4)*vnl(pos4(i)) + h(7)*h(5)*vnl(pos5(i)) + h(7)*h(6)*vnl(pos6(i))
376 . + h(7)*h(7)*vnl(pos7(i)) + h(7)*h(8)*vnl(pos8(i)))
377 ELSE
378 a7 = a7 + vol(i) * xi * (h(7)*h(1)*minmasscal*vnl(pos1(i)) +
379 . h(7)*h(2)*minmasscal*vnl(pos2(i)) +
380 . h(7)*h(3)*minmasscal*vnl(pos3(i)) +
381 . h(7)*h(4)*minmasscal*vnl(pos4(i)) +
382 . h(7)*h(5)*minmasscal*vnl(pos5(i)) +
383 . h(7)*h(6)*minmasscal*vnl(pos6(i)) +
384 . h(7)*h(7)*minmasscal*vnl(pos7(i)) +
385 . h(7)*h(8)*minmasscal*vnl(pos8(i)))
386 ENDIF
387
388 b7 = l2 * vol(i) * ( btb17(i)*unl(pos1(i)) + btb27(i)*unl(pos2(i))
389 . + btb37(i)*unl(pos3(i)) + btb47(i)*unl(pos4(i)) + btb57(i)*unl(pos5(i))
390 . + btb67(i)*unl(pos6(i)) + btb77(i)*unl(pos7(i)) + btb78(i)*unl(pos8(i)))
391
392 c7 = vol(i) * h(7) * var_reg(i)
393
394 a8 = vol(i) * (h(8)*h(1)*unl(pos1(i)) + h
395 . + h(8)*h(4)*unl(pos4(i)) + h(8)*h(5)*unl(pos5(i)) + h(8)*h(6)*unl(pos6(i))
396 . + h(8)*h(7)*unl(pos7(i)) + h(8)*h(8)*unl(pos8(i)))
397
398 IF (nodadt == 0) THEN
399 a8 = a8 + vol(i) * xi * (h(8)*h(1)*vnl(pos1(i)) + h(8)*h(2)*vnl(pos2(i)) + h(8)*h(3)*vnl(pos3(i))
400 . + h(8)*h(4)*vnl(pos4(i)) + h(8)*h(5)*vnl(pos5(i)) + h(8)*h(6)*vnl(pos6(i))
401 . + h(8)*h(7)*vnl(pos7(i)) + h(8)*h(8)*vnl(pos8(i)))
402 ELSE
403 a8 = a8 + vol(i) * xi * (h(8)*h(1)*minmasscal*vnl(pos1(i)) +
404 . h(8)*h(2)*minmasscal*vnl(pos2(i)) +
405 . h(8)*h(3)*minmasscal*vnl(pos3(i)) +
406 . h(8)*h(4)*minmasscal*vnl(pos4(i)) +
407 . h(8)*h(5)*minmasscal*vnl(pos5(i)) +
408 . h(8)*h(6)*minmasscal*vnl(pos6(i)) +
409 . h(8)*h(7)*minmasscal*vnl(pos7(i)) +
410 . h(8)*h(8)*minmasscal*vnl(pos8(i)))
411 ENDIF
412
413 b8 = l2 * vol(i) * ( btb18(i)*unl(pos1(i)) + btb28(i)*unl(pos2(i))
414 . + btb38(i)*unl(pos3(i)) + btb48(i)*unl(pos4(i)) + btb58(i)*unl(pos5(i))
415 . + btb68(i)*unl(pos6(i)) + btb78(i)*unl(pos7(i)) + btb88(i)*unl(pos8(i)))
416
417 c8 = vol(i) * h(8) * var_reg(i)
418
419
420
421
422
423
424 f1(i) = a1 + b1 - c1
425 f2(i) = a2 + b2 - c2
426 f3(i) = a3 + b3 - c3
427 f4(i) = a4 + b4 - c4
428 f5(i) = a5 + b5 - c5
429 f6(i) = a6 + b6 - c6
430 f7(i) = a7 + b7 - c7
431 f8(i) = a8 + b8 - c8
432
433
434 IF (nodadt > 0) THEN
435 sti1(i) = (abs(l2*btb11(i) + h(1)*h(1)) + abs(l2*btb12(i) + h(1)*h(2)) + abs(l2*btb13(i) + h(1)*h
436 . abs(l2*btb14(i) + h(1)*h(4)) + abs(l2*btb15(i) + h(1)*h(5)) + abs(l2*btb16(i) + h(1)*h(6)) +
437 . abs(l2*btb17(i) + h(1)*h(7)) + abs(l2*btb18(i) + h(1)*h(8)))*vol(i)
438 sti2(i) = (abs(l2*btb12(i) + h(2)*h(1)) + abs(l2*btb22(i) + h(2)*h(2)) + abs(l2*btb23(i) + h(2)*h(3)) +
439 . abs(l2*btb24(i) + h(2)*h(4)) + abs(l2*btb25(i) + h(2)*h(5)) + abs(l2*btb26(i) + h(2)*h(6))
440 . abs(l2*btb27(i) + h(2)*h(7)) + abs(l2*btb28(i) + h(2)*h
441 sti3(i) = (abs(l2*btb13(i) + h(3)*h(1)) + abs(l2*btb23(i) + h(3)*h(2)) + abs(l2*btb33(i) + h(3)*h(3)) +
442 . abs(l2*btb34(i) + h(3)*h(4)) + abs(l2*btb35(i) + h(3)*h(5)) + abs(l2*btb36(i) + h(3)*h(6)) +
443 . abs(l2*btb37(i) + h(3)*h(7)) + abs(l2*btb38(i) + h(3)*h(8)))*vol(i)
444 sti4(i) = (abs(l2*btb14(i) + h(4)*h(1)) + abs(l2*btb24(i) + h(4)*h(2)) + abs(l2*btb34(i) + h(4)*h(3)) +
445 . abs(l2*btb44(i) + h(4)*h(4)) + abs(l2*btb45(i) + h(4)*h(5)) + abs(l2*btb46(i) + h(4)*h(6)) +
446 . abs(l2*btb47(i) + h(4)*h(7)) + abs(l2*btb48(i) + h(4)*h(8)))*vol(i)
447 sti5(i) = (abs(l2*btb15(i) + h(5)*h(1)) + abs(l2*btb25
448 . abs(l2*btb45(i) + h(5)*h(4)) + abs(l2*btb55(i) + h(5)*h(5)) + abs(l2*btb56(i) + h(5)*h(6)) +
449 . abs(l2*btb57(i) + h(5)*h(7)) + abs(l2*btb58(i) + h(5)*h(8)))*vol(i)
450 sti6(i) = (abs(l2*btb16(i) + h(6)*h(1)) + abs(l2*btb26(i) + h(6)*h(2)) + abs(l2
451 . abs(l2*btb46(i) + h(6)*h(4)) + abs(l2*btb56(i) + h(6)*h(5)) + abs(l2*btb66(i) + h(6)*h(6)) +
452 . abs(l2*btb67(i) + h(6)*h(7)) + abs(l2*btb68(i) + h(6)*h(8
453 sti7(i) = (abs(l2*btb17(i) + h(7)*h(1)) + abs(l2*btb27(i) + h(7)*h(2)) + abs(l2*btb37(i) + h(7)*h(3)) +
454 . abs(l2*btb47(i) + h(7)*h(4)) + abs(l2*btb57(i) + h(7)*h(5)) + abs(l2*btb67(i) + h(7)*h(6)) +
455 . abs(l2*btb77(i) + h(7)*h(7)) + abs(l2
456 sti8(i) = (abs(l2*btb18(i) + h(8)*h(1)) + abs(l2*btb28(i) + h(8)*h(2)) + abs(l2*btb38(i) + h(8)*h(3)) +
457 . abs(l2*btb48(i) + h(8)*h(4)) + abs(l2*btb58(i) + h(8)*h(5)) + abs(l2*btb68(i) + h(8)*h(6)) +
458 . abs(l2*btb78(i) + h(8)*h(7)) + abs(l2*btb88(i) + h(8)*h(8)))*vol(i)
459 ENDIF
460
461
462 ELSE
463
464
465 lc(i) = ((wi/eight)*vol0(i))**third
466
467 IF (nodadt > 0) THEN
468
469 f1(i) = sqrt(mass(pos1(i))/mass0(pos1(i)))*h(1)*zeta*sspnl*half*
470 . (vnl(pos1(i))+vnl0(pos1(i)))*(three/four)*(lc(i)**2)
471 f2(i) = sqrt(mass(pos2(i))/mass0(pos2(i)))*h(2)*zeta*sspnl*half*
472 . (vnl(pos2(i))+vnl0(pos2(i)))*(three/four)*(lc(i)**2)
473 f3(i) = sqrt(mass(pos3(i))/mass0(pos3(i)))*h(3)*zeta*sspnl*half*
474 . (vnl(pos3(i))+vnl0(pos3(i)))*(three/four)*(lc(i)**2)
475 f4(i) = sqrt(mass(pos4(i))/mass0(pos4(i)))*h(4)*zeta*sspnl*half*
476 . (vnl(pos4(i))+vnl0(pos4(i)))*(three/four)*(lc(i)**2)
477 f5(i) = sqrt(mass(pos5(i))/mass0(pos5(i)))*h(5)*zeta*sspnl*half*
478 . (vnl(pos5(i))+vnl0(pos5(i)))*(three/four)*(lc(i)**2)
479 f6(i) = sqrt(mass(pos6(i))/mass0(pos6(i)))*h(6)*zeta*sspnl*half*
480 . (vnl(pos6(i))+vnl0(pos6(i)))*(three/four)*(lc(i)**2)
481 f7(i) = sqrt(mass(pos7(i))/mass0(pos7(i)))*h(7)*zeta*sspnl*half*
482 . (vnl(pos7(i))+vnl0(pos7(i)))*(three/four)*(lc(i)**2)
483 f8(i) = sqrt(mass(pos8(i))/mass0(pos8(i)))*h(8)*zeta*sspnl*half*
484 . (vnl(pos8(i))+vnl0(pos8(i)))*(three/four)*(lc(i)**2)
485
486 sti1(i) = em20
487 sti2(i) = em20
488 sti3(i) = em20
489 sti4(i) = em20
490 sti5(i) = em20
491 sti6(i) = em20
492 sti7(i) = em20
493 sti8(i) = em20
494 ELSE
495
496 f1(i) = h(1)*zeta*sspnl*half*(vnl(pos1(i))+vnl0(pos1(i)))*(three/four)*(lc(i)**2)
497 f2(i) = h(2)*zeta*sspnl*half*(vnl(pos2(i))+vnl0(pos2(i)))*(three/four)*(lc(i
498 f3(i) = h(3)*zeta*sspnl*half*(vnl(pos3(i))+vnl0(pos3(i)))*(three/four)*(lc(i)**2)
499 f4(i) = h(4)*zeta*sspnl*half*(vnl(pos4(i))+vnl0(pos4(i)))*(three/four)*(lc(i)**2)
500 f5(i) = h(5)*zeta*sspnl*half*(vnl(pos5(i))+vnl0(pos5(i)))*(three/four)*(lc(i)**2)
501 f6(i) = h(6)*zeta*sspnl*half*(vnl(pos6(i))+vnl0(pos6
502 f7(i) = h(7)*zeta*sspnl*half*(vnl(pos7(i))+vnl0(pos7(i)))*(three/four)*(lc(i)**2)
503 f8(i) = h(8)*zeta*sspnl*half*(vnl(pos8(i))+vnl0(pos8(i)))*(three/four)*(lc(i)**2)
504 ENDIF
505 ENDIF
506 ENDDO
507
508
509
510 IF (iparit == 0) THEN
511
512 fnl => nloc_dmg%FNL(1:l_nloc,itask+1)
513 IF (nodadt > 0) stifnl => nloc_dmg%STIFNL(1:l_nloc,itask+1)
514 DO i=1,nel
515
516 fnl(pos1(i)) = fnl(pos1(i)) - f1(i)
517 fnl(pos2(i)) = fnl(pos2(i)) - f2(i)
518 fnl(pos3(i)) = fnl(pos3(i)) - f3(i)
519 fnl(pos4(i)) = fnl(pos4(i)) - f4(i)
520 fnl(pos5(i)) = fnl(pos5(i)) - f5(i)
521 fnl(pos6(i)) = fnl(pos6(i)) - f6(i)
522 fnl(pos7(i)) = fnl(pos7(i)) - f7(i)
523 fnl(pos8(i)) = fnl(pos8(i)) - f8(i)
524 IF (nodadt > 0) THEN
525
526 maxstif =
max(sti1(i),sti2(i),sti3(i),sti4(i),sti5(i),sti6(i),sti7(i),sti8(i))
527
528 stifnl(pos1(i)) = stifnl(pos1(i)) + maxstif
529 stifnl(pos2(i)) = stifnl(pos2(i)) + maxstif
530 stifnl(pos3(i)) = stifnl(pos3(i)) + maxstif
531 stifnl(pos4(i)) = stifnl(pos4(i)) + maxstif
532 stifnl(pos5(i)) = stifnl(pos5(i)) + maxstif
533 stifnl(pos6(i)) = stifnl(pos6(i)) + maxstif
534 stifnl(pos7(i)) = stifnl(pos7(i)) + maxstif
535 stifnl(pos8(i)) = stifnl(pos8(i)) + maxstif
536 ENDIF
537 ENDDO
538
539
540 ELSE
541
542 DO i=1,nel
543 ii = i + nft
544
545
546 IF (nodadt > 0) THEN
547 maxstif =
max(sti1(i),sti2(i),sti3(i),sti4(i),sti5(i),sti6(i),sti7(i),sti8(i))
548 ENDIF
549
550 k = nloc_dmg%IADS(1,ii)
551 IF (ip == 1) THEN
552 nloc_dmg%FSKY(k,1) = -f1(i)
553 IF (nodadt > 0) nloc_dmg%STSKY(k,1) = maxstif
554 ELSE
555 nloc_dmg%FSKY(k,1) = nloc_dmg%FSKY(k,1) - f1(i)
556 IF (nodadt > 0) nloc_dmg%STSKY(k,1) = nloc_dmg%STSKY(k,1) + maxstif
557 ENDIF
558
559 k = nloc_dmg%IADS(2,ii)
560 IF (ip == 1) THEN
561 nloc_dmg%FSKY(k,1) = -f2(i)
562 IF (nodadt > 0) nloc_dmg%STSKY(k,1) = maxstif
563 ELSE
564 nloc_dmg%FSKY(k,1) = nloc_dmg%FSKY(k,1) - f2(i)
565 IF (nodadt > 0) nloc_dmg%STSKY(k,1) = nloc_dmg%STSKY(k,1) + maxstif
566 ENDIF
567
568 k = nloc_dmg%IADS(3,ii)
569 IF (ip == 1) THEN
570 nloc_dmg%FSKY(k,1) = -f3(i)
571 IF (nodadt > 0) nloc_dmg%STSKY(k,1) = maxstif
572 ELSE
573 nloc_dmg%FSKY(k,1) = nloc_dmg%FSKY(k,1) - f3(i)
574 IF (nodadt > 0) nloc_dmg%STSKY(k,1) = nloc_dmg%STSKY(k,1) + maxstif
575 ENDIF
576
577 k = nloc_dmg%IADS(4,ii)
578 IF (ip == 1) THEN
579 nloc_dmg%FSKY(k,1) = -f4(i)
580 IF (nodadt > 0) nloc_dmg%STSKY(k,1) = maxstif
581 ELSE
582 nloc_dmg%FSKY(k,1) = nloc_dmg%FSKY(k,1) - f4(i)
583 IF (nodadt > 0) nloc_dmg%STSKY(k,1) = nloc_dmg%STSKY(k,1) + maxstif
584 ENDIF
585
586 k = nloc_dmg%IADS(5,ii)
587 IF (ip == 1) THEN
588 nloc_dmg%FSKY(k,1) = -f5(i)
589 IF (nodadt > 0) nloc_dmg%STSKY(k,1) = maxstif
590 ELSE
591 nloc_dmg%FSKY(k,1) = nloc_dmg%FSKY(k,1) - f5(i)
592 IF (nodadt > 0) nloc_dmg%STSKY(k,1) = nloc_dmg%STSKY(k,1) + maxstif
593 ENDIF
594
595 k = nloc_dmg%IADS(6,ii)
596 IF (ip == 1) THEN
597 nloc_dmg%FSKY(k,1) = -f6(i)
598 IF (nodadt > 0) nloc_dmg%STSKY(k,1) = maxstif
599 ELSE
600 nloc_dmg%FSKY(k,1) = nloc_dmg%FSKY(k,1) - f6(i)
601 IF (nodadt > 0) nloc_dmg%STSKY(k,1) = nloc_dmg%STSKY(k,1) + maxstif
602 ENDIF
603
604 k = nloc_dmg%IADS(7,ii)
605 IF (ip == 1) THEN
606 nloc_dmg%FSKY(k,1) = -f7(i)
607 IF (nodadt > 0) nloc_dmg%STSKY(k,1) = maxstif
608 ELSE
609 nloc_dmg%FSKY(k,1) = nloc_dmg%FSKY(k,1) - f7(i)
610 IF (nodadt > 0) nloc_dmg%STSKY(k,1) = nloc_dmg%STSKY(k,1) + maxstif
611 ENDIF
612
613 k = nloc_dmg%IADS(8,ii)
614 IF (ip == 1) THEN
615 nloc_dmg%FSKY(k,1) = -f8(i)
616 IF (nodadt > 0) nloc_dmg%STSKY(k,1) = maxstif
617 ELSE
618 nloc_dmg%FSKY(k,1) = nloc_dmg%FSKY(k,1) - f8(i)
619 IF (nodadt > 0) nloc_dmg%STSKY(k,1) = nloc_dmg%STSKY(k,1) + maxstif
620 ENDIF
621
622 ENDDO
623 ENDIF
624
625
626
627
628 IF (nodadt == 0) THEN
629 DO i = 1,nel
630
631 IF (offg(i)/=zero) THEN
632
633 dtnl = (two*(
min(vol(i)**third,le_max))*sqrt(three*zeta))/
634 . sqrt(twelve*l2 + (
min(vol(i)**third,le_max))**2)
635
636 dt2t =
min(dt2t,dtfac1(1)*cdamp*dtnl)
637 ENDIF
638 ENDDO
639 ENDIF
640
641
642 IF (ALLOCATED(btb11)) DEALLOCATE(btb11)
643 IF (ALLOCATED(btb12)) DEALLOCATE(btb12)
644 IF (ALLOCATED(btb13)) DEALLOCATE(btb13)
645 IF (ALLOCATED(btb14)) DEALLOCATE(btb14)
646 IF (ALLOCATED(btb15)) DEALLOCATE(btb15)
647 IF (ALLOCATED(btb16)) DEALLOCATE(btb16)
648 IF (ALLOCATED(btb17)) DEALLOCATE(btb17)
649 IF (ALLOCATED(btb18)) DEALLOCATE(btb18)
650 IF (ALLOCATED(btb22)) DEALLOCATE(btb22)
651 IF (ALLOCATED(btb23)) DEALLOCATE(btb23)
652 IF (ALLOCATED(btb24)) DEALLOCATE(btb24)
653 IF (ALLOCATED(btb25)) DEALLOCATE(btb25)
654 IF (ALLOCATED(btb26)) DEALLOCATE(btb26)
655 IF (ALLOCATED(btb27)) DEALLOCATE(btb27)
656 IF (ALLOCATED(btb28)) DEALLOCATE(btb28)
657 IF (ALLOCATED(btb33)) DEALLOCATE(btb33)
658 IF (ALLOCATED(btb34)) DEALLOCATE(btb34)
659 IF (ALLOCATED(btb35)) DEALLOCATE(btb35)
660 IF (ALLOCATED(btb36)) DEALLOCATE(btb36)
661 IF (ALLOCATED(btb37)) DEALLOCATE(btb37)
662 IF (ALLOCATED(btb38)) DEALLOCATE(btb38)
663 IF (ALLOCATED(btb44)) DEALLOCATE(btb44)
664 IF (ALLOCATED(btb45)) DEALLOCATE(btb45)
665 IF (ALLOCATED(btb46)) DEALLOCATE(btb46)
666 IF (ALLOCATED(btb47)) DEALLOCATE(btb47)
667 IF (ALLOCATED(btb48)) DEALLOCATE(btb48)
668 IF (ALLOCATED(btb55)) DEALLOCATE(btb55)
669 IF (ALLOCATED(btb56)) DEALLOCATE(btb56)
670 IF (ALLOCATED(btb57)) DEALLOCATE(btb57)
671 IF (ALLOCATED(btb58)) DEALLOCATE(btb58)
672 IF (ALLOCATED(btb66)) DEALLOCATE(btb66)
673 IF (ALLOCATED(btb67)) DEALLOCATE(btb67)
674 IF (ALLOCATED(btb68)) DEALLOCATE(btb68)
675 IF (ALLOCATED(btb77)) DEALLOCATE(btb77)
676 IF (ALLOCATED(btb78)) DEALLOCATE(btb78)
677 IF (ALLOCATED(btb88)) DEALLOCATE(btb88)
678 IF (ALLOCATED(pos1)) DEALLOCATE(pos1)
679 IF (ALLOCATED(pos2)) DEALLOCATE(pos2)
680 IF (ALLOCATED(pos3)) DEALLOCATE(pos3)
681 IF (ALLOCATED(pos4)) DEALLOCATE(pos4)
682 IF (ALLOCATED(pos5)) DEALLOCATE(pos5)
683 IF (ALLOCATED(pos6)) DEALLOCATE(pos6)
684 IF (ALLOCATED(pos7)) DEALLOCATE(pos7)
685 IF (ALLOCATED(pos8)) DEALLOCATE(pos8)
686 IF (ALLOCATED(sti1)) DEALLOCATE(sti1)
687 IF (ALLOCATED(sti2)) DEALLOCATE(sti2)
688 IF (ALLOCATED(sti3)) DEALLOCATE(sti3)
689 IF (ALLOCATED(sti4)) DEALLOCATE(sti4)
690 IF (ALLOCATED(sti5)) DEALLOCATE(sti5)
691 IF (ALLOCATED(sti6)) DEALLOCATE(sti6)
692 IF (ALLOCATED(sti7)) DEALLOCATE(sti7)
693 IF (ALLOCATED(sti8)) DEALLOCATE(sti8)
694
end diagonal values have been computed in the(sparse) matrix id.SOL