Now these integrals already involve performing a decomposition in terms of Legendre polynomials, so I thought this should be quite straightforward with ESTER. This is what I tried for the M_l integrals:
star2d s;s.read(argv[1]);matrix rho_coeffs = (s.rho, s.map.leg.P_00);matrix ell_vect = vector(0.0, (double)s.nth - 1.0, s.nth);matrix ells(s.nr, s.nth);for ( int i=0; i < s.nr; i++)ells.setrow(i, ell_vect);// We want weights of r^(\ell + 2)matrix rweights = pow( s.r, 2.0 + ells );// Don't forget the Jacobian factor coming from dr/dzetamatrix multipoles = 2*PI*(s.map.gl.I, rho_coeffs * rweights * s.map.rz);matrix unit_conv = s.units.rho * pow(s.units.r, 3.0 + ell_vect );multipoles *= unit_conv;
multipoles.write();
--
You received this message because you are subscribed to the Google Groups "ester-project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ester-projec...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi Leo,
just forget my last comment. It is true that the spectral decomposition won't be the same for different mappings, but the result of the integral (Ml) should
be the same independently of how the mapping is chosen.
double M(star2d &s, unsigned int ell){if (1 == ell%2)return 0;matrix Pl = s.map.leg.P1_00.row(ell/2) / sqrt(2*ell+1);double Ml = 2.0*PI * (s.map.gl.I,s.rho * Pl * pow(s.r,ell+2.0) * s.map.rz,s.map.leg.I_00)(0);return Ml;};double Mcgs(star2d &s, unsigned int ell){double Ml = M(s, ell);Ml *= s.units.rho * pow(s.units.r, ell+3.0);return Ml;};double Mgeom(star2d &s, unsigned int ell){double Ml = Mcgs(s, ell);Ml *= GRAV / (C_LIGHT * C_LIGHT);return Ml;};double S(star2d &s, unsigned int ell){if (0 == ell%2)return 0;matrix dPl = s.map.leg.P1_10.row((ell-1)/2) / sqrt(2.0*ell+1.0);double Sl = - 4.0*PI / (ell + 1.0) *(s.map.gl.I,s.rho * s.w * sin(s.th)* dPl * pow(s.r,ell+3.0) * s.map.rz,s.map.leg.I_00)(0);return Sl;};double Scgs(star2d &s, unsigned int ell){double Sl = S(s, ell);Sl *= s.units.rho * s.units.Omega * pow(s.units.r, ell+4.0);return Sl;};double Sgeom(star2d &s, unsigned int ell){double Sl = Scgs(s, ell);Sl *= GRAV / pow(C_LIGHT, 3.0);return Sl;};