OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
hm_read_initemp.F File Reference
#include "implicit_f.inc"
#include "com01_c.inc"
#include "com04_c.inc"

Go to the source code of this file.

Functions/Subroutines

subroutine hm_read_initemp (temp, nintemp, itherm_fe, itab, itabm1, igrnod, initids, unitab, lsubmodel)

Function/Subroutine Documentation

◆ hm_read_initemp()

subroutine hm_read_initemp ( temp,
integer, intent(in) nintemp,
integer, intent(in) itherm_fe,
integer, dimension(*) itab,
integer, dimension(*) itabm1,
type (group_), dimension(ngrnod) igrnod,
integer, dimension(*) initids,
type (unit_type_), intent(in) unitab,
type(submodel_data), dimension(*), intent(in) lsubmodel )

Definition at line 42 of file hm_read_initemp.F.

44C-----------------------------------------------
45C M o d u l e s
46C-----------------------------------------------
47 USE unitab_mod
48 USE message_mod
49 USE groupdef_mod
50 USE submodel_mod
53C-----------------------------------------------
54C I m p l i c i t T y p e s
55C-----------------------------------------------
56#include "implicit_f.inc"
57C-----------------------------------------------
58C C o m m o n B l o c k s
59C-----------------------------------------------
60#include "com01_c.inc"
61#include "com04_c.inc"
62C-----------------------------------------------
63C D u m m y A r g u m e n t s
64C-----------------------------------------------
65 TYPE (UNIT_TYPE_),INTENT(IN) ::UNITAB
66 INTEGER ITAB(*), ITABM1(*),INITIDS(*)
67 INTEGER ,INTENT(IN) :: NINTEMP
68 INTEGER ,INTENT(IN) :: ITHERM_FE
69 my_real :: temp(*)
70 TYPE(SUBMODEL_DATA),INTENT(IN)::LSUBMODEL(*)
71C-----------------------------------------------
72 TYPE (GROUP_) , DIMENSION(NGRNOD) :: IGRNOD
73C-----------------------------------------------
74C L o c a l V a r i a b l e s
75C-----------------------------------------------
76 INTEGER I,J,NNOD,NOSYS,ID,IGR,IGRS,NBTEMP,BID,
77 . UID,TYP,NOD,NODSYS,NB_LINE
79 . temp0
80 CHARACTER MESS*40
81 CHARACTER(LEN=NCHARTITLE) :: TITR
82 LOGICAL IS_AVAILABLE
83 my_real, DIMENSION(:), ALLOCATABLE :: list_temp0
84 INTEGER, DIMENSION(:), ALLOCATABLE :: LIST_NOD
85C-----------------------------------------------
86C E x t e r n a l F u n c t i o n s
87C-----------------------------------------------
88 INTEGER USR2SYS
89 DATA mess/'INITIAL TEMPERATURE DEFINITION '/
90C=======================================================================
91 bid =0
92 nbtemp = 0
93 is_available = .false.
94 nb_line = 0
95C--------------------------------------------------
96C START BROWSING MODEL INITEMP
97C--------------------------------------------------
98 CALL hm_option_start('/INITEMP')
99C--------------------------------------------------
100C BROWSING /INITEMP OPTIONS 1->NRADIA
101C--------------------------------------------------
102 DO i=1,nintemp
103 titr = ''
104 CALL hm_option_read_key(lsubmodel,
105 . unit_id = uid,
106 . option_id = id,
107 . option_titr = titr)
108
109! IF (ITHERM_FE == 0) THEN
110! CALL ANCMSG(MSGID=858,
111! . MSGTYPE=MSGERROR,
112! . ANMODE=ANINFO)
113! ENDIF
114C--------------------------------------------------
115C EXTRACT DATAS (INTEGER VALUES)
116C--------------------------------------------------
117 CALL hm_get_intv('distribution',typ,is_available,lsubmodel)
118 CALL hm_get_intv('entityid',igr,is_available,lsubmodel)
119 IF (typ == 1) THEN
120 CALL hm_get_intv('grnd_ID',igr,is_available,lsubmodel)
121 CALL hm_get_intv('distribution_table_count',nb_line,is_available,lsubmodel)
122 IF(.NOT.ALLOCATED(list_nod)) ALLOCATE(list_nod(nb_line))
123 list_nod(1:nb_line) = 0
124 IF(.NOT.ALLOCATED(list_temp0)) ALLOCATE(list_temp0(nb_line))
125 list_temp0(1:nb_line) = zero
126 DO j=1,nb_line
127 CALL hm_get_int_array_index('location_unit_node',list_nod(j),j,is_available,lsubmodel)
128 ENDDO
129 ENDIF
130C--------------------------------------------------
131C EXTRACT DATAS (REAL VALUES)
132C--------------------------------------------------
133 IF (typ == 0) THEN
134 CALL hm_get_floatv('magnitude',temp0,is_available,lsubmodel,unitab)
135 ELSEIF (typ == 1) THEN
136 CALL hm_get_float_array_index('T0',temp0,j,is_available,lsubmodel,unitab)
137 DO j=1,nb_line
138 CALL hm_get_float_array_index('magnitude',list_temp0(j),j,is_available,lsubmodel,unitab)
139 ENDDO
140 ENDIF
141C--------------------------------------------------
142 nbtemp = nbtemp+1
143 initids(nbtemp)=id
144 igrs=0
145 IF (typ == 0) THEN
146 IF (igr == 0)THEN
147 CALL ancmsg(msgid=668,
148 . msgtype=msgerror,
149 . anmode=aninfo,
150 . c1='/INITEM',
151 . c2='/INITEM',
152 . c3=titr,
153 . i1=id)
154 ENDIF
155 DO j=1,ngrnod
156 IF (igr == igrnod(j)%ID) igrs=j
157 ENDDO
158 IF(igrs /= 0)THEN
159 DO j=1,igrnod(igrs)%NENTITY
160 nosys=igrnod(igrs)%ENTITY(j)
161 temp(nosys)= temp0
162 ENDDO
163 nnod=igrnod(igrs)%NENTITY
164 ELSE
165 CALL ancmsg(msgid=53,
166 . msgtype=msgerror,
167 . anmode=aninfo,
168 . c1='IN /INITEM OPTION',
169 . i1=igr)
170 ENDIF
171 ELSE
172 DO j=1,ngrnod
173 IF (igr == igrnod(j)%ID) igrs=j
174 ENDDO
175 IF(igrs /= 0)THEN
176 DO j=1,igrnod(igrs)%NENTITY
177 nosys=igrnod(igrs)%ENTITY(j)
178 temp(nosys)= temp0
179 ENDDO
180 nnod=igrnod(igrs)%NENTITY
181 ENDIF
182 DO j=1,nb_line
183 nodsys=usr2sys(list_nod(j),itabm1,mess,id)
184 IF (list_nod(j) == 0) THEN
185 CALL ancmsg(msgid=78,
186 . msgtype=msgerror,
187 . anmode=aninfo,
188 . c1='/INITEM',
189 . i1=id,
190 . i2=nod)
191 ENDIF
192 IF (nodsys /= 0) temp(nodsys)= list_temp0(j)
193 ENDDO
194 ENDIF
195 IF(ALLOCATED(list_temp0)) DEALLOCATE(list_temp0)
196 IF(ALLOCATED(list_nod)) DEALLOCATE(list_nod)
197 ENDDO
198C---
199 CALL udouble(initids,1,nbtemp,mess,0,bid)
200C--------------------------------------------------
201C PRINT
202C--------------------------------------------------
203 j=0
204 RETURN
#define my_real
Definition cppsort.cpp:32
subroutine hm_get_float_array_index(name, rval, index, is_available, lsubmodel, unitab)
subroutine hm_get_floatv(name, rval, is_available, lsubmodel, unitab)
subroutine hm_get_int_array_index(name, ival, index, is_available, lsubmodel)
subroutine hm_get_intv(name, ival, is_available, lsubmodel)
subroutine hm_option_start(entity_type)
initmumps id
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 usr2sys(iu, itabm1, mess, id)
Definition sysfus.F:146
subroutine udouble(list, ilist, nlist, mess, ir, rlist)
Definition sysfus.F:573