40 #include <gsl/gsl_sf_gamma.h>
44 #ifndef _LALSIMIMRNEWTONIANMULTIPOLE_C
45 #define _LALSIMIMRNEWTONIANMULTIPOLE_C
94 for (
m = 1;
m <=
l;
m++ )
122 INT4 epsilon = (
l +
m) % 2;
134 if ( (
l == 4 &&
m == 4) || (
l == 2 &&
m == 1 ) )
136 *multipole =
params->prefixes->values[
l][
m] * pow(
x, (
REAL8)(
l+epsilon)/2.0 - 1.0)/
r;
140 *multipole =
params->prefixes->values[
l][
m] * pow(
x, (
REAL8)(
l+epsilon)/2.0);
167 INT4 epsilon = (
l +
m) % 2;
178 *multipole =
params->prefixes->values[
l][
m] * pow(
x, (
REAL8)(
l+epsilon)/2.0) ;
205 INT4 epsilon = (
l +
m) % 2;
216 *multipole =
params->prefixes->values[
l][
m] * pow(
x, (
REAL8)(
l+epsilon)/2.0) ;
238 INT4 absM = abs(
m );
240 if ( l < 0 || absM > (
INT4)
l )
254 *
y = legendre * cos(
m * phi);
255 *
y += I * legendre * sin(
m * phi);
258 if (
m < 0 && absM % 2 == 1 )
281 INT4 absM = abs(
m );
283 if ( l < 0 || absM > (
INT4)
l )
301 if (
m < 0 && absM % 2 == 1 )
325 if ( m < 0 || m >
l )
443 legendre = - 135135.;
455 legendre = - 118.125;
477 legendre = - 67567.5;
489 legendre = - 19.6875;
503 legendre *= sqrt( (
REAL8)(2*
l+1)*gsl_sf_fact(
l-
m ) / (4.*
LAL_PI*gsl_sf_fact(
l+
m)));
538 epsilon = (
l +
m ) % 2;
543 eta = m1*m2/(totalMass*totalMass);
545 if ( abs(
m % 2 ) == 0 )
563 if ( m1 != m2 || sign == 1 )
565 c = pow( x2,
l + epsilon - 1 ) + sign * pow(x1,
l + epsilon - 1 );
596 mult1 = 8.0 *
LAL_PI / gsl_sf_doublefact(2u*
l + 1u);
603 else if ( epsilon == 1 )
610 mult1 = 16.*
LAL_PI / gsl_sf_doublefact( 2u*
l + 1u );
612 mult2 = (
REAL8)( (2*
l + 1) * (
l+2) * (
l*
l -
m*
m) );
613 mult2 /= (
REAL8)( (2*
l - 1) * (
l+1) *
l * (
l-1) );
625 *prefix = n * eta *
c;
#define LALEOB_MAX_MULTIPOLE
File containing most of the structures and prototypes which are used in the generation of the EOBNRv2...
static int CalculateThisMultipolePrefix(COMPLEX16 *prefix, const REAL8 m1, const REAL8 m2, const INT4 l, const INT4 m)
Function to calculate the numerical prefix in the Newtonian amplitude.
static REAL8 XLALAssociatedLegendreXIsZero(const int l, const int m)
Function to calculate associated Legendre function used by the spherical harmonics function.
static UNUSED int XLALSimIMREOBComputeNewtonMultipolePrefixes(NewtonMultipolePrefixes *prefix, const REAL8 m1, const REAL8 m2)
Function which computes the various coefficients in the Newtonian multipole.
static UNUSED int XLALSimIMRSpinEOBCalculateNewtonianMultipole(COMPLEX16 *multipole, REAL8 x, UNUSED REAL8 r, REAL8 phi, UINT4 l, INT4 m, EOBParams *params)
This function calculates the Newtonian multipole part of the factorized waveform for the SEOBNRv1 mod...
static UNUSED int XLALSimIMREOBCalculateNewtonianMultipole(COMPLEX16 *multipole, REAL8 x, UNUSED REAL8 r, REAL8 phi, UINT4 l, INT4 m, EOBParams *params)
This function calculates the Newtonian multipole part of the factorized waveform for the EOBNRv2 mode...
static UNUSED int XLALSimIMRSpinEOBFluxCalculateNewtonianMultipole(COMPLEX16 *multipole, REAL8 x, UNUSED REAL8 r, UNUSED REAL8 phi, UINT4 l, INT4 m, EOBParams *params)
This function calculates the Newtonian multipole part of the factorized waveform for the SEOBNRv1 mod...
static int XLALAbsScalarSphHarmThetaPiBy2(COMPLEX16 *y, INT4 l, INT4 m)
static int XLALScalarSphHarmThetaPiBy2(COMPLEX16 *y, INT4 l, INT4 m, REAL8 phi)
#define XLAL_ERROR_REAL8(...)
int XLALPrintError(const char *fmt,...) _LAL_GCC_PRINTF_FORMAT_(1
#define XLAL_IS_REAL8_FAIL_NAN(val)
Structure containing all the parameters needed for the EOB waveform.
Structure containing all the terms of the Newtonian multipole which are constant over the course of t...
COMPLEX16 values[LALEOB_MAX_MULTIPOLE+1][LALEOB_MAX_MULTIPOLE+1]