private function VSH_POL_DN_DP(L, K, THETA, PHI) result(VSH_POL_DN)
The member of the standard (total-angular-momentum
coupled) vector spherical harmonic basis, built from the polar basis by
i.e. PVSH_RAD and PVSH_POL rotated together by an
-dependent angle (see VSH_POL_UP for the companion
rotation). Zero for (no ).
Warning
At this does not reproduce the classic 2:1
magnetic-dipole radial:horizontal ratio -- VSH_POL_DN(1,0,...) is
proportional to , a 1:-1 ratio.
VSH_POL_UP is the one that reproduces the dipole pattern.
Warning
Built on the unnormalized ASSOC_LEGENDRE_AND_DERIV --
inherits its stability limit (safe for at any
), notVSH_POL_DN_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_DN_DP(L,K,THETA,PHI)RESULT(VSH_POL_DN)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_DNVSH_POL_DN(1)=DCMPLX(0.d0,0.d0)VSH_POL_DN(2)=DCMPLX(0.d0,0.d0)VSH_POL_DN(3)=DCMPLX(0.d0,0.d0)IF(L.GT.0)THENSINTH=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*EPHIMGTH=-SINTH*NORM*DPLK*EPHIMIF(SINTH.NE.0.d0)THENGPH=j*K*YLM/SINTHELSEGPH=DCMPLX(0.d0,0.d0)END IFSC1=DSQRT(DBLE(L)/(2*L+1.d0))SC23=1.d0/DSQRT((2*L+1.d0)*DBLE(L))VSH_POL_DN(1)=SC1*YLMVSH_POL_DN(2)=SC23*GTHVSH_POL_DN(3)=SC23*GPHEND IF RETURN END FUNCTION VSH_POL_DN_DP