The Elk Code
 
Loading...
Searching...
No Matches
wsplint.f90
Go to the documentation of this file.
1
2! Copyright (C) 2019 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 wsplint(n,x,w)
7implicit none
8! arguments
9integer, intent(in) :: n
10real(8), intent(in) :: x(n)
11real(8), intent(out) :: w(n)
12! local variables
13integer i
14! automatic arrays
15real(8) f(9)
16! external functions
17real(8), external :: splint
18if (n <= 9) then
19 do i=1,n
20 f(:)=0.d0
21 f(i)=1.d0
22 w(i)=splint(n,x,f)
23 end do
24 return
25end if
26do i=1,4
27 f(:)=0.d0
28 f(i)=1.d0
29 w(i)=splint(9,x,f)
30end do
31f(:)=0.d0
32f(5)=1.d0
33do i=5,n-4
34 w(i)=splint(9,x(i-4),f)
35end do
36do i=1,4
37 f(:)=0.d0
38 f(i+5)=1.d0
39 w(n-4+i)=splint(9,x(n-8),f)
40end do
41end subroutine
42
real(8) function splint(n, x, f)
Definition splint.f90:7
subroutine wsplint(n, x, w)
Definition wsplint.f90:7