private function VSH_POL_UP_DP(L, K, THETA, PHI) result(VSH_POL_UP)
The member of the standard (total-angular-momentum
coupled) vector spherical harmonic basis, built from the polar basis by
the companion rotation to VSH_POL_DN's . Unlike
VSH_POL_DN this is well-defined (nonzero radial part) at
, since still exists when .
Note
At , VSH_POL_UP(1,0,...) is proportional to
-- the classic 2:1 magnetic-dipole
radial:horizontal ratio.
Warning
Built on the unnormalized ASSOC_LEGENDRE_AND_DERIV --
inherits its stability limit (safe for at any
), notVSH_POL_UP_ALL's . See
STABILITY_FINDINGS.md at the repo root, Part 2.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
Source Code
FUNCTION VSH_POL_UP_DP(L,K,THETA,PHI)RESULT(VSH_POL_UP)IMPLICIT NONEINTEGER(KIND=i4),INTENT(IN)::LINTEGER(KIND=i4),INTENT(IN)::KREAL(KIND=dp),INTENT(IN)::THETAREAL(KIND=dp),INTENT(IN)::PHIREAL(KIND=dp)::SINTH,NORM,PLK,DPLK,SC1,SC23COMPLEX(KIND=dp)::EPHIM,YLM,GTH,GPHCOMPLEX(KIND=dp),DIMENSION(3)::VSH_POL_UPSINTH=DSIN(THETA)NORM=DSQRT((2.d0*L+1.d0)/(4.d0*pi))*&EXP(0.5_dp*(LOG_FACT(L-K)-LOG_FACT(L+K)))CALL ASSOC_LEGENDRE_AND_DERIV(L,K,DCOS(THETA),PLK,DPLK)EPHIM=EXP(j*K*PHI)YLM=NORM*PLK*EPHIMSC1=-DSQRT((L+1.d0)/(2*L+1.d0))VSH_POL_UP(1)=SC1*YLMIF(L.GT.0)THENGTH=-SINTH*NORM*DPLK*EPHIMIF(SINTH.NE.0.d0)THENGPH=j*K*YLM/SINTHELSEGPH=DCMPLX(0.d0,0.d0)END IFSC23=1.d0/DSQRT((2*L+1.d0)*(L+1.d0))VSH_POL_UP(2)=SC23*GTHVSH_POL_UP(3)=SC23*GPHELSEVSH_POL_UP(2)=DCMPLX(0.d0,0.d0)VSH_POL_UP(3)=DCMPLX(0.d0,0.d0)END IF RETURN END FUNCTION VSH_POL_UP_DP