diff options
| author | Christoph Berg <christoph.berg@credativ.de> | 2022-08-23 10:23:16 +0200 |
|---|---|---|
| committer | Christoph Berg <christoph.berg@credativ.de> | 2022-08-23 10:23:16 +0200 |
| commit | 2d1068e60bce7ae1fff11623454900e8cee956b1 (patch) | |
| tree | acebe276e30466ef0ab91bc3da5e379bec0d7dc5 /lib/shell.f90 | |
| parent | 43bebfbad6e7ba026bd3d55720c7d9e12a7ef8ef (diff) | |
New upstream version 2.6.0~rc3+repackupstream/2.6.0_rc3+repack
Diffstat (limited to 'lib/shell.f90')
| -rwxr-xr-x | lib/shell.f90 | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/lib/shell.f90 b/lib/shell.f90 index d7365bfc..1e9b4488 100755 --- a/lib/shell.f90 +++ b/lib/shell.f90 @@ -1,27 +1,27 @@ -subroutine shell(n,a) - integer n - real a(n) - integer i,j,inc - real v - - inc=1 -1 inc=3*inc+1 - if(inc.le.n) go to 1 -2 inc=inc/3 - - do i=inc+1,n - v=a(i) - j=i -3 if(a(j-inc).gt.v) then - a(j)=a(j-inc) - j=j-inc - if(j.le.inc) go to 4 - go to 3 - endif -4 a(j)=v - enddo - - if(inc.gt.1) go to 2 - - return -end subroutine shell +subroutine shell(n,a)
+ integer n
+ real a(n)
+ integer i,j,inc
+ real v
+
+ inc=1
+1 inc=3*inc+1
+ if(inc.le.n) go to 1
+2 inc=inc/3
+
+ do i=inc+1,n
+ v=a(i)
+ j=i
+3 if(a(j-inc).gt.v) then
+ a(j)=a(j-inc)
+ j=j-inc
+ if(j.le.inc) go to 4
+ go to 3
+ endif
+4 a(j)=v
+ enddo
+
+ if(inc.gt.1) go to 2
+
+ return
+end subroutine shell
|
