LALSimulation  5.4.0.1-fe68b98
LALSimIMRSpinEOBHcapNumericalDerivativePrec.c
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014 Craig Robinson, Enrico Barausse, Yi Pan, Prayush Kumar,
3  * Stanislav Babak, Andrea Taracchini
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with with program; see the file COPYING. If not, write to the
17  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
18  * MA 02110-1301 USA
19  */
20 /**
21  * \author Craig Robinson, Yi Pan, Stas Babak, Prayush Kumar, Andrea Taracchini
22  * \brief Functions to compute the RHSs of the SEOBNRv3 ODEs
23  */
24 
25 #ifndef _LALSIMIMRSPINPRECEOBHCAPNUMERICALDERIVATIVE_C
26 #define _LALSIMIMRSPINPRECEOBHCAPNUMERICALDERIVATIVE_C
27 
28 #ifdef __GNUC__
29 #define UNUSED __attribute__ ((unused))
30 #else
31 #define UNUSED
32 #endif
33 
34 /* #include "LALSimIMRSpinEOBHcapNumericalDerivative.h" */
35 
36 #include <math.h>
37 #include <gsl/gsl_deriv.h>
38 #include <lal/LALSimInspiral.h>
39 #include <lal/LALSimIMR.h>
40 
41 #include "LALSimIMRSpinEOB.h"
42 
49 
50 // int UsePrec = 1;
51 
52 /*------------------------------------------------------------------------------------------
53  *
54  * Prototypes of functions defined in this code.
55  *
56  *------------------------------------------------------------------------------------------
57  */
58 static REAL8 GSLSpinPrecHamiltonianWrapper(double x, void *params);
59 
60 static int
62  double UNUSED t, /**<< UNUSED */
63  const REAL8 values[], /**<< Dynamical variables */
64  REAL8 dvalues[], /**<< Time derivatives of variables (returned) */
65  void *funcParams /**<< EOB parameters */
66 );
67 
69  const INT4 paramIdx, /**<< Index of the parameters */
70  const REAL8 values[], /**<< Dynamical variables */
71  SpinEOBParams * funcParams /**<< EOB Parameters */
72 );
73 
74 
75 /*------------------------------------------------------------------------------------------
76  *
77  * Defintions of functions.
78  *
79  *------------------------------------------------------------------------------------------
80  */
81 
82 /**
83  * Function to calculate numerical derivatives of the spin EOB Hamiltonian,
84  * which correspond to time derivatives of the dynamical variables in conservative dynamcis.
85  * All derivatives are returned together.
86  * The derivatives are combined with energy flux to give right hand side of the ODEs
87  * of a generic spin EOB model, as decribed in Eqs. A4, A5, 26 and 27 of
88  * Pan et al. PRD 81, 084041 (2010)
89  * Later on we use BB1, that is Barausse and Buonanno PRD 81, 084024 (2010)
90  * This function is not used by the spin-aligned model.
91  */
93  double UNUSED t, /**<< UNUSED */
94  const REAL8 values[], /**<< Dynamical variables */
95  REAL8 dvalues[], /**<< Time derivatives of variables (returned) */
96  void *funcParams /**<< EOB parameters */
97 )
98 {
99  int debugPK = 0;
100 
101 
102  /** lMax: l index up to which h_{lm} modes are included in the computation of the GW enegy flux: see Eq. in 13 in PRD 86, 024011 (2012) */
103  static const INT4 lMax = 8;
104 
106 
107  /* Since we take numerical derivatives wrt dynamical variables */
108  /* but we want them wrt time, we use this temporary vector in */
109  /* the conversion */
110  REAL8 tmpDValues[14];
111 
112  REAL8 H;
113  //Hamiltonian
114  REAL8 flux;
115 
116  gsl_function F;
117  INT4 gslStatus;
118  UINT4 SpinAlignedEOBversion;
119  /* This is needed because SpinAlignedEOBversion is set to 2 for v3 */
120  /* while XLALSimIMREOBCalcSpinPrecFacWaveformCoefficients requires 3 ... */
121  UINT4 SpinAlignedEOBversionForWaveformCoefficients;
122 
123  UINT4 i , j, k, l;
124 
125  REAL8Vector rVec, pVec;
126  REAL8 rData [3], pData[3];
127 
128  /* We need r, phi, pr, pPhi to calculate the flux */
129  REAL8 r;
130  REAL8Vector polarDynamics, cartDynamics;
131  REAL8 polData [4];
132 
133  REAL8 mass1 , mass2, eta;
134  UNUSED REAL8 rrTerm2, pDotS1, pDotS2;
135  REAL8Vector s1 , s2, s1norm, s2norm, sKerr, sStar;
136  REAL8 s1Data [3], s2Data[3], s1DataNorm[3], s2DataNorm[3];
137  REAL8 sKerrData[3], sStarData[3];
138  REAL8 chiS, chiA, a, tplspin;
139  REAL8 s1dotLN, s2dotLN;
140 
141 
142  /* Orbital angular momentum */
143  REAL8 Lx , Ly, Lz, magL;
144  REAL8 Lhatx , Lhaty, Lhatz;
145  REAL8 dLx , dLy, dLz;
146  REAL8 dLhatx , dLhaty, dMagL;
147 
148  REAL8 alphadotcosi;
149 
150  REAL8 rCrossV_x, rCrossV_y, rCrossV_z, omega;
151 
152  /* The error in a derivative as measured by GSL */
153  REAL8 absErr;
154 
155  REAL8 tmpP[3], rMag, rMag2, prT;
156  REAL8 u, u2, u3, u4, u5, w2, a2;
158  REAL8 eobD_r, deltaU_u, deltaU_r;
159  REAL8 dcsi, csi;
160 
161  REAL8 tmpValues[12];
162  REAL8 Tmatrix [3][3], invTmatrix[3][3], dTijdXk[3][3][3];
163  REAL8 tmpPdotT1[3], tmpPdotT2[3], tmpPdotT3[3];
164  //3 terms of Eq.A5
165 
166  /* NQC coefficients container */
167  EOBNonQCCoeffs * nqcCoeffs = NULL;
168 
169  /* Set up pointers for GSL */
170  params.values = values;
171  params.params = (SpinEOBParams *) funcParams;
172  nqcCoeffs = params.params->nqcCoeffs;
173 
174  F.function = &GSLSpinPrecHamiltonianWrapper;
175  F.params = &params;
176 
177  mass1 = params.params->eobParams->m1;
178  mass2 = params.params->eobParams->m2;
179  // SO: Rescale the masses so that the total mass is 1
180  UNUSED REAL8 m_total = mass1 + mass2;
181  mass1 /=m_total;
182  mass2 /=m_total;
183  eta = params.params->eobParams->eta;
184  SpinAlignedEOBversion = params.params->seobCoeffs->SpinAlignedEOBversion;
185  SpinEOBHCoeffs *coeffs = (SpinEOBHCoeffs *) params.params->seobCoeffs;
186  REAL8 STEP_SIZE; // The step size passed to GSL to compute derivatives
187  if(SpinAlignedEOBversion==4){
188  STEP_SIZE = 2.0e-3; //Allow a different step size for v4P
189  }
190  else{
191  STEP_SIZE = 2.0e-4;
192  }
193  /*
194  * For precessing binaries, the effective spin of the Kerr background
195  * evolves with time. The coefficients used to compute the
196  * Hamiltonian depend on the Kerr spin, and hence need to be updated
197  * for the current spin values
198  */
199 
200  /*
201  * Set the position/momenta vectors to point to the appropriate
202  * things
203  */
204  /* Here pvec is the reduced tortoise p^* vector of Pan et al. PRD 81, 084041 (2010) */
205  rVec.length = pVec.length = 3;
206  rVec.data = rData;
207  pVec.data = pData;
208  memcpy(rData, values, sizeof(rData));
209  memcpy(pData, values + 3, sizeof(pData));
210 
211  /*
212  * We need to re-calculate the parameters at each step as precessing
213  * spins will not be constant
214  */
215  /* TODO: Modify so that only spin terms get re-calculated */
216 
217  /*
218  * We cannot point to the values vector directly as it leads to a
219  * warning
220  */
221  s1.length = s2.length = s1norm.length = s2norm.length = 3;
222  s1.data = s1Data;
223  s2.data = s2Data;
224  s1norm.data = s1DataNorm;
225  s2norm.data = s2DataNorm;
226 
227  memcpy(s1Data, values + 6, 3 * sizeof(REAL8));
228  memcpy(s2Data, values + 9, 3 * sizeof(REAL8));
229  memcpy(s1DataNorm, values + 6, 3 * sizeof(REAL8));
230  memcpy(s2DataNorm, values + 9, 3 * sizeof(REAL8));
231  for (i = 0; i < 3; i++) {
232  s1.data[i] *= (mass1 + mass2) * (mass1 + mass2);
233  s2.data[i] *= (mass1 + mass2) * (mass1 + mass2);
234  }
235  sKerr.length = 3;
236  sKerr.data = sKerrData;
237  XLALSimIMRSpinEOBCalculateSigmaKerr(&sKerr, mass1, mass2, &s1, &s2);
238 
239  sStar.length = 3;
240  sStar.data = sStarData;
241  XLALSimIMRSpinEOBCalculateSigmaStar(&sStar, mass1, mass2, &s1, &s2);
242 
243  a = sqrt(sKerr.data[0] * sKerr.data[0] + sKerr.data[1] * sKerr.data[1]
244  + sKerr.data[2] * sKerr.data[2]);
245 
246  /* Convert momenta to p Eq. A3 of PRD 81, 084041 (2010) */
247  rMag = sqrt(rVec.data[0] * rVec.data[0] + rVec.data[1] * rVec.data[1] + rVec.data[2] * rVec.data[2]);
248  /* This is p^*.r/|r| */
249  prT = pVec.data[0] * (rVec.data[0] / rMag) + pVec.data[1] * (rVec.data[1] / rMag)
250  + pVec.data[2] * (rVec.data[2] / rMag);
251 
252  rMag2 = rMag * rMag;
253  u = 1. / rMag;
254  u2 = u * u;
255  u3 = u2 * u;
256  u4 = u2 * u2;
257  u5 = u4 * u;
258  a2 = a * a;
259  w2 = rMag2 + a2;
260  /* Eq. 5.83 of BB1, inverse */
261  D = 1. + log(1. + 6. * eta * u2 + 2. * (26. - 3. * eta) * eta * u3);
262  /* d(Eq. 5.83 of BB1)/dr */
263  eobD_r = (u2 / (D * D)) * (12. * eta * u + 6. * (26. - 3. * eta) * eta * u2) / (1.
264  + 6. * eta * u2 + 2. * (26. - 3. * eta) * eta * u3);
265  m1PlusetaKK = -1. + eta * coeffs->KK;
266  /* Eq. 5.75 of BB1 */
267  /* a as returned by XLALSimIMRSpinEOBCalculateSigmaKerr is S/M^2 so that a is unitless, i.e. 1/M^2 is absorbed in a2. Also, u = M/|r| is unitless */
268  bulk = 1. / (m1PlusetaKK * m1PlusetaKK) + (2. * u) / m1PlusetaKK + a2 * u2;
269  /* Eq. 5.73 of BB1 */
270  /* The 4PN term with coefficients k5 and k5l are defined in the SEOBNRv2 review document https://dcc.ligo.org/T1400476 */
271  logTerms = 1. + eta * coeffs->k0 + eta * log(1. + coeffs->k1 * u
272  + coeffs->k2 * u2 + coeffs->k3 * u3 + coeffs->k4 * u4
273  + coeffs->k5 * u5 + coeffs->k5l * u5 * log(u));
274  /* Eq. 5.73 of BB1 */
275  deltaU = bulk * logTerms;
276  /* Eq. 5.71 of BB1 */
277  deltaT = rMag2 * deltaU;
278  /* ddeltaU/du */
279  /* The log(u) is treated as a constant when taking the derivative wrt u */
280  deltaU_u = 2. * (1. / m1PlusetaKK + a2 * u) * logTerms +
281  bulk * (eta * (coeffs->k1 + u * (2. * coeffs->k2 + u * (3. * coeffs->k3
282  + u * (4. * coeffs->k4 + 5. * (coeffs->k5 + coeffs->k5l * log(u)) * u)))))
283  / (1. + coeffs->k1 * u + coeffs->k2 * u2 + coeffs->k3 * u3
284  + coeffs->k4 * u4 + (coeffs->k5 + coeffs->k5l * log(u)) * u5);
285  deltaU_r = -u2 * deltaU_u;
286  /* Eq. 5.38 of BB1 */
287  deltaR = deltaT * D;
288  if (params.params->tortoise)
289  csi = sqrt(deltaT * deltaR) / w2; /* Eq. 28 of Pan et al.
290  * PRD 81, 084041 (2010) */
291  else
292  csi = 1.0;
293 
294  /* This is A3 of PRD 81, 084041 (2010) explicitly evaluated */
295  for (i = 0; i < 3; i++) {
296  tmpP[i] = pVec.data[i] - (rVec.data[i] / rMag) * prT * (csi - 1.) / csi;
297  }
298 
299  if (debugPK) {
300  XLAL_PRINT_INFO("csi = %.12e\n", csi);
301  for (i = 0; i < 3; i++)
302  XLAL_PRINT_INFO("p,p*: %.12e\t%.12e\n", pData[i], tmpP[i]);
303  }
304  /*
305  * Calculate the T-matrix, required to convert P from tortoise to
306  * non-tortoise coordinates, and/or vice-versa. This is given
307  * explicitly in Eq. A3 of 0912.3466
308  */
309  for (i = 0; i < 3; i++)
310  for (j = 0; j <= i; j++) {
311  Tmatrix[i][j] = Tmatrix[j][i] = (rVec.data[i] * rVec.data[j] / rMag2)
312  * (csi - 1.);
313 
314  invTmatrix[i][j] = invTmatrix[j][i] =
315  -(csi - 1) / csi * (rVec.data[i] * rVec.data[j] / rMag2);
316 
317  if (i == j) {
318  Tmatrix[i][j]++;
319  invTmatrix[i][j]++;
320  }
321  }
322 
323  /* This is dcsi/dr: this is needed in the last term of Eq. A5 of PRD 81, 084041 (2010) */
324  dcsi = csi * (2. / rMag + deltaU_r / deltaU) + csi * csi * csi
325  / (2. * rMag2 * rMag2 * deltaU * deltaU) * (rMag * (-4. * w2) / D - eobD_r * (w2 * w2));
326 
327  for (i = 0; i < 3; i++)
328  for (j = 0; j < 3; j++)
329  for (k = 0; k < 3; k++) {
330  dTijdXk[i][j][k] =
331  (rVec.data[i] * KRONECKER_DELTA(j, k) + KRONECKER_DELTA(i, k) * rVec.data[j])
332  * (csi - 1.) / rMag2
333  + rVec.data[i] * rVec.data[j] * rVec.data[k] / rMag2 / rMag * (-2. / rMag * (csi - 1.) + dcsi);
334  }
335 
336  //Print out the T - matrix for comparison
337  if (debugPK) {
338  XLAL_PRINT_INFO("\nT-Matrix:\n");
339  for (i = 0; i < 3; i++)
340  XLAL_PRINT_INFO("%le\t%le\t%le\n", Tmatrix[i][0], Tmatrix[i][1], Tmatrix[i][2]);
341 
342  for (i = 0; i < 3; i++) {
343  XLAL_PRINT_INFO("dT[%d][j]dX[k]:\n", i);
344  for (j = 0; j < 3; j++)
345  XLAL_PRINT_INFO("%.12e\t%.12e\t%.12e\n", dTijdXk[i][j][0],
346  dTijdXk[i][j][1], dTijdXk[i][j][2]);
347  XLAL_PRINT_INFO("\n");
348  }
349  }
350  INT4 updateHCoeffsOld = params.params->seobCoeffs->updateHCoeffs;
351  /* Now calculate derivatives w.r.t. each parameter */
352  for (i = 0; i < 3; i++) {
353  params.varyParam = i;
354  params.params->seobCoeffs->updateHCoeffs = 1;
355  params.params->tortoise = 2;
356  memcpy(tmpValues, params.values, sizeof(tmpValues));
357  tmpValues[3] = tmpP[0];
358  tmpValues[4] = tmpP[1];
359  tmpValues[5] = tmpP[2];
360  params.values = tmpValues;
361  /* We need derivatives of H wrt to P (and not P^*) */
362  /* Note that in the 1st term on the last line of Eq. A5 of PRD 81, 084041 (2010) one needs
363  * dH/dX @ fixed P, not P^*, hence the need for what follows */
364  XLAL_CALLGSL(gslStatus = gsl_deriv_central(&F, values[i],
365  STEP_SIZE, &tmpDValues[i], &absErr));
366  params.values = values;
367  params.params->tortoise = 1;
368  if (gslStatus != GSL_SUCCESS) {
369  XLALPrintError("XLAL Error %s - Failure in GSL function\n", __func__);
371  }
372  }
373  for (i = 3; i < 6; i++) {
374  params.varyParam = i;
375  params.params->seobCoeffs->updateHCoeffs = 1;
376  XLAL_CALLGSL(gslStatus = gsl_deriv_central(&F, values[i],
377  STEP_SIZE, &tmpDValues[i], &absErr));
378  if (gslStatus != GSL_SUCCESS) {
379  XLALPrintError("XLAL Error %s - Failure in GSL function\n", __func__);
381  }
382  }
383  for (i = 6; i < 9; i++) {
384  params.varyParam = i;
385  params.params->seobCoeffs->updateHCoeffs = 1;
386  XLAL_CALLGSL(gslStatus = gsl_deriv_central(&F, values[i],
387  STEP_SIZE * mass1 * mass1, &tmpDValues[i], &absErr));
388  if (gslStatus != GSL_SUCCESS) {
389  XLALPrintError("XLAL Error %s - Failure in GSL function\n", __func__);
391  }
392  }
393  for (i = 9; i < 12; i++) {
394  params.varyParam = i;
395  params.params->seobCoeffs->updateHCoeffs = 1;
396  XLAL_CALLGSL(gslStatus = gsl_deriv_central(&F, values[i],
397  STEP_SIZE * mass2 * mass2, &tmpDValues[i], &absErr));
398  if (gslStatus != GSL_SUCCESS) {
399  XLALPrintError("XLAL Error %s - Failure in GSL function\n", __func__);
401  }
402  }
403  params.params->seobCoeffs->updateHCoeffs = updateHCoeffsOld;
404 
405  /* Now make the conversion */
406  /* rVectorDot */
407  // Eq. A4 of PRD 81, 084041 (2010). Note that dvalues[i] = \dot{X^i} but tmpDValues[j] = dH/dvalues[j]
408  for (i = 0; i < 3; i++)
409  for (j = 0, dvalues[i] = 0.; j < 3; j++)
410  dvalues[i] += tmpDValues[j + 3] * Tmatrix[i][j];
411 
412  /* Calculate the orbital angular momentum */
413  Lx = values[1] * values[5] - values[2] * values[4];
414  Ly = values[2] * values[3] - values[0] * values[5];
415  Lz = values[0] * values[4] - values[1] * values[3];
416 
417  magL = sqrt(Lx * Lx + Ly * Ly + Lz * Lz);
418 
419  Lhatx = Lx / magL;
420  Lhaty = Ly / magL;
421  Lhatz = Lz / magL;
422 
423  /* Calculate the polar data */
424  polarDynamics.length = 4;
425  polarDynamics.data = polData;
426 
427  r = polarDynamics.data[0] = sqrt(values[0] * values[0] + values[1] * values[1]
428  + values[2] * values[2]);
429  polarDynamics.data[1] = 0;
430  /* Note that poldata[2] and poldata[3] differ from v2 in which one is normalized by polData[0]. Behaviour is reverted. */
431  polarDynamics.data[2] = (values[0] * values[3] + values[1] * values[4]
432  + values[2] * values[5]) / polData[0];
433  polarDynamics.data[3] = magL;
434 
435 
436  /* Now calculate rCrossRdot and omega */
437  rCrossV_x = values[1] * dvalues[2] - values[2] * dvalues[1];
438  rCrossV_y = values[2] * dvalues[0] - values[0] * dvalues[2];
439  rCrossV_z = values[0] * dvalues[1] - values[1] * dvalues[0];
440 
441  omega = sqrt(rCrossV_x * rCrossV_x + rCrossV_y * rCrossV_y + rCrossV_z * rCrossV_z) / (r * r);
442 
443  //
444  // Compute \vec{L_N} = \vec{r} \times \.{\vec{r}}, \vec{S_i} \dot
445  // \vec{L_N} and chiS and chiA
446  //
447 
448  /* Eq. 16 of PRD 89, 084006 (2014): it's S_{1,2}/m_{1,2}^2.LNhat */
449  if (SpinAlignedEOBversion == 4)
450  {
451  s1dotLN = (s1.data[0] * Lhatx + s1.data[1] * Lhaty + s1.data[2] * Lhatz) /
452  (mass1 * mass1);
453  s2dotLN = (s2.data[0] * Lhatx + s2.data[1] * Lhaty + s2.data[2] * Lhatz) /
454  (mass2 * mass2);
455  }
456  else
457  {
458  s1dotLN = (s1.data[0] * rCrossV_x + s1.data[1] * rCrossV_y + s1.data[2] * rCrossV_z) /
459  (r * r * omega * mass1 * mass1);
460  s2dotLN = (s2.data[0] * rCrossV_x + s2.data[1] * rCrossV_y + s2.data[2] * rCrossV_z) /
461  (r * r * omega * mass2 * mass2);
462  }
463 
464  chiS = 0.5 * (s1dotLN + s2dotLN);
465  chiA = 0.5 * (s1dotLN - s2dotLN);
466  REAL8 Lhat[3] = {Lhatx, Lhaty, Lhatz};
467  REAL8 tempS1_p = inner_product(s1.data, Lhat);
468  REAL8 tempS2_p = inner_product(s2.data, Lhat);
469  REAL8 S1_perp[3] = {0, 0, 0};
470  REAL8 S2_perp[3] = {0, 0, 0};
471  for (UINT4 jj = 0; jj < 3; jj++)
472  {
473  S1_perp[jj] = s1.data[jj] - tempS1_p * Lhat[jj];
474  S2_perp[jj] = s2.data[jj] - tempS2_p * Lhat[jj];
475  }
476  REAL8 sKerr_norm = sqrt(inner_product(sKerr.data, sKerr.data));
477  REAL8 S_con = 0.0;
478  if (sKerr_norm > 1e-6){
479  S_con = sKerr.data[0] * Lhat[0] + sKerr.data[1] * Lhat[1] + sKerr.data[2] * Lhat[2];
480  S_con /= (1 - 2 * eta);
481  S_con += (inner_product(S1_perp, sKerr.data) + inner_product(S2_perp, sKerr.data)) / sKerr_norm / (1 - 2 * eta) / 2.;
482  }
483  REAL8 chi = S_con;
484  if (debugPK) {
485  XLAL_PRINT_INFO("chiS = %.12e, chiA = %.12e\n", chiS, chiA);
486  fflush(NULL);
487  }
488  if (debugPK) {
489  XLAL_PRINT_INFO("Computing derivatives for values\n%.12e\t%.12e\t%.12e\t%.12e\t%.12e\t%.12e\t%.12e\t%.12e\t%.12e\t%.12e\t%.12e\t%.12e\n\n",
490  (double)values[0], (double)values[1], (double)values[2],
491  (double)values[3], (double)values[4], (double)values[5],
492  (double)values[6], (double)values[7], (double)values[8],
493  (double)values[9], (double)values[10], (double)values[11]);
494  XLAL_PRINT_INFO("tmpDvalues\n%.12e\t%.12e\t%.12e\t%.12e\t%.12e\t%.12e\t%.12e\t%.12e\t%.12e\t%.12e\t%.12e\t%.12e\t\n",
495  (double)tmpDValues[0], (double)tmpDValues[1], (double)tmpDValues[2],
496  (double)tmpDValues[3], (double)tmpDValues[4], (double)tmpDValues[5],
497  (double)tmpDValues[6], (double)tmpDValues[7], (double)tmpDValues[8],
498  (double)tmpDValues[9], (double)tmpDValues[10], (double)tmpDValues[11]);
499  }
500  /*
501  * Compute the test-particle limit spin of the deformed-Kerr
502  * background
503  */
504  switch (SpinAlignedEOBversion) {
505  case 1:
506  /* See below Eq. 17 of PRD 86, 041011 (2012) */
507  tplspin = 0.0;
508  break;
509  case 2:
510  case 3:
511  case 4:
512  /* See below Eq. 4 of PRD 89, 061502(R) (2014)*/
513  tplspin = (1. - 2. * eta) * chiS + (mass1 - mass2) / (mass1 + mass2) * chiA;
514  break;
515  default:
516  XLALPrintError("XLAL Error - %s: Unknown SEOBNR version!\nAt present only v1 and v2 are available.\n", __func__);
518  break;
519  }
520 
521 
522  memcpy(params.params->s1Vec->data, s1norm.data, 3*sizeof(*params.params->s1Vec->data));
523  memcpy(params.params->s2Vec->data, s2norm.data, 3*sizeof(*params.params->s2Vec->data));
524  memcpy(params.params->sigmaStar->data, sStar.data, 3*sizeof(*params.params->sigmaStar->data));
525  memcpy(params.params->sigmaKerr->data, sKerr.data, 3*sizeof(*params.params->sigmaKerr->data));
526 
527 
528  params.params->a = a;
529  if (params.params->alignedSpins==1) {
531  params.params->eobParams->hCoeffs, mass1, mass2, eta, tplspin,
532  chiS, chiA, SpinAlignedEOBversion);
533  }
534  else {
535  /* This is needed because SpinAlignedEOBversion is set to 2 for v3 */
536  /* while XLALSimIMREOBCalcSpinPrecFacWaveformCoefficients requires 3 ... */
537  if ( SpinAlignedEOBversion == 2 ) SpinAlignedEOBversionForWaveformCoefficients = 3;
538  else SpinAlignedEOBversionForWaveformCoefficients = SpinAlignedEOBversion;
539 
541  params.params->eobParams->hCoeffs, mass1, mass2, eta, tplspin,
542  chiS, chiA, SpinAlignedEOBversionForWaveformCoefficients);
543  }
544  if (SpinAlignedEOBversion == 4)
545  {
547  SpinAlignedEOBversion);
548  }
549  else
550  {
552  SpinAlignedEOBversion);
553  }
554 
555  H = XLALSimIMRSpinPrecEOBHamiltonian(eta, &rVec, &pVec, &s1norm, &s2norm,
556  &sKerr, &sStar, params.params->tortoise, params.params->seobCoeffs);
557 
558  H = H * (mass1 + mass2);
559 
560  /* Now we have the ingredients to compute the flux */
561  memcpy(tmpValues, values, 12 * sizeof(REAL8));
562  cartDynamics.data = tmpValues;
563  if (debugPK) {
564  XLAL_PRINT_INFO("params.params->a = %.12e, %.12e\n", a, params.params->a);
565  fflush(NULL);
566  }
567  /* Eq. 13 of PRD 86, 024011 (2012) */
568  if ( params.params->ignoreflux == 0 ) {
569  flux = XLALInspiralPrecSpinFactorizedFlux(&polarDynamics, &cartDynamics,
570  nqcCoeffs, omega, params.params, H / (mass1 + mass2), lMax, SpinAlignedEOBversion);
571  }
572  else if ( params.params->ignoreflux == 1) {
573  flux = 0.;
574  }
575  else {
576  XLAL_PRINT_INFO("Wrong ignorflux option in XLALSpinPrecHcapNumericalDerivative!\n");
578  }
579  /*
580  * Looking at consistency with the non-spinning model, we have to divide the
581  * flux by eta
582  */
583  flux = flux / eta;
584 
585  pDotS1 = pData[0] * s1.data[0] + pVec.data[1] * s1.data[1] + pVec.data[2] * s1.data[2];
586  pDotS2 = pVec.data[0] * s2.data[0] + pVec.data[1] * s2.data[1] + pVec.data[2] * s2.data[2];
587  rrTerm2 = 8. / 15. * eta * eta * pow(omega, 8. / 3.) / (magL * magL * r) * ((61. + 48. * mass2 / mass1) * pDotS1 + (61. + 48. * mass1 / mass2) * pDotS2);
588 
589  if (debugPK) {
590  XLAL_PRINT_INFO("omega = %.12e \n flux = %.12e \n Lmag = %.12e\n", omega, flux, magL);
591  XLAL_PRINT_INFO("rrForce = %.12e %.12e %.12e\n", -flux * values[3] / (omega * magL), -flux * values[4] / (omega * magL), -flux * values[5] / (omega * magL));
592  }
593  /* Now pDot */
594  /* Compute the first and second terms in eq. A5 of PRD 81, 084041 (2010) */
595  for (i = 0; i < 3; i++) {
596  for (j = 0, tmpPdotT1[i] = 0.; j < 3; j++)
597  tmpPdotT1[i] += -tmpDValues[j] * Tmatrix[i][j];
598 
599  tmpPdotT2[i] = -flux * values[i + 3] / (omega * magL);
600  }
601 
602  /* Compute the third term in eq. A5 */
603  REAL8 tmpPdotT3T11[3][3][3], tmpPdotT3T12[3][3], tmpPdotT3T2[3];
604 
605  for (i = 0; i < 3; i++)
606  for (j = 0; j < 3; j++)
607  for (l = 0; l < 3; l++)
608  for (k = 0, tmpPdotT3T11[i][j][l] = 0.; k < 3; k++)
609  tmpPdotT3T11[i][j][l] += dTijdXk[i][k][j] * invTmatrix[k][l];
610 
611  if (debugPK) {
612  for (i = 0; i < 3; i++)
613  for (j = 0; j < 1; j++)
614  for (l = 0; l < 3; l++) {
615  double sum = 0;
616  for (k = 0; k < 3; k++)
617  sum += dTijdXk[i][k][j] * invTmatrix[k][l];
618  XLAL_PRINT_INFO("\n sum[%d][%d][%d] = %.12e", i, j, l, sum);
619 
620  }
621  XLAL_PRINT_INFO("\n\n Printing dTdX * Tinverse:\n");
622  for (l = 0; l < 3; l++) {
623  for (i = 0; i < 3; i++)
624  for (j = 0; j < 3; j++) {
625  double sum = 0;
626  for (k = 0; k < 3; k++) {
627  sum += dTijdXk[i][k][l] * invTmatrix[k][j];
628  XLAL_PRINT_INFO("\n sum[%d][%d][%d] = %.12e", l, i, j, sum);
629  }
630  }
631  }
632  }
633  if (debugPK)
634  XLAL_PRINT_INFO("\npData: {%.12e, %.12e, %.12e}\n", pData[0], pData[1], pData[2]);
635  for (i = 0; i < 3; i++)
636  for (j = 0; j < 3; j++)
637  for (k = 0, tmpPdotT3T12[i][j] = 0.; k < 3; k++)
638  tmpPdotT3T12[i][j] += tmpPdotT3T11[i][j][k] * pData[k];
639 
640  for (i = 0; i < 3; i++)
641  for (j = 0, tmpPdotT3T2[i] = 0.; j < 3; j++)
642  tmpPdotT3T2[i] += tmpDValues[j + 3] * Tmatrix[i][j];
643 
644  for (i = 0; i < 3; i++)
645  for (j = 0, tmpPdotT3[i] = 0.; j < 3; j++)
646  tmpPdotT3[i] += tmpPdotT3T12[i][j] * tmpPdotT3T2[j];
647 
648  /* Add them to obtain pDot */
649  for (i = 0; i < 3; i++)
650  dvalues[i + 3] = tmpPdotT1[i] + tmpPdotT2[i] + tmpPdotT3[i];
651 
652  if (debugPK) {
653  XLAL_PRINT_INFO("\ntmpPdotT3 = ");
654  for (i = 0; i < 3; i++)
655  XLAL_PRINT_INFO("%.12e ", tmpPdotT3[i]);
656  XLAL_PRINT_INFO("\n");
657  }
658 
659  /* Eqs. 11c-11d of PRD 89, 084006 (2014) */
660  /* spin1 */
661  if (debugPK) {
662  XLAL_PRINT_INFO("Raw spin1 derivatives = %.12e %.12e %.12e\n", tmpDValues[6], tmpDValues[7], tmpDValues[8]);
663  XLAL_PRINT_INFO("Raw spin2 derivatives = %.12e %.12e %.12e\n", tmpDValues[9], tmpDValues[10], tmpDValues[11]);
664  }
665  /* The factor eta is there becasue Hreal is normalized by eta */
666  dvalues[6] = eta * (tmpDValues[7] * values[8] - tmpDValues[8] * values[7]);
667  dvalues[7] = eta * (tmpDValues[8] * values[6] - tmpDValues[6] * values[8]);
668  dvalues[8] = eta * (tmpDValues[6] * values[7] - tmpDValues[7] * values[6]);
669 
670  /* spin2 */
671  /* The factor eta is there becasue Hreal is normalized by eta */
672  dvalues[9] = eta * (tmpDValues[10] * values[11] - tmpDValues[11] * values[10]);
673  dvalues[10] = eta * (tmpDValues[11] * values[9] - tmpDValues[9] * values[11]);
674  dvalues[11] = eta * (tmpDValues[9] * values[10] - tmpDValues[10] * values[9]);
675 
676  /* phase and precessing bit */
677  dLx = dvalues[1] * values[5] - dvalues[2] * values[4]
678  + values[1] * dvalues[5] - values[2] * dvalues[4];
679 
680  dLy = dvalues[2] * values[3] - dvalues[0] * values[5]
681  + values[2] * dvalues[3] - values[0] * dvalues[5];
682 
683  dLz = dvalues[0] * values[4] - dvalues[1] * values[3]
684  + values[0] * dvalues[4] - values[1] * dvalues[3];
685 
686  dMagL = (Lx * dLx + Ly * dLy + Lz * dLz) / magL;
687 
688  dLhatx = (dLx * magL - Lx * dMagL) / (magL * magL);
689  dLhaty = (dLy * magL - Ly * dMagL) / (magL * magL);
690 
691  /*
692  * Finn Chernoff convention is used here.
693  */
694  /* Eqs. 19-20 of PRD 89, 084006 (2014) */
695  if (Lhatx == 0.0 && Lhaty == 0.0) {
696  alphadotcosi = 0.0;
697  } else {
698  alphadotcosi = Lhatz * (Lhatx * dLhaty - Lhaty * dLhatx) / (Lhatx * Lhatx + Lhaty * Lhaty);
699  }
700  /* These are ODEs for the phase that enters the h_{lm}: see Eq. 3.11 of PRD 79, 104023 (2009) */
701  dvalues[12] = omega - alphadotcosi;
702  dvalues[13] = alphadotcosi;
703 
704  if (debugPK) {
705  XLAL_PRINT_INFO("\nIn XLALSpinPrecHcapNumericalDerivative:\n");
706  /* Print out all mass parameters */
707  XLAL_PRINT_INFO("m1 = %12.12lf, m2 = %12.12lf, eta = %12.12lf\n",
708  (double)mass1, (double)mass2, (double)eta);
709  /* Print out all spin parameters */
710  XLAL_PRINT_INFO("spin1 = {%12.12lf,%12.12lf,%12.12lf}, spin2 = {%12.12lf,%12.12lf,%12.12lf}\n",
711  (double)s1.data[0], (double)s1.data[1], (double)s1.data[2],
712  (double)s2.data[0], (double)s2.data[1], (double)s2.data[2]);
713  XLAL_PRINT_INFO("sigmaStar = {%12.12lf,%12.12lf,%12.12lf}, sigmaKerr = {%12.12lf,%12.12lf,%12.12lf}\n",
714  (double)sStar.data[0], (double)sStar.data[1],
715  (double)sStar.data[2], (double)sKerr.data[0],
716  (double)sKerr.data[1], (double)sKerr.data[2]);
717  XLAL_PRINT_INFO("L = {%12.12lf,%12.12lf,%12.12lf}, |L| = %12.12lf\n",
718  (double)Lx, (double)Ly, (double)Lz, (double)magL);
719  XLAL_PRINT_INFO("dLdt = {%12.12lf,%12.12lf,%12.12lf}, d|L|dt = %12.12lf\n",
720  (double)dLx, (double)dLy, (double)dLz, (double)dMagL);
721  XLAL_PRINT_INFO("Polar coordinates = {%12.12lf, %12.12lf, %12.12lf, %12.12lf}\n",
722  (double)polData[0], (double)polData[1], (double)polData[2],
723  (double)polData[3]);
724 
725  XLAL_PRINT_INFO("Cartesian coordinates: {%12.12lf,%12.12lf,%12.12lf,%12.12lf,%12.12lf,%12.12lf,%12.12lf,%12.12lf,%12.12lf,%12.12lf,%12.12lf,%12.12lf,%12.12lf,%12.12lf}\n",
726  (double)values[0], (double)values[1], (double)values[2],
727  (double)values[3], (double)values[4], (double)values[5],
728  (double)values[6], (double)values[7], (double)values[8],
729  (double)values[9], (double)values[10], (double)values[11],
730  (double)values[12], (double)values[13]);
731  XLAL_PRINT_INFO("Cartesian derivatives: {%12.12lf,%12.12lf,%12.12lf,%12.12lf,%12.12lf,%12.12lf,%12.12lf,%12.12lf,%12.12lf,%12.12lf,%12.12lf,%12.12lf,%12.12lf,%12.12lf}\n",
732  (double)dvalues[0], (double)dvalues[1], (double)dvalues[2],
733  (double)dvalues[3], (double)dvalues[4], (double)dvalues[5],
734  (double)dvalues[6], (double)dvalues[7], (double)dvalues[8],
735  (double)dvalues[9], (double)dvalues[10], (double)dvalues[11],
736  (double)dvalues[12], (double)dvalues[13]);
737 
738  XLAL_PRINT_INFO("Hamiltonian = %12.12lf, Flux = %12.12lf, Omega = %12.12lf\n",
739  H/ (mass1 + mass2), eta*flux, omega);
740  fflush(NULL);
741  }
742 
743  if(debugPK){
744  for(i=0; i<14; i++)
745  if(dvalues[i] > 1e3){
746  XLAL_PRINT_INFO("\nIn XLALSpinPrecHcapNumericalDerivative:\n");
747  XLAL_PRINT_INFO("Derivatives have blown up!\n");
748  for(j=0; j<14; XLAL_PRINT_INFO("dvalues[%d] = %3.12f\n", j, dvalues[j]), j++);
749  XLAL_PRINT_INFO("Flux = %3.12f\n\n", flux);
750  break;
751  }
752  }
753  return XLAL_SUCCESS;
754 }
755 
756 
757 /**
758  * Calculate the derivative of the Hamiltonian w.r.t. a specific parameter
759  * Used by generic spin EOB model, including initial conditions solver.
760  */
761 static REAL8
763  const INT4 paramIdx, /**<< Index of the parameters */
764  const REAL8 values[], /**<< Dynamical variables */
765  SpinEOBParams * funcParams /**<< EOB Parameters */
766 )
767 {
768  static const REAL8 STEP_SIZE = 2.0e-3;
769 
771 
772  REAL8 result;
773 
774  gsl_function F;
775  INT4 gslStatus;
776 
777  REAL8 mass1 , mass2;
778 
779  /* The error in a derivative as measured by GSL */
780  REAL8 absErr;
781 
782  /* Set up pointers for GSL */
783  params.params = funcParams;
784 
785 
786  F.function = &GSLSpinPrecHamiltonianWrapper;
787  F.params = &params;
788  params.varyParam = paramIdx;
789 
790  mass1 = params.params->eobParams->m1;
791  mass2 = params.params->eobParams->m2;
792 
793  REAL8 mT2 = (mass1 + mass2) * (mass1 + mass2);
794  REAL8 tmpValues[14];
795  for (UINT4 i = 0; i < 3; i++) {
796  tmpValues[i] = values[i];
797  tmpValues[i + 3] = values[i + 3];
798  tmpValues[i + 6] = values[i + 6]/mT2;
799  tmpValues[i + 9] = values[i + 9]/mT2;
800  }
801  tmpValues[12] = values[12];
802  tmpValues[13] = values[13];
803  params.values = tmpValues;
804  REAL8 m_total = mass1 + mass2;
805  mass1 /=m_total;
806  mass2 /=m_total;
807  params.params->seobCoeffs->updateHCoeffs = 1;
808  /* Now calculate derivatives w.r.t. the required parameter */
809  if (paramIdx >=0 && paramIdx < 6) {
810  XLAL_CALLGSL(gslStatus = gsl_deriv_central(&F, values[paramIdx],
811  STEP_SIZE, &result, &absErr));
812  }
813  else if (paramIdx >= 6 && paramIdx < 9) {
814  params.params->seobCoeffs->updateHCoeffs = 1;
815  XLAL_CALLGSL(gslStatus = gsl_deriv_central(&F, values[paramIdx],
816  STEP_SIZE * mass1 * mass1, &result, &absErr));
817  }
818  else if (paramIdx >= 9 && paramIdx < 12) {
819  params.params->seobCoeffs->updateHCoeffs = 1;
820  XLAL_CALLGSL(gslStatus = gsl_deriv_central(&F, values[paramIdx],
821  STEP_SIZE * mass2 * mass2, &result, &absErr));
822  }
823  else {
824  XLAL_PRINT_INFO("Requested partial derivative is not availabble\n");
826  }
827  if (gslStatus != GSL_SUCCESS) {
828  XLALPrintError("XLAL Error %s - Failure in GSL function\n", __func__);
830  }
831  //XLAL_PRINT_INFO("Abserr = %e\n", absErr);
832 
833  return result;
834 }
835 
836 
837 /**
838  * Wrapper for GSL to call the Hamiltonian function
839  */
840 static REAL8
842 {
843  HcapDerivParams *dParams = (HcapDerivParams *) params;
844 
845  EOBParams *eobParams = (EOBParams *) dParams->params->eobParams;
846  SpinEOBHCoeffs UNUSED *coeffs = (SpinEOBHCoeffs *) dParams->params->seobCoeffs;
847 
848  REAL8 tmpVec [12];
849  REAL8 s1normData[3], s2normData[3], sKerrData[3], sStarData[3];
850 
851  /*
852  * These are the vectors which will be used in the call to the
853  * Hamiltonian
854  */
855  REAL8Vector r , p, spin1, spin2, spin1norm, spin2norm;
856  REAL8Vector sigmaKerr, sigmaStar;
857 
858  INT4 i;
859  REAL8 a;
860  REAL8 m1 = eobParams->m1;
861  REAL8 m2 = eobParams->m2;
862  REAL8 m_total = m1 + m2;
863  m1 /=m_total;
864  m2 /=m_total;
865  REAL8 UNUSED mT2 = (m1 + m2) * (m1 + m2);
866  REAL8 UNUSED eta = m1 * m2 / mT2;
867 
868  INT4 oldTortoise = dParams->params->tortoise;
869  /* Use a temporary vector to avoid corrupting the main function */
870  memcpy(tmpVec, dParams->values, sizeof(tmpVec));
871 
872  /* Set the relevant entry in the vector to the correct value */
873  tmpVec[dParams->varyParam] = x;
874 
875  /* Set the LAL-style vectors to point to the appropriate things */
876  r.length = p.length = spin1.length = spin2.length = spin1norm.length = spin2norm.length = 3;
877  sigmaKerr.length = sigmaStar.length = 3;
878  r.data = tmpVec;
879  p.data = tmpVec + 3;
880 
881  spin1.data = tmpVec + 6;
882  spin2.data = tmpVec + 9;
883  spin1norm.data = s1normData;
884  spin2norm.data = s2normData;
885  sigmaKerr.data = sKerrData;
886  sigmaStar.data = sStarData;
887 
888  memcpy(spin1norm.data, tmpVec + 6, 3 * sizeof(REAL8));
889  memcpy(spin2norm.data, tmpVec + 9, 3 * sizeof(REAL8));
890 
891  /*
892  * To compute the SigmaKerr and SigmaStar, we need the non-normalized
893  * spin values, i.e. S_i. The spins being evolved are S_i/M^2.
894  */
895  for (i = 0; i < 3; i++) {
896  spin1.data[i] *= mT2;
897  spin2.data[i] *= mT2;
898  }
899 
900  /* Calculate various spin parameters */
901  /* Note that XLALSimIMRSpinEOBCalculateSigmaKerr and XLALSimIMRSpinEOBCalculateSigmaStar return a unitless quantity */
903  m2, &spin1, &spin2);
905  m2, &spin1, &spin2);
906  a = sqrt(sigmaKerr.data[0] * sigmaKerr.data[0]
907  + sigmaKerr.data[1] * sigmaKerr.data[1]
908  + sigmaKerr.data[2] * sigmaKerr.data[2]);
909 
910  if (isnan(a) ) {
911  XLALPrintError( "XLAL Error - %s: a = nan \n", __func__);
913  }
914 
915  REAL8 SpinEOBH=0.0;
916  SpinEOBH = XLALSimIMRSpinPrecEOBHamiltonian(eobParams->eta, &r, &p, &spin1norm, &spin2norm, &sigmaKerr, &sigmaStar, dParams->params->tortoise, dParams->params->seobCoeffs) / eobParams->eta;
917  if (dParams->varyParam < 3)
918  dParams->params->tortoise = oldTortoise;
919  return SpinEOBH;
920 }
921 
922 #endif /* _LALSIMIMRSPINPRECEOBHCAPNUMERICALDERIVATIVE_C */
static int XLALSimIMRCalculateSpinPrecEOBHCoeffs_v2(SpinEOBHCoeffs *coeffs, const REAL8 eta, REAL8 a, REAL8 chi, const UINT4 SpinAlignedEOBversion)
This function is used to calculate some coefficients which will be used in the spinning EOB Hamiltoni...
static int XLALSimIMRCalculateSpinPrecEOBHCoeffs(SpinEOBHCoeffs *coeffs, const REAL8 eta, const REAL8 a, const UINT4 SpinAlignedEOBversion)
This function is used to calculate some coefficients which will be used in the spinning EOB Hamiltoni...
static int XLALSimIMRSpinEOBCalculateSigmaKerr(REAL8Vector *sigmaKerr, REAL8 mass1, REAL8 mass2, REAL8Vector *s1, REAL8Vector *s2)
Function to calculate normalized spin of the deformed-Kerr background in SEOBNRv1.
static int XLALSimIMRSpinEOBCalculateSigmaStar(REAL8Vector *sigmaStar, REAL8 mass1, REAL8 mass2, REAL8Vector *s1, REAL8Vector *s2)
Function to calculate normalized spin of the test particle in SEOBNRv1.
#define KRONECKER_DELTA(i, j)
static REAL8 XLALInspiralPrecSpinFactorizedFlux(REAL8Vector *polvalues, REAL8Vector *values, EOBNonQCCoeffs *nqcCoeffs, const REAL8 omega, SpinEOBParams *ak, const REAL8 H, const INT4 lMax, const UINT4 SpinAlignedEOBversion)
This function calculates the spin factorized-resummed GW energy flux for given dynamical variables.
static int XLALSimIMREOBCalcSpinPrecFacWaveformCoefficients(FacWaveformCoeffs *const coeffs, const REAL8 m1, const REAL8 m2, const REAL8 eta, const REAL8 a, const REAL8 chiS, const REAL8 chiA, const UINT4 SpinAlignedEOBversion)
Waveform expressions are given by Taracchini et al.
static REAL8 XLALSimIMRSpinPrecEOBHamiltonian(const REAL8 eta, REAL8Vector *restrict x, REAL8Vector *restrict p, REAL8Vector *restrict s1Vec, REAL8Vector *restrict s2Vec, REAL8Vector *restrict sigmaKerr, REAL8Vector *restrict sigmaStar, int tortoise, SpinEOBHCoeffs *coeffs)
static REAL8 inner_product(const REAL8 values1[], const REAL8 values2[])
Functions to compute the inner product and cross products between vectors.
static REAL8 GSLSpinPrecHamiltonianWrapper(double x, void *params)
Wrapper for GSL to call the Hamiltonian function.
static REAL8 XLALSpinPrecHcapNumDerivWRTParam(const INT4 paramIdx, const REAL8 values[], SpinEOBParams *funcParams)
Calculate the derivative of the Hamiltonian w.r.t.
static int XLALSpinPrecHcapNumericalDerivative(double UNUSED t, const REAL8 values[], REAL8 dvalues[], void *funcParams)
Function to calculate numerical derivatives of the spin EOB Hamiltonian, which correspond to time der...
static REAL8 sum(REAL8 *arr1, REAL8 *arr2, int k)
#define XLAL_CALLGSL(statement)
int l
Definition: bh_qnmode.c:135
double i
Definition: bh_ringdown.c:118
double e
Definition: bh_ringdown.c:117
const double prT
const double H
const double deltaU
const double deltaR
const double u
const double w2
const double u3
const double bulk
const double u5
const double a2
const double m1PlusetaKK
const double u2
const double u4
const double csi
const double logTerms
double REAL8
uint32_t UINT4
int32_t INT4
static const INT4 r
static const INT4 a
#define XLAL_ERROR_REAL8(...)
#define XLAL_PRINT_INFO(...)
#define XLAL_ERROR(...)
int XLALPrintError(const char *fmt,...) _LAL_GCC_PRINTF_FORMAT_(1
XLAL_SUCCESS
XLAL_EFUNC
XLAL_EINVAL
list x
list p
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.
const REAL8 * values
SpinEOBParams * params
REAL8 * data
Parameters for the spinning EOB model, used in calculating the Hamiltonian.
Parameters for the spinning EOB model.
SpinEOBHCoeffs * seobCoeffs
EOBParams * eobParams
Definition: burst.c:245
LALDict * params
Definition: inspiral.c:248
double deltaT
Definition: unicorn.c:24