OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
hm_read_thpart.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!|| hm_read_thpart ../starter/source/output/thpart/hm_read_thpart.F
25!||--- called by ------------------------------------------------------
26!|| lectur ../starter/source/starter/lectur.F
27!||--- calls -----------------------------------------------------
28!|| ancmsg ../starter/source/output/message/message.F
29!|| fretitl ../starter/source/starter/freform.F
30!|| hm_get_intv ../starter/source/devtools/hm_reader/hm_get_intv.F
31!|| hm_option_is_encrypted ../starter/source/devtools/hm_reader/hm_option_is_encrypted.f
32!|| hm_option_read_key ../starter/source/devtools/hm_reader/hm_option_read_key.F
33!|| hm_option_start ../starter/source/devtools/hm_reader/hm_option_start.F
34!|| nintrigr ../starter/source/system/nintrr.F
35!|| udouble ../starter/source/system/sysfus.F
36!||--- uses -----------------------------------------------------
37!|| hm_option_read_mod ../starter/share/modules1/hm_option_read_mod.f
38!|| message_mod ../starter/share/message_module/message_mod.F
39!|| submodel_mod ../starter/share/modules1/submodel_mod.F
40!||====================================================================
41 SUBROUTINE hm_read_thpart(IPART ,IGRBRIC ,IGRQUAD ,IGRSH4N ,IGRSH3N,
42 . IGRTRUSS ,IGRBEAM ,IGRSPRING, LSUBMODEL)
43C-----------------------------------------------
44C M o d u l e s
45C-----------------------------------------------
46 USE message_mod
47 USE groupdef_mod
48 USE submodel_mod
51C-----------------------------------------------
52C I m p l i c i t T y p e s
53C-----------------------------------------------
54#include "implicit_f.inc"
55C-----------------------------------------------
56C C o m m o n B l o c k s
57C-----------------------------------------------
58#include "scr03_c.inc"
59#include "scr17_c.inc"
60#include "units_c.inc"
61#include "com01_c.inc"
62#include "com04_c.inc"
63#include "com10_c.inc"
64#include "warn_c.inc"
65C-----------------------------------------------
66C D u m m y A r g u m e n t s
67C-----------------------------------------------
68 INTEGER IPART(LIPART1,*)
69 TYPE (GROUP_) , DIMENSION(NGRBRIC) :: IGRBRIC
70 TYPE (GROUP_) , DIMENSION(NGRQUAD) :: IGRQUAD
71 TYPE (GROUP_) , DIMENSION(NGRSHEL) :: IGRSH4N
72 TYPE (GROUP_) , DIMENSION(NGRSH3N) :: IGRSH3N
73 TYPE (GROUP_) , DIMENSION(NGRTRUS) :: IGRTRUSS
74 TYPE (GROUP_) , DIMENSION(NGRBEAM) :: IGRBEAM
75 TYPE (GROUP_) , DIMENSION(NGRSPRI) :: IGRSPRING
76 TYPE(submodel_data) LSUBMODEL(NSUBMOD)
77C-----------------------------------------------
78C L o c a l V a r i a b l e s
79C-----------------------------------------------
80 INTEGER ID, I, GR, IGR
81 CHARACTER(LEN=NCHARTITLE) :: TITR,TITR1
82 CHARACTER MESS*40,TYP*6
83 INTEGER ITYP
84 CHARACTER(LEN=NCHARKEY) :: KEY
85 LOGICAL IS_ENCRYPTED,IS_AVAILABLE,IS_FOUND_SURF
86 my_real bid
87C-----------------------------------------------
88C E x t e r n a l F u n c t i o n s
89C-----------------------------------------------
90 INTEGER NINTRIGR
91 DATA mess/' THPART DEFINITION '/
92C-----------------------------------------------
93C S o u r c e L i n e s
94C-----------------------------------------------
95 WRITE(iout,'(//A)')' THPARTS'
96 WRITE(iout,'(A//)')' -----'
97
98 is_encrypted = .false.
99 is_available = .false.
100 is_found_surf = .false.
101
102 igrelem = 0
103 IF(nthpart>0) igrelem = 1
104 CALL hm_option_start('/THPART')
105
106 DO i=1,nthpart
107
108 titr = ''
109 typ = ''
110 CALL hm_option_read_key(lsubmodel,option_id = id,option_titr = titr ,keyword2 = key )
111 CALL hm_option_is_encrypted(is_encrypted)
112
113 typ(1:6)=key(1:6)
114 titr1=titr
115 CALL fretitl(titr,ipart(lipart1-ltitr+1,npart+i),ltitr)
116 CALL hm_get_intv('grelem_ID', gr ,is_available,lsubmodel)
117
118C ITYP : 1 BRIC,
119C 2 QUAD,
120C 3 SHELL,
121C 4 TRUSS,
122C 5 BEAM,
123C 6 SPRINGS,
124C 7 SHELL_3N
125
126 ityp = 0
127 igr = 0
128
129 IF (typ(1:6) == 'GRBRIC') THEN
130 ityp = 1
131 igr = nintrigr(gr,igrbric,ngrbric)
132 IF (ityp == igrbric(igr)%GRTYPE) is_found_surf = .true.
133
134 ELSEIF (typ(1:6) == 'GRQUAD') THEN
135 ityp = 2
136 igr = nintrigr(gr,igrquad,ngrquad)
137 IF (ityp == igrquad(igr)%GRTYPE) is_found_surf = .true.
138
139 ELSEIF (typ(1:6) == 'GRSHEL') THEN
140 ityp = 3
141 igr = nintrigr(gr,igrsh4n,ngrshel)
142 IF (ityp == igrsh4n(igr)%GRTYPE) is_found_surf = .true.
143
144 ELSEIF (typ(1:6) == 'GRTRUS') THEN
145 ityp = 4
146 igr = nintrigr(gr,igrtruss,ngrtrus)
147 IF (ityp == igrtruss(igr)%GRTYPE) is_found_surf = .true.
148
149 ELSEIF (typ(1:6) == 'GRBEAM') THEN
150 ityp = 5
151 igr = nintrigr(gr,igrbeam,ngrbeam)
152 IF (ityp == igrbeam(igr)%GRTYPE) is_found_surf = .true.
153
154 ELSEIF (typ(1:6) == 'GRSPRI') THEN
155 ityp = 6
156 igr = nintrigr(gr,igrspring,ngrspri)
157 IF (ityp == igrspring(igr)%GRTYPE) is_found_surf = .true.
158
159 ELSEIF (typ(1:6) == 'GRSH3N' .OR. typ(1:6) == 'grtria') THEN
160 ITYP = 7
161 IGR = NINTRIGR(GR,IGRSH3N,NGRSH3N)
162 IF (ITYP == IGRSH3N(IGR)%GRTYPE) IS_FOUND_SURF = .TRUE.
163 ENDIF
164
165.NOT. IF( IS_FOUND_SURF)THEN
166 CALL ANCMSG(MSGID=763,MSGTYPE=MSGERROR,ANMODE=ANINFO,I1=ID,C1=TITR,I2=GR,C2=TYP(1:6))
167 ENDIF
168
169 WRITE(IOUT,'(/a,i10,2a)')'thpart:',ID,',',TRIM(TITR)
170 WRITE(IOUT,'(a)') '----'
171 WRITE(IOUT,'(a,a)')'TYPE of element group : ',TYP(1:6)
172 WRITE(IOUT,'(a,i10)')'element group id : ',GR
173
174 IPART(1,NPART+I)=IGR
175 IPART(2,NPART+I)=ITYP
176 IPART(4,NPART+I)=ID
177
178 IF(IPART(4,NPART+I) == 0) THEN
179 CALL ANCMSG(MSGID=493,MSGTYPE=MSGERROR,ANMODE=ANINFO_BLIND_1,C1=TITR1)
180 ENDIF
181
182 ENDDO
183
184 !-------------------------------------
185 ! Search for duplicate IDs
186 !-------------------------------------
187 CALL UDOUBLE(IPART(4,1),LIPART1,NPART+NTHPART,MESS,0,BID)
188
189 RETURN
190C
191 END
#define my_real
Definition cppsort.cpp:32
subroutine hm_get_intv(name, ival, is_available, lsubmodel)
subroutine hm_option_is_encrypted(is_encrypted)
subroutine hm_option_start(entity_type)
subroutine hm_read_thpart(ipart, igrbric, igrquad, igrsh4n, igrsh3n, igrtruss, igrbeam, igrspring, lsubmodel)
integer, parameter nchartitle
integer, parameter ncharkey
subroutine fretitl(titr, iasc, l)
Definition freform.F:615
program starter
Definition starter.F:39