OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
hm_read_alebcs.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_alebcs ../starter/source/constraints/ale/hm_read_alebcs.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_get_string ../starter/source/devtools/hm_reader/hm_get_string.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!|| ngr2usr ../starter/source/system/nintrr.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_alebcs(ICODE ,ISKEW ,ITAB ,ITABM1 ,IKINE ,
41 . IGRNOD ,IBCSLAG ,LAG_NCF ,LAG_NKF ,LAG_NHF,
42 . IKINE1LAG ,ISKN ,NOM_OPT, LSUBMODEL)
43C-----------------------------------------------
44C D e s c r i p t i o n
45C-----------------------------------------------
46C This subroutine is reading /ALE/BCS options in user input file
47C-----------------------------------------------
48C M o d u l e s
49C-----------------------------------------------
50 USE message_mod
51 USE groupdef_mod
52 USE submodel_mod
55C-----------------------------------------------
56C I m p l i c i t T y p e s
57C-----------------------------------------------
58#include "implicit_f.inc"
59C-----------------------------------------------
60C C o m m o n B l o c k s
61C-----------------------------------------------
62#include "scr17_c.inc"
63#include "com04_c.inc"
64#include "param_c.inc"
65#include "scr10_c.inc"
66C-----------------------------------------------
67C D u m m y A r g u m e n t s
68C-----------------------------------------------
69 INTEGER,INTENT(IN) :: ITAB(NUMNOD), ITABM1(*), IKINE(*), IBCSLAG(5,*), LAG_NCF,LAG_NKF,LAG_NHF,IKINE1LAG(*),ISKN(LISKN,*)
70 INTEGER,INTENT(IN) :: NOM_OPT(LNOPT1,*)
71 INTEGER,INTENt(INOUT) :: ISKEW(*),ICODE(NUMNOD)
72 TYPE(submodel_data), INTENT(IN), DIMENSION(NSUBMOD) :: LSUBMODEL
73C-----------------------------------------------
74 TYPE (GROUP_) ,TARGET, DIMENSION(NGRNOD) :: IGRNOD
75C-----------------------------------------------
76C L o c a l V a r i a b l e s
77C-----------------------------------------------
78 INTEGER I, IC, NC, N, IS, IC1, IC2,
79 . NOSYS, J,IGR,IGRS,IBCALE,J6(6),
80 . ic0, ic01, ic02, ic03, ic04, id ,ilagm,
81 . chkcod,nod,sub_index
82 INTEGER IUN
83 CHARACTER MESS*40,CODE*7
84 CHARACTER(LEN=NCHARFIELD) :: STRING
85 CHARACTER(LEN=NCHARTITLE) :: TITR
86 LOGICAL :: IS_AVAILABLE, FOUND
87C-----------------------------------------------
88C E x t e r n a l F u n c t i o n s
89C-----------------------------------------------
90 INTEGER USR2SYS,MY_OR,CHECK_NEW,NGR2USR
91 INTEGER, DIMENSION(:), POINTER :: INGR2USR
92C-----------------------------------------------
93C D a t a
94C-----------------------------------------------
95 DATA iun/1/
96 DATA mess/'BOUNDARY CONDITIONS '/
97C-----------------------------------------------
98C S o u r c e L i n e s
99C-----------------------------------------------
100 is_available = .false.
101 sub_index = 0
102
103 CALL hm_option_start('/ALE/BCS')
104
105 DO i = 1, nalebcs
106 CALL hm_option_read_key(lsubmodel,
107 . option_id = id,
108 . option_titr = titr,
109 . submodel_index = sub_index)
110 CALL hm_get_string('dofstring', string, ncharfield, is_available)
111 CALL hm_get_intv('inputsystem', is, is_available, lsubmodel)
112 IF(is == 0 .AND. sub_index /= 0 ) is = lsubmodel(sub_index)%SKEW
113 CALL hm_get_intv('entityid', igr, is_available, lsubmodel)
114 found = .false.
115 DO j = 0, numskw + nsubmod
116 IF(is == iskn(4, j + 1)) THEN
117 is = j + 1
118 found = .true.
119 EXIT
120 ENDIF
121 ENDDO
122 IF (.NOT. found) THEN
123 CALL ancmsg(msgid = 137, anmode = aninfo, msgtype = msgerror,
124 . c1 = 'BOUNDARY CONDITION', c2 = 'BOUNDARY CONDITION',
125 . i2 = is, i1 = n, c3 = titr)
126 ENDIF
127! CODE = STRING(LFIELD - 6 : LFIELD)
128 code = string(1:7)
129 READ(code,fmt='(3I1,1X,3I1)') j6
130 chkcod = 0
131 DO j=1,6
132 IF (j6(j) >= 2) THEN
133 chkcod = 1
134 ENDIF
135 ENDDO
136 IF (chkcod == 1) THEN
137 CALL ancmsg(msgid = 1051, anmode = aninfo_blind,msgtype = msgerror, i1 = id, c1 = titr, c2 = code)
138 ENDIF
139 ic1=j6(1)*4 +j6(2)*2 +j6(3)
140 ic2=j6(4)*4 +j6(5)*2 +j6(6)
141 ic=ic1*8+ic2
142 ingr2usr => igrnod(1:ngrnod)%ID
143 igrs=ngr2usr(igr,ingr2usr,ngrnod)
144 IF(igrs /= 0)THEN
145 DO j=1,igrnod(igrs)%NENTITY
146 nosys=igrnod(igrs)%ENTITY(j)
147 icode(nosys)=my_or(ic,icode(nosys))
148 IF(iskew(nosys) == -1.OR.iskew(nosys) == is)THEN
149 check_new=is
150 ELSE
151 CALL ancmsg(msgid=148,anmode=aninfo,msgtype=msgerror,i1=itab(nosys),prmod=msg_cumu)
152 ENDIF
153 iskew(nosys)=check_new
154 ENDDO
155 CALL ancmsg(msgid=148,anmode=aninfo,msgtype=msgerror,i1=id,c1=titr,prmod=msg_print)
156 ELSE
157 CALL ancmsg(msgid=678,anmode=aninfo,msgtype=msgerror,i1=id,i2=igr,c1=titr)
158 ENDIF
159 ENDDO
160C-----------------------------------------------
161 RETURN
162 END
subroutine hm_get_intv(name, ival, is_available, lsubmodel)
subroutine hm_get_string(name, sval, size, is_available)
subroutine hm_option_start(entity_type)
subroutine hm_read_alebcs(icode, iskew, itab, itabm1, ikine, igrnod, ibcslag, lag_ncf, lag_nkf, lag_nhf, ikine1lag, iskn, nom_opt, lsubmodel)
initmumps id
integer, parameter nchartitle
integer, parameter ncharfield
integer nsubmod
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
program starter
Definition starter.F:39