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
2af0c210
Commit
2af0c210
authored
Mar 15, 2017
by
Plaszczynski Stephane
Browse files
mieux
parent
d2be317d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
8 deletions
+5
-8
src/camel/Class/ClassEngine.cc
src/camel/Class/ClassEngine.cc
+1
-3
src/camel/Engine.cc
src/camel/Engine.cc
+1
-2
src/camel/Engine.hh
src/camel/Engine.hh
+3
-3
No files found.
src/camel/Class/ClassEngine.cc
View file @
2af0c210
...
...
@@ -86,8 +86,7 @@ void ClassParams::updateVal(const unsigned& i,const string& newval) {pars[i].sec
// Constructors --
//----------------
ClassEngine
::
ClassEngine
(
const
ClassParams
&
pars
)
:
cl
(
0
),
dofree
(
true
){
_nonlin
=
false
;
_lmax
=-
1
;
//default
cout
<<
"Running CLASS version "
<<
_VERSION_
<<
endl
;
...
...
@@ -137,7 +136,6 @@ ClassEngine::ClassEngine(const ClassParams& pars): cl(0),dofree(true){
ClassEngine
::
ClassEngine
(
const
ClassParams
&
pars
,
const
string
&
precision_file
)
:
cl
(
0
),
dofree
(
true
){
_nonlin
=
false
;
cout
<<
"Running CLASS version "
<<
_VERSION_
<<
endl
;
struct
file_content
fc_precision
;
...
...
src/camel/Engine.cc
View file @
2af0c210
...
...
@@ -31,9 +31,8 @@ using namespace std;
//---------------
// Constructors --
//----------------
Engine
::
Engine
()
:
_lmax
(
-
1
)
Engine
::
Engine
()
:
_lmax
(
-
1
)
,
_nonlin
(
false
)
{
_nonlin
=
has_PkNL
();
}
//--------------
// Destructor --
...
...
src/camel/Engine.hh
View file @
2af0c210
...
...
@@ -40,7 +40,7 @@ public:
virtual
bool
has_CMB_Lensing
()
const
{
return
false
;}
virtual
bool
has_Pklin
()
const
{
return
false
;}
virtual
bool
has_PkNL
()
const
{
return
false
;}
virtual
bool
has_PkNL
()
const
{
return
_nonlin
;}
//modify _nonlin in derived class
virtual
std
::
string
name
()
const
=
0
;
...
...
@@ -85,9 +85,9 @@ public:
//P(K): convention if NL is defined return it it, oterwise lin
inline
virtual
double
get_Pk
(
double
k
,
double
z
=
0
)
{
return
(
_nonlin
?
get_PkNL
(
k
,
z
)
:
get_Pklin
(
k
,
z
));
return
(
_nonlin
?
get_PkNL
(
k
,
z
)
:
get_Pklin
(
k
,
z
));
}
//rathe prefer explicit calls
//rathe
r
prefer explicit calls
virtual
double
get_Pklin
(
double
k
,
double
z
)
{
return
undef
(
"get_Pklin"
);}
virtual
double
get_PkNL
(
double
k
,
double
z
)
{
return
undef
(
"get_Pknl"
);}
...
...
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