Changeset 3317 in Sophya for trunk/Cosmo/SimLSS


Ignore:
Timestamp:
Aug 28, 2007, 11:40:41 AM (18 years ago)
Author:
cmv
Message:

hu_power et hu_tf_fit NE PEUVENT ETRE apples dans le meme program sans interferer l'un avec l'autre cvstatcvstat cmv 28/08/2007

Location:
trunk/Cosmo/SimLSS
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cosmo/SimLSS/Makefile

    r3315 r3317  
    204204cmvchkwhu: $(EXE)cmvchkwhu
    205205        echo $@ " done"
    206 $(EXE)cmvchkwhu: $(OBJ)cmvchkwhu.o $(OBJ)hu_tf_fit.o $(OBJ)hu_power.o $(LIBR)
    207         $(CXXLINK) $(CXXREP) -o $@ $(OBJ)cmvchkwhu.o $(OBJ)hu_tf_fit.o $(OBJ)hu_power.o $(MYLIB)
     206$(EXE)cmvchkwhu: $(OBJ)cmvchkwhu.o $(OBJ)hu_tf_fit.o $(LIBR)
     207        $(CXXLINK) $(CXXREP) -o $@ $(OBJ)cmvchkwhu.o $(OBJ)hu_tf_fit.o $(MYLIB)
    208208$(OBJ)cmvchkwhu.o: cmvchkwhu.cc
    209209        $(CXXCOMPILE) $(CXXREP) -I$(MYEXTINC) -o $@ cmvchkwhu.cc
    210210$(OBJ)hu_tf_fit.o: hu_tf_fit.c hu_tf_fit.h
    211211        $(CCOMPILE) -o $@ hu_tf_fit.c
    212 $(OBJ)hu_power.o: hu_power.c hu_power.h
    213         $(CCOMPILE) -o $@ hu_power.c
    214212
    215213hu_sigma8: $(EXE)hu_sigma8
     
    219217$(OBJ)hu_sigma8.o: hu_sigma8.c
    220218        $(CCOMPILE) -o $@ hu_sigma8.c
     219$(OBJ)hu_power.o: hu_power.c hu_power.h
     220        $(CCOMPILE) -o $@ hu_power.c
    221221
    222222##############################################################################
  • trunk/Cosmo/SimLSS/cmvchkwhu.cc

    r3315 r3317  
    11// Check cmv / Wayne Hu coding of the transfert functions
     2// ATTENTION: ne pas appeler hu_power.c ici car il ecrase les initialisations de hu_tf_fit.c
    23#include "sopnamsp.h"
    34#include "machdefs.h"
     
    1314#include "pkspectrum.h"
    1415#include "hu_tf_fit.h"
    15 #include "hu_power.h"
    1616
    1717int main(int narg,char *arg[])
     
    1919 double k1 = 1e-6, k2 = 10.; int_4 npt = 10000;
    2020 double h100 = 0.71, Om0 = 0.267804, Ob0 = 0.0444356, tcmb = T_CMB_Par;
    21  // Modele MDM (hu_power.c)  Eisenstein & Hu Apj 511 p5-15, 1999 (ou astro-ph/9710252)
    22  double Ohdm = 0.0, Ol0 = 0.7, redshift=0.;
    23  int degen_hdm = 0;
    2421
    2522 cout<<"k1="<<k1<<"  k2="<<k2<<" npt="<<npt<<endl;
     
    4542 TransfertEisenstein Tnob(h100,Om0,0.,tcmb,true,1);
    4643
    47  cout<<endl<<"TFmdm_set_cosm"<<endl;
    48  int rcmdm = TFmdm_set_cosm(Om0,Ob0,Ohdm,degen_hdm,Ol0,h100,redshift);
    49  cout<<"  rc="<<rcmdm<<endl;
    50 
    5144 cout<<endl<<"Compare kpeak"<<endl;
    5245 double kpeak = Tfull.KPeak();
     
    5447 cout<<"kpeak = "<<kpeak<<" "<<kpeakhu<<"  Mpc^-1  -> diff "<<kpeak-kpeakhu<<endl;
    5548
    56  const int n = 12;
     49 const int n = 11;
    5750 char *vname[n] = {"k","tf","tfnw","tfnb","tfc","tfb"
    58                   ,"hutf","hutfnw","hutfnb","hutfc","hutfb"
    59                   ,"hutfmdm"};
     51                  ,"hutf","hutfnw","hutfnb","hutfc","hutfb"};
    6052 NTuple nt(n,vname);
    6153 double xnt[n];
     
    7668   double hutfnw = TFnowiggles(Om0,fbaryon,h100,tcmb,k/h100);
    7769   double hutfnb = TFzerobaryon(Om0,h100,tcmb,k/h100);
    78    double hutfmdm = TFmdm_onek_mpc(k);
    7970
    8071
     
    8879   xnt[1]=tf; xnt[2]=tfnw; xnt[3]=tfnb; xnt[4]=tfc; xnt[5]=tfb;
    8980   xnt[6]=hutf; xnt[7]=hutfnw; xnt[8]=hutfnb; xnt[9]=hutfc; xnt[10]=hutfb;
    90    xnt[11] = hutfmdm;
    9181   nt.Fill(xnt);
    9282 }
     
    149139n/plot nt.tfnw%$k ! ! "nsta connectpoints red same"
    150140n/plot nt.tfnb%$k ! ! "nsta connectpoints blue same"
    151 n/plot nt.hutfmdm%$k ! ! "nsta connectpoints green same"
    152141
    153142zone
     
    155144n/plot nt.hutf/hutfnw%$k hutfnw>0. ! "nsta connectpoints same blue"
    156145addline -1000 1 1000 1 "red"
     146
     147zone
     148n/plot nt.tf/tfnb%$k tfnb>0. ! "nsta connectpoints"
     149n/plot nt.hutf/hutfnb%$k hutfnb>0. ! "nsta connectpoints same blue"
     150addline -1000 1 1000 1 "red"
    157151*/
Note: See TracChangeset for help on using the changeset viewer.