forked from CornellCosmology/bias_MG_LPT_products
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlsm.hpp
59 lines (48 loc) · 1.88 KB
/
lsm.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#ifndef CLEFT_LSM_HPP
#define CLEFT_LSM_HPP
#include "lpt.hpp"
#include "zeldovich.hpp"
#include "spline.hpp"
#include "gauss_legendre.hpp"
// Implements the Lagrangian streaming model.
// Currently set up to take a linear power spectrum, f, F1 and F2
// at input, but could be modified to allow f, F1 and F2 to vary.
class LSM: public Zeldovich {
public:
LSM() {} // Do nothing.
// LSM(const char fname[]) {
// init(fname);}
LSM(const char fname[], const double f,
const double b1, const double b2, const double bs,
const double Aeft, const double Aeft1, const double Aeft2) {
init(fname,f,b1,b2,bs,Aeft,Aeft1,Aeft2);
}
//void init(const char fname[]);
void init(const char fname[], const double f,
const double b1, const double b2, const double bs,
const double Aeft, const double Aeft1, const double Aeft2);
double xiRZ(const double R, const double Z, const double s2fog);
std::vector<double> xiEll(const double ss, const double s2fog,
const double Apar, const double Aperp);
void printzFuncs(const char fbase[]);
void printqFuncs(const char fbase[]);
void printXiStuff(const char fbase[]);
void printVpStuff(const char fbase[]);
void printS2Stuff(const char fbase[]);
protected:
Spline xispl,vvspl,stspl,spspl;
Spline R1spl,R2spl,Q1spl,Q2spl,Q5spl,Q8spl,Qsspl,QIspl,RIspl,R12spl;
std::vector<double> X11,X22,X13,Y11,Y22,Y13,X1210,Y1210;
std::vector<double> V1,V3,TT;
std::vector<double> U1,U3,U220,U211,S2D;
LPT lpt;
std::vector<double> calcEfuncs(const double q);
void tabulateEfuncs();
void writeSaveFile(const char fname[]);
void readSaveFile(const char fname[]);
std::vector<double> interpEfuncs(const double q);
void setupQR();
// dpair, vpair, spair.
std::vector<std::vector<double>> dvsPair(const double rval);
};
#endif