The Elk Code
pades.f90
Go to the documentation of this file.
1 
2 ! Copyright (C) 2017 J. K. Dewhurst, S. Sharma and E. K. U. Gross.
3 ! This file is distributed under the terms of the GNU General Public License.
4 ! See the file COPYING for license details.
5 
6 subroutine pades(ns,r,ni,zi,ui,no,zo,uo)
7 implicit none
8 ! arguments
9 integer, intent(in) :: ns
10 real(8), intent(in) :: r
11 integer, intent(in) :: ni
12 complex(8), intent(in) :: zi(ni),ui(ni)
13 integer, intent(in) :: no
14 complex(8), intent(in) :: zo(no)
15 complex(8), intent(out) :: uo(no)
16 ! local variables
17 integer i
18 real(8), parameter :: pi=3.1415926535897932385d0
19 real(8) t1,t2
20 complex(8) z1
21 ! automatic arrays
22 complex(8) u1(ni),u2(no)
23 if (ns < 1) then
24  write(*,*)
25  write(*,'("Error(pades): ns < 1 : ",I8)') ns
26  write(*,*)
27  stop
28 end if
29 if (ns == 1) then
30  call pade(ni,zi,ui,no,zo,uo)
31  return
32 end if
33 uo(1:no)=0.d0
34 do i=1,ns
35  t1=dble(i-1)/dble(ns)
36  t2=6.d0*pi*t1
37  z1=r*t1*cmplx(cos(t2),sin(t2),8)
38  u1(1:ni)=ui(1:ni)+z1
39  call pade(ni,zi,u1,no,zo,u2)
40  uo(1:no)=uo(1:no)+u2(1:no)-z1
41 end do
42 t1=1.d0/dble(ns)
43 uo(1:no)=t1*uo(1:no)
44 end subroutine
45 
pure subroutine pade(ni, zi, ui, no, zo, uo)
Definition: pade.f90:10
subroutine pades(ns, r, ni, zi, ui, no, zo, uo)
Definition: pades.f90:7