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