LAL  7.5.0.1-b72065a
Header LALAdaptiveRungeKuttaIntegrator.h

Detailed Description

Adaptive Runge-Kutta4.

Author
Vallisneri, M.

Description

The code LALAdaptiveRungeKuttaIntegrator.c evolves a system of \(n\) coupled first–order differential equations. Internally, it uses GSL routines to perform adaptive-step evolution, and then interpolates the resulting trajectories to a fixed step size.

Prior to evolving a system using XLALAdaptiveRungeKutta4(), it is necessary to create an integrator structure using XLALAdaptiveRungeKuttaIntegratorInit(). Once you are done with the integrator, free it with XLALAdaptiveRungeKuttaIntegratorFree().

Algorithm

TBF.

Uses

For updated SpinTaylor waveforms.

Notes

None so far...

Prototypes

LALAdaptiveRungeKuttaIntegratorXLALAdaptiveRungeKutta4Init (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)
 
LALAdaptiveRungeKuttaIntegratorXLALAdaptiveRungeKutta4InitEighthOrderInstead (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)
 Eighth-order Runge-Kutta ODE integrator using Runge-Kutta-Fehlberg steps with adaptive step size control. More...
 
void XLALAdaptiveRungeKuttaFree (LALAdaptiveRungeKuttaIntegrator *integrator)
 
int XLALAdaptiveRungeKutta4 (LALAdaptiveRungeKuttaIntegrator *integrator, void *params, REAL8 *yinit, REAL8 tinit, REAL8 tend, REAL8 deltat, REAL8Array **yout)
 
int XLALAdaptiveRungeKutta4NoInterpolate (LALAdaptiveRungeKuttaIntegrator *integrator, void *params, REAL8 *yinit, REAL8 tinit, REAL8 tend, REAL8 deltat_or_h0, REAL8 min_deltat_or_h0, REAL8Array **t_and_yout, INT4 EOBversion)
 Fourth-order Runge-Kutta ODE integrator using Runge-Kutta-Fehlberg steps with adaptive step size control. More...
 
int XLALAdaptiveRungeKuttaDenseandSparseOutput (LALAdaptiveRungeKuttaIntegrator *integrator, void *params, REAL8 *yinit, REAL8 tinit, REAL8 tend, REAL8 deltat, REAL8Array **sparse_output, REAL8Array **dense_output)
 
int XLALAdaptiveRungeKutta4Hermite (LALAdaptiveRungeKuttaIntegrator *integrator, void *params, REAL8 *yinit, REAL8 tinit, REAL8 tend_in, REAL8 deltat, REAL8Array **yout)
 Fourth-order Runge-Kutta ODE integrator using Runge-Kutta-Fehlberg (RKF45) steps with adaptive step size control. More...
 
int XLALAdaptiveRungeKutta4HermiteOnlyFinal (LALAdaptiveRungeKuttaIntegrator *integrator, void *params, REAL8 *yinit, REAL8 tinit, REAL8 tend_in, REAL8 y1_final, REAL8 deltat)
 Fourth-order Runge-Kutta ODE integrator using Runge-Kutta-Fehlberg (RKF45) steps with adaptive step size control. More...
 
int XLALAdaptiveRungeKutta4IrregularIntervals (LALAdaptiveRungeKuttaIntegrator *integrator, void *params, REAL8 *yinit, REAL8 tinit, REAL8 tend_in, REAL8Array **yout)
 Fourth-order Runge-Kutta ODE integrator using Runge-Kutta-Fehlberg (RKF45) steps with adaptive step size control. More...
 

Data Structures

struct  LALAdaptiveRungeKuttaIntegrator
 

Function Documentation

◆ XLALAdaptiveRungeKutta4Init()

LALAdaptiveRungeKuttaIntegrator* XLALAdaptiveRungeKutta4Init ( int  dim,
int(*)(double t, const double y[], double dydt[], void *params)  dydt,
int(*)(double t, const double y[], double dydt[], void *params)  stop,
double  eps_abs,
double  eps_rel 
)

Definition at line 31 of file LALAdaptiveRungeKuttaIntegrator.c.

◆ XLALAdaptiveRungeKutta4InitEighthOrderInstead()

LALAdaptiveRungeKuttaIntegrator* XLALAdaptiveRungeKutta4InitEighthOrderInstead ( int  dim,
int(*)(double t, const double y[], double dydt[], void *params)  dydt,
int(*)(double t, const double y[], double dydt[], void *params)  stop,
double  eps_abs,
double  eps_rel 
)

Eighth-order Runge-Kutta ODE integrator using Runge-Kutta-Fehlberg steps with adaptive step size control.

Intended for use in time domain waveform generation routines based on SEOBNRv2,3,4 models.

Definition at line 70 of file LALAdaptiveRungeKuttaIntegrator.c.

◆ XLALAdaptiveRungeKuttaFree()

void XLALAdaptiveRungeKuttaFree ( LALAdaptiveRungeKuttaIntegrator integrator)

Definition at line 108 of file LALAdaptiveRungeKuttaIntegrator.c.

◆ XLALAdaptiveRungeKutta4()

int XLALAdaptiveRungeKutta4 ( LALAdaptiveRungeKuttaIntegrator integrator,
void *  params,
REAL8 yinit,
REAL8  tinit,
REAL8  tend,
REAL8  deltat,
REAL8Array **  yout 
)

Definition at line 1074 of file LALAdaptiveRungeKuttaIntegrator.c.

◆ XLALAdaptiveRungeKutta4NoInterpolate()

int XLALAdaptiveRungeKutta4NoInterpolate ( LALAdaptiveRungeKuttaIntegrator integrator,
void *  params,
REAL8 yinit,
REAL8  tinit,
REAL8  tend,
REAL8  deltat_or_h0,
REAL8  min_deltat_or_h0,
REAL8Array **  t_and_yout,
INT4  EOBversion 
)

Fourth-order Runge-Kutta ODE integrator using Runge-Kutta-Fehlberg steps with adaptive step size control.

Intended for use in time domain waveform generation routines based on SEOBNRv2,3,4 models. This method does not includes any interpolation. deltat_or_h0 is the initial step size to be tried min_deltat_or_h0 is the minimal step size to enforce – 0 to ignore

Definition at line 587 of file LALAdaptiveRungeKuttaIntegrator.c.

◆ XLALAdaptiveRungeKuttaDenseandSparseOutput()

int XLALAdaptiveRungeKuttaDenseandSparseOutput ( LALAdaptiveRungeKuttaIntegrator integrator,
void *  params,
REAL8 yinit,
REAL8  tinit,
REAL8  tend,
REAL8  deltat,
REAL8Array **  sparse_output,
REAL8Array **  dense_output 
)

Definition at line 806 of file LALAdaptiveRungeKuttaIntegrator.c.

◆ XLALAdaptiveRungeKutta4Hermite()

int XLALAdaptiveRungeKutta4Hermite ( LALAdaptiveRungeKuttaIntegrator integrator,
void *  params,
REAL8 yinit,
REAL8  tinit,
REAL8  tend_in,
REAL8  deltat,
REAL8Array **  yout 
)

Fourth-order Runge-Kutta ODE integrator using Runge-Kutta-Fehlberg (RKF45) steps with adaptive step size control.

Intended for use in various waveform generation routines such as SpinTaylorT4 and various EOB models.

The method is described in

Abramowitz & Stegun, Handbook of Mathematical Functions, Tenth Printing, National Bureau of Standards, Washington, DC, 1972 (available online at http://people.math.sfu.ca/~cbm/aands/ )

This function also includes "on-the-fly" interpolation of the differential equations at regular intervals in-between integration steps. This "on-the-fly" interpolation method is derived and described in the Mathematica notebook "RKF_with_interpolation.nb"; see https://www.lsc-group.phys.uwm.edu/ligovirgo/cbcnote/InspiralPipelineDevelopment/120312111836InspiralPipelineDevelopmentImproved%20Adaptive%20Runge-Kutta%20integrator

This method is functionally equivalent to XLALAdaptiveRungeKutta4, but is nearly always faster due to the improved interpolation.

Parameters
integratorstruct holding dydt, stopping test, stepper, etc.
paramsparams struct used to compute dydt and stopping test
yinitpass in initial values of all variables - overwritten to final values
tinitintegration start time
tend_inmaximum integration time
deltatstep size for evenly sampled output
youtarray holding the evenly sampled output

Definition at line 219 of file LALAdaptiveRungeKuttaIntegrator.c.

◆ XLALAdaptiveRungeKutta4HermiteOnlyFinal()

int XLALAdaptiveRungeKutta4HermiteOnlyFinal ( LALAdaptiveRungeKuttaIntegrator integrator,
void *  params,
REAL8 yinit,
REAL8  tinit,
REAL8  tend_in,
REAL8  y1_final,
REAL8  deltat 
)

Fourth-order Runge-Kutta ODE integrator using Runge-Kutta-Fehlberg (RKF45) steps with adaptive step size control.

Version that only outputs the final state of the integration, intended for use for spin evolution in lalsimulation/lib/LALSimInspiralSpinTaylor.c, based on XLALAdaptiveRungeKutta4Hermite. Specifically, this assumes that the criterion used to set the end of the evolution (and included in the integrator's stopping condition) is given by deltat*y[1] < deltat*y1_final, where y is the vector of variables.

The method is described in

Abramowitz & Stegun, Handbook of Mathematical Functions, Tenth Printing, National Bureau of Standards, Washington, DC, 1972 (available online at http://people.math.sfu.ca/~cbm/aands/ )

This function also includes "on-the-fly" interpolation of the differential equations at regular intervals in-between integration steps. This "on-the-fly" interpolation method is derived and described in the Mathematica notebook "RKF_with_interpolation.nb"; see https://www.lsc-group.phys.uwm.edu/ligovirgo/cbcnote/InspiralPipelineDevelopment/120312111836InspiralPipelineDevelopmentImproved%20Adaptive%20Runge-Kutta%20integrator

Parameters
integratorstruct holding dydt, stopping test, stepper, etc.
paramsparams struct used to compute dydt and stopping test
yinitpass in initial values of all variables - overwritten to final values
tinitintegration start time
tend_inmaximum integration time
y1_finalfinal value of y[1]
deltatstep size for integration

Definition at line 427 of file LALAdaptiveRungeKuttaIntegrator.c.

◆ XLALAdaptiveRungeKutta4IrregularIntervals()

int XLALAdaptiveRungeKutta4IrregularIntervals ( LALAdaptiveRungeKuttaIntegrator integrator,
void *  params,
REAL8 yinit,
REAL8  tinit,
REAL8  tend_in,
REAL8Array **  yout 
)

Fourth-order Runge-Kutta ODE integrator using Runge-Kutta-Fehlberg (RKF45) steps with adaptive step size control.

Intended for use in Fourier domain waveform generation routines based on SpinTaylorTN models.

The method is described in

Abramowitz & Stegun, Handbook of Mathematical Functions, Tenth Printing, National Bureau of Standards, Washington, DC, 1972 (available online at http://people.math.sfu.ca/~cbm/aands/ )

This method is equivalent to XLALAdaptiveRungeKutta4 and XLALAdaptiveRungeKutta4Hermite, but does not includes any interpolation.

Memory is allocated in steps of LAL_MAX_RK4_STEPS.

Intended for use in Fourier domain waveform generation routines based on SpinTaylorTN models.

The method is described in

Abramowitz & Stegun, Handbook of Mathematical Functions, Tenth Printing, National Bureau of Standards, Washington, DC, 1972 (available online at http://people.math.sfu.ca/~cbm/aands/ )

This method is equivalent to XLALAdaptiveRungeKutta4 and XLALAdaptiveRungeKutta4Hermite, but does not includes any interpolation.

Parameters
integratorstruct holding dydt, stopping test, stepper, etc.
paramsparams struct used to compute dydt and stopping test
yinitpass in initial values of all variables - overwritten to final values
tinitintegration start time
tend_inmaximum integration time
youtarray holding the unevenly sampled output

Definition at line 1299 of file LALAdaptiveRungeKuttaIntegrator.c.