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