V3FIT
Main Page
Related Pages
Modules
Modules List
Module Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions/Subroutines
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
y
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Data Types List
Data Types List
Data Types
Class Hierarchy
Data Fields
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
y
z
~
Functions/Subroutines
a
b
c
d
e
f
g
i
l
m
n
p
r
s
t
u
v
x
y
~
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
y
z
Files
File List
File Members
All
b
c
g
i
l
m
n
p
t
v
w
Functions/Subroutines
b
c
g
i
m
p
t
v
w
Variables
Enumerations
Macros
•
All
Classes
Namespaces
Files
Functions
Variables
Enumerations
Macros
Pages
VMEC2000
Sources
Splines
sort_data.f
1
SUBROUTINE
sort_data (x, index_array, n)
2
USE
stel_kinds
3
IMPLICIT NONE
4
C-----------------------------------------------
5
C D u m m y A r g u m e n t s
6
c-----------------------------------------------
7
INTEGER
n
8
INTEGER
,
DIMENSION(n)
:: index_array
9
REAL
(rprec),
DIMENSION(n)
:: x
10
C-----------------------------------------------
11
C L o c a l V a r i a b l e s
12
C-----------------------------------------------
13
INTEGER
:: i, j
14
INTEGER
,
DIMENSION(1)
:: isamax
15
REAL
(rprec),
DIMENSION(n)
:: dumx
16
C-----------------------------------------------
17
!
18
! RETURNS INDEX(I) ARRAY, SO THAT X(INDEX(I)) IS SORTED, I=1,N
19
! RETURNS Xin(INDEX(I)) = Xout(I)
20
!
21
22
DO
i = n, 1, -1
23
isamax = maxloc(abs(x))
24
j = isamax(1)
25
dumx(i) = x(j)
26
x(j) = 0.
27
index_array(i) = j
28
END DO
29
30
x = dumx
31
32
END SUBROUTINE
sort_data
Generated on Thu Mar 5 2020 15:49:27 for V3FIT by
1.8.17