FIXME : Add documentation
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in), | dimension (0:,0:) | :: | gjk | ||
real, | intent(in), | dimension (:,0:) | :: | legdre | ||
real, | intent(in), | dimension (:,0:) | :: | chebyshv | ||
real, | intent(out), | dimension (:,:) | :: | h | ||
real, | intent(in) | :: | phi | |||
integer, | intent(in) | :: | ig | |||
integer, | intent(in) | :: | is |
subroutine get_H (gjk, legdre, chebyshv, h, phi, ig, is)
use species, only: spec
implicit none
real, dimension (0:,0:), intent (in) :: gjk
real, dimension (:,0:), intent (in) :: legdre, chebyshv
real, intent (in) :: phi
real, dimension (:,:), intent (out) :: h
integer, intent (in) :: ig, is
integer :: ix, ij, ik
h = 0.0
do ix = 1, size(h,1)
do ik = 0, size(gjk,2)-1
do ij = 0, size(gjk,1)-1
h(ix,:) = h(ix,:) + chebyshv(:,ik)*legdre(ix,ij)*gjk(ij,ik)
end do
end do
end do
! F_1s = H_1s - Z_s*e*Phi_1/T_s
! want Z_s*e*Phi/T_s, but phi from neo is e*Phi/Tnorm
! at center (GS2) radius, this is a simple multiply by Z_s * Tref/Ts
! note that this assumes the Tref used in NEO is the same as that used in GS2
h = h - spec(is)%zt*phi
end subroutine get_H