From 0bcfe6753e6a5d8b7e60193c5c4090f6c3c638c8 Mon Sep 17 00:00:00 2001 From: Oliver Hahn Date: Wed, 20 Mar 2024 22:58:09 +0100 Subject: [PATCH] disable isocurvature when outputting only 1 species (only relevant when using ppt for dm) --- src/ic_generator.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/ic_generator.cc b/src/ic_generator.cc index c243f6c..cfd9003 100644 --- a/src/ic_generator.cc +++ b/src/ic_generator.cc @@ -542,7 +542,13 @@ int run( config_file& the_config ) music::ilog << std::endl << ">>> Computing ICs for species \'" << cosmo_species_name[this_species] << "\' <<<\n" << std::endl; - const real_t C_species = (this_species == cosmo_species::baryon)? (1.0-the_cosmo_calc->cosmo_param_["f_b"]) : -the_cosmo_calc->cosmo_param_["f_b"]; + // const real_t C_species = (this_species == cosmo_species::baryon)? (1.0-the_cosmo_calc->cosmo_param_["f_b"]) : -the_cosmo_calc->cosmo_param_["f_b"]; + + real_t C_species = (this_species == cosmo_species::baryon)? (1.0-the_cosmo_calc->cosmo_param_["f_b"]) : -the_cosmo_calc->cosmo_param_["f_b"]; + + if( species_list.size() == 1 ){ + C_species = 0.0; + } // main loop block {