OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
read_detonators.F
Go to the documentation of this file.
1Copyright> OpenRadioss
2Copyright> Copyright (C) 1986-2025 Altair Engineering Inc.
3Copyright>
4Copyright> This program is free software: you can redistribute it and/or modify
5Copyright> it under the terms of the GNU Affero General Public License as published by
6Copyright> the Free Software Foundation, either version 3 of the License, or
7Copyright> (at your option) any later version.
8Copyright>
9Copyright> This program is distributed in the hope that it will be useful,
10Copyright> but WITHOUT ANY WARRANTY; without even the implied warranty of
11Copyright> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12Copyright> GNU Affero General Public License for more details.
13Copyright>
14Copyright> You should have received a copy of the GNU Affero General Public License
15Copyright> along with this program. If not, see <https://www.gnu.org/licenses/>.
16Copyright>
17Copyright>
18Copyright> Commercial Alternative: Altair Radioss Software
19Copyright>
20Copyright> As an alternative to this open-source version, Altair also offers Altair Radioss
21Copyright> software under a commercial license. Contact Altair to discuss further if the
22Copyright> commercial version may interest you: https://www.altair.com/radioss/.
23!||====================================================================
24!|| read_detonators ../starter/source/initial_conditions/detonation/read_detonators.F
25!||--- called by ------------------------------------------------------
26!|| lectur ../starter/source/starter/lectur.F
27!||--- calls -----------------------------------------------------
28!|| ancmsg ../starter/source/output/message/message.F
29!|| hm_option_count ../starter/source/devtools/hm_reader/hm_option_count.F
30!|| hm_option_read_key ../starter/source/devtools/hm_reader/hm_option_read_key.F
31!|| hm_option_start ../starter/source/devtools/hm_reader/hm_option_start.F
32!|| prelecdet ../starter/source/initial_conditions/detonation/prelecdet.F
33!|| read_dfs_detcord ../starter/source/initial_conditions/detonation/read_dfs_detcord.F
34!|| read_dfs_detline ../starter/source/initial_conditions/detonation/read_dfs_detline.F
35!|| read_dfs_detplan ../starter/source/initial_conditions/detonation/read_dfs_detplan.F
36!|| read_dfs_detpoint ../starter/source/initial_conditions/detonation/read_dfs_detpoint.F
37!|| read_dfs_wave_shaper ../starter/source/initial_conditions/detonation/read_dfs_wave_shaper.F
38!||--- uses -----------------------------------------------------
39!|| detonators_mod ../starter/share/modules1/detonators_mod.F
40!|| hm_option_read_mod ../starter/share/modules1/hm_option_read_mod.F
41!|| message_mod ../starter/share/message_module/message_mod.F
42!|| submodel_mod ../starter/share/modules1/submodel_mod.F
43!||====================================================================
44 SUBROUTINE read_detonators(ITABM1 ,ITAB ,IGRNOD ,
45 . PM ,IPM ,X ,UNITAB,
46 . LSUBMODEL ,DETONATORS)
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
58C-----------------------------------------------
59C I m p l i c i t T y p e s
60C-----------------------------------------------
61#include "implicit_f.inc"
62C-----------------------------------------------
63C C o m m o n B l o c k s
64C-----------------------------------------------
65#include "com04_c.inc"
66#include "units_c.inc"
67#include "param_c.inc"
68#include "tabsiz_c.inc"
69C-----------------------------------------------
70C D u m m y A r g u m e n t s
71C-----------------------------------------------
72 TYPE (UNIT_TYPE_),INTENT(IN) :: UNITAB
73 INTEGER,INTENT(IN) :: ITABM1(SITABM1),ITAB(NUMNOD)
74 my_real,INTENT(INOUT) :: pm(npropm,nummat)
75 INTEGER,INTENT(IN) :: IPM(NPROPMI,NUMMAT)
76 my_real,INTENT(IN) :: x(3,numnod)
77 TYPE(submodel_data),INTENT(IN) :: LSUBMODEL(NSUBMOD)
78 TYPE(detonators_struct_),TARGET,INTENT(INOUT) :: DETONATORS
79 TYPE (GROUP_),DIMENSION(NGRNOD),INTENT(IN) :: IGRNOD
80C-----------------------------------------------
81C L o c a l V a r i a b l e s
82C-----------------------------------------------
83 INTEGER :: ID,K
84 INTEGER :: IUNIT, UID
85 INTEGER :: IFLAGUNIT
86 INTEGER :: DET_ID,STAT
87 CHARACTER*40 :: MESS
88 CHARACTER(LEN=NCHARKEY) :: KEY, KEY2
89 INTEGER :: NDET,NDFS
90C-----------------------------------------------
91C E x t e r n a l F u n c t i o n s
92C-----------------------------------------------
93 DATA mess/'DETONATORS DEFINITION '/
94C-----------------------------------------------
95C P r e - C o n d i t i o n
96C-----------------------------------------------
97 ndet = detonators%N_DET
98 detonators%IS_SHADOWING_REQUIRED = .false.
99 IF (ndet <= 0) RETURN
100C-----------------------------------------------
101C S o u r c e L i n e s
102C-----------------------------------------------
103
104 !---READING DFS OPTIONS & CHECK UNIT ID
105 CALL hm_option_count('/DFS', ndfs)
106 CALL hm_option_start('/DFS')
107 WRITE(iout,1000)
108 DO k=1,ndfs
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 !CHECK UNIT SYSTEM ID (IF DEFINED)
113 IF(uid > 0)THEN
114 iflagunit=0
115 DO iunit=1,unitab%NUNITS
116 IF (unitab%UNIT_ID(iunit) == uid) THEN
117 iflagunit = 1
118 EXIT
119 ENDIF
120 ENDDO
121 IF (iflagunit == 0) THEN
122 CALL ancmsg(msgid=659,anmode=aninfo,msgtype=msgerror,
123 . i2=uid,i1=det_id,c1='DETONATORS',c2='DETONATORS',c3='/DFS')
124 ENDIF
125 ENDIF
126 ENDDO !K=1,NDFS
127
128 !---SIZING & ALLOCATION
129 CALL prelecdet(igrnod, lsubmodel, detonators)
130
131 ! --- READING ALL DETONATOR TYPES
132 CALL read_dfs_detpoint(detonators,x,ipm,pm,itabm1,unitab,lsubmodel,igrnod)
133 CALL read_dfs_detline(detonators,x,ipm,itabm1,unitab,lsubmodel)
134 CALL read_dfs_wave_shaper(detonators,igrnod,ipm,itabm1,unitab,lsubmodel,itab)
135 CALL read_dfs_detplan(detonators,x,ipm,itabm1,unitab,lsubmodel)
136 CALL read_dfs_detcord(detonators,x,igrnod,ipm,itabm1,unitab,lsubmodel,itab)
137 WRITE(iout,2000)
138C-----------------------------------------------
139C O u t p u t F o r m a t
140C-----------------------------------------------
141
142 1000 FORMAT(////' DETONATORS' /
143 . ' ----------'/)
144 2000 FORMAT(//)
145 END
146
147
148
#define my_real
Definition cppsort.cpp:32
subroutine hm_option_count(entity_type, hm_option_number)
subroutine hm_option_start(entity_type)
integer, parameter ncharkey
subroutine prelecdet(igrnod, lsubmodel, detonators)
Definition prelecdet.F:38
subroutine read_detonators(itabm1, itab, igrnod, pm, ipm, x, unitab, lsubmodel, detonators)
subroutine read_dfs_detcord(detonators, x, igrnod, ipm, itabm1, unitab, lsubmodel, itab)
subroutine read_dfs_detline(detonators, x, ipm, itabm1, unitab, lsubmodel)
subroutine read_dfs_detplan(detonators, x, ipm, itabm1, unitab, lsubmodel)
subroutine read_dfs_detpoint(detonators, x, ipm, pm, itabm1, unitab, lsubmodel, igrnod)
subroutine read_dfs_wave_shaper(detonators, igrnod, ipm, itabm1, unitab, lsubmodel, itab)
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:889