Get radial derivative at center of 3 points
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in), | dimension (:) | :: | h | ||
real, | intent(in), | dimension (:) | :: | rad | ||
integer, | intent(in) | :: | ir | |||
real, | intent(out) | :: | dh |
subroutine get_radgrad (h, rad, ir, dh)
implicit none
real, dimension (:), intent (in) :: h, rad
integer, intent (in) :: ir
real, intent (out) :: dh
dh = (h(ir+1)-h(ir-1))/(rad(ir+1)-rad(ir-1))
end subroutine get_radgrad