109 Scalar ucor_plus = (r2 * bsn * dnphi +
110 sqrt ( r2 * r2 * bsn *bsn * dnphi * dnphi +
111 4 * r2 * bdlog * ndlog + 4 * r * ndlog) ) /
112 2 / (1 + r * bdlog ) ;
114 Scalar factor_u2 = r2 * (2 * ddbbb /
bbb - 2 * bdlog * bdlog +
115 4 * bdlog * ndlog ) +
116 2 * r2 * r2 * bsn * bsn * dnphi * dnphi +
117 4 * r * ( ndlog - bdlog ) - 6 ;
119 Scalar factor_u1 = 2 * r * r2 * bsn * ( 2 * ( ndlog - bdlog ) *
122 Scalar factor_u0 = - r2 * ( 2 * ddnnn /
nn - 2 * ndlog * ndlog +
123 4 * bdlog * ndlog ) ;
126 Scalar orbit = factor_u2 * ucor_plus * ucor_plus +
127 factor_u1 * ucor_plus + factor_u0 ;
133 double r_ms, theta_ms, phi_ms, xi_ms,
134 xi_min = -1, xi_max = 1;
136 bool find_status = false ;
138 const Valeur& vorbit = orbit.get_spectral_va() ;
140 for(l =
nzet; l <= nzm1; l++) {
144 theta_ms = M_PI / 2. ;
151 double xi_f = xi_min;
153 double resloc = vorbit.
val_point(l, xi_min, theta_ms, phi_ms) ;
155 for (
int iloc=0; iloc<200; iloc++) {
157 resloc_old = resloc ;
158 resloc = vorbit.
val_point(l, xi_f, theta_ms, phi_ms) ;
159 if ( resloc * resloc_old <
double(0) ) {
160 xi_min = xi_f - 0.01 ;
177 double precis_ms = 1.e-12 ;
179 int nitermax_ms = 100 ;
182 xi_ms =
zerosec(funct_star_rot_isco, par_ms, xi_min, xi_max,
183 precis_ms, nitermax_ms, niter) ;
186 " number of iterations used in zerosec to locate the ISCO : "
188 *ost <<
" zero found at xi = " << xi_ms << endl ;
191 r_ms =
mp.
val_r(l_ms, xi_ms, theta_ms, phi_ms) ;
210 double ucor_msplus = (ucor_plus.
get_spectral_va()).val_point(l_ms, xi_ms, theta_ms,
212 double nobrs = (bsn.
get_spectral_va()).val_point(l_ms, xi_ms, theta_ms, phi_ms) ;
215 p_f_isco =
new double ( ( ucor_msplus / nobrs / r_ms + nphirs ) /
216 (
double(2) * M_PI) ) ;
225 p_espec_isco=
new double (( 1./nobrs / r_ms / ucor_msplus + nphirs) *
226 (ucor_msplus/
sqrt(1.-ucor_msplus*ucor_msplus)*
233 double ucor_eqplus = (ucor_plus.
get_spectral_va()).val_point(l_ms, -1, theta_ms,phi_ms)
235 double nobeq = (bsn.
get_spectral_va()).val_point(l_ms, -1, theta_ms, phi_ms) ;
238 p_f_eq =
new double ( ( ucor_eqplus / nobeq /
ray_eq() + nphieq ) /
239 (
double(2) * M_PI) ) ;
virtual double val_r(int l, double xi, double theta, double pphi) const =0
Returns the value of the radial coordinate r for a given in a given domain.
double val_point(int l, double x, double theta, double phi) const
Computes the value of the field represented by *this at an arbitrary point, by means of the spectral ...
double zerosec(double(*f)(double, const Param &), const Param &par, double a, double b, double precis, int nitermax, int &niter, bool abort=true)
Finding the zero a function.