23 #define USE_LONG_DOUBLE 2 25 #if !defined(REAL_TYPE) || REAL_TYPE == USE_DOUBLE 27 #elif REAL_TYPE == USE_FLOAT 29 #elif REAL_TYPE == USE_LONG_DOUBLE 30 typedef long double Real;
35 typedef std::complex<Real> Complex;
36 const Complex II = Complex(0.,1.);
39 template<
class NUMBER>
40 inline NUMBER Max(
const NUMBER a,
const NUMBER b) {
41 return (a > b ? a : b);
45 template<
class NUMBER>
46 inline NUMBER Min(
const NUMBER a,
const NUMBER b) {
47 return (a < b ? a : b);
57 return(1. + sqrt((1. - a)*(1. + a)));
63 return(1. - sqrt((1. - a)*(1. + a)));
67 static Real
rstar(
const Real r,
const Real a)
70 const Real rp =
rplus(a);
72 return(r + ((2.*rp)/(rp - rm))*log((r - rp)/2.) -
73 ((2.*rm)/(rp - rm))*log((r - rm)/2.));
77 static Real
Delta(
const Real r,
const Real a)
79 return(r*r - 2.*r + a*a);
95 static Real
Sigma(
const Real r,
const Real a,
const Real z)
112 static Real Eeqpro(
const Real r,
const Real a)
114 const Real v = 1./sqrt(r);
116 const Real numer = 1. - v*v*(2. - a*v);
117 const Real denom = 1. - v*v*(3. - 2.*a*v);
119 return(numer/sqrt(denom));
122 static Real Eeqret(
const Real r,
const Real a)
124 const Real v = 1./sqrt(r);
126 const Real numer = 1. - v*v*(2. + a*v);
127 const Real denom = 1. - v*v*(3. + 2.*a*v);
129 return(numer/sqrt(denom));
132 static Real Lzeqpro(
const Real r,
const Real a)
134 const Real v = 1./sqrt(r);
136 const Real numer = 1. - a*v*v*v*(2. - a*v);
137 const Real denom = 1. - v*v*(3. - 2.*a*v);
139 return(r*v*numer/sqrt(denom));
142 static Real Lzeqret(
const Real r,
const Real a)
144 const Real v = 1./sqrt(r);
146 const Real numer = 1. + a*v*v*v*(2. + a*v);
147 const Real denom = 1. - v*v*(3. + 2.*a*v);
149 return(-r*v*numer/sqrt(denom));
152 static Real Omega_phi_eqpro(
const Real r,
const Real a)
154 return(1./(sqrt(r*r*r) + a));
157 static Real Omega_phi_eqret(
const Real r,
const Real a)
159 return(-1./(sqrt(r*r*r) - a));
162 static Real isco_pro(
const Real a)
164 const Real Z1 = 1. + (pow(1. + a, 1./3.) + pow(1. - a, 1./3.))*
165 pow((1. + a)*(1. - a), 1./3.);
166 const Real Z2 = sqrt(3.*a*a + Z1*Z1);
168 return(3. + Z2 - sqrt((3. - Z1)*(3. + Z1 + 2.*Z2)));
171 static Real isco_ret(
const Real a)
173 const Real Z1 = 1. + (pow(1. + a, 1./3.) + pow(1. - a, 1./3.))*
174 pow((1. + a)*(1. - a), 1./3.);
175 const Real Z2 = sqrt(3.*a*a + Z1*Z1);
177 return(3. + Z2 + sqrt((3. - Z1)*(3. + Z1 + 2.*Z2)));
188 Real EdotInf, LzdotInf, QdotInf, rdotInf;
189 Real EdotH, LzdotH, QdotH, rdotH;
static Real Sigma(const Real r, const Real a, const Real z)
Definition: Globals.h:95
static Real Delta(const Real r, const Real a)
Definition: Globals.h:77
static Real rstar(const Real r, const Real a)
Definition: Globals.h:67
static Real ddr_Delta()
Definition: Globals.h:89
Data Holder Struct (deprecated March 2019)
Definition: Globals.h:183
static Real dr_Sigma(const Real r)
Definition: Globals.h:101
static Real ddr_Sigma()
Definition: Globals.h:107
static Real rplus(const Real a)
Definition: Globals.h:55
Kerr Quantities Class.
Definition: Globals.h:52
static Real dr_Delta(const Real r)
Definition: Globals.h:83
static Real rminus(const Real a)
Definition: Globals.h:61