/[lmdze]/trunk/Sources/filtrez/eigen_sort.f
ViewVC logotype

Annotation of /trunk/Sources/filtrez/eigen_sort.f

Parent Directory Parent Directory | Revision Log Revision Log


Revision 81 - (hide annotations)
Wed Mar 5 14:38:41 2014 UTC (10 years, 3 months ago) by guez
Original Path: trunk/filtrez/eigen_sort.f90
File size: 556 byte(s)
 Converted to free source form files which were still in fixed source
form. The conversion was done using the polish mode of the NAG Fortran
Compiler.

In addition to converting to free source form, the processing of the
files also:

-- indented the code (including comments);

-- set Fortran keywords to uppercase, and set all other identifiers
to lower case;

-- added qualifiers to end statements (for example "end subroutine
conflx", instead of "end");

-- changed the terminating statements of all DO loops so that each
loop ends with an ENDDO statement (instead of a labeled continue).

1 guez 3
2 guez 81 ! $Header: /home/cvsroot/LMDZ4/libf/filtrez/eigen_sort.F,v 1.1.1.1 2004/05/19
3     ! 12:53:09 lmdzadmin Exp $
4 guez 3
5 guez 81 SUBROUTINE eigen_sort(d, v, n, np)
6     INTEGER n, np
7     REAL d(np), v(np, np)
8     INTEGER i, j, k
9     REAL p
10    
11     DO i = 1, n - 1
12     k = i
13     p = d(i)
14     DO j = i + 1, n
15     IF (d(j)>=p) THEN
16     k = j
17     p = d(j)
18     END IF
19     END DO
20    
21     IF (k/=i) THEN
22     d(k) = d(i)
23     d(i) = p
24     DO j = 1, n
25     p = v(j, i)
26     v(j, i) = v(j, k)
27     v(j, k) = p
28     END DO
29     END IF
30     END DO
31    
32     RETURN
33     END SUBROUTINE eigen_sort

  ViewVC Help
Powered by ViewVC 1.1.21