The Elk Code
 
Loading...
Searching...
No Matches
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
6subroutine pades(ns,r,ni,zi,ui,no,zo,uo)
7implicit none
8! arguments
9integer, intent(in) :: ns
10real(8), intent(in) :: r
11integer, intent(in) :: ni
12complex(8), intent(in) :: zi(ni),ui(ni)
13integer, intent(in) :: no
14complex(8), intent(in) :: zo(no)
15complex(8), intent(out) :: uo(no)
16! local variables
17integer i
18real(8), parameter :: pi=3.1415926535897932385d0
19real(8) t1,t2
20complex(8) z1
21! automatic arrays
22complex(8) u1(ni),u2(no)
23if (ns < 1) then
24 write(*,*)
25 write(*,'("Error(pades): ns < 1 : ",I8)') ns
26 write(*,*)
27 stop
28end if
29if (ns == 1) then
30 call pade(ni,zi,ui,no,zo,uo)
31 return
32end if
33uo(1:no)=0.d0
34do 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
41end do
42t1=1.d0/dble(ns)
43uo(1:no)=t1*uo(1:no)
44end 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