FIXME : Add documentation
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in), | dimension (-ntgrid:) | :: | invR | ||
real, | intent(in), | dimension (-ntgrid:, :) | :: | rpgrad | ||
real, | intent(in) | :: | dpsidrp | |||
real, | intent(out), | dimension (-ntgrid:) | :: | bpol | ||
integer, | intent(in) | :: | nth |
pure subroutine B_pol(invR, rpgrad, dpsidrp, bpol, nth)
implicit none
integer, intent (in) :: nth
real, intent(in) :: dpsidrp
real, dimension (-ntgrid:), intent (in) :: invR
real, dimension (-ntgrid:, :), intent (in) :: rpgrad
real, dimension (-ntgrid:) , intent (out) :: bpol
bpol(-nth:nth) = hypot(rpgrad(-nth:nth, 1), rpgrad(-nth:nth, 2)) * invR(-nth:nth) * dpsidrp
end subroutine B_pol