From c85b99f9cd7bcc9cf9863ced328487ddb0afa3d7 Mon Sep 17 00:00:00 2001 From: Jose Onorbe Date: Wed, 14 Nov 2012 14:28:04 -0800 Subject: [PATCH] - Some corrections to avoid warnings during compilation. - Added information about initial temperature for the baryons in the log. - Modified output file names when doing a baryon run. - Corrected bug of hubble constant units in header. Did not affect dark matter only results. --- plugins/output_art.cc | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/plugins/output_art.cc b/plugins/output_art.cc index 3060889..9c53801 100644 --- a/plugins/output_art.cc +++ b/plugins/output_art.cc @@ -166,7 +166,12 @@ protected: // non-public member functions void write_header_file( void ) //PMcrd.DAT { - std::string partfname = fname_ + "/PMcrd.DAT"; + char* fout; + if(do_baryons_){ + fout = "/PMcrdIC.DAT";} + else{ + fout = "/PMcrd.DAT";} + std::string partfname = fname_ + fout; std::ofstream ofs( partfname.c_str(), std::ios::trunc ); //ofs.open(fname_.c_str(), std::ios::binary|std::ios::trunc ); header this_header(header_); @@ -284,7 +289,12 @@ protected: void assemble_DM_file( void ) //PMcrs0.DAT { // file name - std::string partfname = fname_ + "/PMcrs0.DAT"; + char* fout; + if(do_baryons_) { + fout = "/PMcrs0IC.DAT";} + else { + fout = "/PMcrs0.DAT";} + std::string partfname = fname_ + fout; std::ofstream ofs( partfname.c_str(), std::ios::trunc ); // generate all temp file names @@ -333,7 +343,7 @@ protected: // that could be interpreted as real. if(n2read1.e4) ? 4.0/(8.-5.*YHe_) : 4.0/(1.+3.*(1.-YHe_)); + LOGINFO("ART : set initial gas temperature to %.3f K (%.3f K/mu)",Tini, Tini/mu); + } @@ -578,7 +596,7 @@ public: header_.Nseed = 0; // random number used ( 0 for MUSIC? or set the random number used in the lowest level?) header_.Om0 = cf.getValue("cosmology","Omega_m"); //Omega_m header_.Oml0 = cf.getValue("cosmology","Omega_L"); //Omega_L - header_.hubble = cf.getValue("cosmology","H0"); //hubble constant h=H/100 + header_.hubble = cf.getValue("cosmology","H0")/100; //hubble constant h=H/100 header_.Wp5 = 0.0; // 0.0 header_.Ocurv = 1.0 - header_.Oml0 - header_.Om0; // header_.Omb0 = cf.getValue("cosmology","Omega_b");; // this parameter only appears in header in hydro runs