Last change
on this file since 5456 was
2,
checked in by lmdz, 25 years ago
|
Initial revision
|
-
Property svn:eol-style set to
native
-
Property svn:executable set to
*
-
Property svn:keywords set to
Author Date Id Revision
|
File size:
523 bytes
|
Line | |
---|
1 | SUBROUTINE eigen_sort(d,v,n,np) |
---|
2 | INTEGER n,np |
---|
3 | REAL d(np),v(np,np) |
---|
4 | INTEGER i,j,k |
---|
5 | REAL p |
---|
6 | |
---|
7 | DO i=1,n-1 |
---|
8 | k=i |
---|
9 | p=d(i) |
---|
10 | DO j=i+1,n |
---|
11 | IF(d(j).ge.p) THEN |
---|
12 | k=j |
---|
13 | p=d(j) |
---|
14 | ENDIF |
---|
15 | ENDDO |
---|
16 | |
---|
17 | IF(k.ne.i) THEN |
---|
18 | d(k)=d(i) |
---|
19 | d(i)=p |
---|
20 | DO j=1,n |
---|
21 | p=v(j,i) |
---|
22 | v(j,i)=v(j,k) |
---|
23 | v(j,k)=p |
---|
24 | ENDDO |
---|
25 | ENDIF |
---|
26 | ENDDO |
---|
27 | |
---|
28 | RETURN |
---|
29 | END |
---|
Note: See
TracBrowser
for help on using the repository browser.