Commit 97bd8dea authored by Andrea taracchini's avatar Andrea taracchini

SEOBNRv3_opt Redmine #5388: avoid relaxing tolerance on integrator for highly...

SEOBNRv3_opt Redmine #5388: avoid relaxing tolerance on integrator for highly symmetric spin configs
Original: 93e6f3c7e3075d1a7c75d4eccc14b3fbc5775d37
parent cf686f57
......@@ -231,7 +231,6 @@ XLALEOBSpinPrecStopConditionBasedOnPR(double UNUSED t,
/* ********************************************************** */
/* ******* Unphysical orbital conditions ******** */
/* ********************************************************** */
/* Terminate if p_r points outwards */
if ( r2 < 16 && pDotr >= 0 )
{
......@@ -953,7 +952,7 @@ int XLALSimIMRSpinEOBWaveformAll(
//const REAL8 EPS_REL = 1.0e-10;
/* Relax abs accuracy in case of highly symmetric case that would otherwise slow down significantly */
if (sqrt((INspin1[0] + INspin2[0])*(INspin1[0] + INspin2[0]) + (INspin1[1] + INspin2[1])*(INspin1[1] + INspin2[1])) < 1.0e-10 && !SpinsAlmostAligned)
if (sqrt((INspin1[0] + INspin2[0])*(INspin1[0] + INspin2[0]) + (INspin1[1] + INspin2[1])*(INspin1[1] + INspin2[1])) < 1.0e-10 && !SpinsAlmostAligned && !use_optimized)
{
if (debugPK) XLAL_PRINT_INFO("EPS_ABS is decreased!\n");
EPS_ABS = 1.0e-4;
......@@ -1728,7 +1727,35 @@ int XLALSimIMRSpinEOBWaveformAll(
}
if(debugPK) { XLAL_PRINT_INFO("\n\n FINISHED THE EVOLUTION\n\n"); fflush(NULL); }
if (debugPK) {
if (debugPK && use_optimized) {
/* Write the dynamics to file */
out = fopen( "seobDynamics.dat", "w" );
for ( i = 0; i < retLenEOMLow; i++ )
{
//YP: output orbital phase and phase modulation separately, instead of their sum
fprintf( out, "%.16e %.16e %.16e %.16e %.16e %.16e %.16e %.16e %.16e %.16e %.16e %.16e %.16e %.16e %.16e\n",
dynamicsEOMLo->data[i],
dynamicsEOMLo->data[retLenEOMLow+i],
dynamicsEOMLo->data[2*retLenEOMLow+i],
dynamicsEOMLo->data[3*retLenEOMLow+i],
dynamicsEOMLo->data[4*retLenEOMLow+i],
dynamicsEOMLo->data[5*retLenEOMLow+i],
dynamicsEOMLo->data[6*retLenEOMLow+i],
dynamicsEOMLo->data[7*retLenEOMLow+i],
dynamicsEOMLo->data[8*retLenEOMLow+i],
dynamicsEOMLo->data[9*retLenEOMLow+i],
dynamicsEOMLo->data[10*retLenEOMLow+i],
dynamicsEOMLo->data[11*retLenEOMLow+i],
dynamicsEOMLo->data[12*retLenEOMLow+i],
dynamicsEOMLo->data[13*retLenEOMLow+i],
dynamicsEOMLo->data[14*retLenEOMLow+i]
);
}
fclose( out );
fflush(NULL);
}
if (debugPK && !use_optimized) {
/* Write the dynamics to file */
out = fopen( "seobDynamics.dat", "w" );
for ( i = 0; i < retLenLow; i++ )
......@@ -2360,7 +2387,8 @@ int XLALSimIMRSpinEOBWaveformAll(
tlistRDPatch->data[i] = i * deltaT/mTScaled;
}
// END OPTIMIZED CODE CHUNK
} else {
}
else {
// START UNOPTIMIZED CODE CHUNK
/* Create time-series containers for euler angles and hlm harmonics */
if ( !(alphaI2PTS = XLALCreateREAL8TimeSeries( "alphaI2P", &tc, 0.0, deltaT, &lalStrainUnit, retLenLow )) + !(betaI2PTS = XLALCreateREAL8TimeSeries( "betaI2P", &tc, 0.0, deltaT, &lalStrainUnit, retLenLow )) + !(gammaI2PTS = XLALCreateREAL8TimeSeries( "gammaI2P", &tc, 0.0, deltaT, &lalStrainUnit, retLenLow )) + !(alphaP2JTS = XLALCreateREAL8TimeSeries( "alphaP2J", &tc, 0.0, deltaT, &lalStrainUnit, retLenLow )) + !(betaP2JTS = XLALCreateREAL8TimeSeries( "betaP2J", &tc, 0.0, deltaT, &lalStrainUnit, retLenLow )) + !(gammaP2JTS = XLALCreateREAL8TimeSeries( "gammaP2J", &tc, 0.0, deltaT, &lalStrainUnit, retLenLow )) ) {
......@@ -2588,7 +2616,8 @@ int XLALSimIMRSpinEOBWaveformAll(
}
// END OPTIMIZED CODE CHUNK
} else {
}
else {
// START UNOPTIMIZED CODE CHUNK (straight from LALSuite master, Nov 14, 2016). CONTINUES ALL THE WAY TO START OF STEP 6!
/* Main loop for quasi-nonprecessing waveform generation */
// Generating modes for coarsely sampled portion
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment