33 #ifndef _LALSIMIMRSPINEOBCOMPUTEAMPPHASEFROMEOMSOLN_C
34 #define _LALSIMIMRSPINEOBCOMPUTEAMPPHASEFROMEOMSOLN_C
39 #include <lal/LALSimInspiral.h>
40 #include <lal/LALSimIMR.h>
81 memcpy (tmpVec, values,
sizeof (tmpVec));
84 r.length =
p.length = 3;
91 s2Vec, sigmaKerr, sigmaStar,
102 for (
UINT4 jj = 0; jj < retLen; jj++)
104 REAL8 yForOmegaCirc[4], cartValues[6], yy[4];
105 for (
INT4 kk = 1; kk <= 4; kk++)
106 yy[kk - 1] = inputdata[kk * retLen + jj];
107 yForOmegaCirc[0] = yy[0];
108 yForOmegaCirc[1] = yy[1];
109 yForOmegaCirc[2] = 0.0;
110 yForOmegaCirc[3] = yy[3];
112 cartValues[0] = yy[0];
115 cartValues[3] = yy[2];
116 cartValues[4] = yy[3] / yy[0];
148 REAL8 hathatk = ham * k;
155 gsl_sf_result lnr1, arg1;
160 REAL8 TlmPhase = arg1.val + 2.0 * hathatk * log (4.0 * k / sqrt (
LAL_E));
161 REAL8 TlmMag = exp (lnr1.val +
LAL_PI * hathatk) * 0.5;
165 REAL8 Slm = (ham * ham - 1.) / (2. * eta) + 1.;
167 REAL8 v = cbrt (omega);
171 REAL8 vh3 = ham * omega;
172 REAL8 vh = cbrt (vh3);
177 REAL8 vPhi2 = (omega * omega / omegaCirc) * cbrt (1.0 / omegaCirc);
215 eulerlogxabs) * v2)))))));
217 REAL8 rholmPwrl = rholm * rholm;
251 REAL8 rOmegaSq = rOmega * rOmega;
259 REAL8 nqcMag = 1. + (
p *
p / rOmegaSq) * (nqcCoeffs->
a1
260 + nqcCoeffs->
a2 /
r +
262 nqcCoeffs->
a3S) / (
r *
264 nqcCoeffs->
a4 / (
r *
r) +
265 nqcCoeffs->
a5 / (
r *
r *
268 REAL8 nqcPhase = nqcCoeffs->
b1 *
p / rOmega +
p *
p *
p / rOmega * (nqcCoeffs->
b2 + nqcCoeffs->
b3 / sqrtR + nqcCoeffs->
b4 /
r);
270 REAL8 hlmMag = hlm0 * legendre;
271 REAL8 hlmPhase = -2.0 * phi;
277 inputdata[(4 + 1) * retLen + jj] =
278 TlmMag * hlmMag * (Slm * rholmPwrl) * nqcMag;
281 inputdata[(4 + 2) * retLen + jj] =
282 (hlmPhase + TlmPhase + nqcPhase + deltalm);
static double GenericSpinAlignedHamiltonianWrapperOptimized(REAL8 *values, SpinEOBParams *params)
static void GenerateAmpPhaseFromEOMSoln(UINT4 retLen, REAL8 *inputdata, SpinEOBParams *seobParams)
UNUSED REAL8 XLALSimIMRSpinEOBHamiltonianOptimized(const REAL8 eta, REAL8Vector *restrict x, REAL8Vector *restrict p, REAL8Vector *restrict s1Vec, REAL8Vector *restrict s2Vec, REAL8Vector *restrict sigmaKerr, REAL8Vector *restrict sigmaStar, INT4 tortoise, SpinEOBHCoeffs *coeffs)
Function to calculate the value of the spinning Hamiltonian for given values of the dynamical variabl...
static REAL8 XLALSimIMRSpinAlignedEOBCalcOmegaOptimized(const REAL8 values[], SpinEOBParams *funcParams)
Function to calculate the value of omega for the spin-aligned EOB waveform.
#define XLAL_CALLGSL(statement)
The coefficients which are used in calculating the non-quasicircular correction to the EOBNRv2 model.
Structure containing all the parameters needed for the EOB waveform.
FacWaveformCoeffs * hCoeffs
NewtonMultipolePrefixes * prefixes
COMPLEX16 values[LALEOB_MAX_MULTIPOLE+1][LALEOB_MAX_MULTIPOLE+1]
Parameters for the spinning EOB model.
EOBNonQCCoeffs * nqcCoeffs