41 integer :: no_l_channels
46 real(real64),
allocatable :: rofi(:)
47 real(real64),
allocatable :: vps(:,:)
48 real(real64),
allocatable :: rphi(:,:)
50 logical :: core_corrections
51 real(real64),
allocatable :: chcore(:)
52 real(real64),
allocatable,
private :: d1chcore(:)
53 real(real64),
allocatable,
private :: d2chcore(:)
60 integer,
intent(in) :: unit
61 type(ps_cpi_file_t),
intent(inout) :: psf
63 integer :: i, l, ios, idummy
64 real(real64) :: a, b, c, d
68 read(unit, *) psf%zval, psf%no_l_channels
74 read(unit, *) psf%nr, psf%a
79 safe_allocate(psf%rofi (1:psf%nr))
80 safe_allocate(psf%vps (1:psf%nr, 1:psf%no_l_channels))
81 safe_allocate(psf%rphi (1:psf%nr, 1:psf%no_l_channels))
83 do l = 1, psf%no_l_channels
84 if (l /= 1)
read(unit, *)
87 read(unit, *) idummy, psf%rofi(i), psf%rphi(i, l), psf%vps(i, l)
92 read(unit, *, iostat=ios) a, b, c, d
94 psf%core_corrections = .
true.
96 safe_allocate(psf%chcore (1:psf%nr))
97 safe_allocate(psf%d1chcore(1:psf%nr))
98 safe_allocate(psf%d2chcore(1:psf%nr))
105 read(unit, *) a, psf%chcore(i), psf%d1chcore(i), psf%d2chcore(i)
108 psf%core_corrections = .false.
113 do l = 1, psf%no_l_channels
119 if (psf%core_corrections)
then
123 psf%chcore(:) = psf%chcore(:) * psf%rofi(:)**2
143 safe_deallocate_a(psf%rofi)
144 safe_deallocate_a(psf%vps)
145 safe_deallocate_a(psf%rphi)
147 if (psf%core_corrections)
then
148 safe_deallocate_a(psf%chcore)
149 safe_deallocate_a(psf%d1chcore)
150 safe_deallocate_a(psf%d2chcore)
real(real64), parameter, public m_two
real(real64), parameter, public m_zero
subroutine, public ps_cpi_file_read(unit, psf)
subroutine, public ps_cpi_file_end(psf)
real(real64) function, public first_point_extrapolate(x, y, high_order)
First, the contents of the file.