OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
i25sors.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!|| i25sors ../starter/source/interfaces/inter3d1/i25sors.F
25!||--- called by ------------------------------------------------------
26!|| inint3 ../starter/source/interfaces/inter3d1/inint3.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 SUBROUTINE i25sors(NSN ,NRTS, ITAB, ILEV ,IPARI,
33 . INTBUF_TAB)
34C
35 USE message_mod
36 USE intbufdef_mod
37C-----------------------------------------------
38C I m p l i c i t T y p e s
39C-----------------------------------------------
40#include "implicit_f.inc"
41C-----------------------------------------------
42C C o m m o n B l o c k s
43C-----------------------------------------------
44#include "param_c.inc"
45C-----------------------------------------------
46C D u m m y A r g u m e n t s
47C-----------------------------------------------
48 INTEGER NSN, NRTS, ITAB(*), ILEV, IPARI(NPARI)
49 TYPE(intbuf_struct_) INTBUF_TAB
50C-----------------------------------------------
51C L o c a l V a r i a b l e s
52C-----------------------------------------------
53 INTEGER J, N, M, K, NISUB, NISUBS
54 INTEGER IERROR,WORK(70000)
55 INTEGER, DIMENSION(:),ALLOCATABLE :: ITRI, INDEX, LISUBS, INFLG_SUBS, ADDSUBS
56 INTEGER, DIMENSION(:,:),ALLOCATABLE :: ISAV
57C-----------------------------------------------
58 ALLOCATE (itri(nsn),isav(3,nsn),index(2*nsn),stat=ierror)
59 IF (ierror /= 0)
60 . CALL ancmsg(msgid=268,anmode=aninfo,
61 . msgtype=msgerror,
62 . c1='SORTING SECONDARY NODES IN INTERFACE TYPE25')
63C--------------------------------------------------------------
64C Tri nds SECONDARYs vs ID
65C--------------------------------------------------------------
66C
67 DO n=1,nsn
68 itri(n) =itab(intbuf_tab%NSV(n))
69 isav(1,n)=intbuf_tab%NSV(n)
70 IF(ilev==2) isav(2,n)=intbuf_tab%NBINFLG(n)
71 END DO
72C
73 nisub = ipari(36)
74 nisubs =ipari(37)
75 IF(nisub > 0)THEN
76 ALLOCATE (lisubs(nisubs),inflg_subs(nisubs),addsubs(nsn+1),stat=ierror)
77 IF (ierror /= 0)
78 . CALL ancmsg(msgid=268,anmode=aninfo,
79 . msgtype=msgerror,
80 . c1='SORTING SECONDARY NODES IN INTERFACE TYPE25')
81 addsubs(1:nsn+1) =intbuf_tab%ADDSUBS(1:nsn+1)
82 lisubs(1:nisubs) =intbuf_tab%LISUBS(1:nisubs)
83 inflg_subs(1:nisubs)=intbuf_tab%INFLG_SUBS(1:nisubs)
84 END IF
85C
86 CALL my_orders(0,work,itri,index,nsn,1)
87C
88 DO n=1,nsn
89 intbuf_tab%NSV(n) =isav(1,index(n))
90 IF(ilev==2) intbuf_tab%NBINFLG(n)=isav(2,index(n))
91 END DO
92C
93 IF(nisub > 0)THEN
94 intbuf_tab%ADDSUBS(1)=1
95 DO n=1,nsn
96 m=index(n)
97 intbuf_tab%ADDSUBS(n+1)= intbuf_tab%ADDSUBS(n)
98 . + addsubs(m+1) - addsubs(m)
99 DO k=addsubs(m),addsubs(m+1)-1
100 intbuf_tab%LISUBS(intbuf_tab%ADDSUBS(n)+k-addsubs(m)) =lisubs(k)
101 intbuf_tab%INFLG_SUBS(intbuf_tab%ADDSUBS(n)+k-addsubs(m))=inflg_subs(k)
102 END DO
103 END DO
104 END IF
105C
106 DO n=1,nrts
107 DO j=1,4
108 m = intbuf_tab%IRECTS(4*(n-1)+j)
109 IF(m/=0) intbuf_tab%IRECTS(4*(n-1)+j)=isav(1,index(m))
110 END DO
111 END DO
112C
113 DEALLOCATE (itri,isav,index)
114 IF(nisub > 0)DEALLOCATE (lisubs,inflg_subs,addsubs)
115C--------------------------------------------------------------
116 RETURN
117 END
subroutine i25sors(nsn, nrts, itab, ilev, ipari, intbuf_tab)
Definition i25sors.F:34
void my_orders(int *mode, int *iwork, int *data, int *index, int *n, int *irecl)
Definition my_orders.c:82
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