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
Open sidebar
Xavier Garrido
CAMEL
Commits
3e4e4edf
Commit
3e4e4edf
authored
Jun 26, 2017
by
Plaszczynski Stephane
Browse files
accesss to class knodes computations
parent
f10764b1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
0 deletions
+26
-0
src/camel/Class/ClassEngine.cc
src/camel/Class/ClassEngine.cc
+18
-0
src/camel/Class/ClassEngine.hh
src/camel/Class/ClassEngine.hh
+8
-0
No files found.
src/camel/Class/ClassEngine.cc
View file @
3e4e4edf
...
...
@@ -744,3 +744,21 @@ ClassEngine::get_Pkvec(const std::vector<double>& knodes, const std::vector<doub
}
#endif
bool
ClassEngine
::
get_PkNodes
(
std
::
vector
<
double
>&
knodes
,
std
::
vector
<
double
>&
pknodes
){
knodes
.
resize
(
sp
.
ln_k_size
);
pknodes
.
resize
(
sp
.
ln_k_size
);
int
index_mode
=
0
;
int
index_ic1_ic2
=
0
;
int
index_eta
=
sp
.
ln_tau_size
-
1
;
for
(
int
index_k
=
0
;
index_k
<
sp
.
ln_k_size
;
index_k
++
){
knodes
[
index_k
]
=
std
::
exp
(
sp
.
ln_k
[
index_k
]);
pknodes
[
index_k
]
=
std
::
exp
(
sp
.
ln_pk
[(
index_eta
*
sp
.
ln_k_size
+
index_k
)
*
sp
.
ic_ic_size
[
index_mode
]
+
index_ic1_ic2
]);
}
return
_SUCCESS_
;
}
src/camel/Class/ClassEngine.hh
View file @
3e4e4edf
...
...
@@ -153,9 +153,12 @@ public:
double
get_H
(
double
z
);
double
get_DMod
(
double
z
);
//PK related stuuff
double
get_Pklin
(
double
k
,
double
z
);
double
get_PkNL
(
double
k
,
double
z
);
//vectorized access (if macro defined)
#ifdef FASTPK
//fixed k and z values: output
...
...
@@ -171,6 +174,11 @@ public:
#endif
//nodes used by class to perfrom spline interpolation: at z=0
//automatically resized
bool
get_PkNodes
(
std
::
vector
<
double
>&
knodes
,
std
::
vector
<
double
>&
Pknodes
);
//combile distance
double
com_distance
(
double
z
);
...
...
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