Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Docker-in-Docker (DinD) capabilities of public runners deactivated.
More info
Open sidebar
Xavier Garrido
CAMEL
Commits
9709373e
Commit
9709373e
authored
Mar 09, 2017
by
Plaszczynski Stephane
Browse files
add comobile distance- fix CMTPATH
parent
dc0515ad
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
30 additions
and
1 deletion
+30
-1
cmt/camel_setup.sh
cmt/camel_setup.sh
+4
-0
src/camel/Class/ClassEngine.cc
src/camel/Class/ClassEngine.cc
+20
-0
src/camel/Class/ClassEngine.hh
src/camel/Class/ClassEngine.hh
+2
-0
src/camel/Class/MnClassEngine.hh
src/camel/Class/MnClassEngine.hh
+1
-1
src/camel/Engine.cc
src/camel/Engine.cc
+1
-0
src/camel/Engine.hh
src/camel/Engine.hh
+2
-0
No files found.
cmt/camel_setup.sh
View file @
9709373e
...
...
@@ -4,7 +4,11 @@ if [ -z "$CMTCLASS" ] ; then
echo
"CMTCLASS is undefined"
exit
1
else
if
[
-z
"
$CMTPATH
"
]
;
then
export
CMTPATH
=
${
CMTCLASS
}
else
export
CMTPATH
=
${
CMTPATH
}
:
${
CMTCLASS
}
fi
fi
if
[
!
-f
setup.sh
]
;
then
...
...
src/camel/Class/ClassEngine.cc
View file @
9709373e
...
...
@@ -694,6 +694,26 @@ double ClassEngine::get_H(double z)
return
(
H_z
);
}
double
ClassEngine
::
com_distance
(
double
z
)
{
double
tau
;
int
index
;
double
*
pvecback
;
//transform redshift in conformal time
background_tau_of_z
(
&
ba
,
z
,
&
tau
);
//pvecback must be allocated
pvecback
=
(
double
*
)
malloc
(
ba
.
bg_size
*
sizeof
(
double
));
//call to fill pvecback
background_at_tau
(
&
ba
,
tau
,
ba
.
long_info
,
ba
.
inter_normal
,
&
index
,
pvecback
);
double
r
=
pvecback
[
ba
.
index_bg_conf_distance
];
free
(
pvecback
);
return
(
r
);
}
double
ClassEngine
::
get_Da
(
double
z
)
...
...
src/camel/Class/ClassEngine.hh
View file @
9709373e
...
...
@@ -146,6 +146,8 @@ public:
double
get_Pk
(
double
k
,
double
z
);
double
get_PkNL
(
double
k
,
double
z
);
double
com_distance
(
double
z
);
//expansion
inline
double
get_H0
()
const
{
return
ba
.
H0
*
_c_
/
1e3
;}
inline
double
theta
()
const
{
return
th
.
rs_rec
/
th
.
ra_rec
;}
...
...
src/camel/Class/MnClassEngine.hh
View file @
9709373e
...
...
@@ -81,7 +81,7 @@ public:
double
z_rec
()
const
{
return
klass
->
z_rec
();}
double
rs_rec
()
const
{
return
klass
->
rs_rec
();}
double
com_distance
(
double
z
)
{
return
klass
->
com_distance
(
z
);}
void
writeCls
(
std
::
ostream
&
o
)
{
klass
->
writeCls
(
o
);}
...
...
src/camel/Engine.cc
View file @
9709373e
...
...
@@ -117,6 +117,7 @@ Engine::get(const std::string& key)
else
if
(
var
==
"tau_reio"
)
return
get_tau_reio
();
else
if
(
var
==
"z_reio"
)
return
get_z_reio
();
else
if
(
var
==
"H"
)
return
get_H
(
z
);
else
if
(
var
==
"com_distance"
)
return
com_distance
(
z
);
else
planck_assert
(
false
,(
"key="
+
key
+
" not found in Engine::get()"
));
}
...
...
src/camel/Engine.hh
View file @
9709373e
...
...
@@ -65,6 +65,8 @@ public:
virtual
double
get_DMod
(
double
z
)
{
return
undef
(
"Dmod(z)"
);}
virtual
double
Omega_m
()
const
{
return
undef
(
"Omega_m"
);}
virtual
double
YHe
()
const
{
return
undef
(
"YHe"
);}
//distance (comobile Mpc)
virtual
double
com_distance
(
double
z
)
{
return
undef
(
"com_distance"
);}
virtual
double
get_Pk
(
double
k
,
double
z
)
{
return
undef
(
"getpk"
);}
virtual
double
get_PkNL
(
double
k
,
double
z
)
{
return
undef
(
"getpknl"
);}
...
...
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