#ifndef YLM_H #define YLM_H #include #include using namespace std ; /** * Multiple of a Spherical Harmonics. * Edmonds, Angular momentum in quantum mechanics, 1957, * (2.5.29): c* (-1)^m*sqrt{ (2l+1)/(4pi) (l-m)!/(l+m)!} P_l^m(cos theta) exp(i*m*phi) * P_l^m = (1-x^2)^(m/2) d^m P_l(x)/dx^m * int(dOmega conj(Y (l1,m1))*Y(l2,m2) = delta(l1,l2)delta(m1,m2) where dOmega=sin (theta)dtheta dphi * (2.5.18): P_l^(-m)(x)=(-)^m (l-m)!/(l+m)! P_l^m(x) * int dOmega Y(l1,m1) Y(l2,m2) Y(l3,m3) = sqrt{(2l1+1)(2l2+1)(2l3+1)/4/pi} j3(l1 l2 l3, 0 0 0) *j3(l1 l2 l3, m1 m2 m3) * * Parity w.r.t image of the argument, r->-r, phi->phi+180 deg, theta->180-theta * exp(i*m*phi)->exp(i*m*phi)*exp(i*m*pi)=exp(i*m*phi)*(-)^m. * cos(theta)-> -cos(theta), P_l^m(cos theta)-> (-)^(l-m) P_l^m(cos theta) since it * has parity l-m (see B.72 of the Messiah appendix) * full contribution of r->-r cancellation of the two (-)^m and remains (-)^l * This parity is the same as in Messiah (B.91), Messiah uses the same additional * factor (-)^m in his definition. * */ class Ylm { public: /** Angular momentum quantum number. l = 0,1,2,... */ int l ; /** Magnetic quantum number, -l<=m<= l. */ int m ; /** Any additional factor or coefficient. The implicit sqrt() is an extra factor, not part of this number. * Although the individual Ylm is defined as a complex number field which does not specifiy any * additional degree of freedom, this extra parameter is useful to represent vectors of Ylm's * (linear combinations) with mixed expansion coeffients> */ complex c ; #if 0 Ylm() ; #endif Ylm(const int orbl, const int magm, const complex coef=1.) ; #if 0 Ylm conj() const ; #endif Ylm & operator*= (const complex & fact) ; protected: private: } ; Ylm operator*(const complex & fact, const Ylm & right) ; Ylm conj(const Ylm & arg) ; vector operator*(const Ylm & left, const Ylm & right) ; bool operator== (const Ylm & first, const Ylm & secnd) ; bool operator!= (const Ylm & first, const Ylm & secnd) ; ostream & operator<<(ostream &os, const Ylm & someylm) ; #endif /* YLM_H */