OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
lecfill.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!|| lecfill ../starter/source/elements/initia/lecfill.F
25!||--- called by ------------------------------------------------------
26!|| lectur ../starter/source/starter/lectur.F
27!||--- calls -----------------------------------------------------
28!|| ancmsg ../starter/source/output/message/message.F
29!|| hm_get_float_array_index ../starter/source/devtools/hm_reader/hm_get_float_array_index.F
30!|| hm_get_int_array_index ../starter/source/devtools/hm_reader/hm_get_int_array_index.F
31!|| hm_get_intv ../starter/source/devtools/hm_reader/hm_get_intv.F
32!|| hm_option_count ../starter/source/devtools/hm_reader/hm_option_count.F
33!|| hm_option_read_key ../starter/source/devtools/hm_reader/hm_option_read_key.F
34!|| hm_option_start ../starter/source/devtools/hm_reader/hm_option_start.F
35!|| uel2sys ../starter/source/initial_conditions/inista/yctrl.F
36!||--- uses -----------------------------------------------------
37!|| hm_option_read_mod ../starter/share/modules1/hm_option_read_mod.F
38!|| message_mod ../starter/share/message_module/message_mod.F
39!|| submodel_mod ../starter/share/modules1/submodel_mod.F
40!||====================================================================
41 SUBROUTINE lecfill(IXS,FILLSOL,UNITAB,LSUBMODEL)
42C-----------------------------------------------
43C M o d u l e s
44C-----------------------------------------------
45 USE message_mod
46 USE submodel_mod
47 USE unitab_mod
50 use element_mod , only : nixs
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 "com01_c.inc"
59#include "com04_c.inc"
60C-----------------------------------------------
61C D u m m y A r g u m e n t s
62C-----------------------------------------------
63 INTEGER IXS(NIXS,*)
64 my_real fillsol(*)
65 TYPE (UNIT_TYPE_),INTENT(IN) ::UNITAB
66 TYPE(submodel_data) LSUBMODEL(*)
67C-----------------------------------------------
68C L o c a l V a r i a b l e s
69C-----------------------------------------------
70 INTEGER :: INI,J,N,ID_ELEM,IE,UID,SUB_ID,STAT,NB_INIBRI, IFLAGUNIT,IUNIT,NB_ELEMENTS
71 INTEGER :: WORKS(70000)
72 INTEGER, DIMENSION(:), ALLOCATABLE :: KSYSUSRS,INDEXS,ITRIS
73 CHARACTER(LEN=NCHARKEY) :: KEY
74 my_real :: fill
75 LOGICAL :: IS_AVAILABLE
76 INTEGER, EXTERNAL :: UEL2SYS
77C=======================================================================
78 DO n=1,numels
79 fillsol(n)=one
80 END DO
81C------------------------------------
82 is_available = .false.
83!-----------------------------------------
84! pre-reading of FILL for interfaces stiffness computation
85! --- /INIBRI/FILL ---
86!-----------------------------------------
87 CALL hm_option_count('/INIBRI', nb_inibri)
88!
89 IF ( nb_inibri > 0 ) THEN
90!
91 ! Start reading /INIBRI card
92 CALL hm_option_start('/INIBRI')
93!
94 nfilsol=0
95 DO ini=1,nb_inibri
96!
97 CALL hm_option_read_key(lsubmodel,
98 . unit_id = uid,
99 . submodel_id = sub_id,
100 . keyword2 = key)
101!
102 SELECT CASE (key(1:len_trim(key)))
103 CASE ( 'FILL' )
104 nfilsol = 1
105 END SELECT ! SELECT CASE(KEY)
106!
107 ENDDO ! DO INI=1,NB_INIBRI
108C---------
109C---------
110 IF(nfilsol==0)RETURN
111C---------
112C---------
113C------------------------------------
114 ALLOCATE (itris(numels) ,stat=stat)
115 IF (stat /= 0) THEN
116 CALL ancmsg(msgid=268,anmode=aninfo,
117 . msgtype=msgerror,
118 . c1='ITRIS')
119 RETURN
120 END IF
121 ALLOCATE (indexs(2*numels) ,stat=stat)
122 IF (stat /= 0) THEN
123 CALL ancmsg(msgid=268,anmode=aninfo,
124 . msgtype=msgerror,
125 . c1='INDEXS')
126 RETURN
127 END IF
128 ALLOCATE (ksysusrs(2*numels) ,stat=stat)
129 IF (stat /= 0) THEN
130 CALL ancmsg(msgid=268,anmode=aninfo,
131 . msgtype=msgerror,
132 . c1='KSYSUSRS')
133 RETURN
134 END IF
135 itris = 0
136 indexs = 0
137 ksysusrs=0
138!
139 DO ie = 1, numels
140 itris(ie) = ixs(nixs,ie)
141 END DO
142 CALL my_orders(0,works,itris,indexs,numels,1)
143 DO j = 1, numels
144 ie=indexs(j)
145 ksysusrs(j) =ixs(nixs,ie)
146 ksysusrs(numels+j)=ie
147 END DO
148C------------------------------------
149 CALL hm_option_start('/INIBRI')
150 DO ini=1,nb_inibri
151!
152 CALL hm_option_read_key(lsubmodel,
153 . unit_id = uid,
154 . submodel_id = sub_id,
155 . keyword2 = key)
156!
157 iflagunit = 0
158 DO iunit=1,unitab%NUNITS
159 IF (unitab%UNIT_ID(iunit) == uid) THEN
160 iflagunit = 1
161 EXIT
162 ENDIF
163 ENDDO
164 IF (uid/=0.AND.iflagunit == 0) THEN
165 CALL ancmsg(msgid=659,anmode=aninfo,msgtype=msgerror,
166 . i2=uid,i1=sub_id,c1='INIBRI',
167 . c2='INIBRI',c3=' ')
168 ENDIF
169c---------------------------------------
170 SELECT CASE (key(1:len_trim(key)))
171C---------
172 CASE ( 'FILL' )
173C---------
174 nfilsol = 1
175 CALL hm_get_intv('inibri_fill_count',nb_elements,is_available,lsubmodel)
176!
177 DO j=1,nb_elements
178 ! Reading --- ID_ELEM, FILL ---
179 CALL hm_get_int_array_index('brick_ID',id_elem,j,is_available,lsubmodel)
180 CALL hm_get_float_array_index('value',fill,j,is_available,lsubmodel,unitab)
181!
182 ie=uel2sys(id_elem,ksysusrs,numels)
183 IF(ie/=0) fillsol(ie)=fill
184 ENDDO ! DO J=1,NB_ELEMENTS
185C---------
186 END SELECT ! SELECT CASE(KEY)
187!
188 ENDDO ! DO INI=1,NB_INIBRI
189!
190 DEALLOCATE(ksysusrs,indexs,itris)
191!
192 ENDIF ! IF ( NB_INIBRI > 0 ) THEN
193!
194C-----------------------------------------------
195 RETURN
196 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_count(entity_type, hm_option_number)
subroutine hm_option_start(entity_type)
subroutine lecfill(ixs, fillsol, unitab, lsubmodel)
Definition lecfill.F:42
void my_orders(int *mode, int *iwork, int *data, int *index, int *n, int *irecl)
Definition my_orders.c:82
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:895