OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
read_dfs_wave_shaper.F File Reference
#include "implicit_f.inc"
#include "com04_c.inc"
#include "units_c.inc"
#include "param_c.inc"
#include "tabsiz_c.inc"

Go to the source code of this file.

Functions/Subroutines

subroutine read_dfs_wave_shaper (detonators, igrnod, ipm, itabm1, unitab, lsubmodel, itab)

Function/Subroutine Documentation

◆ read_dfs_wave_shaper()

subroutine read_dfs_wave_shaper ( type(detonators_struct_), intent(inout), target detonators,
type (group_), dimension(ngrnod), intent(in) igrnod,
integer, dimension(npropmi,nummat), intent(in) ipm,
integer, dimension(sitabm1), intent(in) itabm1,
type (unit_type_), intent(in) unitab,
type(submodel_data), dimension(nsubmod), intent(in) lsubmodel,
integer, dimension(numnod), intent(in) itab )

Definition at line 46 of file read_dfs_wave_shaper.F.

47C-----------------------------------------------
48C M o d u l e s
49C-----------------------------------------------
50 USE unitab_mod
51 USE message_mod
53 USE groupdef_mod
55 USE submodel_mod
58 USE format_mod , ONLY : fmw_10i
59C-----------------------------------------------
60C I m p l i c i t T y p e s
61C-----------------------------------------------
62#include "implicit_f.inc"
63C-----------------------------------------------
64C C o m m o n B l o c k s
65C-----------------------------------------------
66#include "com04_c.inc"
67#include "units_c.inc"
68#include "param_c.inc"
69#include "tabsiz_c.inc"
70C-----------------------------------------------
71C D u m m y A r g u m e n t s
72C-----------------------------------------------
73 TYPE (UNIT_TYPE_),INTENT(IN) :: UNITAB
74 INTEGER,INTENT(IN) :: ITABM1(SITABM1),ITAB(NUMNOD)
75 INTEGER,INTENT(IN) :: IPM(NPROPMI,NUMMAT)
76 TYPE(SUBMODEL_DATA),INTENT(IN) :: LSUBMODEL(NSUBMOD)
77 TYPE(DETONATORS_STRUCT_),INTENT(INOUT),TARGET :: DETONATORS
78 TYPE (GROUP_),DIMENSION(NGRNOD),INTENT(IN) :: IGRNOD
79C-----------------------------------------------
80C L o c a l V a r i a b l e s
81C-----------------------------------------------
82 INTEGER :: I, MAT, J, K,IGU,IGS,JJ,MDET,DET_ID,IDET
83 INTEGER :: IBID, NODE_ID1, NODE_ID2,uID1,uID2, IOPT, IUNIT, UID
84 INTEGER :: FLAG_FMT,IMAT,IFLAGUNIT,UNUSED
85 INTEGER :: STAT,NPE
86 my_real :: xc, yc, zc, alt, xc1, yc1, zc1, xc2, yc2, zc2, nx, ny, nz, bid, vcj, vdet
87 CHARACTER*40 :: MESS
88 CHARACTER*64 :: chain1,chain2
89 CHARACTER(LEN=NCHARKEY) :: KEY, KEY2
90 CHARACTER(LEN=NCHARTITLE) :: TITR
91 LOGICAL :: IS_ENCRYPTED, IS_AVAILABLE
92 INTEGER,POINTER,DIMENSION(:) :: IECRAN
93 my_real,POINTER,DIMENSION(:) :: decran
94 INTEGER :: NDETPS,NDETSG,NECRAN,NDETPL,NDETCORD
95C-----------------------------------------------
96C E x t e r n a l F u n c t i o n s
97C-----------------------------------------------
98 INTEGER,EXTERNAL :: NODGRNR5, USR2SYS, NINTRI
99 INTEGER :: UNUSED_MAT_DETONATOR
100 DATA mess/'DETONATORS DEFINITION '/
101C-----------------------------------------------
102C S o u r c e L i n e s
103C-----------------------------------------------
104
105 CALL hm_option_start('/DFS/WAV_SHA')
106
107 DO idet=1,detonators%N_DET_WAVE_SHAPER
108
109 CALL hm_option_read_key(lsubmodel,option_id=det_id, unit_id=uid,keyword2=key,keyword3=key2)
110 IF (len_trim(key) > 0) key = key(1:7)
111 IF (len_trim(key2) > 0) key2 = key2(1:4)
112
113 iecran => detonators%WAVE_SHAPER(idet)%NODES(1:)
114 decran => detonators%WAVE_SHAPER(idet)%TIME(1:)
115
116 is_encrypted= .false.
117 is_available = .false.
118 CALL hm_option_is_encrypted(is_encrypted)
119 !---------------------------------!
120 ! READING !
121 !---------------------------------!
122 CALL hm_get_floatv('rad_det_locationA_X', vdet, is_available, lsubmodel, unitab)
123 CALL hm_get_floatv('rad_det_locationA_Y', yc1, is_available, lsubmodel, unitab)
124 CALL hm_get_floatv('rad_det_locationA_Z', zc1, is_available, lsubmodel, unitab)
125 CALL hm_get_floatv('rad_det_time', alt, is_available, lsubmodel,unitab)
126 CALL hm_get_intv('rad_det_materialid', mat, is_available, lsubmodel)
127 CALL hm_get_intv('entityid', igu, is_available, lsubmodel)
128 !---------------------------------!
129 ! CHECKING USER FLAGS !
130 ! +INTERNAL ID !
131 !---------------------------------!
132 mdet=mat !bak
133 IF (alt > infinity) alt=infinity
134 IF(mat > 0)unused=unused_mat_detonator(mat,nummat,ipm)
135 unused=0
136 IF (mat < 0) THEN
137 CALL ancmsg(msgid=102,msgtype=msgerror,anmode=aninfo,
138 . i1=det_id,
139 . c1='DETONATOR IS REFERRING TO A NEGATIVE MATERIAL ID',
140 . c2='/DFS/WAV_SHA',
141 . i2=mdet)
142 ELSEIF (unused==1) THEN
143 CALL ancmsg(msgid=102,msgtype=msgerror,anmode=aninfo,
144 . i1=det_id,
145 . c1='DETONATOR IS REFERRING TO AN UNKNOWN MATERIAL ID',
146 . c2='/DFS/WAV_SHA',
147 . i2=mdet)
148 ELSEIF (unused==2) THEN
149 CALL ancmsg(msgid=102,msgtype=msgerror,anmode=aninfo,
150 . i1=det_id,
151 . c1='DETONATOR MUST REFER TO A JWL MATERIAL LAW (LAWS 5, 51, 97, 151)',
152 . c2='/DFS/WAV_SHA',
153 . i2=mdet)
154 ELSE
155 !---------------------------------!
156 ! LISTING PRINTOUT !
157 !---------------------------------!
158 npe = nodgrnr5(igu ,igs,iecran(1),igrnod ,itabm1 ,mess)
159 !Nodes in group are ordered from 1 to NPE. last point is the nearest from the detonation origin. Points are composing the screen lines (guard lines). Screen lines is the boundary of the obstacle (shadow area
160 IF(is_encrypted) WRITE(iout,1001)
161 IF(.NOT.is_encrypted)WRITE(iout,1550) det_id,vdet,yc1,zc1,alt,mdet,igu,npe
162 IF(.NOT.is_encrypted)WRITE(iout,fmt=fmw_10i) (itab(iecran(i)),i=1,npe)
163 DO i=1,npe
164 CALL ifrontplus(iecran(i),1)
165 END DO
166 detonators%WAVE_SHAPER(idet)%TDET = alt
167 detonators%WAVE_SHAPER(idet)%MAT = mat
168 detonators%WAVE_SHAPER(idet)%VDET = vdet
169 detonators%WAVE_SHAPER(idet)%XDET = zero
170 detonators%WAVE_SHAPER(idet)%YDET = yc1
171 detonators%WAVE_SHAPER(idet)%ZDET = zc1
172 detonators%WAVE_SHAPER(idet)%NUMNOD = npe
173 END IF
174
175 ENDDO !next IDET
176C-----------------------------------------------
177C O u t p u t F o r m a t
178C-----------------------------------------------
179 1001 FORMAT(///5x,
180 & 'SHADOW LINE DETONATION ',i10,/5x,
181 & '---------------------- ',/5x,
182 & 'CONFIDENTIAL DATA')
183 1550 FORMAT(///5x,
184 & 'SHADOW LINE DETONATION =',i10,/5x,
185 & '---------------------- ',/5x,
186 & 'OPTIONAL VELOCITY =',1pg20.13,/5x,
187 & 'Y-COORDINATE =',1pg20.13,/5x,
188 & 'Z-COORDINATE =',1pg20.13,/5x,
189 & 'LIGHTING TIME =',1pg20.13,/5x,
190 & 'EXPLOSIVE MATERIAL NUMBER =',i10,/5x,
191 & 'SHADOW LINE NODE GROUP ID =',i10,/5x,
192 & 'NUMBER OF POINTS(SHADOW) =',i10,/5x,
193 & 'SHADOW LINE DEFINITION : ')
194
195C-----------------------------------------------
#define my_real
Definition cppsort.cpp:32
subroutine ifrontplus(n, p)
Definition frontplus.F:101
subroutine hm_get_floatv(name, rval, is_available, lsubmodel, unitab)
subroutine hm_get_intv(name, ival, is_available, lsubmodel)
subroutine hm_option_is_encrypted(is_encrypted)
subroutine hm_option_start(entity_type)
integer, parameter nchartitle
integer, parameter ncharkey
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)
Definition message.F:895
integer function nodgrnr5(igu, igs, ibuf, igrnod, itabm1, mess)
Definition freform.F:298
integer function unused_mat_detonator(mdet, nummat, listmat)