Loading [MathJax]/extensions/TeX/AMSsymbols.js
LALInspiral 5.0.3.1-ea7c608
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
LALInspiralVelocity.c
Go to the documentation of this file.
1/*
2* Copyright (C) 2007 David Churches, Duncan Brown, Jolien Creighton, B.S. Sathyaprakash, Drew Keppel
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/**
21 * \author Sathyaprakash, B. S.
22 * \file
23 * \ingroup LALInspiral_h
24 *
25 * \brief The function \c XLALInspiralVelocity() calculates the velocity \f$v\f$ which corresponds to a time \f$t\f$ in
26 * the inspiralling binary system.
27 *
28 * ### Prototypes ###
29 *
30 * <tt>XLALInspiralVelocity()</tt>
31 *
32 * ### Description ###
33 *
34 * The function \c XLALInspiralVelocity() calculates the velocity \f$v\f$ corresponding to a time \f$t\f$
35 * in the evolution of an inspiralling binary system. It does this by iteratively solving
36 * \f{equation}{
37 * \label{tofv}
38 * t(v) = t_{0} - m \int_{v_{0}}^{v} \frac{E'(v)}{{\cal F}(v)} \, dv \,\,.
39 * \f}
40 * \c LALInspiralVelocity() calculates \f$v\f$, given \f$t(v)\f$,
41 * \f$t_{0}\f$, \f$m\f$, \f$v_{0}\f$, \f$E^{\prime}(v)\f$ and \f$\mathcal{F}(v)\f$.
42 *
43 * ### Algorithm ###
44 *
45 *
46 * ### Uses ###
47 *
48 * \c XLALDBisectionFindRoot()
49 *
50 * ### Notes ###
51 *
52 */
53
54#include <lal/LALInspiral.h>
55#include <lal/FindRoot.h>
56#include <lal/XLALError.h>
57
60 TofVIn *ak
61 )
62{
63 REAL8 v,xmin,xmax,xacc;
64 REAL8 (*rootfunction)(REAL8, void *);
65 void *funcParams;
66
67 if (ak == NULL)
69
70 rootfunction = XLALInspiralTofV;
71 xmax = ak->vlso;
72 xmin = ak->v0/2.;
73 xacc = 1.0e-8;
74
75 funcParams = (void *) ak;
76
77
78 if (ak->t==ak->t0)
79 {
80 return ak->v0;
81 }
82
83 v = XLALDBisectionFindRoot(rootfunction, xmin, xmax, xacc, funcParams);
86
87 return v;
88}
REAL8 XLALInspiralTofV(REAL8, void *)
REAL8 XLALInspiralVelocity(TofVIn *ak)
REAL8 XLALDBisectionFindRoot(REAL8(*y)(REAL8, void *), REAL8 xmin, REAL8 xmax, REAL8 xacc, void *params)
double REAL8
#define XLAL_ERROR_REAL8(...)
#define XLAL_IS_REAL8_FAIL_NAN(val)
XLAL_EFAULT
XLAL_EFUNC
REAL8 t0
Definition: LALInspiral.h:567
REAL8 v0
Definition: LALInspiral.h:566
REAL8 t
Definition: LALInspiral.h:565
REAL8 vlso
Definition: LALInspiral.h:568