max_range Function

private function max_range(f) result(range)

Returns the maximum radius in a radfunc's data

Arguments

Type IntentOptional AttributesName
type(radfunc_t), intent(in) :: f

Return Value real(kind=dp)


Contents

Source Code


Source Code

function max_range(f) result(range)
type(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