OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
pblast_1.F File Reference
#include "implicit_f.inc"
#include "comlock.inc"
#include "param_c.inc"
#include "com04_c.inc"
#include "com08_c.inc"
#include "parit_c.inc"
#include "scr14_c.inc"
#include "scr16_c.inc"
#include "mvsiz_p.inc"
#include "units_c.inc"
#include "sysunit.inc"
#include "tabsiz_c.inc"
#include "lockon.inc"
#include "lockoff.inc"

Go to the source code of this file.

Functions/Subroutines

subroutine pblast_1 (pblast, iloadp, fac, a, v, x, iadc, fsky, lloadp, fext, noda_surf, noda_pext, itab, h3d_data, nl, dtmin_loc, wfext_loc, th_surf, nsegpl)

Function/Subroutine Documentation

◆ pblast_1()

subroutine pblast_1 ( type(pblast_) pblast,
integer, dimension(sizloadp,nloadp), intent(inout) iloadp,
dimension(lfacload,nloadp), intent(inout) fac,
dimension(3,numnod), intent(inout) a,
dimension(3,numnod), intent(in) v,
dimension(3,numnod), intent(in) x,
integer, dimension(*), intent(in) iadc,
dimension(8,sfsky/8), intent(inout) fsky,
integer, dimension(slloadp), intent(in) lloadp,
dimension(3,numnod), intent(inout) fext,
dimension(numnod), intent(inout) noda_surf,
dimension(numnod), intent(inout) noda_pext,
integer, dimension(numnod), intent(in) itab,
type(h3d_database), intent(in) h3d_data,
integer, intent(in) nl,
intent(inout) dtmin_loc,
double precision, intent(inout) wfext_loc,
type (th_surf_), intent(inout) th_surf,
integer, intent(inout) nsegpl )

Definition at line 42 of file pblast_1.F.

46C-----------------------------------------------
47C M o d u l e s
48C-----------------------------------------------
49 USE h3d_mod
50 USE pblast_mod
51 USE groupdef_mod
52 USE h3d_inc_mod
53 USE th_surf_mod , ONLY : th_surf_
55 USE th_mod , ONLY : th_has_noda_pext
56 USE output_mod , ONLY : h3d_has_noda_pext, anim_has_noda_pext
57C-----------------------------------------------
58C I m p l i c i t T y p e s
59C-----------------------------------------------
60#include "implicit_f.inc"
61#include "comlock.inc"
62#include "param_c.inc"
63C-----------------------------------------------
64C C o m m o n B l o c k s
65C-----------------------------------------------
66#include "com04_c.inc"
67#include "com08_c.inc"
68#include "parit_c.inc"
69#include "scr14_c.inc"
70#include "scr16_c.inc"
71#include "mvsiz_p.inc"
72#include "units_c.inc"
73#include "sysunit.inc"
74#include "tabsiz_c.inc"
75C-----------------------------------------------
76C D u m m y A r g u m e n t s
77C-----------------------------------------------
78 INTEGER,INTENT(IN) :: LLOADP(SLLOADP)
79 INTEGER,INTENT(INOUT) :: ILOADP(SIZLOADP,NLOADP)
80 INTEGER,INTENT(IN) :: IADC(*)
81 INTEGER, INTENT(IN) :: ITAB(NUMNOD),NL
82 my_real,INTENT(INOUT) :: dtmin_loc
83 DOUBLE PRECISION,INTENT(INOUT) :: WFEXT_LOC
84 my_real,INTENT(IN) :: v(3,numnod),x(3,numnod)
85 my_real,INTENT(INOUT) :: fac(lfacload,nloadp)
86 my_real,INTENT(INOUT) :: a(3,numnod),fsky(8,sfsky/8)
87 my_real,INTENT(INOUT) :: fext(3,numnod)
88 my_real,INTENT(INOUT) :: noda_surf(numnod)
89 my_real,INTENT(INOUT) :: noda_pext(numnod)
90 TYPE(H3D_DATABASE),INTENT(IN) :: H3D_DATA
91 TYPE (TH_SURF_) , INTENT(INOUT) :: TH_SURF
92 INTEGER, INTENT(INOUT) :: NSEGPL
93 TYPE(FRIEDLANDER_PARAMS_) :: FRIEDLANDER_PARAMS
94 TYPE(PBLAST_) :: PBLAST
95C-----------------------------------------------
96C L o c a l V a r i a b l e s
97C-----------------------------------------------
98 INTEGER :: N1, N2, N3, N4,IL,IS,IAD,I,IANIM_OR_H3D,IZ_UPDATE,ABAC_ID,ISIZ_SEG,IERR1,
99 . ID, ITA_SHIFT,IMODEL,NN(4),NS,KSURF,NDT
100 INTEGER :: NWARN !< number of segment for which it is not possible to correlate the positive impulse. It may happen that for a given Pmax and dt0 value even building a triangle shape leads to a lower impulse that the targeted one.
101
102 my_real :: zx,zy,zz,norm,nx,ny,nz,area,
103 . cos_theta, alpha_inci, alpha_refl, p_inci, p_refl_,p_inci_, p_refl,z,
104 . i_inci,i_refl,i_inci_,i_refl_, dt_0, t_a,dt_0_,
105 . wave_refl,wave_inci, w13,
106 . dnorm, xdet,ydet,zdet,tdet,wtnt,pmin,t_stop,dx,dy,dz,p,
107 . fac_m_bb, fac_l_bb, fac_t_bb, fac_p_bb, fac_i_bb, ta_first, tt_star, z1_,
108 . decay_inci,decay_refl,zeta,
109 . cst_255_div_ln_z1_on_zn, log10_, npt, ff(3), ta_inf_loc,
110 . surf_patch
111
112 INTEGER, EXTERNAL :: OMP_GET_THREAD_NUM
113
114 LOGICAL,SAVE :: IS_UPDATED
115 LOGICAL :: IS_DECAY_TO_BE_COMPUTED
116
117 CHARACTER(LEN=NCHARLINE) :: MSGOUT1,MSGOUT2
118
119 DATA cst_255_div_ln_z1_on_zn/-38.147316611455952998/
120 DATA log10_ /2.30258509299405000000/
121
122C-----------------------------------------------
123C D e s c r i p t i o n
124C-----------------------------------------------
125C This subroutines is applying pressure load to a segment submitted to a blast wave (FREE AIR model).
126C Preussre time histories are built from "UFC 3-340-02, Dec. 5th 2008" tables which are hardcoded in unit system {g, cm, mus}
127C (table sampling : 256 points ; see pblast_mod.F)
128C
129C T* = T + TA_INF (shift with first arrival time for all pblast option, TA_INF=0. if ita_shift/=2)
130C If request made to update blast profile (iz_update==2) then it is made once on T*=TDET
131C
132C-----------------------------------------------
133C P r e - C o n d i t i o n
134C-----------------------------------------------
135 !--- subroutine not relevant if no /LOAD/PBLAST option
136 IF(pblast%NLOADP_B==0)RETURN
137
138 !--- time step
139 ta_first = fac(07,nl) ! arrival time for first segment to be loaded
140 il= nl-nloadp_f
141 tt_star = tt + pblast%PBLAST_DT%TA_INF
142 iz_update = iloadp(06,nl)
143 tdet = fac(01,nl)
144 ta_first = fac(07,nl) + pblast%PBLAST_DT%TA_INF ! arrival time for first segment to be loaded
145 IF(iz_update ==1)THEN
146 !if no update during engine
147 dtmin_loc = (one+em06)*(ta_first - tt)
148 dtmin_loc=max(pblast%PBLAST_TAB(il)%DTMIN, dtmin_loc) !go directly to arrival time but avoid too
149 IF(tt_star<ta_first)RETURN ! (nothing to load for now)
150 ELSE
151 IF(tdet > tt)THEN
152 dtmin_loc = (one+em06)*(tdet - tt)
153 dtmin_loc=max(pblast%PBLAST_TAB(il)%DTMIN, dtmin_loc)!go directly to arrival time but avoid too
154 ELSE
155 dtmin_loc = pblast%PBLAST_TAB(il)%DTMIN
156 ENDIF
157 IF(tt_star<tdet)RETURN ! (nothing to update for now)
158 ENDIF
159C-----------------------------------------------,
160C S o u r c e C o d e
161C-----------------------------------------------
162 ianim_or_h3d = anim_v(5)+outp_v(5)+h3d_data%N_VECT_FINT + anim_v(6)+outp_v(6)+h3d_data%N_VECT_FEXT !output
163
164 !Index Bijection
165 z1_ = half
166
167 !translation from Working unit System to {big bang} unit system
168 fac_m_bb = fac_mass*ep03
169 fac_l_bb = fac_length*ep02
170 fac_t_bb = fac_time*ep06
171 fac_p_bb = fac_m_bb/fac_l_bb/fac_t_bb/fac_t_bb
172 fac_i_bb = fac_p_bb*fac_t_bb
173 fac_i_bb = fac_m_bb/fac_l_bb/fac_t_bb
174
175 is_updated=.false.
176 CALL my_barrier
177
178 !-----------------------------------------------,
179 ! FREE AIR BURST
180 !-----------------------------------------------
181 il = nl-nloadp_f
182 tdet = fac(01,nl)
183 xdet = fac(02,nl)
184 ydet = fac(03,nl)
185 zdet = fac(04,nl)
186 wtnt = fac(05,nl)
187 pmin = fac(06,nl)
188 ta_first = fac(07,nl)
189 t_stop = fac(13,nl)
190 is = iloadp(02,nl)
191 iz_update = iloadp(06,nl)
192 abac_id = iloadp(07,nl)
193 id = iloadp(08,nl) !user_id
194 ita_shift = iloadp(09,nl)
195 ndt = iloadp(10,nl)
196 imodel = iloadp(11,nl)
197 isiz_seg = iloadp(01,nl)/4
198 ierr1 = 0
199 w13 = (wtnt*fac_m_bb)**third ! '*FAC_M' g->work unit '/FAC_M' : WORK_UNIT -> g
200 z = zero
201 ta_inf_loc = ep20
202
203 is_decay_to_be_computed = .false.
204 IF(imodel == 2)is_decay_to_be_computed=.true.
205 nwarn = 0
206
207 !---------------------------------------------
208 ! LOOP ON SEGMENTS (4N or 3N)
209 !---------------------------------------------
210
211!$OMP DO SCHEDULE(GUIDED,MVSIZ)
212 DO i = 1,isiz_seg
213 n1=lloadp(iloadp(4,nl)+4*(i-1))
214 n2=lloadp(iloadp(4,nl)+4*(i-1)+1)
215 n3=lloadp(iloadp(4,nl)+4*(i-1)+2)
216 n4=lloadp(iloadp(4,nl)+4*(i-1)+3)
217 nn(1)=n1
218 nn(2)=n2
219 nn(3)=n3
220 nn(4)=n4
221
222 IF(n4==0 .OR. n3==n4 )THEN
223 !3-NODE-SEGMENT
224 pblast%PBLAST_TAB(il)%NPt(i) = three
225 npt = three
226 !Segment Centroid
227 zx = x(1,n1)+x(1,n2)+x(1,n3)
228 zy = x(2,n1)+x(2,n2)+x(2,n3)
229 zz = x(3,n1)+x(3,n2)+x(3,n3)
230 zx = zx*third
231 zy = zy*third
232 zz = zz*third
233 !Normal vector : (NX,NY,NZ) = 2*S*n where |n|=1.0
234 nx = (x(2,n3)-x(2,n1))*(x(3,n3)-x(3,n2)) - (x(3,n3)-x(3,n1))*(x(2,n3)-x(2,n2))
235 ny = (x(3,n3)-x(3,n1))*(x(1,n3)-x(1,n2)) - (x(1,n3)-x(1,n1))*(x(3,n3)-x(3,n2))
236 nz = (x(1,n3)-x(1,n1))*(x(2,n3)-x(2,n2)) - (x(2,n3)-x(2,n1))*(x(1,n3)-x(1,n2))
237 !NORM = 2*S
238 norm = sqrt(nx*nx+ny*ny+nz*nz)
239 ELSE
240 !4-NODE-SEGMENT
241 pblast%PBLAST_TAB(il)%NPt(i) = four
242 npt = four
243 !Face Centroid
244 zx = x(1,n1)+x(1,n2)+x(1,n3)+x(1,n4)
245 zy = x(2,n1)+x(2,n2)+x(2,n3)+x(2,n4)
246 zz = x(3,n1)+x(3,n2)+x(3,n3)+x(3,n4)
247 zx = zx*fourth
248 zy = zy*fourth
249 zz = zz*fourth
250 !Normal vector (NX,NY,NZ) = 2*S*n where |n|=1.0
251 nx = (x(2,n3)-x(2,n1))*(x(3,n4)-x(3,n2)) - (x(3,n3)-x(3,n1))*(x(2,n4)-x(2,n2))
252 ny = (x(3,n3)-x(3,n1))*(x(1,n4)-x(1,n2)) - (x(1,n3)-x(1,n1))*(x(3,n4)-x(3,n2))
253 nz = (x(1,n3)-x(1,n1))*(x(2,n4)-x(2,n2)) - (x(2,n3)-x(2,n1))*(x(1,n4)-x(1,n2))
254 !NORM = 2*S
255 norm = sqrt(nx*nx+ny*ny+nz*nz)
256 ENDIF
257
258 pblast%PBLAST_TAB(il)%N(1,i) = n1
259 pblast%PBLAST_TAB(il)%N(2,i) = n2
260 pblast%PBLAST_TAB(il)%N(3,i) = n3
261 pblast%PBLAST_TAB(il)%N(4,i) = n4
262
263 !--------------------------------------------!
264 ! Update Wave parameters !
265 ! (experimental) !
266 ! If requested. Otherwise use Starter param. !
267 ! Default : do not update:use Starter param. !
268 !--------------------------------------------!
269 IF(iz_update == 2)THEN
270
271 dtmin_loc = ep20
272
273 !Dist
274 dx = (xdet - zx)*fac_l_bb ! => working unit to cm
275 dy = (ydet - zy)*fac_l_bb ! => ... to cm
276 dz = (zdet - zz)*fac_l_bb ! => ... to cm
277 dnorm = sqrt(dx*dx+dy*dy+dz*dz)
278
279 !angle from detonation point
280 cos_theta = dx*nx + dy*ny + dz*nz
281 cos_theta = cos_theta/max(em20,norm*dnorm)
282
283 !scaled distance
284 z = dnorm / w13 !in abac unit ID g,cm,mus
285 !display warning message if out of bounds
286 ! precondition for SUBROUTINE PBLAST_PARAMETERS__FREE_AIR
287 IF(z <= 0.5 .AND. pblast%PBLAST_TAB(il)%TAGMSG(i) == 0 )THEN
288 write(iout, fmt='(A,I0,A)') "Warning : /LOAD/PBLAST id=",id," R/W**(1/3) < 0.5 cm/g**(1/3)"
289 write(istdo,fmt='(A,I0,A)') "Warning : /LOAD/PBLAST id=",id," R/W**(1/3) < 0.5 cm/g**(1/3)"
290 write(iout, fmt='(A)') " Radial Distance R too close to the charge"
291 write(istdo,fmt='(A)') " Radial Distance R too close to the charge"
292
293 if (n4 == 0 .OR. n3 == n4)then
294 write(iout, fmt='(A,3I11)') " -> Segment nodes : ", itab(n1),itab(n2),itab(n3)
295 write(istdo,fmt='(A,3I11)') " -> Segment nodes : ", itab(n1),itab(n2),itab(n3)
296 else
297 write(iout, fmt='(A,4I11)') " -> Segment nodes : ", itab(n1),itab(n2),itab(n3),itab(n4)
298 write(istdo,fmt='(A,4I11)') " -> Segment nodes : ", itab(n1),itab(n2),itab(n3),itab(n4)
299 endif
300 pblast%PBLAST_TAB(il)%TAGMSG(i) = 1
301
302 ELSEIF(z > 400. and. pblast%PBLAST_TAB(il)%TAGMSG(i) == 0)THEN
303 write(iout, fmt='(A,I0,A)') "Warning : /LOAD/PBLAST id=",id," R/W**(1/3) > 400. cm/g**(1/3)"
304 write(istdo,fmt='(A,I0,A)') "Warning : /LOAD/PBLAST id=",id," R/W**(1/3) > 400. cm/g**(1/3)"
305 WRITE(iout, fmt='(A)') " Radial Distance R too far from the charge"
306 WRITE(istdo,fmt='(A)') " Radial Distance R too far from the charge"
307 if (n4 == 0 .OR. n3 == n4)then
308 write(iout, fmt='(A,3I11)') " -> Segment nodes : ", itab(n1),itab(n2),itab(n3)
309 write(istdo,fmt='(A,3I11)') " -> Segment nodes : ", itab(n1),itab(n2),itab(n3)
310 else
311 write(iout, fmt='(A,4I11)') " -> Segment nodes : ", itab(n1),itab(n2),itab(n3),itab(n4)
312 write(istdo,fmt='(A,4I11)') " -> Segment nodes : ", itab(n1),itab(n2),itab(n3),itab(n4)
313 endif
314 pblast%PBLAST_TAB(il)%TAGMSG(i) = 1
315 ENDIF
316
317 !------------------------------------------------------------------!
318 CALL pblast_parameters__free_air(pblast,z, w13, tdet,
319 + fac_p_bb, fac_i_bb, fac_t_bb,
320 + is_decay_to_be_computed,
321 + friedlander_params,nwarn)
322
323 p_inci = friedlander_params%P_inci
324 p_inci_ = friedlander_params%P_inci_
325 p_refl = friedlander_params%P_refl
326 p_refl_ = friedlander_params%P_refl_
327 i_inci = friedlander_params%I_inci
328 i_inci_ = friedlander_params%I_inci_
329 i_refl = friedlander_params%I_refl
330 i_refl_ = friedlander_params%I_refl_
331 t_a = friedlander_params%T_A
332 dt_0 = friedlander_params%DT_0
333 dt_0_ = friedlander_params%DT_0_
334 decay_inci = friedlander_params%decay_inci
335 decay_refl = friedlander_params%decay_refl
336 !------------------------------------------------------------------!
337
338 ta_inf_loc = min(ta_inf_loc, t_a)
339
340 !update wave parameters
341 pblast%PBLAST_TAB(il)%cos_theta(i) = cos_theta
342 pblast%PBLAST_TAB(il)%P_inci(i) = p_inci
343 pblast%PBLAST_TAB(il)%P_refl(i) = p_refl
344 pblast%PBLAST_TAB(il)%ta(i) = t_a
345 pblast%PBLAST_TAB(il)%t0(i) = dt_0
346 pblast%PBLAST_TAB(il)%decay_inci(i) = decay_inci
347 pblast%PBLAST_TAB(il)%decay_refl(i) = decay_refl
348
349 dtmin_loc = min(dtmin_loc,dt_0/ndt)
350 is_updated = .true.
351
352 else! => IZ_UPDATE=1
353
354 !use wave parameters from Starter
355 z=zero
356 cos_theta = pblast%PBLAST_TAB(il)%cos_theta(i)
357 p_inci = pblast%PBLAST_TAB(il)%P_inci(i)
358 p_refl = pblast%PBLAST_TAB(il)%P_refl(i)
359 t_a = pblast%PBLAST_TAB(il)%ta(i)
360 dt_0 = pblast%PBLAST_TAB(il)%t0(i)
361 decay_inci = pblast%PBLAST_TAB(il)%decay_inci(i)
362 decay_refl = pblast%PBLAST_TAB(il)%decay_refl(i)
363 dtmin_loc = pblast%PBLAST_TAB(il)%DTMIN
364
365 ENDIF !IF(IZ_UPDATE == 2)
366
367 !Coefficients for wave superimposition
368 !PressureLoad = Reflected_Pressure * cos2X + IncidentPressure * (1 + cos2X -2 cosX)
369 IF(cos_theta<=zero)THEN
370 !Surface not facing the point of explosion
371 alpha_refl = zero
372 alpha_inci = one
373 ELSE
374 alpha_refl = cos_theta**2 ! cos**2 a
375 alpha_inci = one + cos_theta - two * alpha_refl ! 1 + cos a -2 cos**2 a
376 ENDIF
377
378 !Building pressure waves from Friedlander model. (Modified model can bu introduced later if needed)
379 wave_inci = zero
380 wave_refl = zero
381 IF(tt_star>=t_a)THEN
382 wave_inci = p_inci*(one-(tt_star-t_a)/dt_0)*exp(-decay_inci*(tt_star-t_a)/dt_0)
383 wave_refl = p_refl*(one-(tt_star-t_a)/dt_0)*exp(-decay_refl*(tt_star-t_a)/dt_0)
384 ELSE
385 wave_inci = zero
386 wave_refl = zero
387 ENDIF
388 p = alpha_refl * wave_refl + alpha_inci * wave_inci
389 p = max(p,pmin)
390 pblast%PBLAST_TAB(il)%PRES(i) = p
391
392 !!Expand Pressure load to nodes
393 ! FF is nodal force which applied on each node N1,N2,N3, and also N4 if relevant
394 ! FF = FF_elem / NPT = Pload.S.n / NPT where n is the unitary normal vector
395 ! NX,NY,NZ = 2S.n (in all cases:quadrangles & triangles)
396 surf_patch = half*sqrt(nx*nx+ny*ny+nz*nz) / npt
397 ff(1) = -p * half*nx / npt ! -P*S/NPT . nx
398 ff(2) = -p * half*ny / npt ! -P*S/NPT . ny
399 ff(3) = -p * half*nz / npt ! -P*S/NPT . nz
400 !storing force for one node of the current face (for assembly below)
401 pblast%PBLAST_TAB(il)%FX(i) = ff(1)
402 pblast%PBLAST_TAB(il)%FY(i) = ff(2)
403 pblast%PBLAST_TAB(il)%FZ(i) = ff(3)
404 pblast%PBLAST_TAB(il)%SURF_PATCH(i) = surf_patch
405
406 !External Force work
407 ! on a given node : DW = <F,V>*dt
408 ! for this current 4-node or 3-node face : DW = sum( <F_k,V_k>*dt k=1,NPT) where F_k=Fel/NPT
409 wfext_loc=wfext_loc+dt1*(ff(1)*sum(v(1,nn(1:nint(npt)))) +ff(2)*sum(v(2,nn(1:nint(npt)))) +ff(3)*sum(v(3,nn(1:nint(npt)))))
410
411C----- /TH/SURF -------
412 IF(th_surf%LOADP_FLAG > 0 ) THEN
413 nsegpl = nsegpl + 1
414 area = surf_patch * npt
415 DO ns=th_surf%LOADP_KSEGS(nsegpl) +1,th_surf%LOADP_KSEGS(nsegpl+1)
416 ksurf = th_surf%LOADP_SEGS(ns)
417 th_surf%channels(4,ksurf)= th_surf%channels(4,ksurf) + area*p ! mean pressure
418 th_surf%channels(5,ksurf)= th_surf%channels(5,ksurf) + area ! suface where pressure is applied
419 ENDDO
420 ENDIF
421
422 enddo!next I
423!$OMP END DO
424
425 IF(imodel == 2 .AND. nwarn > 0)THEN
426 msgout1=''
427 WRITE(MSGOUT1,FMT='(i0,a)') NWARN,
428 . ' segment(s) has excessive positive impulse regarding the peak pressure and positive duration.'
429 msgout2=''
430 msgout2='A TRIANGULAR WAVEFORM WILL BE USED INSTEAD TO MAXIMIZE THE IMPULSE. DEFINING A PMIN VALUE IS STRONGLY RECOMMENDED'
431 write(iout , fmt='(A,I10,/A,/A)') "Updated parameters for /LOAD/PBLAST id=", id, msgout1, msgout2
432 write(istdo, fmt='(A,I10,/A,/A)') "Updated parameters for /LOAD/PBLAST id=", id, msgout1, msgout2
433 ENDIF
434
435 CALL my_barrier
436 IF(is_updated)THEN
437#include "lockon.inc"
438 !---arrival time
439 zeta = fac(07,nl)
440 fac(07,nl) = min(ta_inf_loc, fac(07,nl)) !smp min value
441 !---time step
442 dtmin_loc = (one+em06)*(fac(07,nl) - tt) ! go directly to trigger time
443 dtmin_loc=max(pblast%PBLAST_TAB(il)%DTMIN, dtmin_loc)
444 !---no update on next cycle
445 iz_update = 1 !update done
446 iloadp(06,nl) = iz_update
447#include "lockoff.inc"
448!$OMP SINGLE
449 write(iout,fmt='(A,I10,A,E16.8,A,E16.8)') "Updated parameters for /LOAD/PBLAST id=",
450 . id,' previous first arrival time :',zeta,
451 . ' is now updated to :',fac(07,nl)
452 write(istdo,fmt='(A,I10,A,E16.8,A,E16.8)') "Updated parameters for /LOAD/PBLAST id=",
453 . id,' previous first arrival time :',zeta,
454 . ' is now updated to :',fac(07,nl)
455!$OMP END SINGLE
456 ENDIF
457
458 !-------------------------------------------------------------------!
459 ! FORCE ASSEMBLY !
460 ! /PARITH/OFF : F directly added in A(1:3,1:NUMNOD). !
461 ! /PARITH/ON : F added FSKY & and automatically treated later !
462 !-------------------------------------------------------------------!
463 ! SPMD/SMP Parith/OFF
464 IF(iparit==0) THEN
465!$OMP SINGLE
466 DO i = 1,isiz_seg
467 n1=lloadp(iloadp(4,nl)+4*(i-1))
468 n2=lloadp(iloadp(4,nl)+4*(i-1)+1)
469 n3=lloadp(iloadp(4,nl)+4*(i-1)+2)
470 n4=lloadp(iloadp(4,nl)+4*(i-1)+3)
471 a(1,n1)=a(1,n1)+pblast%PBLAST_TAB(il)%FX(i)
472 a(2,n1)=a(2,n1)+pblast%PBLAST_TAB(il)%FY(i)
473 a(3,n1)=a(3,n1)+pblast%PBLAST_TAB(il)%FZ(i)
474 a(1,n2)=a(1,n2)+pblast%PBLAST_TAB(il)%FX(i)
475 a(2,n2)=a(2,n2)+pblast%PBLAST_TAB(il)%FY(i)
476 a(3,n2)=a(3,n2)+pblast%PBLAST_TAB(il)%FZ(i)
477 a(1,n3)=a(1,n3)+pblast%PBLAST_TAB(il)%FX(i)
478 a(2,n3)=a(2,n3)+pblast%PBLAST_TAB(il)%FY(i)
479 a(3,n3)=a(3,n3)+pblast%PBLAST_TAB(il)%FZ(i)
480 IF(pblast%PBLAST_TAB(il)%NPt(i) == four)THEN
481 a(1,n4)=a(1,n4)+pblast%PBLAST_TAB(il)%FX(i)
482 a(2,n4)=a(2,n4)+pblast%PBLAST_TAB(il)%FY(i)
483 a(3,n4)=a(3,n4)+pblast%PBLAST_TAB(il)%FZ(i)
484 ENDIF
485 ENDDO
486!$OMP END SINGLE
487 ELSE
488!$OMP DO SCHEDULE(GUIDED,MVSIZ)
489 DO i = 1,isiz_seg
490 iad =iadc(iloadp(4,nl)+4*(i-1))
491 fsky(1,iad) =pblast%PBLAST_TAB(il)%FX(i)
492 fsky(2,iad) =pblast%PBLAST_TAB(il)%FY(i)
493 fsky(3,iad) =pblast%PBLAST_TAB(il)%FZ(i)
494 iad =iadc(iloadp(4,nl)+4*(i-1)+1)
495 fsky(1,iad) =pblast%PBLAST_TAB(il)%FX(i)
496 fsky(2,iad) =pblast%PBLAST_TAB(il)%FY(i)
497 fsky(3,iad) =pblast%PBLAST_TAB(il)%FZ(i)
498 iad =iadc(iloadp(4,nl)+4*(i-1)+2)
499 fsky(1,iad) =pblast%PBLAST_TAB(il)%FX(i)
500 fsky(2,iad) =pblast%PBLAST_TAB(il)%FY(i)
501 fsky(3,iad) =pblast%PBLAST_TAB(il)%FZ(i)
502 IF(pblast%PBLAST_TAB(il)%NPt(i) == four)THEN
503 iad =iadc(iloadp(4,nl)+4*(i-1)+3)
504 fsky(1,iad) =pblast%PBLAST_TAB(il)%FX(i)
505 fsky(2,iad) =pblast%PBLAST_TAB(il)%FY(i)
506 fsky(3,iad) =pblast%PBLAST_TAB(il)%FZ(i)
507 ENDIF
508 ENDDO
509!$OMP END DO
510 ENDIF !IPARIT
511
512
513 !-------------------------------------------!
514 ! ANIMATION FILE /ANIM/VECT/FEXT !
515 ! H3D FILE /H3D/NODA/FEXT !
516 !-------------------------------------------!
517!$OMP SINGLE
518 IF(ianim_or_h3d > 0) THEN
519 DO i = 1,isiz_seg
520 n1=pblast%PBLAST_TAB(il)%N(1,i)
521 n2=pblast%PBLAST_TAB(il)%N(2,i)
522 n3=pblast%PBLAST_TAB(il)%N(3,i)
523 n4=pblast%PBLAST_TAB(il)%N(4,i)
524 fext(1,n1) = fext(1,n1)+pblast%PBLAST_TAB(il)%FX(i)
525 fext(2,n1) = fext(2,n1)+pblast%PBLAST_TAB(il)%FY(i)
526 fext(3,n1) = fext(3,n1)+pblast%PBLAST_TAB(il)%FZ(i)
527 fext(1,n2) = fext(1,n2)+pblast%PBLAST_TAB(il)%FX(i)
528 fext(2,n2) = fext(2,n2)+pblast%PBLAST_TAB(il)%FY(i)
529 fext(3,n2) = fext(3,n2)+pblast%PBLAST_TAB(il)%FZ(i)
530 fext(1,n3) = fext(1,n3)+pblast%PBLAST_TAB(il)%FX(i)
531 fext(2,n3) = fext(2,n3)+pblast%PBLAST_TAB(il)%FY(i)
532 fext(3,n3) = fext(3,n3)+pblast%PBLAST_TAB(il)%FZ(i)
533 IF(pblast%PBLAST_TAB(il)%NPt(i)==four)THEN
534 fext(1,n4) = fext(1,n4)+pblast%PBLAST_TAB(il)%FX(i)
535 fext(2,n4) = fext(2,n4)+pblast%PBLAST_TAB(il)%FY(i)
536 fext(3,n4) = fext(3,n4)+pblast%PBLAST_TAB(il)%FZ(i)
537 ENDIF
538 ENDDO
539 ENDIF
540 IF(th_has_noda_pext > 0 .OR. anim_has_noda_pext > 0 .OR. h3d_has_noda_pext > 0) THEN
541 DO i = 1,isiz_seg
542 n1 = pblast%PBLAST_TAB(il)%N(1,i)
543 n2 = pblast%PBLAST_TAB(il)%N(2,i)
544 n3 = pblast%PBLAST_TAB(il)%N(3,i)
545 n4 = pblast%PBLAST_TAB(il)%N(4,i)
546 surf_patch = pblast%PBLAST_TAB(il)%SURF_PATCH(i)
547 noda_surf(n1) = noda_surf(n1) + surf_patch
548 noda_surf(n2) = noda_surf(n2) + surf_patch
549 noda_surf(n3) = noda_surf(n3) + surf_patch
550 p = pblast%PBLAST_TAB(il)%PRES(i) * surf_patch
551 noda_pext(n1) = noda_pext(n1) + p
552 noda_pext(n2) = noda_pext(n2) + p
553 noda_pext(n3) = noda_pext(n3) + p
554 IF(pblast%PBLAST_TAB(il)%NPT(i) == four)THEN
555 noda_surf(n4) = noda_surf(n4) + surf_patch
556 noda_pext(n4) = noda_pext(n4) + p
557 ENDIF
558 ENDDO
559 ENDIF
560!$OMP END SINGLE
561
562 RETURN
563
564C-----------------------------------------------
565 IF (ierr1/=0) THEN
566 WRITE(iout,*)' ** ERROR IN MEMORY ALLOCATION - PBLAST LOADING'
567 WRITE(istdo,*)' ** ERROR IN MEMORY ALLOCATION - PBLAST LOADING'
568 CALL arret(2)
569 END IF
570C-----------------------------------------------
#define my_real
Definition cppsort.cpp:32
end diagonal values have been computed in the(sparse) matrix id.SOL
norm(diag(diag(diag(inv(mat))) -id.SOL), 2) % destroy mumps instance id.JOB
subroutine area(d1, x, x2, y, y2, eint, stif0)
#define min(a, b)
Definition macros.h:20
#define max(a, b)
Definition macros.h:21
initmumps id
integer, parameter ncharline
integer th_has_noda_pext
Definition th_mod.F:121
OPTION /TH/SURF outputs of Pressure and Area needed Tabs.
Definition th_surf_mod.F:60
character *2 function nl()
Definition message.F:2354
subroutine arret(nn)
Definition arret.F:87
subroutine my_barrier
Definition machine.F:31