OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
i23trc.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!|| i23trc ../engine/source/interfaces/intsort/i23trc.F
25!||--- called by ------------------------------------------------------
26!|| i23main_tri ../engine/source/interfaces/intsort/i23main_tri.F
27!||====================================================================
28 SUBROUTINE i23trc(
29 1 NSN ,I_STOK ,CAND_N ,CAND_E,CAND_P ,
30 2 CAND_FX,CAND_FY ,CAND_FZ,CAND_A,IFPEN )
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
46 INTEGER CAND_N(*),CAND_E(*),CAND_A(*), IFPEN(*),
47 . cand_t
48 my_real cand_fx(*),cand_fy(*),cand_fz(*),cand_p(*),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,IGET(I_STOK),IPUT(I_STOK)
53C=======================================================================
54C
55 DO n=1,nsn+3
56 cand_a(n) = 0
57 ENDDO
58C=======================================================================
59C LES NOEUDS DELETES DEVIENNENT NSN+1
60C=======================================================================
61 DO i=1,i_stok
62 IF(ifpen(i)==0)THEN
63 cand_n(i) = nsn+1
64 ENDIF
65 ENDDO
66C=======================================================================
67C CAND_A : DENOMBREMENT DE CHAQUE NOEUD
68C APRES 300 CAND_A[3:NSN+3] : OCCURENCE DES NOEUDS [1:NSN+1]
69C=======================================================================
70 DO i=1,i_stok
71 nn = cand_n(i) + 2
72 cand_a(nn) = cand_a(nn) + 1
73 ENDDO
74C=======================================================================
75C CAND_A : ADRESSE DE CHAQUE NOEUD
76C APRES 400 CAND_A[2:NSN+2] : ADRESSE DES NOEUDS [1:NSN+1]
77C=======================================================================
78 cand_a(1) = 1
79 cand_a(2) = 1
80 DO n=3,nsn+2
81 cand_a(n) = cand_a(n) + cand_a(n-1)
82 ENDDO
83C=======================================================================
84C IPUT(I) ADRESSE OU DOIT ALLER I
85C IGET(K) ADRESSE D'OU DOIT VENIR K
86C APRES 500 CAND_A[1:NSN+1] : ADRESSE DES NOEUDS [1:NSN+1]
87C=======================================================================
88 DO i=1,i_stok
89 nn = cand_n(i) + 1
90 k = cand_a(nn)
91 iput(i) = k
92 iget(k) = i
93 cand_a(nn) = cand_a(nn) + 1
94 ENDDO
95C=======================================================================
96C TRI DE CAND_N CAND_E CAND_P
97C SUR N CROISSANT
98C PERMUTATION 1 PASSE
99C=======================================================================
100 DO k=1,i_stok
101 i = iget(k)
102C
103 cand_t = cand_n(k)
104 cand_n(k) = cand_n(i)
105 cand_n(i) = cand_t
106C
107 cand_t = cand_e(k)
108 cand_e(k) = cand_e(i)
109 cand_e(i) = cand_t
110C------ Fx
111 cand_tf = cand_fx(k)
112 cand_fx(k) = cand_fx(i)
113 cand_fx(i) = cand_tf
114C------ Fy
115 cand_tf = cand_fy(k)
116 cand_fy(k) = cand_fy(i)
117 cand_fy(i) = cand_tf
118C------ Fz
119 cand_tf = cand_fz(k)
120 cand_fz(k) = cand_fz(i)
121 cand_fz(i) = cand_tf
122C
123 cand_tf = cand_p(k)
124 cand_p(k) = cand_p(i)
125 cand_p(i) = cand_tf
126
127 cand_t = ifpen(k)
128 ifpen(k) = ifpen(i)
129 ifpen(i) = cand_t
130C
131 iput(i) = iput(k)
132 iget(iput(i)) = i
133 ENDDO
134C=======================================================================
135C CAND_A[NSN+1] : ADRESSE DE NSN+1
136C=======================================================================
137 i_stok = cand_a(nsn+1) - 1
138 cand_a(nsn+2) = cand_a(nsn+1)
139C
140 RETURN
141 END
#define my_real
Definition cppsort.cpp:32
subroutine i23trc(nsn, i_stok, cand_n, cand_e, cand_p, cand_fx, cand_fy, cand_fz, cand_a, ifpen)
Definition i23trc.F:31