source: Sophya/trunk/Cosmo/SimLSS/cmvtgrowth.cc@ 3358

Last change on this file since 3358 was 3115, checked in by ansari, 19 years ago

Creation initiale du groupe Cosmo avec le repertoire SimLSS de
simulation de distribution de masse 3D des galaxies par CMV+Rz
18/12/2006

File size: 1.3 KB
Line 
1#include "sopnamsp.h"
2#include "machdefs.h"
3#include <iostream>
4#include <stdlib.h>
5#include <stdio.h>
6#include <string.h>
7#include <math.h>
8#include <unistd.h>
9#include "timing.h"
10#include "ntuple.h"
11
12#include "cosmocalc.h"
13#include "pkspectrum.h"
14
15void usage(void);
16void usage(void) {cout<<"cmvtgrowth z1,z2,dz [Omatter0,Lambda0]"<<endl;}
17
18void tstprint(CosmoCalc& univ,double z1,double z2,double dz);
19void tstspeed(CosmoCalc& univ,double z1,double z2,double dz);
20void tstntuple(CosmoCalc& univ,double z1,double z2,double dz);
21
22int main(int narg,char *arg[])
23{
24
25 double z1=0., z2=10., dz=1.;
26 if(narg>1) sscanf(arg[1],"%lf,%lf,%lf",&z1,&z2,&dz);
27 cout<<"z1="<<z1<<" z2="<<z2<<" dz="<<dz<<endl;
28
29 double om0=0.267804, ol0=0.73;
30 if(narg>2) sscanf(arg[2],"%lf,%lf",&om0,&ol0);
31 cout<<"Om0="<<om0<<" Ol0="<<ol0<<endl;
32
33 GrowthFactor growth(om0,ol0);
34 cout<<"D1(z=0) = "<<growth(0.)<<endl;
35
36 const int n = 2;
37 char *vname[n] = {"z","d1"};
38 NTuple nt(n,vname);
39 double xnt[n];
40 for(double z=z1;z<z2+dz/2.;z+=dz) {
41 xnt[0] = z;
42 xnt[1] = growth(z);
43 nt.Fill(xnt);
44 }
45
46 cout<<">>>> Ecriture"<<endl;
47 string tag = "cmvtgrowth.ppf";
48 POutPersist pos(tag);
49 tag = "nt"; pos.PutObject(nt,tag);
50
51 return 0;
52}
53
54
55/*
56openppf cmvtgrowth.ppf
57
58set cut 1
59set cut z<5
60
61n/plot nt.d1%z $cut ! "nsta connectpoints"
62n/plot nt.1./(1.+z)%z $cut ! "nsta connectpoints red same"
63*/
Note: See TracBrowser for help on using the repository browser.