OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
hm_admlist.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_admlist ../starter/source/groups/hm_admlist.F
25!||--- called by ------------------------------------------------------
26!|| hm_lecgre ../starter/source/groups/hm_lecgre.F
27!||--- calls -----------------------------------------------------
28!|| ancmsg ../starter/source/output/message/message.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!||--- 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_admlist(NIX ,IX ,NUMEL ,IPARTEL ,IPART ,
37 . KELTREE ,ELTREE ,KSONTREE,NSONTREE,KLEVTREE,
38 . NLIST ,MESS ,IX1 ,IX2 ,INDEX ,
39 . KK ,NEL ,NELT ,ELKEY ,ID ,
40 . TITR ,LSUBMODEL)
41C-----------------------------------------------
42C M o d u l e s
43C-----------------------------------------------
44 USE message_mod
46 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 G l o b a l P a r a m e t e r s
54C-----------------------------------------------
55#include "remesh_c.inc"
56#include "scr17_c.inc"
57C-----------------------------------------------
58C D u m m y A r g u m e n t s
59C-----------------------------------------------
60 INTEGER NIX, IX(NIX,*), NUMEL, IPARTEL(*), IPART(LIPART1,*),
61 . KELTREE, ELTREE(KELTREE,*), KSONTREE, NSONTREE, KLEVTREE,
62 . NLIST, IX1(*), IX2(*), INDEX(*), KK, NEL, NELT(*)
63 CHARACTER MESS*40
64 INTEGER ID
65 CHARACTER(LEN=NCHARTITLE) :: TITR
66 CHARACTER ELKEY*4
67 TYPE(submodel_data) LSUBMODEL(NSUBMOD)
68C-----------------------------------------------
69C L o c a l V a r i a b l e s
70C-----------------------------------------------
71 INTEGER LIST(NLIST), IL, JJ, NENTITY, II
72 INTEGER I, J, NOLD, K, IWORK(70000)
73 INTEGER LELT, LELT1, LELT2, NE, KE, IP, LEVEL, NLEV,
74 . LELTMP, NELTMP(NSONTREE**(LEVELMAX+1))
75 LOGICAL IS_AVAILABLE, IS_ENCRYPTED
76C-----------------------------------------------
77C CONSTITUTION DE LIST
78C-----------------------------------------------
79 il =0
80
81 CALL hm_get_intv ('idsmax' ,nentity,is_available,lsubmodel)
82
83 DO ii=1,nentity
84 CALL hm_get_int_array_index ('ids' ,jj ,ii,is_available,lsubmodel)
85 IF(jj /= 0)THEN
86 il = il + 1
87 list(il)=jj
88 ENDIF
89 enddo! NEXT II
90
91C-----------------------
92C TRI DE LIST EN ORDRE CROISSANT
93C AVEC SUPPRESSION DES No DOUBLES
94C-----------------------
95 CALL my_orders(0,iwork,list,index,nlist,1)
96 DO i=1,nlist
97 index(nlist+i) = list(index(i))
98 ENDDO
99 k=1
100 nold = index(nlist+1)
101 DO i=1,nlist
102 IF(nold/=index(nlist+i))k=k+1
103 list(k) = index(nlist+i)
104 nold = index(nlist+i)
105 ENDDO
106 nel=k
107C-----------------------
108C TRI DE IX EN ORDRE CROISSANT si KK = 0
109C-----------------------
110 IF(kk==0)THEN
111 DO i=1,numel
112 ix2(i) = ix(nix,i)
113 ENDDO
114 CALL my_orders(0,iwork,ix2,index,numel,1)
115 DO i=1,numel
116 ix1(i) = ix2(index(i))
117 ENDDO
118 DO i=1,numel
119 ix2(i) = index(i)
120 ENDDO
121 ENDIF
122C-----------------------
123C RECHERCHE DES ELEMENTS DE LIST() DANS IX()
124C ALGO < NLIST+NUMEL
125C-----------------------
126 i=1
127 j=1
128 DO i=1,nel
129 DO WHILE(list(i)>ix1(j).AND.j<numel)
130 j=j+1
131 ENDDO
132 IF(list(i)==ix1(j))THEN
133 list(i)=ix2(j)
134 ELSE
135 CALL ancmsg(msgid=70,
136 . msgtype=msgerror,
137 . anmode=aninfo,
138 . c1=elkey,
139 . i1=id,
140 . c2=trim(titr),
141 . i2=list(i))
142 RETURN
143 ENDIF
144 ENDDO
145C-----------------------
146C
147C-----------------------
148 lelt = 0
149C
150 DO i=1,nel
151 ne=list(i)
152
153 ip=ipartel(ne)
154 nlev =ipart(10,ip)
155
156 IF(nlev==0)THEN
157 lelt=lelt+1
158 nelt(lelt)=ne
159 ELSE
160
161 leltmp =1
162 neltmp(1)=ne
163
164 level =eltree(klevtree,ne)
165 IF(level < 0) level=-(level+1)
166
167 lelt1=0
168 lelt2=leltmp
169
170 DO WHILE(level < nlev)
171 DO ke=lelt1+1,lelt2
172 DO k=0,nsontree-1
173 leltmp=leltmp+1
174 neltmp(leltmp)=eltree(ksontree,neltmp(ke))+k
175 END DO
176 END DO
177
178 lelt1=lelt2
179 lelt2=leltmp
180
181 level=level+1
182 END DO
183
184 DO ke=lelt1+1,lelt2
185 lelt=lelt+1
186 nelt(lelt)=neltmp(ke)
187 END DO
188
189 END IF
190 END DO
191C
192 nel=lelt
193C-----------------------
194 RETURN
195 END
subroutine hm_admlist(nix, ix, numel, ipartel, ipart, keltree, eltree, ksontree, nsontree, klevtree, nlist, mess, ix1, ix2, index, kk, nel, nelt, elkey, id, titr, lsubmodel)
Definition hm_admlist.F:41
subroutine hm_get_int_array_index(name, ival, index, is_available, lsubmodel)
subroutine hm_get_intv(name, ival, is_available, lsubmodel)
void my_orders(int *mode, int *iwork, int *data, int *index, int *n, int *irecl)
Definition my_orders.c:82
integer, parameter nchartitle
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