[3115] | 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 |
|
---|
| 15 | void usage(void);
|
---|
| 16 | void usage(void) {cout<<"cmvtgrowth z1,z2,dz [Omatter0,Lambda0]"<<endl;}
|
---|
| 17 |
|
---|
| 18 | void tstprint(CosmoCalc& univ,double z1,double z2,double dz);
|
---|
| 19 | void tstspeed(CosmoCalc& univ,double z1,double z2,double dz);
|
---|
| 20 | void tstntuple(CosmoCalc& univ,double z1,double z2,double dz);
|
---|
| 21 |
|
---|
| 22 | int 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 | /*
|
---|
| 56 | openppf cmvtgrowth.ppf
|
---|
| 57 |
|
---|
| 58 | set cut 1
|
---|
| 59 | set cut z<5
|
---|
| 60 |
|
---|
| 61 | n/plot nt.d1%z $cut ! "nsta connectpoints"
|
---|
| 62 | n/plot nt.1./(1.+z)%z $cut ! "nsta connectpoints red same"
|
---|
| 63 | */
|
---|