22 #include <gsl/gsl_const.h>
23 #include <gsl/gsl_errno.h>
24 #include <gsl/gsl_math.h>
25 #include <gsl/gsl_odeiv.h>
27 #include <lal/LALSimInspiral.h>
28 #include <lal/LALAdaptiveRungeKuttaIntegrator.h>
29 #include <lal/LALConstants.h>
30 #include <lal/LALStdlib.h>
31 #include <lal/TimeSeries.h>
32 #include <lal/Units.h>
39 #define UNUSED __attribute__ ((unused))
45 #define LALSIMINSPIRAL_T1_VISCO 1.L/sqrt(6.L)
47 #define LALSIMINSPIRAL_T1_TEST_ISCO 1025
49 #define LALSIMINSPIRAL_NUM_T1_VARIABLES 2
51 #define LALSIMINSPIRAL_T1_ABSOLUTE_TOLERANCE 1.e-12
52 #define LALSIMINSPIRAL_T1_RELATIVE_TOLERANCE 1.e-12
115 ydot[0] = -
p->ak.av*
p->flux(
y[0],&
p->ak.akdEF)/
p->dEdv(
y[0],&
p->ak.akdEF);
116 ydot[1] =
y[0]*
y[0]*
y[0]*
p->ak.av;
198 #if __GNUC__ >= 7 && !defined __INTEL_COMPILER
204 #if __GNUC__ >= 7 && !defined __INTEL_COMPILER
210 XLALPrintError(
"XLAL Error - %s: Invalid tidal PN order %d\nSee LALSimInspiralTidalOrder enum in LALSimInspiralWaveformFlags.h for valid tidal orders.\n",
226 XLALPrintError(
"XLAL Error - %s: PN approximant not supported for PN order %d\n", __func__,O);
261 XLALPrintError(
"XLAL Error - %s: PN approximant not supported for PN order %d\n", __func__,O);
265 XLALPrintError(
"XLAL Error - %s: Unknown PN order in switch\n", __func__);
309 double lengths, VRef = 0.;
310 int len, intreturn, idx, idxRef = 0;
341 XLALPrintError(
"XLAL Error - %s: Cannot allocate integrator\n", __func__);
356 XLALPrintError(
"XLAL Error - %s: integration failed with errorcode %d.\n", __func__, intreturn);
376 phiRef -= yout->
data[3*len-1];
378 else if( fRef ==
f_min )
379 phiRef -= yout->
data[2*len];
388 }
while (yout->
data[len+idx] <= VRef);
389 phiRef -= yout->
data[2*len+idxRef];
395 for( idx = 0; idx < len; idx++ )
397 (*V)->data->data[idx] = yout->
data[len+idx];
398 (*phi)->data->data[idx] = yout->
data[2*len+idx] + phiRef;
403 return (
int)(*V)->data->length;
442 if( fRef != 0. && fRef <
f_min )
444 XLALPrintError(
"XLAL Error - %s: fRef = %f must be > fStart = %f\n",
445 __func__, fRef,
f_min);
450 XLALPrintError(
"XLAL Error - %s: fRef = %f must be < Schwar. ISCO=%f\n",
451 __func__, fRef, fISCO);
460 m1, m2,
f_min, fRef, lambda1, lambda2, tideO, phaseO);
464 v0, m1, m2,
r,
i, amplitudeO);
499 if( fRef != 0. && fRef <
f_min )
501 XLALPrintError(
"XLAL Error - %s: fRef = %f must be > fStart = %f\n",
502 __func__, fRef,
f_min);
507 XLALPrintError(
"XLAL Error - %s: fRef = %f must be < Schwar. ISCO=%f\n",
508 __func__, fRef, fISCO);
516 m1, m2,
f_min, fRef, lambda1, lambda2, tideO, phaseO);
521 for(
l=2;
l<=lmax;
l++){
522 for(
m=-
l;
m<=
l;
m++){
524 m1, m2,
r, amplitudeO,
l,
m);
569 if( fRef != 0. && fRef <
f_min )
571 XLALPrintError(
"XLAL Error - %s: fRef = %f must be > fStart = %f\n",
572 __func__, fRef,
f_min);
577 XLALPrintError(
"XLAL Error - %s: fRef = %f must be < Schwar. ISCO=%f\n",
578 __func__, fRef, fISCO);
586 m1, m2,
f_min, fRef, lambda1, lambda2, tideO, phaseO);
590 m1, m2,
r, amplitudeO,
l,
m);
668 #include <lal/PrintFTSeries.h>
669 #include <lal/PrintFTSeries.h>
684 XLALSimInspiralTaylorT1PN(&hplus, &hcross, &tc, phic,
deltaT, m1, m2,
f_min, fRef,
r,
i, lambda1, lambda2, tideO, O);
void LALCheckMemoryLeaks(void)
static REAL8 UNUSED XLALSimInspiralPNFlux_5PNCoeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralPNEnergy_4PNCoeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralPNFlux_0PNCoeff(REAL8 eta)
Computes the flux PN Coefficients.
static REAL8 UNUSED XLALSimInspiralPNEnergy_10PNTidalCoeff(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralPNFlux_12PNTidalCoeff(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralPNFlux_3PNCoeff(REAL8 UNUSED eta)
static REAL8 UNUSED XLALSimInspiralPNEnergy_2PNCoeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralPNFlux_4PNCoeff(REAL8 eta)
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 XLALSimInspiralPNFlux_2PNCoeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralPNEnergy_12PNTidalCoeff(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralPNFlux_7PNCoeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralPNFlux_6PNCoeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralPNFlux_6PNLogCoeff(REAL8 UNUSED eta)
static REAL8 UNUSED XLALSimInspiralPNEnergy_6PNCoeff(REAL8 eta)
REAL8() SimInspiralTaylorT1Energy(REAL8 v, expnCoeffsdEnergyFlux *ak)
REAL8() SimInspiralTaylorT1dEnergy(REAL8 v, expnCoeffsdEnergyFlux *ak)
static int XLALSimInspiralTaylorT1StoppingTest(double UNUSED t, const double y[], double UNUSED ydot[], void UNUSED *params)
#define LALSIMINSPIRAL_T1_ABSOLUTE_TOLERANCE
static int XLALSimInspiralTaylorT1Setup(expnCoeffsTaylorT1 *ak, expnFuncTaylorT1 *f, REAL8 m1, REAL8 m2, REAL8 lambda1, REAL8 lambda2, LALSimInspiralTidalOrder tideO, int O)
#define LALSIMINSPIRAL_T1_VISCO
static int XLALSimInspiralTaylorT1PNEvolveOrbitIntegrand(double UNUSED t, const double y[], double ydot[], void *params)
#define LALSIMINSPIRAL_NUM_T1_VARIABLES
REAL8() SimInspiralTaylorT1Flux(REAL8 v, expnCoeffsdEnergyFlux *ak)
#define LALSIMINSPIRAL_T1_RELATIVE_TOLERANCE
#define LALSIMINSPIRAL_T1_TEST_ISCO
Module containing the energy and flux functions for waveform generation.
static REAL8 UNUSED XLALSimInspiralFt0(REAL8 v, expnCoeffsdEnergyFlux *ak)
static REAL8 UNUSED XLALSimInspiralEt6(REAL8 v, expnCoeffsdEnergyFlux *ak)
static REAL8 UNUSED XLALSimInspiralFt2(REAL8 v, expnCoeffsdEnergyFlux *ak)
static REAL8 UNUSED XLALSimInspiralEt0(REAL8 v, expnCoeffsdEnergyFlux *ak)
static REAL8 UNUSED XLALSimInspiralEt4(REAL8 v, expnCoeffsdEnergyFlux *ak)
static REAL8 UNUSED XLALSimInspiraldEt4(REAL8 v, expnCoeffsdEnergyFlux *ak)
static REAL8 UNUSED XLALSimInspiralFt4(REAL8 v, expnCoeffsdEnergyFlux *ak)
static REAL8 UNUSED XLALSimInspiraldEt2(REAL8 v, expnCoeffsdEnergyFlux *ak)
static REAL8 UNUSED XLALSimInspiralEt2(REAL8 v, expnCoeffsdEnergyFlux *ak)
static REAL8 UNUSED XLALSimInspiraldEt0(REAL8 v, expnCoeffsdEnergyFlux *ak)
static REAL8 UNUSED XLALSimInspiralFt7(REAL8 v, expnCoeffsdEnergyFlux *ak)
static REAL8 UNUSED XLALSimInspiraldEt6(REAL8 v, expnCoeffsdEnergyFlux *ak)
static REAL8 UNUSED XLALSimInspiralFt6(REAL8 v, expnCoeffsdEnergyFlux *ak)
static REAL8 UNUSED XLALSimInspiralFt5(REAL8 v, expnCoeffsdEnergyFlux *ak)
static REAL8 UNUSED XLALSimInspiralFt3(REAL8 v, expnCoeffsdEnergyFlux *ak)
int main(int argc, char *argv[])
void XLALDestroyREAL8Array(REAL8Array *)
void XLALAdaptiveRungeKuttaFree(LALAdaptiveRungeKuttaIntegrator *integrator)
int XLALAdaptiveRungeKutta4Hermite(LALAdaptiveRungeKuttaIntegrator *integrator, void *params, REAL8 *yinit, REAL8 tinit, REAL8 tend_in, REAL8 deltat, REAL8Array **yout)
LALAdaptiveRungeKuttaIntegrator * XLALAdaptiveRungeKutta4Init(int dim, int(*dydt)(double t, const double y[], double dydt[], void *params), int(*stop)(double t, const double y[], double dydt[], void *params), double eps_abs, double eps_rel)
int XLALSimInspiralPNPolarizationWaveforms(REAL8TimeSeries **hplus, REAL8TimeSeries **hcross, REAL8TimeSeries *V, REAL8TimeSeries *Phi, REAL8 v0, REAL8 m1, REAL8 m2, REAL8 r, REAL8 i, int ampO)
Given time series for a binary's orbital dynamical variables, construct the waveform polarizations h+...
LALSimInspiralTidalOrder
Enumeration of allowed PN orders of tidal effects.
@ LAL_SIM_INSPIRAL_TIDAL_ORDER_5PN
@ LAL_SIM_INSPIRAL_TIDAL_ORDER_6PN
@ LAL_SIM_INSPIRAL_TIDAL_ORDER_ALL
@ LAL_SIM_INSPIRAL_TIDAL_ORDER_0PN
COMPLEX16TimeSeries * XLALCreateSimInspiralPNModeCOMPLEX16TimeSeriesLALConvention(REAL8TimeSeries *v, REAL8TimeSeries *phi, REAL8 m1, REAL8 m2, REAL8 r, int O, int l, int m)
Computes h(l,m) mode timeseries of spherical harmonic decomposition of the post-Newtonian inspiral wa...
int XLALSimInspiralTaylorT1PNEvolveOrbit(REAL8TimeSeries **V, REAL8TimeSeries **phi, REAL8 phiRef, REAL8 deltaT, REAL8 m1, REAL8 m2, REAL8 f_min, REAL8 fRef, REAL8 lambda1, REAL8 lambda2, LALSimInspiralTidalOrder tideO, int O)
Evolves a post-Newtonian orbit using the Taylor T1 method.
int XLALSimInspiralTaylorT1PN(REAL8TimeSeries **hplus, REAL8TimeSeries **hcross, REAL8 phiRef, REAL8 deltaT, REAL8 m1, REAL8 m2, REAL8 f_min, REAL8 fRef, REAL8 r, REAL8 i, REAL8 lambda1, REAL8 lambda2, LALSimInspiralTidalOrder tideO, int O)
Driver routine to compute the post-Newtonian inspiral waveform.
COMPLEX16TimeSeries * XLALSimInspiralTaylorT1PNMode(UNUSED REAL8 v0, REAL8 deltaT, REAL8 m1, REAL8 m2, REAL8 f_min, REAL8 fRef, REAL8 r, REAL8 lambda1, REAL8 lambda2, LALSimInspiralTidalOrder tideO, int amplitudeO, int phaseO, int l, int m)
Driver routine to compute the -2 spin-weighted spherical harmonic mode using TaylorT1 phasing.
int XLALSimInspiralTaylorT1PNGenerator(REAL8TimeSeries **hplus, REAL8TimeSeries **hcross, REAL8 phiRef, REAL8 v0, REAL8 deltaT, REAL8 m1, REAL8 m2, REAL8 f_min, REAL8 fRef, REAL8 r, REAL8 i, REAL8 lambda1, REAL8 lambda2, LALSimInspiralTidalOrder tideO, int amplitudeO, int phaseO)
Driver routine to compute the post-Newtonian inspiral waveform.
SphHarmTimeSeries * XLALSimInspiralTaylorT1PNModes(UNUSED REAL8 v0, REAL8 deltaT, REAL8 m1, REAL8 m2, REAL8 f_min, REAL8 fRef, REAL8 r, REAL8 lambda1, REAL8 lambda2, LALSimInspiralTidalOrder tideO, int amplitudeO, int phaseO, int lmax)
int XLALSimInspiralTaylorT1PNRestricted(REAL8TimeSeries **hplus, REAL8TimeSeries **hcross, REAL8 phiRef, REAL8 deltaT, REAL8 m1, REAL8 m2, REAL8 f_min, REAL8 fRef, REAL8 r, REAL8 i, REAL8 lambda1, REAL8 lambda2, LALSimInspiralTidalOrder tideO, int O)
Driver routine to compute the restricted post-Newtonian inspiral waveform.
SphHarmTimeSeries * XLALSphHarmTimeSeriesAddMode(SphHarmTimeSeries *appended, const COMPLEX16TimeSeries *inmode, UINT4 l, INT4 m)
Prepend a node to a linked list of SphHarmTimeSeries, or create a new head.
void LALDPrintTimeSeries(REAL8TimeSeries *series, const CHAR *filename)
REAL8TimeSeries * XLALCreateREAL8TimeSeries(const CHAR *name, const LIGOTimeGPS *epoch, REAL8 f0, REAL8 deltaT, const LALUnit *sampleUnits, size_t length)
void XLALDestroyCOMPLEX16TimeSeries(COMPLEX16TimeSeries *series)
void XLALDestroyREAL8TimeSeries(REAL8TimeSeries *series)
const LALUnit lalDimensionlessUnit
#define XLAL_ERROR_NULL(...)
int XLALPrintError(const char *fmt,...) _LAL_GCC_PRINTF_FORMAT_(1
LIGOTimeGPS * XLALGPSAdd(LIGOTimeGPS *epoch, REAL8 dt)
Structure to carry a collection of spherical harmonic modes in COMPLEX16 time series.
expnCoeffsdEnergyFlux akdEF
SimInspiralTaylorT1Energy * energy
SimInspiralTaylorT1dEnergy * dEnergy
SimInspiralTaylorT1Flux * flux