OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
trirap.F File Reference
#include "implicit_f.inc"

Go to the source code of this file.

Functions/Subroutines

subroutine trirap (n, tab, n2)

Function/Subroutine Documentation

◆ trirap()

subroutine trirap ( integer n,
tab,
integer n2 )

Definition at line 30 of file trirap.F.

31C-----------------------------------------------
32C I m p l i c i t T y p e s
33C-----------------------------------------------
34#include "implicit_f.inc"
35C-----------------------------------------------
36C D u m m y A r g u m e n t s
37C-----------------------------------------------
38 INTEGER N, N2
39C REAL
41 . tab(*)
42C-----------------------------------------------
43C L o c a l V a r i a b l e s
44C-----------------------------------------------
45 INTEGER SEUIL, SEPAR, I, J, ISUIV, JSUIV, NIVPIL, PILE(40)
46C-----------------------------------------------
47C E x t e r n a l F u n c t i o n s
48C-----------------------------------------------
49 INTEGER IPARTI
50 DATA seuil/15/
51C-----------------------------------------------
52C S o u r c e L i n e s
53C-----------------------------------------------
54C
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
#define my_real
Definition cppsort.cpp:32
integer function iparti(i, j, tab, n2)
Definition iparti.F:32
subroutine triins(n, tab, n2)
Definition triins.F:33