Loading [MathJax]/extensions/TeX/AMSsymbols.js
LALSimulation 6.2.0.1-5e288d3
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
PNCoefficients.c
Go to the documentation of this file.
1/*
2 * Copyright (C) 2014 Andrew Lundgren, 2017 Riccardo Sturani
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with with program; see the file COPYING. If not, write to the
16 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
17 * MA 02110-1301 USA
18 */
19
20#include <stdlib.h>
21#include <math.h>
22#include <lal/LALSimInspiral.h>
23#include <lal/Units.h>
24#include <lal/XLALError.h>
25#include <lal/LALSimInspiralTestGRParams.h>
27
28#define EPSILON 1.e-11
29
30static int compare_value(
31 REAL8 val1,
32 REAL8 val2)
33{
34 if (fabs(val1 - val2) > EPSILON)
35 {
36 return 1;
37 }
38 else
39 {
40 return 0;
41 }
42}
43
44static int compare(
45 REAL8 val1,
46 REAL8 val2,
47 int v_order,
48 int log_order)
49{
50 if (fabs(val1 - val2) > EPSILON)
51 {
52 if (log_order == 0) { fprintf(stderr, "FAILED at %.1f PN order: %.11f versus %.11f\n", 0.5*v_order, val1, val2); }
53 else { fprintf(stderr, "FAILED at %.1f PN order, in log^%u term: %.11f versus %.11f\n", 0.5*v_order, log_order, val1, val2); }
54 return 1;
55 }
56 else
57 {
58 return 0;
59 }
60}
61
65{
66 int ret = 0;
67
68 ret += compare(s1->v[0], s2->v[0], 0, 0);
69 ret += compare(s1->v[2], s2->v[2], 2, 0);
70 ret += compare(s1->v[3], s2->v[3], 3, 0);
71 ret += compare(s1->v[4], s2->v[4], 4, 0);
72 ret += compare(s1->v[5], s2->v[5], 5, 0);
73 ret += compare(s1->v[6], s2->v[6], 6, 0);
74 ret += compare(s1->vlogv[6], s2->vlogv[6], 6, 1);
75 ret += compare(s1->v[7], s2->v[7], 7, 0);
76
77 return ret;
78}
79
80/* *
81 * The factor to go from dtdv to phasing.
82 * Derived from the stationary phase approximation,
83 * Psi(f) = 2 Phi_orb - 2 Pi f t,
84 * where f = v^3 / Pi,
85 * Phi_orb = int v^3 dt/dv dv,
86 * t = int dt / dv dv
87 * */
88static REAL8 pfac(int n) { return 40./(n-5.)/(n-8.); }
89
90/* The factor to go from a dt/dv log term to non-log phasing */
91static REAL8 logpfac(int n)
92{
93 REAL8 temp = (n-5.)*(n-8.);
94 return 40.*(13.-2.*n)/temp/temp;
95}
96
98 PNPhasingSeries *phasing,
99 PNPhasingSeries *dtdv)
100{
101 int ret = 0;
102
103 ret += compare(phasing->v[2], pfac(2)*dtdv->v[2], 2, 0);
104 ret += compare(phasing->v[3], pfac(3)*dtdv->v[3], 3, 0);
105 ret += compare(phasing->v[4], pfac(4)*dtdv->v[4], 4, 0);
106 /* The 2.5 pN term is anomalous - it integrates to a log term */
107 ret += compare(phasing->v[5], (-40./9.)*dtdv->v[5], 5, 0);
108 ret += compare(phasing->vlogv[5], (-40./3.)*dtdv->v[5], 5, 1);
109 /* The 3 pN term has an extra piece coming from the log */
110 ret += compare(phasing->v[6], pfac(6)*dtdv->v[6] + logpfac(6)*dtdv->vlogv[6], 6, 0);
111 ret += compare(phasing->vlogv[6], pfac(6)*dtdv->vlogv[6], 6, 1);
112 ret += compare(phasing->v[7], pfac(7)*dtdv->v[7], 7, 0);
113
114 return ret;
115}
116
117/* Helper function to calculate sum of flux[j]*dtdv[k-j] from 1 to k-1 */
118static REAL8 sum(
119 REAL8 *arr1,
120 REAL8 *arr2,
121 int k)
122{
123 REAL8 accum = 0.;
124 for (int j=1; j < k; j++)
125 {
126 accum += arr1[j]*arr2[k-j];
127 }
128 return accum;
129}
130
131/* Helper function to calculate sum of (1+j/2)energy[j]*wdot[k-j] from 1 to k-1 */
132static REAL8 sumE(
133 REAL8 *ene,
134 REAL8 *wdot,
135 int k)
136{
137 REAL8 accum = 0.;
138 for (int j=1; j < k; j++)
139 {
140 accum += (1.+((double) j)/2.)*ene[j]*wdot[k-j];
141 }
142 return accum;
143}
144
145/* The TaylorT2/F2 waveform is defined by
146 * dt/dv = trunc[ -(dE/dv) / flux(v) ]
147 * where trunc[ ] means truncate the expression at the desired PN order.
148 * There's a recursive expression for dt/dv at each order. Write
149 * dt/dv = T_0 ( 1 + \sum_{i=1}^n T_i v^i )
150 * e(v) = E_0 ( 1 + \sum_{i=1}^n E_i v^i )
151 * flux(v) = F_0 ( 1 + \sum_{i=1}^n F_i v^i )
152 *
153 * Then
154 *
155 * T_i = (1+i/2)*E_i - F_i - \sum_{j=1}^{i-1} F_j T_{i-j}
156 *
157 * This doesn't handle terms involving log(v), so we'll treat them separately.
158 * Be careful with the dE/dv, which causes the log and non-log terms to mix.
159 * Also, because spin-spin PN terms are only known to leading order, we have
160 * to be careful with spin terms. We first add in the spin-orbit terms, but
161 * only keeping terms linear in spin. Then we add in the spin-spin terms at 2 PN.
162 */
163
165 PNPhasingSeries *dtdv,
166 const REAL8 m1M,
167 const REAL8 chi1,
168 const REAL8 chi2,
169 const REAL8 qm_def1,
170 const REAL8 qm_def2
171 )
172{
173 /* Check is performed for aligned spin only*/
174 REAL8 m2M = 1.-m1M;
175 REAL8 eta = m1M*m2M;
176 /* Spins use the wacky lal convention */
177 REAL8 S1L = m1M*m1M*chi1;
178 REAL8 S2L = m2M*m2M*chi2;
179
180 REAL8 energy[9];
181 REAL8 flux[9];
182
183 energy[1] = 0.;
184 energy[2] = XLALSimInspiralPNEnergy_2PNCoeff(eta);
186 energy[4] = XLALSimInspiralPNEnergy_4PNCoeff(eta);
188 energy[6] = XLALSimInspiralPNEnergy_6PNCoeff(eta);
190
191 flux[1] = 0.;
192 flux[2] = XLALSimInspiralPNFlux_2PNCoeff(eta);
193 flux[3] = XLALSimInspiralPNFlux_3PNCoeff(eta);
194 flux[4] = XLALSimInspiralPNFlux_4PNCoeff(eta);
195 flux[5] = XLALSimInspiralPNFlux_5PNCoeff(eta);
196 flux[6] = XLALSimInspiralPNFlux_6PNCoeff(eta);
197 flux[7] = XLALSimInspiralPNFlux_7PNCoeff(eta);
198 /* Add the spin-orbit fluxes */
203
205
206 memset(dtdv, 0, sizeof(PNPhasingSeries));
208 dtdv->v[1] = 0.; /* there's no 0.5 PN term */
209 for (int i = 2; i < 8; i++)
210 {
211 dtdv->v[i] = (1.+0.5*((double)i))*energy[i] - flux[i] - sum(flux, dtdv->v, i);
212 }
213 dtdv->vlogv[6] = -flux6l;
214
215 /* Calculate the leading-order spin-spin terms separately
216 * FIXME: For now, only do aligned spins
217 */
218 REAL8 energy_ss4 = XLALSimInspiralPNEnergy_4PNS1S2Coeff(eta)*S1L*S2L;
219 energy_ss4 += qm_def1*XLALSimInspiralPNEnergy_4PNQMS1S1Coeff(m1M)*S1L*S1L;
220 energy_ss4 += qm_def2*XLALSimInspiralPNEnergy_4PNQMS1S1Coeff(m2M)*S2L*S2L;
221
222 REAL8 flux_ss4 = XLALSimInspiralPNFlux_4PNS1S2Coeff(eta)*S1L*S2L;
223 flux_ss4 += XLALSimInspiralPNFlux_4PNS1S1Coeff(m1M)*S1L*S1L;
224 flux_ss4 += XLALSimInspiralPNFlux_4PNS1S1Coeff(m2M)*S2L*S2L;
225 flux_ss4 += qm_def1*XLALSimInspiralPNFlux_4PNQMS1S1Coeff(m1M)*S1L*S1L;
226 flux_ss4 += qm_def2*XLALSimInspiralPNFlux_4PNQMS1S1Coeff(m2M)*S2L*S2L;
227
228 dtdv->v[4] += 3.*energy_ss4 - flux_ss4;
229
230 REAL8 energy_ss6 = XLALSimInspiralPNEnergy_6PNS1S2Coeff(eta)*S1L*S2L;
231 energy_ss6 += XLALSimInspiralPNEnergy_6PNS1OS2OCoeff(eta)*S1L*S2L;
232 energy_ss6 += XLALSimInspiralPNEnergy_6PNS1S1Coeff(m1M)*S1L*S1L;
233 energy_ss6 += XLALSimInspiralPNEnergy_6PNS1OS1OCoeff(m1M)*S1L*S1L;
234 energy_ss6 += qm_def1*XLALSimInspiralPNEnergy_6PNQMS1S1Coeff(m1M)*S1L*S1L;
235 energy_ss6 += XLALSimInspiralPNEnergy_6PNS1S1Coeff(m2M)*S2L*S2L;
236 energy_ss6 += XLALSimInspiralPNEnergy_6PNS1OS1OCoeff(m2M)*S2L*S2L;
237 energy_ss6 += qm_def2*XLALSimInspiralPNEnergy_6PNQMS1S1Coeff(m2M)*S2L*S2L;
238
239 REAL8 flux_ss6 = XLALSimInspiralPNFlux_6PNS1S2Coeff(eta)*S1L*S2L;
240 flux_ss6 += XLALSimInspiralPNFlux_6PNS1OS2OCoeff(eta)*S1L*S2L;
241 flux_ss6 += XLALSimInspiralPNFlux_6PNS1S1Coeff(m1M)*S1L*S1L;
242 flux_ss6 += XLALSimInspiralPNFlux_6PNS1OS1OCoeff(m1M)*S1L*S1L;
243 flux_ss6 += qm_def1*XLALSimInspiralPNFlux_6PNQMS1S1Coeff(m1M)*S1L*S1L;
244 flux_ss6 += XLALSimInspiralPNFlux_6PNS1S1Coeff(m2M)*S2L*S2L;
245 flux_ss6 += XLALSimInspiralPNFlux_6PNS1OS1OCoeff(m2M)*S2L*S2L;
246 flux_ss6 += qm_def2*XLALSimInspiralPNFlux_6PNQMS1S1Coeff(m2M)*S2L*S2L;
247
248 dtdv->v[6] += 4.*energy_ss6 - flux_ss6 -3.*flux[2]*energy_ss4 - 2.*flux_ss4*energy[2] + 2.*flux[2]*flux_ss4;
249
250 return;
251}
252
254 PNPhasingSeries *dtdv,
255 const REAL8 m1M,
256 const REAL8 chi1,
257 const REAL8 chi2,
258 const REAL8 qm_def1,
259 const REAL8 qm_def2
260 )
261{
262 REAL8 m2M = 1.-m1M;
263 REAL8 eta = m1M*m2M;
264 /* Spins use the wacky lal convention */
265 REAL8 S1L = m1M*m1M*chi1;
266 REAL8 S2L = m2M*m2M*chi2;
267
268 memset(dtdv, 0, sizeof(PNPhasingSeries));
270 dtdv->v[1] = 0.;
278
283
284 //Test for spin aligned only
285 dtdv->v[4] += XLALSimInspiralTaylorT2dtdv_4PNS1S2Coeff(eta)*S1L*S2L;
288
289 dtdv->v[6] += XLALSimInspiralTaylorT2dtdv_6PNS1S2Coeff(eta)*S1L*S2L;
290 dtdv->v[6] += XLALSimInspiralTaylorT2dtdv_6PNS1OS2OCoeff(eta)*S1L*S2L;
293
294 return;
295}
296
297static int test_average(const REAL8 m1M)
298{
299 const REAL8 m2M=1.-m1M;
300 const REAL8 eta=m1M*m2M;
301
302 int ret=0;
303
304 printf("Testing consistency between averaged and instantaneous coefficients (2 and 3PN spin^2)\n");
305
308
311
314
317
320
322
324
326
328
330
332
333 return ret;
334
335}
336
338 const REAL8 m1M,
339 const REAL8 chi1,
340 const REAL8 chi2,
341 const REAL8 qm_def1,
342 const REAL8 qm_def2
343 )
344{
345 REAL8 m2M = 1.-m1M;
346 REAL8 eta = m1M*m2M;
347
348 int ret = 0;
349
350 fprintf(stdout, "\n=== Testing eta=%.4f, chi1=%.4f, chi2=%.4f, qm1=%.4f, qm2=%.4f ===\n", eta, chi1, chi2, qm_def1, qm_def2);
351
352 PNPhasingSeries dtdv_ef;
353 dtdv_from_energy_flux(&dtdv_ef, m1M, chi1, chi2, qm_def1, qm_def2);
354
355 PNPhasingSeries dtdv_pn;
356 dtdv_from_pncoefficients(&dtdv_pn, m1M, chi1, chi2, qm_def1, qm_def2);
357
358 LALDict *extraParams=XLALCreateDict();
359 XLALSimInspiralWaveformParamsInsertdQuadMon1(extraParams,qm_def1-1.);
360 XLALSimInspiralWaveformParamsInsertdQuadMon2(extraParams,qm_def2-1.);
362 PNPhasingSeries phasing;
363 XLALSimInspiralPNPhasing_F2(&phasing, m1M,m2M, chi1, chi2,\
364 chi1*chi1, chi2*chi2, chi1*chi2,\
365 extraParams);
366 XLALDestroyDict(extraParams);
367
368 /* Divide the phasing by the leading-order term */
369 REAL8 phase0 = phasing.v[0];
370 for (int i = 1; i < PN_PHASING_SERIES_MAX_ORDER; i++)
371 {
372 phasing.v[i] /= phase0;
373 phasing.vlogv[i] /= phase0;
374 phasing.vlogvsq[i] /= phase0;
375 }
376
377 fprintf(stdout, "Testing dtdv consistency with energy and flux.\n");
378 ret += compare_pnseries(&dtdv_pn, &dtdv_ef);
379
380 fprintf(stdout, "Testing phasing consistency with dtdv.\n");
381 ret += compare(phasing.v[0], 3./20.*dtdv_pn.v[0], 0, 0);
382 ret += compare_phasing_to_dtdv(&phasing, &dtdv_pn);
383
384 fprintf(stdout, "Testing phasing consistency with energy and flux.\n");
385 ret += compare(phasing.v[0], 3./20.*dtdv_ef.v[0], 0, 0);
386 ret += compare_phasing_to_dtdv(&phasing, &dtdv_ef);
387
388 return ret;
389}
390
391/* The TaylorT4 waveform is defined by
392 * dw/dt = trunc[ -flux(v)/dE/dw(v) ]
393 * where trunc[ ] means truncate the expression at the desired PN order.
394 * There's a recursive expression for dw/dt at each order. Write
395 * dw/dt = W_0 ( 1 + \sum_{i=1}^n W_i v^i )
396 * e(v) = E_0 ( 1 + \sum_{i=1}^n E_i v^i )
397 * flux(v) = F_0 ( 1 + \sum_{i=1}^n F_i v^i )
398 *
399 * Then
400 *
401 * W_i = F_i - (1+i/2)E_i - \sum_{j=1}^{i-1} (1+i/2) E_j T_{i-j}
402 *
403 * This doesn't handle terms involving log(v), so we'll treat them separately.
404 * Be careful with the dE/dv, which causes the log and non-log terms to mix.
405 * We first add in the spin-orbit terms, but
406 * only keeping terms linear in spin. Then we add in the spin-spin terms.
407 */
408
410 PNPhasingSeries *wdot,
411 const REAL8 m1M,
412 const REAL8 chi1,
413 const REAL8 chi2,
414 const REAL8 qm_def1,
415 const REAL8 qm_def2
416 )
417{
418 REAL8 m2M = 1.-m1M;
419 REAL8 eta = m1M*m2M;
420 /* Spins use the wacky lal convention */
421 REAL8 S1L = m1M*m1M*chi1;
422 REAL8 S2L = m2M*m2M*chi2;
423
424 REAL8 energy[9];
425 REAL8 flux[9];
426
427 energy[1] = 0.;
428 energy[2] = XLALSimInspiralPNEnergy_2PNCoeff(eta);
429 energy[3] = 0.;
430 energy[4] = XLALSimInspiralPNEnergy_4PNCoeff(eta);
431 energy[5] = 0.;
432 energy[6] = XLALSimInspiralPNEnergy_6PNCoeff(eta);
433 energy[7] = 0.;
434 //We do not add the non-spin part of the 4PN energy as the 4PN flux is unknown, apart from the SL terms
435 energy[8] = 0.;
436
437 flux[1] = 0.;
438 flux[2] = XLALSimInspiralPNFlux_2PNCoeff(eta);
439 flux[3] = XLALSimInspiralPNFlux_3PNCoeff(eta);
440 flux[4] = XLALSimInspiralPNFlux_4PNCoeff(eta);
441 flux[5] = XLALSimInspiralPNFlux_5PNCoeff(eta);
442 flux[6] = XLALSimInspiralPNFlux_6PNCoeff(eta);
443 flux[7] = XLALSimInspiralPNFlux_7PNCoeff(eta);
444 flux[8] = 0.;
445
446 /* Add the spin-orbit contributions */
448 energy[3] += energy_so3;
450 energy[5] += energy_so5;
452
456 flux[6] += flux_so6;
459
460 memset(wdot, 0, sizeof(PNPhasingSeries));
462 wdot->v[1] = 0.; /* there's no 0.5 PN term */
463 for (int i = 2; i <8; i++)
464 {
465 wdot->v[i] = flux[i] - (1.+0.5*i)*energy[i] - sumE(energy, wdot->v, i);
466 }
468
469 // The 8PN SO term is checked by hand
470 wdot->v[8]=flux[8]-5.*energy[8] - flux_so6*2.*XLALSimInspiralPNEnergy_2PNCoeff(eta) - XLALSimInspiralPNFlux_5PNCoeff(eta)*5./2.*energy_so3 + XLALSimInspiralPNFlux_3PNCoeff(eta)*(-7./2.*energy_so5 + 10.*XLALSimInspiralPNEnergy_2PNCoeff(eta)*energy_so3);
471
472 /* Calculate the leading-order spin-spin terms separately */
473 REAL8 energy_ss4 = XLALSimInspiralPNEnergy_4PNS1S2Coeff(eta)*S1L*S2L;
474 energy_ss4 += qm_def1*XLALSimInspiralPNEnergy_4PNQMS1S1Coeff(m1M)*S1L*S1L;
475 energy_ss4 += qm_def2*XLALSimInspiralPNEnergy_4PNQMS1S1Coeff(m2M)*S2L*S2L;
476
477 REAL8 flux_ss4 = XLALSimInspiralPNFlux_4PNS1S2Coeff(eta)*S1L*S2L;
478 flux_ss4 += XLALSimInspiralPNFlux_4PNS1S1Coeff(m1M)*S1L*S1L;
479 flux_ss4 += XLALSimInspiralPNFlux_4PNS1S1Coeff(m2M)*S2L*S2L;
480 flux_ss4 += qm_def1*XLALSimInspiralPNFlux_4PNQMS1S1Coeff(m1M)*S1L*S1L;
481 flux_ss4 += qm_def2*XLALSimInspiralPNFlux_4PNQMS1S1Coeff(m2M)*S2L*S2L;
482
483 wdot->v[4] += flux_ss4 -3.*energy_ss4;
484
485 REAL8 energy_ss6 = XLALSimInspiralPNEnergy_6PNS1S2Coeff(eta)*S1L*S2L;
486 energy_ss6 += XLALSimInspiralPNEnergy_6PNS1OS2OCoeff(eta)*S1L*S2L;
487 energy_ss6 += XLALSimInspiralPNEnergy_6PNS1S1Coeff(m1M)*S1L*S1L;
488 energy_ss6 += XLALSimInspiralPNEnergy_6PNS1OS1OCoeff(m1M)*S1L*S1L;
489 energy_ss6 += qm_def1*XLALSimInspiralPNEnergy_6PNQMS1S1Coeff(m1M)*S1L*S1L;
490 energy_ss6 += XLALSimInspiralPNEnergy_6PNS1S1Coeff(m2M)*S2L*S2L;
491 energy_ss6 += XLALSimInspiralPNEnergy_6PNS1OS1OCoeff(m2M)*S2L*S2L;
492 energy_ss6 += qm_def2*XLALSimInspiralPNEnergy_6PNQMS1S1Coeff(m2M)*S2L*S2L;
493
494 REAL8 flux_ss6 = XLALSimInspiralPNFlux_6PNS1S2Coeff(eta)*S1L*S2L;
495 flux_ss6 += XLALSimInspiralPNFlux_6PNS1OS2OCoeff(eta)*S1L*S2L;
496 flux_ss6 += XLALSimInspiralPNFlux_6PNS1S1Coeff(m1M)*S1L*S1L;
497 flux_ss6 += XLALSimInspiralPNFlux_6PNS1OS1OCoeff(m1M)*S1L*S1L;
498 flux_ss6 += qm_def1*XLALSimInspiralPNFlux_6PNQMS1S1Coeff(m1M)*S1L*S1L;
499 flux_ss6 += XLALSimInspiralPNFlux_6PNS1S1Coeff(m2M)*S2L*S2L;
500 flux_ss6 += XLALSimInspiralPNFlux_6PNS1OS1OCoeff(m2M)*S2L*S2L;
501 flux_ss6 += qm_def2*XLALSimInspiralPNFlux_6PNQMS1S1Coeff(m2M)*S2L*S2L;
502
503 wdot->v[6] += flux_ss6 - 4.*energy_ss6 -3.*flux[2]*energy_ss4 - 2.*flux_ss4*energy[2] + 12.*energy[2]*energy_ss4;
504
505 return;
506}
507
509 PNPhasingSeries *wdot,
510 const REAL8 m1M,
511 const REAL8 chi1,
512 const REAL8 chi2,
513 const REAL8 qm_def1,
514 const REAL8 qm_def2
515 )
516{
517 REAL8 m2M = 1.-m1M;
518 REAL8 eta = m1M*m2M;
519 /* Spins use the wacky lal convention */
520 REAL8 S1L = m1M*m1M*chi1;
521 REAL8 S2L = m2M*m2M*chi2;
522
523 memset(wdot, 0, sizeof(PNPhasingSeries));
525 wdot->v[1] = 0.;
533 wdot->v[8] = 0.;
534
540
541 wdot->v[4] += XLALSimInspiralTaylorT4wdot_4PNS1S2Coeff(eta)*S1L*S2L;
542 wdot->v[4] += XLALSimInspiralTaylorT4wdot_4PNS1S1Coeff(m1M)*S1L*S1L;
543 wdot->v[4] += XLALSimInspiralTaylorT4wdot_4PNS1S1Coeff(m2M)*S2L*S2L;
544 wdot->v[4] += qm_def1*XLALSimInspiralTaylorT4wdot_4PNQMS1S1Coeff(m1M)*S1L*S1L;
545 wdot->v[4] += qm_def2*XLALSimInspiralTaylorT4wdot_4PNQMS1S1Coeff(m2M)*S2L*S2L;
546
547 wdot->v[6] += XLALSimInspiralTaylorT4wdot_6PNS1S2Coeff(eta)*S1L*S2L;
548 wdot->v[6] += XLALSimInspiralTaylorT4wdot_6PNS1OS2OCoeff(eta)*S1L*S2L;
549 wdot->v[6] += XLALSimInspiralTaylorT4wdot_6PNS1S1Coeff(m1M)*S1L*S1L;
550 wdot->v[6] += XLALSimInspiralTaylorT4wdot_6PNS1OS1OCoeff(m1M)*S1L*S1L;
551 wdot->v[6] += XLALSimInspiralTaylorT4wdot_6PNS1S1Coeff(m2M)*S2L*S2L;
552 wdot->v[6] += XLALSimInspiralTaylorT4wdot_6PNS1OS1OCoeff(m2M)*S2L*S2L;
553 wdot->v[6] += qm_def1*XLALSimInspiralTaylorT4wdot_6PNQMS1S1Coeff(m1M)*S1L*S1L;
554 wdot->v[6] += qm_def2*XLALSimInspiralTaylorT4wdot_6PNQMS1S1Coeff(m2M)*S2L*S2L;
555
556 return;
557}
558
560 const REAL8 m1M,
561 const REAL8 chi1,
562 const REAL8 chi2,
563 const REAL8 qm_def1,
564 const REAL8 qm_def2
565 )
566{
567
568 REAL8 m2M = 1.-m1M;
569 REAL8 eta = m1M*m2M;
570
571 int ret = 0;
572
573 fprintf(stdout, "\n=== Testing T4 eta=%.4f, chi1=%.4f, chi2=%.4f, qm1=%.4f, qm2=%.4f ===\n", eta, chi1, chi2, qm_def1, qm_def2);
574
575 PNPhasingSeries wdot_ef;
576 T4wdot_from_energy_flux(&wdot_ef, m1M, chi1, chi2, qm_def1, qm_def2);
577
578 PNPhasingSeries wdot_pn;
579 T4wdot_from_pncoefficients(&wdot_pn, m1M, chi1, chi2, qm_def1, qm_def2);
580
581 fprintf(stdout, "Testing wdot consistency with energy and flux.\n");
582 ret += compare_pnseries(&wdot_pn, &wdot_ef);
583
584 return ret;
585
586}
587
588/* Testing tidal coefficients. Since they are symmetric with respect to both objects
589 * it is sufficient to test only one non-zero coefficient. */
590
591static int test_tidal_F2(
592 const REAL8 m2M
593 )
594{
595 REAL8 m1M = 1.L-m2M;
596 REAL8 eta = m1M*m2M;
597
604
605 REAL8 dtdv2 = 2.L*energy2 - flux2;
606 REAL8 dtdv10 = 6.L*energy10 - flux10;
607 REAL8 dtdv12 = (7.L*energy12 - flux12) - flux2*dtdv10 - flux10*dtdv2;
608
609 REAL8 calc_phasing10 = 4.L*dtdv10;
610 REAL8 calc_phasing12 = (10.L/7.L)*dtdv12;
611
614
615 int ret = 0;
616 ret += compare(calc_phasing10, phasing10, 10, 0);
617 ret += compare(calc_phasing12, phasing12, 12, 0);
618
619 return ret;
620}
621
622static int test_tidal_T4(
623 const REAL8 m2M
624 )
625{
626 REAL8 m1M = 1.L-m2M;
627 REAL8 eta = m1M*m2M;
628
635
636 REAL8 dvdt2 = flux2 - 2.L*energy2;
637 REAL8 dvdt10 = flux10 - 6.L*energy10;
638 REAL8 dvdt12 = (flux12 -7.L*energy12) - 2.L*energy2*dvdt10 - 6.L*energy10*dvdt2;
639
642
643 int ret = 0;
644 ret += compare(dvdt10, phasing10, 10, 0);
645 ret += compare(dvdt12, phasing12, 12, 0);
646
647 return ret;
648}
649
650static int test_tidal_T2(
651 const REAL8 m2M
652 )
653{
654 REAL8 m1M = 1.L-m2M;
655 REAL8 eta = m1M*m2M;
656
663
664 REAL8 dtdv2 = 2.L*energy2 - flux2;
665 REAL8 dtdv10 = 6.L*energy10 - flux10;
666 REAL8 dtdv12 = (7.L*energy12 - flux12) - flux2*dtdv10 - flux10*dtdv2;
667
670
671 int ret = 0;
672 ret += compare(dtdv10, phasing10, 10, 0);
673 ret += compare(dtdv12, phasing12, 12, 0);
674
675 return ret;
676}
677
678/* The dL PN coefficients are defined in LALSimInspiralPNCoefficients.c.
679 */
680
682 PNPhasingSeries *dL1, /* Coefficients of \epsilon_{ijk}S1_jL_k */
683 PNPhasingSeries *dL2, /* Coefficients of \epsilon_{ijk}S2_jL_k */
684 const REAL8 m1M
685 )
686{
687 /* Check is performed for aligned spin only*/
688 REAL8 m2M = 1.-m1M;
689 /* Spins use the LAL convention */
690
691 memset(dL1, 0, sizeof(PNPhasingSeries));
692 memset(dL2, 0, sizeof(PNPhasingSeries));
693 dL1->v[0] = 0.; dL2->v[0] = 0.;
694 dL1->v[1] = 0.; dL2->v[1] = 0.;
695 dL1->v[2] = 0.; dL2->v[2] = 0.;
696 dL1->v[3] = XLALSimInspiralLDot_3PNSOCoeff(m1M);
697 dL2->v[3] = XLALSimInspiralLDot_3PNSOCoeff(m2M);
698 dL1->v[4] = 0.;
699 dL2->v[4] = 0.;
700 dL1->v[5] = XLALSimInspiralLDot_5PNSOCoeff(m1M);
701 dL2->v[5] = XLALSimInspiralLDot_5PNSOCoeff(m2M);
702 dL1->v[6] = 0.;
703 dL2->v[6] = 0.;
704 dL1->v[7] = XLALSimInspiralLDot_7PNSOCoeff(m1M);
705 dL2->v[7] = XLALSimInspiralLDot_7PNSOCoeff(m2M);
706
707 return;
708}
709
710/* The dL PN coefficients are defined via the dS ones.
711 */
712
714 PNPhasingSeries *dL1, /* Coefficients of \epsilon_{ijk}S1_jL_k */
715 PNPhasingSeries *dL2, /* Coefficients of \epsilon_{ijk}S2_jL_k */
716 const REAL8 m1M
717 )
718{
719 /* Check is performed for aligned spin only*/
720 REAL8 m2M = 1.-m1M;
721 REAL8 eta = m1M*m2M;
722 /* Spins use the LAL convention */
723
724 memset(dL1, 0, sizeof(PNPhasingSeries));
725 memset(dL2, 0, sizeof(PNPhasingSeries));
726 dL1->v[0] = 0.; dL2->v[0] = 0.;
727 dL1->v[1] = 0.; dL2->v[1] = 0.;
728 dL1->v[2] = 0.; dL2->v[2] = 0.;
729 dL1->v[3] = XLALSimInspiralSpinDot_3PNCoeff(m1M)/eta;
730 dL2->v[3] = XLALSimInspiralSpinDot_3PNCoeff(m2M)/eta;
731 dL1->v[4] = 0.;
732 dL2->v[4] = 0.;
733 dL1->v[5] = XLALSimInspiralSpinDot_5PNCoeff(m1M)/eta;
734 dL2->v[5] = XLALSimInspiralSpinDot_5PNCoeff(m2M)/eta;
735 dL1->v[6] = 0.;
736 dL2->v[6] = 0.;
737 dL1->v[7] = XLALSimInspiralSpinDot_7PNCoeff(m1M)/eta;
738 dL2->v[7] = XLALSimInspiralSpinDot_7PNCoeff(m2M)/eta;
739
740 return;
741}
742
744 const REAL8 m1M)
745{
746
747 REAL8 m2M = 1.-m1M;
748 REAL8 eta = m1M*m2M;
749
750 int ret = 0;
751 int idx;
752
753 fprintf(stdout, "\n=== Testing dL eta=%.4f ===\n", eta);
754
755 PNPhasingSeries dL1_dL, dL2_dL;
756 dL_from_pncoefficients(&dL1_dL, &dL2_dL, m1M);
757
758 PNPhasingSeries dL1_dS, dL2_dS;
759 dL_from_dSpncoefficients(&dL1_dS, &dL2_dS, m1M);
760
761 fprintf(stdout, "Testing dL consistency with dS.\n");
762 for (idx=0;idx<9;idx++) {
763 ret += compare(dL1_dL.v[idx], dL1_dS.v[idx],idx,0);
764 ret += compare(dL2_dL.v[idx], dL2_dS.v[idx],idx,0);
765 }
766
767 return ret;
768
769}
770
771int main (int argc, char **argv)
772{
773 /* Ignore unused parameters. */
774 (void)argc;
775 (void)argv;
776
777 int ret = 0;
778
779 ret += test_consistency(0.5, 0., 0., 0., 0.);
780 ret += test_consistency(0.9, 0., 0., 1., 4.5);
781 ret += test_consistency(0.01, 0., 0., 1., 4.5);
782
783 ret += test_consistency(0.5, 1., 0., 1., 4.5);
784 ret += test_consistency(0.9, 1., 0., 1., 4.5);
785 ret += test_consistency(0.01, 1., 0., 1., 4.5);
786
787 ret += test_consistency(0.5, 0., -0.4, 1., 4.5);
788 ret += test_consistency(0.9, 0., -0.4, 1., 4.5);
789 ret += test_consistency(0.01, 0., -0.4, 1., 4.5);
790
791 ret += test_consistency(0.5, 0.9, -0.9, 2., 2.);
792 ret += test_consistency(0.9, 0.9, -0.9, 3., 3.);
793 ret += test_consistency(0.01, 0.9, -0.9, 4., 4.);
794
795 ret += test_consistency_T4(0.5, 0., 0., 1., 4.5);
796 ret += test_consistency_T4(0.9, 0., 0., 1., 4.5);
797 ret += test_consistency_T4(0.01, 0., 0., 1., 4.5);
798
799 ret += test_consistency_T4(0.5, 1., 0., 1., 4.5);
800 ret += test_consistency_T4(0.9, 1., 0., 1., 4.5);
801 ret += test_consistency_T4(0.01, 1., 0., 1., 4.5);
802
803 ret += test_consistency_T4(0.5, 0., -0.4, 1., 4.5);
804 ret += test_consistency_T4(0.9, 0., -0.4, 1., 4.5);
805 ret += test_consistency_T4(0.01, 0., -0.4, 1., 4.5);
806
807 ret += test_consistency_T4(0.5, 0.9, 0.9, 0., 0.);
808 ret += test_consistency_T4(0.9, 0.9, -0.9, 3., 2.);
809 ret += test_consistency_T4(0.01, 0.9, 0.9, 4., 4.);
810
811 fprintf(stdout, "Testing tidal terms.\n");
812 for (UINT4 idx=1;idx<=9;idx++) {
813 ret += test_tidal_F2(0.1*((REAL8)idx));
814 ret += test_tidal_T2(0.1*((REAL8)idx));
815 ret += test_tidal_T4(0.1*((REAL8)idx));
816 ret += test_average(0.1*((REAL8)idx));
817 }
818
819 for (UINT4 idx=1;idx<=5;idx++) {
820 ret += test_consistency_dL(0.1*((REAL8)idx));
821 }
822
823 if (ret == 0)
824 {
825 fprintf(stdout, "\nAll PNCoefficients tests passed.\n");
826 }
827 else
828 {
829 fprintf(stderr, "\nFAILURE: %u PNCoefficients comparisons incorrect.\n", ret);
830 }
831
832 return ret;
833}
void XLALDestroyDict(LALDict *dict)
LALDict * XLALCreateDict(void)
static REAL8 UNUSED XLALSimInspiralPNFlux_4PNQMS1vS1vCoeff(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralPNFlux_5PNCoeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralPNFlux_4PNS1S2CoeffAvg(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralTaylorT4wdot_12PNTidalCoeff(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralTaylorT4wdot_3PNSOCoeff(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralTaylorT2dtdv_4PNS1S1Coeff(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralTaylorT2dtdv_6PNS1S2Coeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralPNEnergy_5PNSOCoeff(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralPNEnergy_4PNCoeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralTaylorT4wdot_7PNCoeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralTaylorT4wdot_6PNS1S1Coeff(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralTaylorT4wdot_4PNCoeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralPNFlux_0PNCoeff(REAL8 eta)
Computes the flux PN Coefficients.
static REAL8 UNUSED XLALSimInspiralTaylorT2dtdv_7PNCoeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralPNFlux_6PNSOCoeff(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralPNEnergy_10PNTidalCoeff(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralTaylorT2dtdv_4PNS1OS1OCoeffAvg(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralPNFlux_12PNTidalCoeff(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralPNFlux_3PNCoeff(REAL8 UNUSED eta)
static REAL8 UNUSED XLALSimInspiralPNFlux_4PNS1S1Coeff(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralTaylorT2dtdv_5PNCoeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralPNEnergy_2PNCoeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralPNFlux_4PNS1nS2nCoeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralTaylorT2dtdv_4PNS1S2CoeffAvg(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralTaylorT2dtdv_3PNCoeff(REAL8 UNUSED eta)
static REAL8 UNUSED XLALSimInspiralTaylorT4wdot_0PNCoeff(REAL8 eta)
Computes the PN Coefficients for using in the TaylorT4 frequency equation.
static REAL8 UNUSED XLALSimInspiralTaylorT4wdot_2PNCoeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralTaylorT4wdot_4PNS1S2Coeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralTaylorT4wdot_7PNSOCoeff(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralPNFlux_4PNS1S1CoeffAvg(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralPNEnergy_4PNS1S2CoeffAvg(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralTaylorT2dtdv_12PNTidalCoeff(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralPNFlux_4PNCoeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralPNFlux_6PNS1OS2OCoeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralTaylorT4wdot_6PNCoeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralTaylorT2dtdv_7PNSOCoeff(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralPNEnergy_0PNCoeff(REAL8 eta)
Computes the PN Coefficients for using in the PN energy equation.
static REAL8 UNUSED XLALSimInspiralPNFlux_10PNTidalCoeff(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralTaylorT2dtdv_6PNS1OS1OCoeff(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralTaylorT4wdot_4PNS1OS2OCoeffAvg(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralLDot_5PNSOCoeff(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralTaylorT2dtdv_6PNS1S1Coeff(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralPNFlux_2PNCoeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralPNFlux_4PNQMS1nS1nCoeff(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralTaylorT2dtdv_6PNLogCoeff(REAL8 UNUSED eta)
static REAL8 UNUSED XLALSimInspiralLDot_7PNSOCoeff(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralTaylorT4wdot_4PNQMS1OS1OCoeffAvg(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralTaylorT2dtdv_4PNQMS1S1Coeff(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralPNEnergy_6PNQMS1S1Coeff(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralPNFlux_7PNSOCoeff(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralPNEnergy_3PNSOCoeff(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralTaylorT2dtdv_5PNSOCoeff(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralTaylorT2dtdv_4PNQMS1OS1OCoeffAvg(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralPNEnergy_6PNS1S1Coeff(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralTaylorT4wdot_4PNS1S1Coeff(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralTaylorT2dtdv_3PNSOCoeff(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralPNEnergy_4PNS1S2Coeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralPNEnergy_4PNQMS1S1Coeff(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralTaylorT4wdot_10PNTidalCoeff(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralTaylorT4wdot_6PNLogCoeff(REAL8 UNUSED eta)
static REAL8 UNUSED XLALSimInspiralPNFlux_6PNQMS1S1Coeff(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralPNEnergy_4PNQMS1nS1nCoeff(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralPNFlux_4PNS1OS2OCoeffAvg(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralPNFlux_6PNS1S1Coeff(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralTaylorT4wdot_4PNS1S2CoeffAvg(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralPNEnergy_4PNQMS1S1CoeffAvg(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralPNEnergy_12PNTidalCoeff(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralTaylorT4wdot_6PNS1OS1OCoeff(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralPNEnergy_6PNS1OS2OCoeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralPNFlux_4PNS1S2Coeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralTaylorT4wdot_6PNS1S2Coeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralPNEnergy_7PNSOCoeff(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralPNEnergy_4PNS1nS2nCoeff(REAL8 UNUSED eta)
static REAL8 UNUSED XLALSimInspiralSpinDot_3PNCoeff(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralPNFlux_7PNCoeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralTaylorT2dtdv_4PNS1OS2OCoeffAvg(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralPNFlux_4PNS1vS2vCoeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralPNFlux_4PNQMS1S1CoeffAvg(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralPNEnergy_4PNS1OS2OCoeffAvg(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralTaylorT4wdot_4PNS1OS1OCoeffAvg(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralPNFlux_4PNS1OS1OCoeffAvg(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralPNFlux_6PNCoeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralTaylorT2dtdv_6PNS1OS2OCoeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralSpinDot_7PNCoeff(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralTaylorT4wdot_6PNQMS1S1Coeff(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralTaylorT2dtdv_4PNCoeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralPNEnergy_4PNQMS1OS1OCoeffAvg(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralPNEnergy_6PNS1S2Coeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralPNFlux_6PNLogCoeff(REAL8 UNUSED eta)
static REAL8 UNUSED XLALSimInspiralTaylorT4wdot_4PNQMS1S1CoeffAvg(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralTaylorT2dtdv_4PNQMS1S1CoeffAvg(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralTaylorT2dtdv_6PNQMS1S1Coeff(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralTaylorT2dtdv_6PNSOCoeff(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralTaylorT2dtdv_0PNCoeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralPNFlux_5PNSOCoeff(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralSpinDot_5PNCoeff(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralPNFlux_4PNS1vS1vCoeff(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralTaylorT4wdot_5PNCoeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralTaylorT2dtdv_6PNCoeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralTaylorT4wdot_4PNQMS1S1Coeff(REAL8 mByM)
static void UNUSED XLALSimInspiralPNPhasing_F2(PNPhasingSeries *pfa, const REAL8 m1, const REAL8 m2, const REAL8 chi1L, const REAL8 chi2L, const REAL8 chi1sq, const REAL8 chi2sq, const REAL8 chi1dotchi2, LALDict *p)
static REAL8 UNUSED XLALSimInspiralPNEnergy_6PNS1OS1OCoeff(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralTaylorT2dtdv_2PNCoeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralPNFlux_3PNSOCoeff(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralTaylorT2dtdv_10PNTidalCoeff(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralPNEnergy_6PNCoeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralTaylorT4wdot_3PNCoeff(REAL8 UNUSED eta)
static REAL8 UNUSED XLALSimInspiralTaylorF2Phasing_12PNTidalCoeff(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralPNFlux_6PNS1S2Coeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralPNFlux_4PNQMS1S1Coeff(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralPNFlux_4PNQMS1OS1OCoeffAvg(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralTaylorT4wdot_6PNS1OS2OCoeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralTaylorT4wdot_8PNSOCoeff(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralTaylorT4wdot_6PNSOCoeff(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralPNFlux_6PNS1OS1OCoeff(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralTaylorT4wdot_5PNSOCoeff(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralTaylorT2dtdv_4PNS1S2Coeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralLDot_3PNSOCoeff(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralTaylorT2dtdv_4PNS1S1CoeffAvg(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralPNFlux_8PNSOCoeff(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralTaylorT4wdot_4PNS1S1CoeffAvg(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralTaylorF2Phasing_10PNTidalCoeff(REAL8 mByM)
int XLALSimInspiralWaveformParamsInsertPNSpinOrder(LALDict *params, INT4 value)
int XLALSimInspiralWaveformParamsInsertdQuadMon2(LALDict *params, REAL8 value)
int XLALSimInspiralWaveformParamsInsertdQuadMon1(LALDict *params, REAL8 value)
#define EPSILON
static int test_consistency_dL(const REAL8 m1M)
static void dtdv_from_energy_flux(PNPhasingSeries *dtdv, const REAL8 m1M, const REAL8 chi1, const REAL8 chi2, const REAL8 qm_def1, const REAL8 qm_def2)
static int compare(REAL8 val1, REAL8 val2, int v_order, int log_order)
static int compare_value(REAL8 val1, REAL8 val2)
static int test_average(const REAL8 m1M)
static void dL_from_dSpncoefficients(PNPhasingSeries *dL1, PNPhasingSeries *dL2, const REAL8 m1M)
static void dL_from_pncoefficients(PNPhasingSeries *dL1, PNPhasingSeries *dL2, const REAL8 m1M)
static int test_consistency(const REAL8 m1M, const REAL8 chi1, const REAL8 chi2, const REAL8 qm_def1, const REAL8 qm_def2)
static int test_tidal_T4(const REAL8 m2M)
int main(int argc, char **argv)
static void T4wdot_from_pncoefficients(PNPhasingSeries *wdot, const REAL8 m1M, const REAL8 chi1, const REAL8 chi2, const REAL8 qm_def1, const REAL8 qm_def2)
static REAL8 sum(REAL8 *arr1, REAL8 *arr2, int k)
static REAL8 logpfac(int n)
static int test_tidal_F2(const REAL8 m2M)
static void T4wdot_from_energy_flux(PNPhasingSeries *wdot, const REAL8 m1M, const REAL8 chi1, const REAL8 chi2, const REAL8 qm_def1, const REAL8 qm_def2)
static void dtdv_from_pncoefficients(PNPhasingSeries *dtdv, const REAL8 m1M, const REAL8 chi1, const REAL8 chi2, const REAL8 qm_def1, const REAL8 qm_def2)
static REAL8 sumE(REAL8 *ene, REAL8 *wdot, int k)
static int compare_phasing_to_dtdv(PNPhasingSeries *phasing, PNPhasingSeries *dtdv)
static int compare_pnseries(PNPhasingSeries *s1, PNPhasingSeries *s2)
static REAL8 pfac(int n)
static int test_consistency_T4(const REAL8 m1M, const REAL8 chi1, const REAL8 chi2, const REAL8 qm_def1, const REAL8 qm_def2)
static int test_tidal_T2(const REAL8 m2M)
#define fprintf
double i
Definition: bh_ringdown.c:118
double REAL8
uint32_t UINT4
#define PN_PHASING_SERIES_MAX_ORDER
Structure for passing around PN phasing coefficients.
REAL8 vlogv[PN_PHASING_SERIES_MAX_ORDER+1]
REAL8 vlogvsq[PN_PHASING_SERIES_MAX_ORDER+1]
REAL8 v[PN_PHASING_SERIES_MAX_ORDER+1]