Loading [MathJax]/extensions/TeX/AMSsymbols.js
LALInspiral
5.0.3.1-ea7c608
LALSuite
LAL
LALFrame
LALMetaIO
LALSimulation
LALBurst
LALInspiral
LALInference
LALPulsar
LALApps
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Modules
Pages
LALInspiralDerivatives.c
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2007 David Churches, Duncan Brown, Jolien Creighton, B.S. Sathyaprakash
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 Module to calculate the RHS of the differential equations
26
* in \eqref{eq_ode2}.
27
*
28
* ### Prototypes ###
29
*
30
* <tt>LALInspiralDerivatives()</tt>:
31
* <ul>
32
* <li> \c values: Input containing the values of the variables \f$v\f$ and \f$\phi\f$ at the
33
* current time.</li>
34
* <li> \c dvalues: Output containing the derivatives \f$dv/dt\f$ and \f$d\phi/dt\f$ at the
35
* current time.</li>
36
* <li> \c params: Input of type \c InspiralDerivativesIn that must be
37
* cast to a <tt>void.</tt>\\
38
* </li>
39
* </ul>
40
*
41
* ### Description ###
42
*
43
* This module calculates the right-hand sides of
44
* the follwoing two coupled first-order differential equations which are
45
* solved to obtain the gravitational wave phasing equation,
46
* as described in the documentation for the function \c LALInspiralWave1:
47
* The equations are
48
* \f{equation}{
49
* \label{ode2}
50
* \frac{dv}{dt} = - \frac{\mathcal{F}(v)}{m E^{\prime}(v)},\ \ \ \
51
* \frac{d \phi(t)}{dt} = \frac{2v^{3}}{m}.
52
* \f}
53
*
54
* ### Algorithm ###
55
*
56
*
57
* ### Uses ###
58
*
59
* None.
60
*
61
* ### Notes ###
62
*
63
* <ul>
64
* <li> This function has been intentionally made non-LAL compliant in the sense that it
65
* has no status structure. This is because this code
66
* outputs the RHS of the differential equations
67
* and is called repeatedly by a function that integrates the two differential
68
* equations and should therefore not suffer from undue overheads.</li>
69
* <li> The input \c params is of type \c InspiralDerivativesIn and must
70
* be cast to a void before calling this function. For example,
71
* <code>
72
* InspiralDerivativesIn in3;
73
* void *funcParams;
74
* in3.totalmass = totalmass;
75
* ...
76
* funcParams = (void *) \&in3;
77
* </code>
78
* </li>
79
* </ul>
80
*
81
*/
82
83
#include <lal/LALInspiral.h>
84
#include <lal/LALStdlib.h>
85
86
void
87
LALInspiralDerivatives
(
88
REAL8Vector
*values,
89
REAL8Vector
*dvalues,
90
void
*
params
91
)
92
{
93
94
InspiralDerivativesIn
*ak;
95
REAL8
v;
96
97
ak = (
InspiralDerivativesIn
*)
params
;
98
v = *(values->
data
);
99
100
dvalues->
data
[0] = -ak->
flux
(v, ak->
coeffs
)/ (ak->
totalmass
*ak->
dEnergy
(v, ak->
coeffs
));
101
dvalues->
data
[1] = 2.* v*v*v/ak->
totalmass
;
102
103
return
;
104
}
LALInspiralDerivatives
void LALInspiralDerivatives(REAL8Vector *values, REAL8Vector *dvalues, void *params)
Definition:
LALInspiralDerivatives.c:87
REAL8
double REAL8
InspiralDerivativesIn
Structure used as an input to compute the derivatives needed in solving the phasing formula when the ...
Definition:
LALInspiral.h:607
InspiralDerivativesIn::dEnergy
EnergyFunction * dEnergy
Definition:
LALInspiral.h:609
InspiralDerivativesIn::flux
FluxFunction * flux
Definition:
LALInspiral.h:610
InspiralDerivativesIn::totalmass
REAL8 totalmass
Definition:
LALInspiral.h:608
InspiralDerivativesIn::coeffs
expnCoeffs * coeffs
Definition:
LALInspiral.h:611
REAL8Vector
REAL8Vector::data
REAL8 * data
params
lib
LALInspiralDerivatives.c
Generated on Sun Jul 20 2025 05:16:27 for LALInspiral by
1.9.4