ymy Subroutine

public subroutine ymy(v1, v2, v3, r, ylm, lmax)

This subroutine calculates real spherical harmonics with the normalization : =1 returns also r = length of vector v generate the complex spherical harmonics for the vector v using a stable upward recursion in l. (see notes by m. weinert.)

Note

Converted to real spherical harmonics B. Drittler 1987

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: v1
real(kind=dp), intent(in) :: v2
real(kind=dp), intent(in) :: v3
real(kind=dp), intent(out) :: r
real(kind=dp), intent(out), dimension((2*lmax+1)**2) :: ylm

real spherical harmonic to a given l,m

integer, intent(in) :: lmax

Maximum l component in wave function expansion