OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
hm_submodpart.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_submodpart ../starter/source/groups/hm_submodpart.F
25!||--- called by ------------------------------------------------------
26!|| hm_read_grpart ../starter/source/groups/hm_read_grpart.F
27!|| hm_read_lines ../starter/source/groups/hm_read_lines.F
28!|| hm_read_surf ../starter/source/groups/hm_read_surf.F
29!||--- calls -----------------------------------------------------
30!|| ancmsg ../starter/source/output/message/message.F
31!|| groups_get_elem_list ../starter/source/groups/groups_get_elem_list.F
32!||--- uses -----------------------------------------------------
33!|| hm_option_read_mod ../starter/share/modules1/hm_option_read_mod.F
34!|| message_mod ../starter/share/message_module/message_mod.F
35!|| submodel_mod ../starter/share/modules1/submodel_mod.F
36!||====================================================================
37 SUBROUTINE hm_submodpart(
38 . ISUBMOD ,TAGBUF ,IPART ,ID ,FLAG ,
39 . MESS ,TITR ,TITR1 ,INDX ,NINDX ,
40 . LSUBMODEL)
41C-----------------------------------------------
42C M o d u l e s
43C-----------------------------------------------
44 USE message_mod
45 USE submodel_mod
48C-----------------------------------------------
49C I m p l i c i t T y p e s
50C-----------------------------------------------
51#include "implicit_f.inc"
52C-----------------------------------------------
53C C o m m o n B l o c k s
54C-----------------------------------------------
55#include "scr17_c.inc"
56#include "com04_c.inc"
57C-----------------------------------------------
58C D u m m y A r g u m e n t s
59C-----------------------------------------------
60 INTEGER TAGBUF(*),ISUBMOD(*),IPART(LIPART1,*), INDX(*)
61 INTEGER ID,FLAG,NINDX
62 CHARACTER MESS(*)
63 CHARACTER(LEN=NCHARTITLE) :: TITR,TITR1
64 TYPE(submodel_data) LSUBMODEL(*)
65C-----------------------------------------------
66C L o c a l V a r i a b l e s
67C-----------------------------------------------
68 INTEGER I,J,K,ISU,JREC,PARTID,CUR_SUBMOD,ISELECT,IOK,
69 . ID_SUB,IDU,ID1,UID1,SUB_INDEX,KK,JJ
70 INTEGER TAGS(NSUBMOD)
71 CHARACTER(LEN=NCHARKEY) :: KEY
72 CHARACTER(LEN=NCHARFIELD) :: VERS_IN
73 CHARACTER(LEN=NCHARLINE) :: TITR2,CART
74 LOGICAL IS_AVAILABLE,IS_ENCRYPTED
75 INTEGER,DIMENSION(:),ALLOCATABLE :: LIST_ELEM
76 INTEGER :: NENTITY
77C-----------------------------------------------
78 INTERFACE
79 SUBROUTINE groups_get_elem_list(arg1,arg2,arg3)
80 USE submodel_mod
81 INTEGER,DIMENSION(:),ALLOCATABLE :: arg1
82 INTEGER,INTENT(INOUT) :: arg2
83 TYPE(submodel_data) :: arg3(NSUBMOD)
84 END SUBROUTINE
85 END INTERFACE
86C=======================================================================
87C Tag submodels
88C-------------------------
89 tags(1:nsubmod) = 0
90
91 CALL groups_get_elem_list(list_elem, nentity, lsubmodel)
92 DO kk=1,nentity
93 jj=list_elem(kk)
94 IF(jj > 0)THEN
95 isu=0
96 iselect = 0
97 iok = 0
98 DO k=1,nsubmod
99 cur_submod = k
100 iselect = 0
101 DO WHILE (cur_submod /= 0 .AND. iselect == 0)
102 IF (lsubmodel(cur_submod)%NOSUBMOD == jj) iselect = 1
103 IF (lsubmodel(cur_submod)%NOSUBMOD == -jj) iselect = -1
104 cur_submod = lsubmodel(cur_submod)%IFATHER
105 ENDDO
106 IF (iselect == 1) THEN
107 isu=k
108 tags(k) = tags(k) + 1
109 iok = 1
110 ELSEIF (iselect == -1) THEN
111 isu=k
112 tags(k) = tags(k) - 1
113 iok = 1
114 ENDIF
115 ENDDO
116 IF (iok == 0) CALL ancmsg(msgid=194,
117 . msgtype=msgwarning,
118 . anmode=aninfo,
119 . i1=id,
120 . c1=titr1,
121 . c2=titr,
122 . c3='SUBMODEL',
123 . i2=jj)
124 ENDIF
125 ENDDO
126 IF(ALLOCATED(list_elem))DEALLOCATE (list_elem)
127
128C-------------------------
129C Tag Parts
130C-------------------------
131 DO k=1,nsubmod
132 IF (tags(k) > 1) tags(k) = 1
133 IF (tags(k) < -1) tags(k) = -1
134 ENDDO
135
136C--------------------------------------------------
137C BROWSING MODEL PARTS 1->NPART
138C--------------------------------------------------
139 DO i=1,npart
140 sub_index = ipart(9,i)
141 cur_submod = sub_index
142 IF(tagbuf(i)==0 .AND. cur_submod > 0)THEN
143 IF(tags(cur_submod) /=0 )THEN
144 tagbuf(i)=tags(cur_submod)
145 nindx=nindx+1
146 indx(nindx)=i
147 END IF
148 END IF
149 ENDDO
150C-------------------------
151 RETURN
152 END
subroutine groups_get_elem_list(list_entity, nentity, lsubmodel)
subroutine hm_submodpart(isubmod, tagbuf, ipart, id, flag, mess, titr, titr1, indx, nindx, lsubmodel)
integer, parameter nchartitle
integer, parameter ncharkey
integer, parameter ncharfield
integer, parameter ncharline
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