eval_radfunc Function

private function eval_radfunc(f, r, debug) result(val)

Arguments

Type IntentOptional AttributesName
type(radfunc_t), intent(in) :: f
real(kind=dp), intent(in) :: r
logical, intent(in) :: debug

Return Value real(kind=dp)


Contents

Source Code


Source Code

function eval_radfunc(f,r,debug) result(val)
use m_psml_interp, only: interpolator, nq

type(radfunc_t), intent(in) :: f
real(dp), intent(in)      :: r
logical, intent(in)       :: debug

real(dp)                  :: val

real(dp), pointer :: x(:) => null(), y(:) => null()
integer :: npts

x => valGrid(f%grid)
y => f%data(:)

!Note size(y) to cover the case in which the data set uses only
! a first section of the grid
npts = size(y)
call interpolator(nq,x,y,npts,r,val,debug)

end function eval_radfunc