OpenRadioss
2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
trirap.F
Go to the documentation of this file.
1
Copyright> OpenRadioss
2
Copyright> Copyright (C) 1986-2025 Altair Engineering Inc.
3
Copyright>
4
Copyright> This program is free software: you can redistribute it and/or modify
5
Copyright> it under the terms of the GNU Affero General Public License as published by
6
Copyright> the Free Software Foundation, either version 3 of the License, or
7
Copyright> (at your option) any later version.
8
Copyright>
9
Copyright> This program is distributed in the hope that it will be useful,
10
Copyright> but WITHOUT ANY WARRANTY; without even the implied warranty of
11
Copyright> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
Copyright> GNU Affero General Public License for more details.
13
Copyright>
14
Copyright> You should have received a copy of the GNU Affero General Public License
15
Copyright> along with this program. If not, see <https://www.gnu.org/licenses/>.
16
Copyright>
17
Copyright>
18
Copyright> Commercial Alternative: Altair Radioss Software
19
Copyright>
20
Copyright> As an alternative to this open-source version, Altair also offers Altair Radioss
21
Copyright> software under a commercial license. Contact Altair to discuss further if the
22
Copyright> commercial version may interest you: https://www.altair.com/radioss/.
23
C
24
!||====================================================================
25
!|| trirap ../common_source/tools/sort/trirap.F
26
!||--- calls -----------------------------------------------------
27
!|| iparti ../common_source/tools/sort/iparti.F
28
!|| triins ../common_source/tools/sort/triins.F
29
!||====================================================================
30
SUBROUTINE
trirap
(N,TAB,N2)
31
C-----------------------------------------------
32
C I m p l i c i t T y p e s
33
C-----------------------------------------------
34
#include "implicit_f.inc"
35
C-----------------------------------------------
36
C D u m m y A r g u m e n t s
37
C-----------------------------------------------
38
INTEGER
N, N2
39
C REAL
40
my_real
41
. tab(*)
42
C-----------------------------------------------
43
C L o c a l V a r i a b l e s
44
C-----------------------------------------------
45
INTEGER
SEUIL, SEPAR, I, J, ISUIV, JSUIV, NIVPIL,
PILE
(40)
46
C-----------------------------------------------
47
C E x t e r n a l F u n c t i o n s
48
C-----------------------------------------------
49
INTEGER
IPARTI
50
DATA
seuil/15/
51
C-----------------------------------------------
52
C S o u r c e L i n e s
53
C-----------------------------------------------
54
C
55
nivpil=0
56
IF
(n-1>seuil)
THEN
57
i=1
58
j=n
59
100
CONTINUE
60
separ=iparti(i,j,tab,n2)
61
IF
(separ-i<=j-separ)
THEN
62
isuiv=separ+1
63
jsuiv=j
64
j=separ-1
65
ELSE
66
isuiv=i
67
jsuiv=separ-1
68
i=separ+1
69
ENDIF
70
IF
(jsuiv-isuiv>seuil)
THEN
71
nivpil=nivpil+2
72
pile(nivpil)=isuiv
73
pile(nivpil-1)=jsuiv
74
ENDIF
75
IF
(j-i>seuil)
GO TO
100
76
IF
(nivpil/=0)
THEN
77
i=pile(nivpil)
78
j=pile(nivpil-1)
79
nivpil=nivpil-2
80
GO TO
100
81
ENDIF
82
ENDIF
83
CALL
triins
(n,tab,n2)
84
RETURN
85
END
my_real
#define my_real
Definition
cppsort.cpp:32
triins
subroutine triins(n, tab, n2)
Definition
triins.F:33
trirap
subroutine trirap(n, tab, n2)
Definition
trirap.F:31
common_source
tools
sort
trirap.F
Generated by
1.15.0