Changeset 3348 in Sophya for trunk/Cosmo/SimLSS/pkspectrum.h
- Timestamp:
- Oct 11, 2007, 4:37:03 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Cosmo/SimLSS/pkspectrum.h
r3325 r3348 23 23 class TransfertEisenstein : public GenericFunc { 24 24 public: 25 26 typedef enum{ALL=0, CDM=1, BARYON=2} ReturnPart; 27 25 28 TransfertEisenstein(double h100,double OmegaCDM0,double OmegaBaryon0,double tcmb,bool nobaryon=false,int lp=0); 26 29 TransfertEisenstein(TransfertEisenstein& tf); … … 29 32 double KPeak(void); 30 33 void SetNoOscEnv(unsigned short nooscenv=0); 31 void SetReturnPart( unsigned short retpart=0);34 void SetReturnPart(ReturnPart retpart=ALL); 32 35 protected: 33 36 int lp_; … … 39 42 40 43 bool nobaryon_; 41 unsigned short nooscenv_, retpart_; 44 unsigned short nooscenv_; 45 ReturnPart retpart_; 42 46 43 47 double T0tild(double k,double alphac,double betac); … … 94 98 class PkSpectrumZ : public GenericFunc { 95 99 public: 100 typedef enum {PK=0, DELTA=1} ReturnSpectrum; 96 101 PkSpectrumZ(PkSpectrum0& pk0,GrowthFactor& d1,double zref=0.); 97 102 PkSpectrumZ(PkSpectrumZ& pkz); … … 101 106 inline void SetZ(double z) {zref_ = z;} 102 107 inline double GetZ(void) {return zref_;} 103 void SetTypSpec( unsigned short typspec=0);108 void SetTypSpec(ReturnSpectrum typspec=PK); 104 109 inline void SetScale(double scale=1.) {scale_=scale; zold_=-1.;} 105 110 inline double GetScale(void) {return scale_;} … … 110 115 GrowthFactor& d1_; 111 116 double zref_, scale_; 112 unsigned shorttypspec_;117 ReturnSpectrum typspec_; 113 118 mutable double zold_, d1old_; 114 119 }; … … 117 122 class VarianceSpectrum : public GenericFunc { 118 123 public: 119 VarianceSpectrum(GenericFunc& pk,unsigned short typfilter); 124 125 typedef enum {TOPHAT=0, GAUSSIAN=1, NOFILTER=2} TypeFilter; 126 127 VarianceSpectrum(GenericFunc& pk,double R,TypeFilter typfilter); 120 128 VarianceSpectrum(VarianceSpectrum& pkinf); 121 129 virtual ~VarianceSpectrum(void); 122 130 123 void SetFilter(unsigned short typfilter=0); 131 void SetRadius(double R); 132 void SetFilter(TypeFilter typfilter=TOPHAT); 124 133 void SetInteg(double dperc=0.1,double dlogkinc=-1.,double dlogkmax=-1.,unsigned short glorder=4); 125 134 126 double Variance(double R,doublekmin,double kmax);135 double Variance(double kmin,double kmax); 127 136 128 137 // ATTENTION: La fonction a integrer est : f(k)dk = k^3*Pk(k)/(2Pi^2) *filter2(k*R) *dk/k … … 131 140 132 141 // Aide a l'integration 133 double FindMaximum(double R,doublekmin,double kmax,double eps=1.e-3);134 int FindLimits(double R,doublehigh,double &kmin,double &kmax,double eps=1.e-3);142 double FindMaximum(double kmin,double kmax,double eps=1.e-3); 143 int FindLimits(double high,double &kmin,double &kmax,double eps=1.e-3); 135 144 136 145 protected: 137 146 138 147 GenericFunc& pk_; 139 unsigned shorttypfilter_;148 TypeFilter typfilter_; 140 149 double R_; 141 150
Note:
See TracChangeset
for help on using the changeset viewer.