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
aacc4e4d
Commit
aacc4e4d
authored
Oct 12, 2018
by
Xavier Garrido
Browse files
get back to default verbosity
parent
4d792a73
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
18 deletions
+18
-18
src/camel/pico/MnPicoEngine.cc
src/camel/pico/MnPicoEngine.cc
+18
-18
No files found.
src/camel/pico/MnPicoEngine.cc
View file @
aacc4e4d
...
...
@@ -22,7 +22,7 @@
#include<iterator>
#include<algorithm>
//--------------------
// C
// C
//----------------
using
namespace
std
;
...
...
@@ -38,7 +38,7 @@ char* MnPicoEngine::clNames[]={"cl_TT","cl_EE","cl_TE","cl_BB",};
// Constructors --
//----------------
MnPicoEngine
::
MnPicoEngine
(
const
Variables
&
_upar
,
const
int
&
lmax
,
const
string
&
picodata
,
bool
verbose
)
:
iAs
(
-
1
),
ins
(
-
1
),
inu
(
-
1
),
pResult
(
NULL
){
//superclass
_lmax
=
lmax
;
...
...
@@ -48,10 +48,10 @@ MnPicoEngine::MnPicoEngine(const Variables& _upar,const int& lmax, const string&
cout
<<
"loading pico datafile: "
<<
picodata
<<
endl
;
pico
=
pico_load
(
const_cast
<
char
*>
(
picodata
.
c_str
()));
pico_set_verbose
(
pico
,
tru
e
);
pico_set_verbose
(
pico
,
verbos
e
);
const
int
npico
=
sizeof
(
picoNames
)
/
sizeof
(
char
*
);
//recherche si tous les parametres sont presnents
vector
<
string
>
inputNames
;
for
(
size_t
i
=
0
;
i
<
_upar
.
Params
().
size
();
i
++
)
inputNames
.
push_back
(
_upar
.
GetName
(
i
));
...
...
@@ -65,11 +65,11 @@ MnPicoEngine::MnPicoEngine(const Variables& _upar,const int& lmax, const string&
planck_assert
(
it
!=
inputNames
.
end
(),
string
(
"Missing parameter: "
)
+
s
);
vector
<
string
>::
size_type
ipos
=
it
-
inputNames
.
begin
();
_index
.
push_back
(
ipos
);
if
(
s
==
"log(10^10A_s)"
)
if
(
s
==
"log(10^10A_s)"
)
iAs
=
ipos
;
else
if
(
s
==
"n_s"
)
else
if
(
s
==
"n_s"
)
ins
=
ipos
;
else
if
(
s
==
"m_ncdm"
)
else
if
(
s
==
"m_ncdm"
)
inu
=
ipos
;
else
if
(
s
==
"100*theta_s"
)
itet
=
ipos
;
...
...
@@ -93,8 +93,8 @@ MnPicoEngine::MnPicoEngine(const Variables& _upar,const int& lmax, const string&
//fill dict
updateParValues
(
_upar
.
Params
());
}
...
...
@@ -129,10 +129,10 @@ MnPicoEngine::updateParValues(const std::vector<double>& vals){
else
{
PyDict_SetItemString
(
dict
,
picoNames
[
i
],
PyFloat_FromDouble
(
vals
[
_index
[
i
]]));
}
}
//compute: clean?
pico_free_result
(
pResult
);
pResult
=
pico_compute_result_dict
(
pico
,
dict
,
outputs
);
...
...
@@ -141,11 +141,11 @@ MnPicoEngine::updateParValues(const std::vector<double>& vals){
}
void
MnPicoEngine
::
getCls
(
const
std
::
vector
<
unsigned
>&
lVec
,
//input
std
::
vector
<
double
>&
cltt
,
std
::
vector
<
double
>&
clte
,
std
::
vector
<
double
>&
clee
,
void
MnPicoEngine
::
getCls
(
const
std
::
vector
<
unsigned
>&
lVec
,
//input
std
::
vector
<
double
>&
cltt
,
std
::
vector
<
double
>&
clte
,
std
::
vector
<
double
>&
clee
,
std
::
vector
<
double
>&
clbb
){
double
*
ClTT
=
NULL
;
...
...
@@ -180,7 +180,7 @@ MnPicoEngine::getCls(const std::vector<unsigned>& lVec, //input
}
double
double
MnPicoEngine
::
undef
(
const
char
*
param
)
const
{
throw
Message_error
(
string
(
"Parameter="
)
+
param
+
" not available in pico"
);
return
-
1.
;
...
...
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