OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
hm_get_max_id.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_get_max_id ../starter/source/devtools/hm_reader/hm_get_max_id.F
25!||--- called by ------------------------------------------------------
26!|| starter0 ../starter/source/starter/starter0.F
27!||--- calls -----------------------------------------------------
28!|| hm_option_count ../starter/source/devtools/hm_reader/hm_option_count.F
29!|| hm_option_start ../starter/source/devtools/hm_reader/hm_option_start.F
30!||--- uses -----------------------------------------------------
31!|| message_mod ../starter/share/message_module/message_mod.F
32!|| submodel_mod ../starter/share/modules1/submodel_mod.F
33!||====================================================================
34 SUBROUTINE hm_get_max_id(NAME,IDMAX,LSUBMODEL)
35C-----------------------------------------------
36C ROUTINE DESCRIPTION :
37C ===================
38C REQUEST MAX ID OF A GIVEN KEY MODEL NEUTRAL OBJECT DATABASE USING HM_READER
39C PICK VALUE
40C APPLY AUTOMATICALLY SUBMODEL OFFSETS USING DATATYPE DEFINED IN .cfg FILE
41C IF NO OPTION IN THE MODEL MAX_ID MAX SUBMODEL OFFSET IN THE MODEL
42C-----------------------------------------------
43C DUMMY ARGUMENTS DESCRIPTION:
44C ===================
45C
46C NAME DESCRIPTION
47C
48C NAME FIELD NAME
49C IDMAX MAX ID
50C LSUBMODEL SUBMODEL STRUCTURE
51C============================================================================
52C M o d u l e s
53C-----------------------------------------------
54 USE message_mod
55 USE submodel_mod
57C-----------------------------------------------
58C I m p l i c i t T y p e s
59C-----------------------------------------------
60#include "implicit_f.inc"
61C-----------------------------------------------
62C D u m m y A r g u m e n t s
63C-----------------------------------------------
64C INPUT ARGUMENTS
65 CHARACTER*(*),INTENT(IN)::NAME
66 TYPE(submodel_data),INTENT(IN)::LSUBMODEL(*)
67C OUTPUT ARGUMENTS
68 INTEGER,INTENT(OUT)::IDMAX
69C-----------------------------------------------
70C L o c a l V a r i a b l e s
71C-----------------------------------------------
72 INTEGER I,VALUE_TYPE,SUB_ID,NBOPTION,OPTION_ID,UNIT_ID,SUBMODEL_INDEX,
73 . S_KEYWORD,S_TITR,OFFSET_CATEGORY,MY_POSITION,
74 . OFF_EL,OFF_NOD,OFF_PART,OFF_MAT,OFF_PROP,OFF_DEF
75 CHARACTER(LEN=NCHARLINE) :: KEYWORD,TITR
76C-----------------------------------------------
77 offset_category = 0
78 value_type = 0
79 sub_id = 0
80 keyword=''
81 option_id = 0
82 unit_id = 0
83 submodel_index = 0
84 my_position = 0
85 idmax = 0
86C--------------------------------------------------
87C START OPTION READING
88C--------------------------------------------------
89 CALL hm_option_count(name(1:len_trim(name)), nboption)
90 CALL hm_option_start(name(1:len_trim(name)))
91C--------------------------------------------------
92C READ EACH OCCURRENCE OF OPTION
93C--------------------------------------------------
94 IF(nboption > 0)THEN
95 DO i=1,nboption
96 CALL cpp_option_read(option_id,unit_id,submodel_index,keyword,s_keyword,
97 . titr,s_titr,offset_category,my_position)
98 IF (option_id > idmax) idmax = option_id
99 ENDDO
100 ENDIF
101C--------------------------------------------------
102 RETURN
103C
104 END
subroutine hm_get_max_id(name, idmax, lsubmodel)
subroutine hm_option_count(entity_type, hm_option_number)
subroutine hm_option_start(entity_type)
integer, parameter ncharline