94 int nzm1 =
mp.get_mg()->get_nzone() - 1 ;
125 Cmp ucor_plus = (r2 * bsn * dnphi +
126 sqrt ( r2 * r2 * bsn *bsn * dnphi * dnphi +
127 4 * r2 * bdlog * ndlog + 4 *
r * ndlog) ) /
128 2 / (1 +
r * bdlog ) ;
130 Cmp factor_u2 = r2 * (2 * ddbbb /
bbb() - 2 * bdlog * bdlog +
131 4 * bdlog * ndlog ) +
132 2 * r2 * r2 * bsn * bsn * dnphi * dnphi +
133 4 *
r * ( ndlog - bdlog ) - 6 ;
135 Cmp factor_u1 = 2 *
r * r2 * bsn * ( 2 * ( ndlog - bdlog ) *
138 Cmp factor_u0 = - r2 * ( 2 * ddnnn /
nnn() - 2 * ndlog * ndlog +
139 4 * bdlog * ndlog ) ;
142 Cmp orbit = factor_u2 * ucor_plus * ucor_plus +
143 factor_u1 * ucor_plus + factor_u0 ;
149 double r_ms, theta_ms, phi_ms, xi_ms,
150 xi_min = -1, xi_max = 1;
152 bool find_status = false ;
154 const Valeur& vorbit = orbit.va ;
156 for(l =
nzet; l <= nzm1; l++) {
160 theta_ms = M_PI / 2. ;
167 double xi_f = xi_min;
169 double resloc = vorbit.
val_point(l, xi_min, theta_ms, phi_ms) ;
171 for (
int iloc=0; iloc<200; iloc++) {
173 resloc_old = resloc ;
174 resloc = vorbit.
val_point(l, xi_f, theta_ms, phi_ms) ;
175 if ( resloc * resloc_old <
double(0) ) {
176 xi_min = xi_f - 0.01 ;
193 double precis_ms = 1.e-13 ;
194 int nitermax_ms = 200 ;
197 xi_ms =
zerosec(fonct_etoile_rot_isco, par_ms, xi_min, xi_max,
198 precis_ms, nitermax_ms, niter,
false) ;
200 if (niter > nitermax_ms) {
201 cerr <<
"Etoile_rot::r_isco : " << endl ;
202 cerr <<
"result may be wrong ... " << endl ;
203 cerr <<
"Continuing." << endl ;
208 " number of iterations used in zerosec to locate the ISCO : "
210 *ost <<
" zero found at xi = " << xi_ms << endl ;
213 r_ms =
mp.val_r(l_ms, xi_ms, theta_ms, phi_ms) ;
224 p_r_isco =
new double ((
bbb().va).val_point(l_ms, xi_ms, theta_ms, phi_ms)
231 double ucor_msplus = (ucor_plus.
va).val_point(l_ms, xi_ms, theta_ms,
233 double nobrs = (bsn.
va).val_point(l_ms, xi_ms, theta_ms, phi_ms) ;
234 double nphirs = (
nphi().va).val_point(l_ms, xi_ms, theta_ms, phi_ms) ;
236 p_f_isco =
new double ( ( ucor_msplus / nobrs / r_ms + nphirs ) /
237 (
double(2) * M_PI) ) ;
242 ((
bbb().va).val_point(l_ms, xi_ms, theta_ms, phi_ms)) * r_ms );
246 p_espec_isco=
new double (( 1./nobrs / r_ms / ucor_msplus + nphirs) *
247 (ucor_msplus/
sqrt(1.-ucor_msplus*ucor_msplus)*
248 ((
bbb().va).val_point(l_ms, xi_ms, theta_ms, phi_ms)) * r_ms ));
253 double ucor_eqplus = (ucor_plus.
va).val_point(l_ms, -1, theta_ms, phi_ms) ;
254 double nobeq = (bsn.
va).val_point(l_ms, -1, theta_ms, phi_ms) ;
255 double nphieq = (
nphi().va).val_point(l_ms, -1, theta_ms, phi_ms) ;
257 p_f_eq =
new double ( ( ucor_eqplus / nobeq /
ray_eq() + nphieq ) /
258 (
double(2) * M_PI) ) ;
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.