GremlinEq
CEID.h
1 //---------------------------------------------------------------------------
2 //
3 // $Id: CEID.h,v 1.33 2019/01/24 20:47:07 sahughes Exp $
4 //
5 //---------------------------------------------------------------------------
6 //
7 // Circular, equatorial inspiral data.
8 //
9 #ifndef _CEID_H
10 #define _CEID_H
11 
12 #include <cmath>
13 #include "Globals.h"
14 #include "CEDR.h"
15 #include "SWSH.h"
16 #include "RRGW.h"
17 #include <gsl/gsl_errno.h>
18 #include <gsl/gsl_spline.h>
19 
20 #define LRANGE 100
21 
23 class CEID {
24 public:
25  CEID(char *basename, const Real arrmin, const Real rmax, const Real dr,
26  const int ellmax);
27  CEID(char *basename, const int Nhi, const int ellmax);
28  ~CEID();
29 
30  Real rdot, rdot_noH, Omega;
31  Real Omega_max, rmin;
32  Real EdotI, LzdotI;
33  Real EdotH, LzdotH;
34  Real hp, hc;
35  Real r_isco, a;
36  //
37  // Loads spheroid data.
38  //
39  void Spheroids(const Real costheta_view);
40  //
41  // Get stuff, interpolated to current coordinate in parameter space
42  //
43  void Get_rdot_omega(const Real r);
44  void Get_fluxes(const Real r);
45  void Get_wave(const Real r, const Real phi, const Real phi_view);
46  void Get_flux_Smode(const Real r, const int l, const int m,
47  Real & EdotHlm, Real & EdotIlm);
48  void Get_flux_mmode(const Real r, const int m,
49  Real & EdotHm, Real & EdotIm);
50  void Get_flux_lmode(const Real r, const int l,
51  Real & EdotHl, Real & EdotIl);
52  void Get_flux_Ymode(const Real r, const int l, const int m,
53  Real & EdotHlm, Real & EdotIlm);
54  void Get_ZIlm(const Real r, const int l, const int m, Complex & ZIlm);
55  void Get_CIlm(const Real r, const Real phi, const int l, const int m,
56  Complex & CIlm);
57  //
58  // Before using Get_CIlm or Get_flux_Ymode, you must run Spline_CIlm()!
59  // Would be best to put this in the constructor, but it is so CPU
60  // expensive we leave it out to be run for a particular mode.
61  //
62  void Spline_CIlm(const int l, const int m);
63 
64  int jmax;
65  Real *r_arr;
66 
67  int *max_l_computed; // The largest value of l computed for a given v.
68 
69 private:
70  void Allocate();
71  void ReadIn(char *inname);
72  void Make_radial_splines();
73 
74  int j, lmax, l, m;
75  //
76  Real *rstar_arr;
77  //
78  Real *Omega_arr, *rdot_arr, *rdot_noH_arr;
79  gsl_interp_accel *Omega_acc, *rdot_acc, *rdot_noH_acc;
80  gsl_spline *Omega_spl, *rdot_spl, *rdot_noH_spl;
81  //
82  Real *EdotI_arr, *LzdotI_arr, *EdotH_arr, *LzdotH_arr;
83  gsl_interp_accel *EdotI_acc, *LzdotI_acc, *EdotH_acc, *LzdotH_acc;
84  gsl_spline *EdotI_spl, *LzdotI_spl, *EdotH_spl, *LzdotH_spl;
85  //
86  // Used for waveforms.
87  //
88  Real ***ZI_re, ***ZI_im, ***CI_re, ***CI_im, ***ZH_re, ***ZH_im, ***Spheroid;
89  gsl_interp_accel ***ZI_re_acc, ***ZI_im_acc, ***CI_re_acc, ***CI_im_acc;
90  gsl_interp_accel ***ZH_re_acc, ***ZH_im_acc, ***Spheroid_acc;
91  gsl_spline ***ZI_re_spl, ***ZI_im_spl, ***CI_re_spl, ***CI_im_spl;
92  gsl_spline ***ZH_re_spl, ***ZH_im_spl, ***Spheroid_spl;
93 };
94 #endif
Circular Equatorial Inspiral Data Class.
Definition: CEID.h:23