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 of the routine:
39C ===================
40C sort on N of CAND_N CAND_E CAND_F
41C and elimination of rebounding nodes
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,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 NODES 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 NODE C APRES 300 CAND_A[3:NSN+3] : occurrence DES NODES [1:NSN+1]
68C=======================================================================
69 DO i=1,i_stok
70 nn = cand_n(i) + 2
71 cand_a(nn) = cand_a(nn) + 1
72 ENDDO
73C=======================================================================
74C CAND_A : ADDRESS DE CHAQUE NODE C APRES 400 CAND_A[2:NSN+2] : ADDRESS DES NODES [1:NSN+1]
75C=======================================================================
76 cand_a(1) = 1
77 cand_a(2) = 1
78 DO n=3,nsn+2
79 cand_a(n) = cand_a(n) + cand_a(n-1)
80 ENDDO
81C=======================================================================
82C IPUT(I) ADDRESS OU DOIT ALLER I
83C IGET(K) ADDRESS D'OU DOIT VENIR K
84C APRES 500 CAND_A[1:NSN+1] : ADDRESS DES NODES [1:NSN+1]
85C=======================================================================
86 DO i=1,i_stok
87 nn = cand_n(i) + 1
88 k = cand_a(nn)
89 iput(i) = k
90 iget(k) = i
91 cand_a(nn) = cand_a(nn) + 1
92 ENDDO
93C=======================================================================
94C TRI DE CAND_N CAND_E CAND_P
95C on increasing N
96C PERMUTATION 1 PASSE
97C=======================================================================
98 DO k=1,i_stok
99 i = iget(k)
100C
101 cand_t = cand_n(k)
102 cand_n(k) = cand_n(i)
103 cand_n(i) = cand_t
104C
105 cand_t = cand_e(k)
106 cand_e(k) = cand_e(i)
107 cand_e(i) = cand_t
108C------ Fx
109 cand_tf = cand_fx(k)
110 cand_fx(k) = cand_fx(i)
111 cand_fx(i) = cand_tf
112C------ Fy
113 cand_tf = cand_fy(k)
114 cand_fy(k) = cand_fy(i)
115 cand_fy(i) = cand_tf
116C------ Fz
117 cand_tf = cand_fz(k)
118 cand_fz(k) = cand_fz(i)
119 cand_fz(i) = cand_tf
120C
121 cand_tf = cand_p(k)
122 cand_p(k) = cand_p(i)
123 cand_p(i) = cand_tf
124
125 cand_t = ifpen(k)
126 ifpen(k) = ifpen(i)
127 ifpen(i) = cand_t
128C
129 iput(i) = iput(k)
130 iget(iput(i)) = i
131 ENDDO
132C=======================================================================
133C CAND_A[NSN+1] : ADDRESS DE NSN+1
134C=======================================================================
135 i_stok = cand_a(nsn+1) - 1
136 cand_a(nsn+2) = cand_a(nsn+1)
137C
138 RETURN
139 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