OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
i10trc.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!|| i10trc ../engine/source/interfaces/intsort/i10trc.F
25!||--- called by ------------------------------------------------------
26!|| i10main_tri ../engine/source/interfaces/intsort/i10main_tri.F
27!||====================================================================
28 SUBROUTINE i10trc(
29 1 NSN ,I_STOK ,CAND_N ,CAND_E,CAND_F,
30 2 CAND_A,NUM_IMP ,IND_IMP)
31C-----------------------------------------------
32C I m p l i c i t T y p e s
33C-----------------------------------------------
34#include "implicit_f.inc"
35C-----------------------------------------------
36C C o m m o n B l o c k s
37C-----------------------------------------------
38C ROLE DE LA ROUTINE:
39C ===================
40C TRI sur N de CAND_N CAND_E CAND_F
41C et elimination des noeuds en rebond
42C-----------------------------------------------
43C D u m m y A r g u m e n t s
44C-----------------------------------------------
45 INTEGER I_STOK,NSN,NUM_IMP,IND_IMP(*)
46 INTEGER CAND_N(*),CAND_E(*),CAND_A(*),
47 . cand_t
48 my_real cand_f(6,*),cand_tf
49C-----------------------------------------------
50C L o c a l V a r i a b l e s
51C-----------------------------------------------
52 INTEGER I, I_ST0,N,NN,K,
53 . IGET(I_STOK), IPUT(I_STOK)
54C=======================================================================
55C
56 DO n=1,nsn+3
57 cand_a(n) = 0
58 ENDDO
59C=======================================================================
60C LES NOEUDS DELETES DEVIENNENT NSN+1
61C=======================================================================
62 IF(num_imp>0)THEN
63 DO i=1,i_stok
64 iput(i)=0
65 END DO
66 DO n=1,num_imp
67 i= ind_imp(n)
68 iput(i)=1
69 END DO
70 DO i=1,i_stok
71 IF(cand_f(1,i)==zero.AND.iput(i)==0)THEN
72 cand_n(i) = nsn+1
73 ENDIF
74 END DO
75 ELSE
76 DO i=1,i_stok
77 IF(cand_f(1,i)==zero .OR. cand_n(i) == 0)THEN
78 cand_n(i) = nsn+1
79 ENDIF
80 ENDDO
81 ENDIF !IF(NUM_IMP>0)
82C=======================================================================
83C CAND_A : DENOMBREMENT DE CHAQUE NOEUD
84C APRES 300 CAND_A[3:NSN+3] : OCCURENCE DES NOEUDS [1:NSN+1]
85C=======================================================================
86 DO i=1,i_stok
87 nn = cand_n(i) + 2
88 cand_a(nn) = cand_a(nn) + 1
89 ENDDO
90C=======================================================================
91C CAND_A : ADRESSE DE CHAQUE NOEUD
92C APRES 400 CAND_A[2:NSN+2] : ADRESSE DES NOEUDS [1:NSN+1]
93C=======================================================================
94 cand_a(1) = 1
95 cand_a(2) = 1
96 DO n=3,nsn+2
97 cand_a(n) = cand_a(n) + cand_a(n-1)
98 ENDDO
99C=======================================================================
100C IPUT(I) ADRESSE OU DOIT ALLER I
101C IGET(K) ADRESSE D'OU DOIT VENIR K
102C APRES 500 CAND_A[1:NSN+1] : ADRESSE DES NOEUDS [1:NSN+1]
103C=======================================================================
104 DO i=1,i_stok
105 nn = cand_n(i) + 1
106 k = cand_a(nn)
107 iput(i) = k
108 iget(k) = i
109 cand_a(nn) = cand_a(nn) + 1
110 ENDDO
111C=======================================================================
112C TRI DE CAND_N CAND_E CAND_F
113C SUR N CROISSANT
114C PERMUTATION 1 PASSE
115C=======================================================================
116 DO n=1,num_imp
117 k=ind_imp(n)
118 i = iput(k)
119 ind_imp(n)=i
120 END DO
121C
122 DO k=1,i_stok
123 i = iget(k)
124C
125 cand_t = cand_n(k)
126 cand_n(k) = cand_n(i)
127 cand_n(i) = cand_t
128C
129 cand_t = cand_e(k)
130 cand_e(k) = cand_e(i)
131 cand_e(i) = cand_t
132C
133 cand_tf = cand_f(1,k)
134 cand_f(1,k) = cand_f(1,i)
135 cand_f(1,i) = cand_tf
136C
137 cand_tf = cand_f(2,k)
138 cand_f(2,k) = cand_f(2,i)
139 cand_f(2,i) = cand_tf
140C
141 cand_tf = cand_f(3,k)
142 cand_f(3,k) = cand_f(3,i)
143 cand_f(3,i) = cand_tf
144C
145 cand_tf = cand_f(4,k)
146 cand_f(4,k) = cand_f(4,i)
147 cand_f(4,i) = cand_tf
148C
149 cand_tf = cand_f(5,k)
150 cand_f(5,k) = cand_f(5,i)
151 cand_f(5,i) = cand_tf
152C
153 cand_tf = cand_f(6,k)
154 cand_f(6,k) = cand_f(6,i)
155 cand_f(6,i) = cand_tf
156C
157 iput(i) = iput(k)
158 iget(iput(i)) = i
159 ENDDO
160C=======================================================================
161C CAND_A[NSN+1] : ADRESSE DE NSN+1
162C=======================================================================
163 i_stok = cand_a(nsn+1) - 1
164 cand_a(nsn+2) = cand_a(nsn+1)
165C
166
167 RETURN
168 END
#define my_real
Definition cppsort.cpp:32
subroutine i10trc(nsn, i_stok, cand_n, cand_e, cand_f, cand_a, num_imp, ind_imp)
Definition i10trc.F:31