L_SSH_DP Function

private function L_SSH_DP(L, K, THETA, PHI) result(L_SSH)

The angular-momentum-operator field (proportional to the quantum-mechanical orbital angular-momentum operator acting on the scalar harmonic). Simply GRAD_SSH rotated 90 degrees within the tangent plane: .

Warning

Built on the unnormalized ASSOC_LEGENDRE_AND_DERIV -- inherits its stability limit (safe for at any ), not L_SSH_ALL's . See STABILITY_FINDINGS.md at the repo root, Part 2.

Returns: , complex 3-vector.

Arguments

Type IntentOptional Attributes Name
integer(kind=i4), intent(in) :: L

Degree, .

integer(kind=i4), intent(in) :: K

Order, .

real(kind=dp), intent(in) :: THETA

Colatitude in radians, .

real(kind=dp), intent(in) :: PHI

Longitude in radians, .

Return Value complex(kind=dp), DIMENSION(3)


Calls

proc~~l_ssh_dp~~CallsGraph proc~l_ssh_dp L_SSH_DP dcos dcos proc~l_ssh_dp->dcos dsin dsin proc~l_ssh_dp->dsin interface~assoc_legendre_and_deriv ASSOC_LEGENDRE_AND_DERIV proc~l_ssh_dp->interface~assoc_legendre_and_deriv interface~log_fact LOG_FACT proc~l_ssh_dp->interface~log_fact proc~assoc_legendre_and_deriv_dp ASSOC_LEGENDRE_AND_DERIV_DP interface~assoc_legendre_and_deriv->proc~assoc_legendre_and_deriv_dp proc~log_fact_dp LOG_FACT_DP interface~log_fact->proc~log_fact_dp proc~assoc_legendre_and_deriv_dp->interface~log_fact

Called by

proc~~l_ssh_dp~~CalledByGraph proc~l_ssh_dp L_SSH_DP interface~l_ssh L_SSH interface~l_ssh->proc~l_ssh_dp proc~batch_l_ssh_cons BATCH_L_SSH_CONS proc~batch_l_ssh_cons->interface~l_ssh program~main MAIN program~main->proc~batch_l_ssh_cons

Source Code

  FUNCTION L_SSH_DP(L,K,THETA,PHI) RESULT(L_SSH)
  IMPLICIT NONE
  INTEGER(KIND=i4), INTENT(IN) :: L
  INTEGER(KIND=i4), INTENT(IN) :: K
  REAL(KIND=dp), INTENT(IN) :: THETA
  REAL(KIND=dp), INTENT(IN) :: PHI
  REAL(KIND=dp) :: SINTH,NORM,PLK,DPLK
  COMPLEX(KIND=dp) :: EPHIM, YLM
  COMPLEX(KIND=dp), DIMENSION(3) :: L_SSH
  SINTH = 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 * EPHIM
  L_SSH(1) = DCMPLX(0.d0, 0.d0)
  IF (SINTH .NE. 0.d0) THEN
    L_SSH(2) = -j*K*YLM/SINTH
  ELSE
    L_SSH(2) = DCMPLX(0.d0, 0.d0)
  END IF
  L_SSH(3) = -SINTH * NORM * DPLK * EPHIM
  RETURN
  END FUNCTION L_SSH_DP