OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
hm_read_inicrack.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_inicrack ../starter/source/initial_conditions/inicrack/hm_read_inicrack.F
25!||--- called by ------------------------------------------------------
26!|| lectur ../starter/source/starter/lectur.F
27!||--- calls -----------------------------------------------------
28!|| hm_get_float_array_index ../starter/source/devtools/hm_reader/hm_get_float_array_index.F
29!|| hm_get_int_array_index ../starter/source/devtools/hm_reader/hm_get_int_array_index.F
30!|| hm_get_intv ../starter/source/devtools/hm_reader/hm_get_intv.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!|| udouble_igr ../starter/source/system/sysfus.F
34!|| usr2sys ../starter/source/system/sysfus.F
35!||--- uses -----------------------------------------------------
36!|| hm_option_read_mod ../starter/share/modules1/hm_option_read_mod.F
37!|| message_mod ../starter/share/message_module/message_mod.F
38!|| submodel_mod ../starter/share/modules1/submodel_mod.F
39!||====================================================================
40 SUBROUTINE hm_read_inicrack(ITABM1 ,INICRACK ,UNITAB ,LSUBMODEL)
41C-----------------------------------------------
42 USE my_alloc_mod
43 USE message_mod
45 USE submodel_mod
47 USE unitab_mod
49C-----------------------------------------------
50C I m p l i c i t T y p e s
51C-----------------------------------------------
52#include "implicit_f.inc"
53C-----------------------------------------------
54C C o m m o n B l o c k s
55C-----------------------------------------------
56#include "com_xfem1.inc"
57C-----------------------------------------------
58C D u m m y A r g u m e n t s
59C-----------------------------------------------
60 INTEGER ITABM1(*)
61 TYPE (INICRACK_) , DIMENSION(NINICRACK) :: INICRACK
62 TYPE (UNIT_TYPE_),INTENT(IN) ::UNITAB
63 TYPE(SUBMODEL_DATA) LSUBMODEL(*)
64C-----------------------------------------------
65C L o c a l V a r i a b l e s
66C-----------------------------------------------
67 INTEGER I,J,ID,NSEG,LIST_INICRACK(NINICRACK)
68 INTEGER J2(2)
69 CHARACTER(LEN=NCHARTITLE) :: TITR
70 CHARACTER MESS*40
72 . bid,ratio
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 USR2SYS
78 DATA mess/'INITIAL CRACK DEFINITION '/
79C-----------------------------------------------
80c INICRACK ! Crack storage array
81C INICRACK(IGS)%ID : INICRACK IDENTIFIER
82C INICRACK(IGS)%NSEG : INICRACK NUMBER OF SEGMENTS
83C INICRACK(IGS)%TITLE : INICRACK title
84C INICRACK(IGS)%RATIO : INICRACK RATIO OF ONE SEGMENT
85C INICRACK(IGS)%SEG : SEGMENTS OF INICRACK
86C=======================================================================
87C
88 ! Variable initialization
89 bid = zero
90C
91 ! Start reading /INICRACK cards
92 CALL hm_option_start('/INICRACK')
93C
94 ! Loop over INICRACK
95 DO i = 1,ninicrack
96C
97 ! Reading title and keys
98 titr = ''
99 CALL hm_option_read_key(lsubmodel,
100 . option_id = id,
101 . option_titr = titr)
102C
103 ! Storing IDs and Title
104 inicrack(i)%ID = id
105 inicrack(i)%TITLE = titr
106C
107 ! Count number of segment
108 CALL hm_get_intv('segmax',nseg,is_available,lsubmodel)
109 inicrack(i)%NSEG = nseg
110C
111 ! Allocation of segment data structure
112 ALLOCATE(inicrack(i)%SEG(nseg))
113 DO j = 1,nseg
114 CALL my_alloc(inicrack(i)%SEG(j)%NODES,2)
115 ENDDO
116C
117 ! Filling the segment data structure
118 DO j = 1,nseg
119 CALL hm_get_int_array_index('node_ID1',j2(1),j,is_available,lsubmodel)
120 CALL hm_get_int_array_index('node_ID2',j2(2),j,is_available,lsubmodel)
121 CALL hm_get_float_array_index('Ratio', ratio,j,is_available,lsubmodel,unitab)
122 inicrack(i)%SEG(j)%NODES(1) = usr2sys(j2(1),itabm1,mess,id)
123 inicrack(i)%SEG(j)%NODES(2) = usr2sys(j2(2),itabm1,mess,id)
124 inicrack(i)%SEG(j)%RATIO = ratio
125 ENDDO
126 ENDDO
127C-------------------------------------
128C Recherche des ID doubles
129C-------------------------------------
130 DO j = 1,ninicrack
131 list_inicrack(j) = inicrack(j)%ID
132 ENDDO
133 CALL udouble_igr(list_inicrack,ninicrack,mess,0,bid)
134C=======================================================================
135c-----------
136c-----------
137 RETURN
138 END
#define my_real
Definition cppsort.cpp:32
subroutine hm_get_float_array_index(name, rval, index, is_available, lsubmodel, unitab)
subroutine hm_get_int_array_index(name, ival, index, is_available, lsubmodel)
subroutine hm_get_intv(name, ival, is_available, lsubmodel)
subroutine hm_option_start(entity_type)
subroutine hm_read_inicrack(itabm1, inicrack, unitab, lsubmodel)
integer, parameter nchartitle
subroutine udouble_igr(list, nlist, mess, ir, rlist)
Definition sysfus.F:1220