Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
L
lalsuite
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
109
Issues
109
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
28
Merge Requests
28
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lscsoft
lalsuite
Commits
c81f2175
Commit
c81f2175
authored
Jun 05, 2018
by
John Douglas Veitch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix compilation errors
parent
1d63d6e1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
14 deletions
+20
-14
lalinference/src/LALInferenceInitCBC.c
lalinference/src/LALInferenceInitCBC.c
+6
-5
lalinference/src/LALInferenceTemplate.c
lalinference/src/LALInferenceTemplate.c
+14
-9
No files found.
lalinference/src/LALInferenceInitCBC.c
View file @
c81f2175
...
...
@@ -38,6 +38,7 @@
#include <lal/LALInferenceReadData.h>
#include <lal/LALInferenceInit.h>
#include <lal/LALInferenceCalibrationErrors.h>
#include <lal/LALSimNeutronStar.h>
static
int
checkParamInList
(
const
char
*
list
,
const
char
*
param
);
static
int
checkParamInList
(
const
char
*
list
,
const
char
*
param
)
...
...
@@ -1351,9 +1352,9 @@ LALInferenceModel *LALInferenceInitCBCModel(LALInferenceRunState *state) {
}
if
((
~~
LALInferenceGetProcParamVal
(
commandLine
,
"--tidalT"
)
+
~~
LALInferenceGetProcParamVal
(
commandLine
,
"--tidal"
)
+
~~
LALInferenceGetProcParamVal
(
commandLine
,
"--4PolyEOS"
)
+
~~
LALInferenceGetProcParamVal
(
commandLine
,
"--4SpectralDecomp"
)
+
~~
LALInferenceGetProcParamVal
(
commandLine
,
"--eos"
))
>
1
)
if
((
!!
LALInferenceGetProcParamVal
(
commandLine
,
"--tidalT"
)
+
!!
LALInferenceGetProcParamVal
(
commandLine
,
"--tidal"
)
+
!!
LALInferenceGetProcParamVal
(
commandLine
,
"--4PolyEOS"
)
+
!!
LALInferenceGetProcParamVal
(
commandLine
,
"--4SpectralDecomp"
)
+
!!
LALInferenceGetProcParamVal
(
commandLine
,
"--eos"
))
>
1
)
{
XLALPrintError
(
"Error: cannot use more than one of --tidalT, --tidal, --4PolyEOS, --4SpectralDecomp and --eos.
\n
"
);
XLAL_ERROR_NULL
(
XLAL_EINVAL
);
...
...
@@ -1382,11 +1383,11 @@ LALInferenceModel *LALInferenceInitCBCModel(LALInferenceRunState *state) {
else
if
((
ppt
=
LALInferenceGetProcParamVal
(
commandLine
,
"--eos"
)))
{
LALSimNeutronStarEOS
*
eos
=
NULL
;
INT4
errnum
=
XLAL_SUCCESS
;
errnum
=
XLAL_SUCCESS
;
XLAL_TRY
(
eos
=
XLALSimNeutronStarEOSByName
(
ppt
->
value
),
errnum
);
if
(
errnum
!=
XLAL_SUCCESS
)
XLAL_ERROR_NULL
(
errnum
);
LALInferenceAddVariable
(
model
->
params
,
"ns_eos"
,
eos
,
LALINFERENCE_void_t
,
LALINFERENCE_PARAM_FIXED
);
LALInferenceAddVariable
(
model
->
params
,
"ns_eos"
,
eos
,
LALINFERENCE_void_
ptr_
t
,
LALINFERENCE_PARAM_FIXED
);
}
LALSimInspiralSpinOrder
spinO
=
LAL_SIM_INSPIRAL_SPIN_ORDER_ALL
;
...
...
lalinference/src/LALInferenceTemplate.c
View file @
c81f2175
...
...
@@ -40,6 +40,7 @@
#include <lal/LALSimInspiral.h>
#include <lal/LALInferenceTemplate.h>
#include <lal/LALInferenceMultibanding.h>
#include <lal/LALSimNeutronStar.h>
/* LIB imports*/
#include <lal/LALInferenceBurstRoutines.h>
...
...
@@ -807,30 +808,34 @@ void LALInferenceTemplateXLALSimInspiralChooseWaveform(LALInferenceModel *model)
if
(
LALInferenceCheckVariable
(
model
->
params
,
"ns_eos"
))
{
LALSimNeutronStarFamily
*
eos_fam
=
XLALCreateSimNeutronStarFamily
((
LALSimNeutronStarEOS
*
)
LALInferenceGetVariable
(
model
->
params
,
"ns_eos"
));
REAL8
r1
=
0
,
r2
=
0
,
k2_1
=
0
,
k2_2
=
0
;
REAL8
r1
=
0
,
r2
=
0
,
k2_1
=
0
,
k2_2
=
0
,
lambda1
=
0
,
lambda2
=
0
;
REAL8
mass_max
=
XLALSimNeutronStarMaximumMass
(
eos_fam
)
/
LAL_MSUN_SI
;
REAL8
mass_min
=
XLALSimNeutronStarFamMinimumMass
(
eos_fam
)
/
LAL_MSUN_SI
;
if
(
m1
<
mass_max
&&
m1
>
mass_min
)
{
/* Compute l1, l2 from mass and EOS */
r1
=
XLALSimNeutronStarRadius
(
m
ass
1
*
LAL_MSUN_SI
,
eos_fam
);
k2_1
=
XLALSimNeutronStarLoveNumberK2
(
m
ass
1
*
LAL_MSUN_SI
,
eos_fam
);
lambda1
=
(
2
.
/
3
.)
*
k2_1
*
pow
(
r1
/
(
m
ass
1
*
LAL_MRSUN_SI
),
5
.
0
);
r1
=
XLALSimNeutronStarRadius
(
m1
*
LAL_MSUN_SI
,
eos_fam
);
k2_1
=
XLALSimNeutronStarLoveNumberK2
(
m1
*
LAL_MSUN_SI
,
eos_fam
);
lambda1
=
(
2
.
/
3
.)
*
k2_1
*
pow
(
r1
/
(
m1
*
LAL_MRSUN_SI
),
5
.
0
);
}
if
(
m2
<
mass_max
&&
m2
>
mass_min
)
{
r2
=
XLALSimNeutronStarRadius
(
m
ass
2
*
LAL_MSUN_SI
,
eos_fam
);
k2_2
=
XLALSimNeutronStarLoveNumberK2
(
m
ass
2
*
LAL_MSUN_SI
,
eos_fam
);
lambda2
=
(
2
.
/
3
.)
*
k2_2
*
pow
(
r2
/
(
m
ass
2
*
LAL_MRSUN_SI
),
5
.
0
);
r2
=
XLALSimNeutronStarRadius
(
m2
*
LAL_MSUN_SI
,
eos_fam
);
k2_2
=
XLALSimNeutronStarLoveNumberK2
(
m2
*
LAL_MSUN_SI
,
eos_fam
);
lambda2
=
(
2
.
/
3
.)
*
k2_2
*
pow
(
r2
/
(
m2
*
LAL_MRSUN_SI
),
5
.
0
);
}
/* Set waveform params */
XLALSimInspiralWaveformParamsInsertTidalLambda1
(
model
->
LALpars
,
lambda1
);
XLALSimInspiralWaveformParamsInsertTidalLambda2
(
model
->
LALpars
,
lambda2
);
/* Add derived quantities for output */
LALInferenceAddVariable
(
model
->
params
,
"radius1"
,
&
r1
,
LALINFERENCE_REAL8_t
,
LALINFERENCE_PARAM_OUTPUT
);
LALInferenceAddVariable
(
model
->
params
,
"radius2"
,
&
r2
,
LALINFERENCE_REAL8_t
,
LALINFERENCE_PARAM_OUTPUT
);
LALInferenceAddVariable
(
model
->
params
,
"lambda1"
,
&
lambda1
,
LALINFERENCE_REAL8_t
,
LALINFERENCE_PARAM_OUTPUT
);
LALInferenceAddVariable
(
model
->
params
,
"lambda2"
,
&
lambda2
,
LALINFERENCE_REAL8_t
,
LALINFERENCE_PARAM_OUTPUT
);
/* ClLean up */
/* Clean up */
if
(
eos_fam
)
XLALDestroySimNeutronStarFamily
(
eos_fam
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment