Changeset 1218 in Sophya for trunk/SophyaLib/Samba/lambdaBuilder.h
- Timestamp:
- Oct 3, 2000, 2:14:14 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/Samba/lambdaBuilder.h
r864 r1218 10 10 namespace SOPHYA { 11 11 12 /*! 13 generate Legendre polynomials : use in two steps : 14 15 a) instanciate Legendre(\f$x\f$, \f$lmax\f$) ; \f$x\f$ is the value for wich Legendre polynomials will be required (usually equal to \f$\cos \theta\f$) and \f$lmax\f$ is the MAXIMUM value of the order of polynomials wich will be required in the following code (all polynomials, from \f$l=0 to lmax\f$, are computed once for all by an iterative formula). 16 17 b) get the value of Legendre polynomial for a particular value of \f$l\f$ by calling the method getPl. 18 */ 12 /*! classe pour les polynomes de legendre*/ 19 13 class Legendre { 20 14 … … 32 26 33 27 private : 34 /*! compute all \f$P_l(x,l_{max})\f$ for \f$l=1,l_{max}\f$ */35 28 void array_init(int_4 lmax); 36 29 … … 42 35 43 36 44 /*!45 This class generate the coefficients :46 \f[47 \lambda_l^m=\sqrt{\frac{2l+1}{4\pi}\frac{(l-m)!}{(l+m)!}}48 P_l^m(\cos{\theta})49 \f]50 where \f$P_l^m\f$ are the associated Legendre polynomials. The above coefficients contain the theta-dependance of spheric harmonics :51 \f[52 Y_{lm}(\cos{\theta})=\lambda_l^m(\cos{\theta}) e^{im\phi}.53 \f]54 55 Each object has a fixed theta (radians), and maximum l and m to be calculated56 (lmax and mmax).57 use the class in two steps :58 a) instanciate LambdaLMBuilder(\f$\theta\f$, \f$lmax\f$, \f$mmax\f$) ; \f$lmax\f$ and \f$mmax\f$ are MAXIMUM values for which \f$\lambda_l^m\f$ will be required in the following code (all coefficients, from \f$l=0 to lmax\f$, are computed once for all by an iterative formula).59 b) get the values of coefficients for particular values of \f$l\f$ and \f$m\f$ by calling the method lamlm.60 */61 37 class LambdaLMBuilder { 62 38 … … 71 47 72 48 private: 73 /*! compute a static array of coefficients independant from theta (common to all instances of the LambdaBuilder Class */74 49 void updateArrayRecurrence(int_4 lmax); 75 50 … … 82 57 protected : 83 58 84 /*! compute static arrays of coefficients independant from theta (common to all instances of the derived classes */85 59 void updateArrayLamNorm(); 86 60 … … 96 70 97 71 98 /*!99 100 This class generates the coefficients :101 \f[102 _{w}\lambda_l^m=-2\sqrt{\frac{2(l-2)!}{(l+2)!}\frac{(2l+1)}{4\pi}\frac{(l-m)!}{(l+m)!}} G^+_{lm}103 \f]104 \f[105 _{x}\lambda_l^m=-2\sqrt{\frac{2(l-2)!}{(l+2)!}\frac{(2l+1)}{4\pi}\frac{(l-m)!}{(l+m)!}}G^-_{lm}106 \f]107 where108 \f[G^+_{lm}(\cos{\theta})=-\left( \frac{l-m^2}{\sin^2{\theta}}+\frac{1}{2}l\left(l-1\right)\right)P_l^m(\cos{\theta})+\left(l+m\right)\frac{\cos{\theta}}{\sin^2{\theta}}P^m_{l-1}(\cos{\theta})109 \f]110 and111 \f[G^-_{lm}(\cos{\theta})=\frac{m}{\sin^2{\theta}}\left(\left(l-1\right)\cos{\theta}P^m_l(\cos{\theta})-\left(l+m\right)P^m_{l-1}(\cos{\theta})\right)112 \f]113 \f$P_l^m\f$ are the associated Legendre polynomials.114 115 The coefficients express the theta-dependance of the \f$W_{lm}(\cos{\theta})\f$ and \f$X_{lm}(\cos{\theta})\f$ functions :116 \f[W_{lm}(\cos{\theta}) = \sqrt{\frac{(l+2)!}{2(l-2)!}}_w\lambda_l^m(\cos{\theta})e^{im\phi}117 \f]118 \f[X_{lm}(\cos{\theta}) = -i\sqrt{\frac{(l+2)!}{2(l-2)!}}_x\lambda_l^m(\cos{\theta})e^{im\phi}119 \f]120 where \f$W_{lm}(\cos{\theta})\f$ and \f$X_{lm}(\cos{\theta})\f$ are defined as :121 122 \f[123 W_{lm}(\cos{\theta})=-\frac{1}{2}\sqrt{\frac{(l+2)!}{(l-2)!}}\left(124 _{+2}Y_l^m(\cos{\theta})+_{-2}Y_l^m(\cos{\theta})\right)125 \f]126 \f[X_{lm}(\cos{\theta})=-\frac{i}{2}\sqrt{\frac{(l+2)!}{(l-2)!}}\left(127 _{+2}Y_l^m(\cos{\theta})-_{-2}Y_l^m(\cos{\theta})\right)128 \f]129 130 */131 72 class LambdaWXBuilder : public LambdaLMBuilder 132 73 { … … 156 97 }; 157 98 158 /*!159 160 This class generates the coefficients161 \f[162 _{\pm}\lambda_l^m=2\sqrt{\frac{(l-2)!}{(l+2)!}\frac{(2l+1)}{4\pi}\frac{(l-m)!}{(l+m)!}}\left( G^+_{lm} \mp G^-_{lm}\right)163 \f]164 where165 \f[G^+_{lm}(\cos{\theta})=-\left( \frac{l-m^2}{\sin^2{\theta}}+\frac{1}{2}l\left(l-1\right)\right)P_l^m(\cos{\theta})+\left(l+m\right)\frac{\cos{\theta}}{\sin^2{\theta}}P^m_{l-1}(\cos{\theta})166 \f]167 and168 \f[G^-_{lm}(\cos{\theta})=\frac{m}{\sin^2{\theta}}\left(\left(l-1\right)\cos{\theta}P^m_l(\cos{\theta})-\left(l+m\right)P^m_{l-1}(\cos{\theta})\right)169 \f]170 and \f$P_l^m\f$ are the associated Legendre polynomials.171 The coefficients express the theta-dependance of the spin-2 spherical harmonics :172 \f[_{\pm2}Y_l^m(\cos{\theta})=_\pm\lambda_l^m(\cos{\theta})e^{im\phi}173 \f]174 */175 99 class LambdaPMBuilder : public LambdaLMBuilder 176 100 {
Note:
See TracChangeset
for help on using the changeset viewer.