00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044 #include <stdio.h>
00045 #include <math.h>
00046 #include <lal/LALConfig.h>
00047 #include <lal/LALStdlib.h>
00048 #include <lal/Integrate.h>
00049 #include <lal/AstroOmega.h>
00050
00051 NRCSID (ASTROOMEGATESTC, "$Id: AstroOmegaTest.c,v 1.7 2007/06/08 14:41:54 bema Exp $");
00052
00053 static void SDensity (REAL8 *dEgw, REAL8 nu)
00054 {
00055 *dEgw=9.27E35 * pow(nu,3.);
00056 return;
00057 }
00058
00059 int lalDebugLevel = 0;
00060 int main ( void )
00061 {
00062 static LALStatus status;
00063 AstroOmegaParams p;
00064 AstroOmegaSourceParams sourcep;
00065 AstroOmegaCosmoParams cosmop;
00066 REAL8 nu, test;
00067
00068 cosmop.ho = 0.65;
00069 cosmop.density_matter = 0.3;
00070 cosmop.density_vacuum = 0.7;
00071 cosmop.density_k = 0.;
00072 nu = 1100.;
00073
00074 sourcep.lambda = 4.84E-3;
00075 sourcep.numax = 4000.;
00076 sourcep.SDensitySource = SDensity;
00077 p.cosmoparams = cosmop;
00078 p.sourceparams = sourcep;
00079
00080
00081 p.extraparams = ν
00082 LALAstroOmega (&status, &test, nu,&p);
00083 if (fabs(test-1.16E-10) > 1.E-12)
00084 {
00085 printf("error! the right value is 1.16E-10 not %.2e\n",test);
00086 }
00087 else printf("omega(%f)= %.2e o.k\n", nu,test);
00088
00089
00090
00091
00092
00093
00094
00095
00096 return 0;
00097 }