OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
hm_convert_fail_tab.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_convert_fail_tab ../starter/source/devtools/hm_reader/hm_convert_fail_tab.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_read_key ../starter/source/devtools/hm_reader/hm_option_read_key.F
30!|| hm_option_start ../starter/source/devtools/hm_reader/hm_option_start.F
31!||--- uses -----------------------------------------------------
32!|| hm_option_read_mod ../starter/share/modules1/hm_option_read_mod.F
33!|| message_mod ../starter/share/message_module/message_mod.F
34!|| submodel_mod ../starter/share/modules1/submodel_mod.F
35!||====================================================================
36 SUBROUTINE hm_convert_fail_tab(TABLE_MAXID,FAIL_MAXID,LSUBMODEL)
37C-----------------------------------------------
38C ROUTINE DESCRIPTION :
39C ===================
40C ROUTINE TO CONVERT /FAIL/TAB -> /FAIL/TAB1 + /TABLE
41C-----------------------------------------------
42C DUMMY ARGUMENTS DESCRIPTION:
43C ===================
44C
45C NAME DESCRIPTION
46C
47C TABLE_MAXID MAX ID TABLE
48C FAIL_MAXID MAX ID FAIL
49C LSUBMODEL SUBMODEL STRUCTURE
50C============================================================================
51C M o d u l e s
52C-----------------------------------------------
53 USE message_mod
54 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 INTEGER,INTENT(IN)::TABLE_MAXID,FAIL_MAXID
66 TYPE(submodel_data),INTENT(IN)::LSUBMODEL(*)
67C-----------------------------------------------
68C L o c a l V a r i a b l e s
69C-----------------------------------------------
70 INTEGER I,NBFAILTAB,OFFSET,ISFIRST,IS_CONVERT,CPT
71 CHARACTER(LEN=NCHARLINE) :: KEY
72C-----------------------------------------------
73 is_convert = 0
74 CALL hm_option_count('/FAIL/TAB', nbfailtab)
75 CALL hm_option_start('/FAIL/TAB')
76 DO i=1,nbfailtab
77 isfirst = 1
78 key = ''
79 CALL hm_option_read_key(lsubmodel,
80 . keyword2 = key )
81 offset = 0
82 IF ((key /= 'TAB1').AND.(key /= 'TAB2')) THEN
83 CALL cpp_convert_fail_tab(table_maxid,fail_maxid,offset,isfirst)
84 is_convert = 1
85 ENDIF
86 ENDDO
87C--------------------------------------------------
88C DELETE /FAIL/TAB ENTITIES
89C--------------------------------------------------
90 cpt = 0
91 IF (is_convert == 1) THEN
92 DO i=1,nbfailtab
93 CALL hm_option_start('/FAIL/TAB')
94 key = ''
95 CALL hm_option_read_key(lsubmodel,
96 . keyword2 = key )
97 cpt = 1
98 DO WHILE (((key == 'TAB1').OR.(key == 'TAB2')) .AND. cpt < nbfailtab)
99 key = ''
100 CALL hm_option_read_key(lsubmodel,
101 . keyword2 = key )
102 cpt = cpt + 1
103 ENDDO
104 IF ((key /= 'TAB1').AND.(key /= 'TAB2')) CALL cpp_delete_entity()
105 ENDDO
106 ENDIF
107C--------------------------------------------------
108 RETURN
109C
110 END
111
subroutine hm_convert_fail_tab(table_maxid, fail_maxid, lsubmodel)
subroutine hm_option_count(entity_type, hm_option_number)
subroutine hm_option_start(entity_type)
integer, parameter ncharline