OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
hm_preread_impdisp.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_preread_impdisp ../starter/source/constraints/general/impvel/hm_preread_impdisp.F
25!||--- called by ------------------------------------------------------
26!|| lectur ../starter/source/starter/lectur.F
27!||--- calls -----------------------------------------------------
28!|| ancmsg ../starter/source/output/message/message.F
29!|| hm_get_intv ../starter/source/devtools/hm_reader/hm_get_intv.F
30!|| hm_option_count ../starter/source/devtools/hm_reader/hm_option_count.F
31!|| hm_option_read_key ../starter/source/devtools/hm_reader/hm_option_read_key.F
32!|| hm_option_start ../starter/source/devtools/hm_reader/hm_option_start.F
33!|| ngr2usrn ../starter/source/system/nintrr.F
34!||--- uses -----------------------------------------------------
35!|| hm_option_read_mod ../starter/share/modules1/hm_option_read_mod.F
36!|| message_mod ../starter/share/message_module/message_mod.F
37!|| submodel_mod ../starter/share/modules1/submodel_mod.F
38!||====================================================================
39 SUBROUTINE hm_preread_impdisp(NIMPDISP ,IGRNOD ,IPART ,IPARTR ,
40 . UNITAB ,LSUBMODEL)
41C============================================================================
42C M o d u l e s
43C-----------------------------------------------
44 USE message_mod
45 USE groupdef_mod
46 USE submodel_mod
48 USE unitab_mod
50C-----------------------------------------------
51C I m p l i c i t T y p e s
52C-----------------------------------------------
53#include "implicit_f.inc"
54C-----------------------------------------------
55C C o m m o n B l o c k s
56C-----------------------------------------------
57#include "com04_c.inc"
58#include "scr17_c.inc"
59C-----------------------------------------------
60C D u m m y A r g u m e n t s
61C-----------------------------------------------
62 INTEGER ,INTENT(OUT) :: NIMPDISP
63 INTEGER IPART(LIPART1,*), IPARTR(*)
64 TYPE(unit_type_) ,INTENT(IN) :: UNITAB
65 TYPE (GROUP_) , DIMENSION(NGRNOD) ,INTENT(IN) :: IGRNOD
66 TYPE(submodel_data), DIMENSION(*) ,INTENT(IN) :: LSUBMODEL
67C-----------------------------------------------
68C L o c a l V a r i a b l e s
69C-----------------------------------------------
70 INTEGER :: I,N,OPTID,NFDISP,NFGEO,IGS,GRNOD_ID,PART_ID,NNOD,JPART
71 CHARACTER(LEN=NCHARKEY) :: KEY
72 CHARACTER(LEN=NCHARTITLE) :: TITR
73 LOGICAL :: IS_AVAILABLE
74C-----------------------------------------------
75C E x t e r n a l F u n c t i o n s
76C-----------------------------------------------
77 INTEGER NGR2USRN
78 EXTERNAL ngr2usrn
79c--------------------------------------------------
80c Count number of nodes with imposed displacement => NIMPDISP
81C======================================================================|
82 is_available = .false.
83c
84 nimpdisp = 0
85c--------------------------------------------------
86c /IMPDISP
87c--------------------------------------------------
88 CALL hm_option_count('/IMPDISP',nfdisp)
89c
90 CALL hm_option_start('/IMPDISP')
91c
92 DO i=1,nfdisp
93c
94 CALL hm_option_read_key(lsubmodel,
95 . option_id = optid,
96 . option_titr = titr,
97 . keyword2 = key)
98c
99 IF (key(1:4) /= 'FGEO') THEN
100 CALL hm_get_intv('entityid' ,grnod_id ,is_available,lsubmodel)
101 igs = ngr2usrn(grnod_id,igrnod,ngrnod,nnod)
102 IF (igs > 0) nimpdisp = nimpdisp + nnod
103 ENDIF
104c
105 ENDDO ! DO I=1,NFDISP
106c--------------------------
107c /IMPDISP/FGEO
108c--------------------------
109 CALL hm_option_count('/IMPDISP/FGEO',nfgeo)
110c
111 CALL hm_option_start('/IMPDISP/FGEO')
112c
113 DO i=1,nfgeo
114c
115 CALL hm_option_read_key(lsubmodel,
116 . option_id = optid,
117 . option_titr = titr,
118 . keyword2 = key)
119 IF (key(1:4) == 'FGEO') THEN
120 CALL hm_get_intv('rad_spring_part' ,part_id ,is_available,lsubmodel)
121 IF (part_id > 0) THEN
122 jpart = 0
123 DO n=1,npart
124 IF (ipart(4,n) == part_id) jpart = n
125 ENDDO
126 IF (jpart == 0) THEN
127 CALL ancmsg(msgid=1077, msgtype=msgerror,
128 . anmode=aninfo,
129 . i1=optid,
130 . c1=titr,
131 . i2=part_id)
132 ENDIF
133 DO n=1,numelr
134 IF (ipartr(n) == jpart) nimpdisp = nimpdisp + 1
135 ENDDO
136 ENDIF
137c
138 CALL hm_get_intv('distribution_table_count' ,nnod ,is_available,lsubmodel)
139c
140 nimpdisp = nimpdisp + nnod
141 ENDIF
142 ENDDO ! DO I=1,NFGEO
143c-----------
144 RETURN
145 END
subroutine hm_get_intv(name, ival, is_available, lsubmodel)
subroutine hm_option_count(entity_type, hm_option_number)
subroutine hm_option_start(entity_type)
subroutine hm_preread_impdisp(nimpdisp, igrnod, ipart, ipartr, unitab, lsubmodel)
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:889