Changeset 3802 in Sophya for trunk/Cosmo/SimLSS/pkspectrum.cc


Ignore:
Timestamp:
Jul 22, 2010, 2:49:20 PM (15 years ago)
Author:
cmv
Message:

minor cosmetics, cmv 22/07/2010

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cosmo/SimLSS/pkspectrum.cc

    r3768 r3802  
    295295///////////////////////////////////////////////////////////
    296296
    297 TransfertTabulate::TransfertTabulate(double h100,double OmegaCDM0,double OmegaBaryon0)
    298 : Oc_(OmegaCDM0) , Ob_(OmegaBaryon0) , h100_(h100) , kmin_(1.) , kmax_(-1.)
    299 , interptyp_(0)
     297TransfertTabulate::TransfertTabulate(void)
     298: kmin_(1.) , kmax_(-1.) , interptyp_(0)
    300299{
    301300}
    302301
    303302TransfertTabulate::TransfertTabulate(TransfertTabulate& tf)
    304 : Oc_(tf.Oc_) , Ob_(tf.Ob_) , h100_(tf.h100_) , kmin_(tf.kmin_) , kmax_(tf.kmax_)
    305 , interptyp_(tf.interptyp_) , k_(tf.k_) , tf_(tf.tf_)
     303: kmin_(tf.kmin_) , kmax_(tf.kmax_) , interptyp_(tf.interptyp_) , k_(tf.k_) , tf_(tf.tf_)
    306304{
    307305}
     
    323321}
    324322
    325 int TransfertTabulate::ReadCMBFast(string filename)
     323int TransfertTabulate::ReadCMBFast(string filename,double h100,double OmegaCDM0,double OmegaBaryon0)
    326324{
    327325 FILE *file = fopen(filename.c_str(),"r");
    328326 if(file==NULL) return -1;
     327 cout<<"TransfertTabulate::ReadCMBFast: fn="<<filename<<" h100="<<h100
     328     <<" OmegaCDM0="<<OmegaCDM0<<" OmegaBaryon0="<<OmegaBaryon0<<endl;
    329329
    330330 const int lenline = 512;
     
    336336   double k,tc,tb,tf;
    337337   sscanf(line,"%lf %lf %lf",&k,&tc,&tb);
    338    k *= h100_;     // convert h^-1 Mpc  ->  Mpc
    339    tf = (Oc_*tc+Ob_*tb)/(Oc_+Ob_);
     338   k *= h100;     // convert h Mpc^-1  ->  Mpc^-1
     339   tf = (OmegaCDM0*tc+OmegaBaryon0*tb)/(OmegaCDM0+OmegaBaryon0);
    340340   if(tf>tmax) tmax = tf;
    341341   k_.push_back(k);
Note: See TracChangeset for help on using the changeset viewer.