58 USE format_mod ,
ONLY : fmw_10i
62#include "implicit_f.inc"
69#include "tabsiz_c.inc"
73 TYPE (UNIT_TYPE_),
INTENT(IN) ::
74 INTEGER,
INTENT(IN) :: ITABM1(SITABM1),ITAB(NUMNOD)
75 INTEGER,
INTENT(IN) :: IPM(,NUMMAT)
76 my_real,
INTENT(IN) :: x(3,numnod)
79 TYPE (GROUP_),
DIMENSION(NGRNOD),
INTENT(IN) :: IGRNOD
83 INTEGER :: I, MAT, J, NPEM, K,IGU,IGS,JJ,MDET,DET_ID,IDET
84 INTEGER :: IBID, NODE_ID1, NODE_ID2,uID1,uID2, IOPT, IUNIT, UID
85 INTEGER :: FLAG_FMT,IMAT,IFLAGUNIT,UNUSED,NNOD
86 INTEGER :: STAT,NPE,NPE2
87 my_real :: xc, yc, zc, alt, xc1, yc1, zc1, xc2, yc2, zc2, nx, ny, nz, bid, vcj
89 CHARACTER*64 :: chain1,chain2
90 CHARACTER(LEN=NCHARKEY) :: KEY, KEY2
91 CHARACTER(LEN=NCHARTITLE) :: TITR
92 LOGICAL :: IS_ENCRYPTED, IS_AVAILABLE
93 INTEGER :: NDETPS,NDETSG,NECRAN,NDETPL,NDETCORD
97 INTEGER,
EXTERNAL :: NODGRNR5, USR2SYS, NINTRI
98 INTEGER :: UNUSED_MAT_DETONATOR
99 DATA mess/
'DETONATORS DEFINITION '/
105 DO idet=1,detonators%N_DET_CORD
107 CALL hm_option_read_key(lsubmodel,option_id=det_id, unit_id=uid,keyword2=key,keyword3=key2)
108 IF (len_trim(key) > 0) key = key(1:7)
109 IF (len_trim(key2) > 0) key2 = key2(1:4)
111 is_encrypted= .false.
112 is_available = .false.
117 CALL hm_get_floatv(
'magnitude', vcj, is_available, lsubmodel, unitab)
119 CALL hm_get_intv(
'rad_det_iopt', iopt, is_available, lsubmodel)
120 CALL hm_get_intv(
'rad_det_materialid', mat, is_available, lsubmodel)
121 CALL hm_get_intv(
'entityid', igu, is_available, lsubmodel)
128 IF (alt > infinity) alt=infinity
129 IF (alt < -infinity)alt=-infinity
130 nnod = nodgrnr5(igu ,igs,detonators%CORD(idet)%NODES,igrnod,itabm1,mess)
131 IF(igrnod(igs)%SORTED /= 1)
THEN
132 CALL ancmsg(msgid = 104,msgtype = msgerror,anmode = aninfo,
133 . c1 =
'/DFS/DETCORD',
135 . c2 =
'ORDERED GROUP OF NODES IS REQUIRED')
138 IF(mat > 0)unused=unused_mat_detonator(mat,nummat,ipm)
140 CALL ancmsg(msgid=102,msgtype=msgerror,anmode=aninfo,
142 . c1=
'DETONATOR IS REFERRING TO A NEGATIVE MATERIAL ID',
145 ELSEIF (unused==1)
THEN
150 . c1=
'DETONATOR IS REFERRING TO AN UNKNOWN MATERIAL ID',
153 ELSEIF (unused==2)
THEN
154 CALL ancmsg(msgid=102,msgtype=msgerror,anmode=aninfo,
156 . c1=
'DETONATOR MUST REFER TO A JWL MATERIAL LAW (LAWS 5, 51, 97, 151)',
159 ELSEIF (nnod == 0)
THEN
162 detonators%CORD(idet)%IS_MAT_VALID = .true.
170 IF(is_encrypted)
WRITE(iout,1001)
173 IF(.NOT.is_encrypted)
WRITE(iout,1700) det_id,igu,nnod,alt,mdet
174 ELSEIF(iopt == 1)
THEN
175 IF(.NOT.is_encrypted)
WRITE(iout,1701) det_id,igu,nnod,alt,vcj,mdet
177 IF(.NOT.is_encrypted)
WRITE(iout,1700) det_id,igu,nnod,alt,mdet
180 IF(.NOT.is_encrypted)
WRITE(iout,fmt=fmw_10i) (itab(detonators%CORD(idet)%NODES(i)),i
182 CALL ifrontplus(detonators%CORD(idet)%NODES(i),1)
184 IF(iopt == 1 .AND. vcj <= zero)iopt=2
186 CALL detcord0(detonators%CORD(idet),alt,x,vcj,iopt)
189 detonators%CORD(idet)%TDET= alt
190 detonators%CORD(idet)%MAT = mat
191 detonators%CORD(idet)%VDET = vcj
192 detonators%CORD(idet)%IOPT = iopt
201 &
'DETONATING CORD ',i10,/5x,
202 &
'--------------- ',/5x,
203 &
'CONFIDENTIAL DATA')
205 &
'DETONATING CORD ',i10,/5x,
206 &
'---------------- ',/5x,
207 & 'node group identifier =
',I10 ,/5X,
208 & 'number of points(cord) =
',I10 ,/5X,
209 & 'lighting time =
',1PG20.13,/5X,
210 & 'explosive material number =
',I10 ,/5X,
211 & 'cord definition :
')
213 & 'detonating cord
',I10,/5X,
214 & '----------------
',/5X,
215 & 'node group identifier =
',I10 ,/5X,
216 & 'number of points(cord) =
',I10 ,/5X,
217 & 'lighting time =
',1PG20.13,/5X,
218 & 'detonation velocity =
',1PG20.13,/5X,
219 & 'explosive material number =
',I10 ,/5X,
220 & 'cord definition :
')
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)