OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
nboxlist.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!|| nboxlst ../starter/source/model/box/nboxlist.F
25!||--- called by ------------------------------------------------------
26!|| hm_read_box ../starter/source/model/box/hm_read_box.F
27!||--- calls -----------------------------------------------------
28!|| ancmsg ../starter/source/output/message/message.F
29!||--- uses -----------------------------------------------------
30!|| message_mod ../starter/share/message_module/message_mod.F
31!||====================================================================
32 INTEGER FUNCTION nboxlst(LIST ,NLIST ,IBOXTMP,NBBOX ,
33 . IX1 ,IX2 ,INDEX ,KK ,ID ,TITR)
34C-----------------------------------------------
35C M o d u l e s
36C-----------------------------------------------
37 USE message_mod
39C FONCTION DONNE N0 SYSTEME D'UNE LISTE DE BOXES USER
40C-----------------------------------------------
41C I m p l i c i t T y p e s
42C-----------------------------------------------
43#include "implicit_f.inc"
44C-----------------------------------------------
45C C o m m o n B l o c k s
46C-----------------------------------------------
47C-----------------------------------------------
48C D u m m y A r g u m e n t s
49C-----------------------------------------------
50 INTEGER nlist,kk,nbbox,id
51 INTEGER list(nlist),index(nbbox*3),iboxtmp(nbbox),ix1(nbbox),ix2(nbbox)
52 CHARACTER(LEN=NCHARTITLE) ,INTENT(IN) :: titr
53C-----------------------------------------------
54C L o c a l V a r i a b l e s
55C-----------------------------------------------
56 INTEGER i,j,nbox,nold,k,k0,k1,kall,id0,
57 . iwork(70000),isign(nlist),isign1(nlist),
58 . signold,fac(nlist+1),indxold,fac1(nlist+1),
59 . facx,list1(nlist),idel(nlist),idbl(nlist)
60 CHARACTER box*3
61C-----------------------
62C TRI DE LIST EN ORDRE CROISSANT
63C-----------------------
64 DO i=1,nlist
65 isign(i) = sign(1,list(i))
66 list(i) = abs(list(i))
67 ENDDO
68C---
69 CALL my_orders(0,iwork,list,index,nlist,1)
70 DO i=1,nlist
71 index(nlist+i) = list(index(i))
72 isign1(i)= isign(index(i))
73 ENDDO
74C---
75 DO i=1,nlist
76 list(i) = index(nlist+i)
77 isign(i) = isign1(i)
78 ENDDO
79C---
80 nbox = nlist
81C-----------------------
82C TRI DE IBOX() EN ORDRE CROISSANT si KK = 0
83C-----------------------
84 IF (kk == 0) THEN
85 DO i=1,nbbox
86 ix2(i) = iboxtmp(i)
87 ENDDO
88 CALL my_orders(0,iwork,ix2,index,nbbox,1)
89 DO i=1,nbbox
90 ix1(i) = ix2(index(i))
91 ENDDO
92 DO i=1,nbbox
93 ix2(i) = index(i)
94 ENDDO
95 ENDIF
96C-----------------------
97C RECHERCHE DES ELEMENTS DE LIST() DANS IBOX()
98C ALGO < NLIST+NBBOX
99C-----------------------
100 i=1
101 j=1
102 DO i=1,nbox
103 DO WHILE(abs(list(i)) > ix1(j).AND. j < nbbox)
104 j=j+1
105 ENDDO
106 IF (abs(list(i)) == ix1(j))THEN
107 list(i) = ix2(j)*isign(i)
108 ELSE
109 CALL ancmsg(msgid=795,
110 . msgtype=msgerror,
111 . anmode=aninfo,
112 . i1=id,
113 . c1=titr,
114 . i2=list(i))
115 nboxlst=i-1
116 RETURN
117 ENDIF
118 ENDDO
119C---
120 nboxlst = nbox
121C---
122 RETURN
123 END
initmumps id
void my_orders(int *mode, int *iwork, int *data, int *index, int *n, int *irecl)
Definition my_orders.c:82
integer, parameter nchartitle
integer function nboxlst(list, nlist, iboxtmp, nbbox, ix1, ix2, index, kk, id, titr)
Definition nboxlist.F:34
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