Closed astrogirl1 closed 3 years ago
By looking into input.c
and background.c
you can see what happens:
Omega_dcdmdr
or omega_dcdmdr
, the internal variable pba->Omega0_dcdmdr
is set to a non-zero value inside input.c
pba->Omega0_dcdmdr
has been set to a non-zero value, the internal variable pba->has_dcdm
is set to _TRUE_
inside background.c
In conclusion, you are not supposed to pass has_dcdm
in your input parameter file, but only Omega_dcdmdr
or omega_dcdmdr
, as documented in explanatory.ini
. All the cosmological parameters understood by CLASS are documented in explanatory.ini
, and no other cosmological parameter is understood by CLASS (unless you modify the code yourself).
Yes, this has worked thank you!
Hi again,
I have introduced new parameters to the code, which are being read and used by CLASS successfully. The issue that I am running into is I am trying to trigger the following if condition to use the equations with the newly added parameters but it is not working. I am unsure where/how I should define has_dcdm so that the condition is TRUE and the equations are calculated.
I know this because I added a print statement inside the if condition and nothing is printing. I have tried to use this in CLASS on its own (using explanatory.ini and defining values there, even has_dcdm) and also using MontePython, but the posteriors for my variables looks exactly like the input priors.
if (pba->has_dcdm == _TRUE_){ printf("'new_param2' input parameter = %g\n", pba->new_param2); /** - compute dcdm density \f$ \rho' = -3aH \rho - a \Gamma \rho \f$*/ dy[pba->index_bi_rho_dcdm] = -3.*y[pba->index_bi_a]*pvecback[pba->index_bg_H]*y[pba->index_bi_rho_dcdm]- y[pba->index_bi_a]*pba->new_param1*pba->Gamma_dcdm*y[pba->index_bi_rho_dcdm]; }
Thank you for your help! Meera