Returns the maximum radius in a radfunc's data
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ps_radfunc_t), | intent(in) | :: | f |
function max_range(f) result(range)
type(ps_radfunc_t), intent(in) :: f
real(dp) :: range
real(dp), pointer :: a(:)
integer :: npts_data
a => valGrid(f%grid)
!
if (global_use_effective_range) then
! We use the effective end_of_range
range = f%rcut_eff
else
! Use the nominal range
! This covers the case in which the data set uses only
! a first section of the grid
npts_data = size(f%data)
range = a(npts_data)
endif
end function max_range