OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
hm_preread_impvel.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_impvel ../starter/source/constraints/general/impvel/hm_preread_impvel.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!||====================================================================
40 . NIMPVEL ,IGRNOD ,IPART ,IPARTR , NFVLAG,
41 . UNITAB ,LSUBMODEL)
42C============================================================================
43C M o d u l e s
44C-----------------------------------------------
45 USE message_mod
46 USE groupdef_mod
47 USE submodel_mod
49 USE unitab_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 "com04_c.inc"
59#include "scr17_c.inc"
60C-----------------------------------------------
61C D u m m y A r g u m e n t s
62C-----------------------------------------------
63 INTEGER ,INTENT(OUT) :: NIMPVEL
64 INTEGER ,INTENT(INOUT) :: NFVLAG
65 INTEGER IPART(LIPART1,*), IPARTR(*)
66 TYPE(unit_type_), INTENT(IN) :: UNITAB
67 TYPE (GROUP_) , DIMENSION(NGRNOD) ,INTENT(IN) :: IGRNOD
68 TYPE(submodel_data), DIMENSION(*) ,INTENT(IN) :: LSUBMODEL
69C-----------------------------------------------
70C L o c a l V a r i a b l e s
71C-----------------------------------------------
72 INTEGER :: I,N,OPTID,NFVEL,NFGEO,IGS,GRNOD_ID,PART_ID,NNOD,JPART,SYS_TYPE
73 CHARACTER(LEN=NCHARKEY) :: KEY
74 CHARACTER(LEN=NCHARTITLE) :: TITR
75 LOGICAL :: IS_AVAILABLE
76C-----------------------------------------------
77C E x t e r n a l F u n c t i o n s
78C-----------------------------------------------
79 INTEGER NGR2USRN
80c--------------------------------------------------
81c Count number of nodes with imposed velocity => NUMVEL
82C======================================================================|
83 is_available = .false.
84c
85 nimpvel = 0 ! initialize counter of nodes
86c--------------------------------------------------
87c /IMPVEL and /IMPVEL/LAGMUL
88c--------------------------------------------------
89 CALL hm_option_count('/IMPVEL',nfvel)
90c
91 CALL hm_option_start('/IMPVEL')
92c
93 DO i=1,nfvel
94c
95 CALL hm_option_read_key(lsubmodel,
96 . option_id = optid,
97 . option_titr = titr,
98 . keyword2 = key)
99c
100 IF (key(1:4) /= 'FGEO') THEN
101 CALL hm_get_intv('rad_system_input_type' ,sys_type ,is_available,lsubmodel)
102 CALL hm_get_intv('entityid' ,grnod_id ,is_available,lsubmodel)
103 igs = ngr2usrn(grnod_id,igrnod,ngrnod,nnod)
104 IF (igs > 0) THEN
105 nimpvel = nimpvel + nnod
106 IF (key(1:6) == 'LAGMUL') nfvlag = nfvlag + nnod
107 END IF
108 ENDIF
109c
110 ENDDO ! DO I=1,NFVEL
111c--------------------------
112c /IMPVEL/FGEO
113c--------------------------
114 CALL hm_option_count('/IMPVEL/FGEO',nfgeo)
115c
116 CALL hm_option_start('/IMPVEL/FGEO')
117c
118
119 DO i=1,nfgeo
120c
121 CALL hm_option_read_key(lsubmodel,
122 . option_id = optid,
123 . option_titr = titr,
124 . keyword2 = key)
125 IF (key(1:4) == 'FGEO') THEN
126 CALL hm_get_intv('rad_spring_part' ,part_id ,is_available,lsubmodel)
127 IF (part_id > 0) THEN
128 jpart = 0
129 DO n=1,npart
130 IF (ipart(4,n) == part_id) jpart = n
131 ENDDO
132 IF (jpart == 0) THEN
133 CALL ancmsg(msgid=1077, msgtype=msgerror,
134 . anmode=aninfo,
135 . i1=optid,
136 . c1=titr,
137 . i2=part_id)
138 ENDIF
139 DO n=1,numelr
140 IF (ipartr(n) == jpart) nimpvel = nimpvel + 1
141 ENDDO
142 ENDIF
143c
144 CALL hm_get_intv('distribution_table_count' ,nnod ,is_available,lsubmodel)
145 nimpvel = nimpvel + nnod
146 ENDIF
147 ENDDO ! DO I=1,NFGEO
148c-----------
149 RETURN
150 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_impvel(nimpvel, igrnod, ipart, ipartr, nfvlag, 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