| 1 | /* |
| 2 | * Definition of Lorene class Star_bhns |
| 3 | * |
| 4 | */ |
| 5 | |
| 6 | /* |
| 7 | * Copyright (c) 2005-2007 Keisuke Taniguchi |
| 8 | * |
| 9 | * This file is part of LORENE. |
| 10 | * |
| 11 | * LORENE is free software; you can redistribute it and/or modify |
| 12 | * it under the terms of the GNU General Public License version 2 |
| 13 | * as published by the Free Software Foundation. |
| 14 | * |
| 15 | * LORENE is distributed in the hope that it will be useful, |
| 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 18 | * GNU General Public License for more details. |
| 19 | * |
| 20 | * You should have received a copy of the GNU General Public License |
| 21 | * along with LORENE; if not, write to the Free Software |
| 22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 23 | * |
| 24 | */ |
| 25 | |
| 26 | #ifndef __STAR_BHNS_H_ |
| 27 | #define __STAR_BHNS_H_ |
| 28 | |
| 29 | /* |
| 30 | * $Id: star_bhns.h,v 1.3 2014/10/13 08:52:36 j_novak Exp $ |
| 31 | * $Log: star_bhns.h,v $ |
| 32 | * Revision 1.3 2014/10/13 08:52:36 j_novak |
| 33 | * Lorene classes and functions now belong to the namespace Lorene. |
| 34 | * |
| 35 | * Revision 1.2 2008/05/15 18:55:55 k_taniguchi |
| 36 | * Change of some parameters. |
| 37 | * |
| 38 | * Revision 1.1 2007/06/22 01:04:35 k_taniguchi |
| 39 | * *** empty log message *** |
| 40 | * |
| 41 | * |
| 42 | * $Header: /cvsroot/Lorene/C++/Include/star_bhns.h,v 1.3 2014/10/13 08:52:36 j_novak Exp $ |
| 43 | * |
| 44 | */ |
| 45 | |
| 46 | // Lorene headers |
| 47 | #include "star.h" |
| 48 | |
| 49 | namespace Lorene { |
| 50 | |
| 51 | // External classes which appear in the declaration of class Star_bhns: |
| 52 | class Hole_bhns ; |
| 53 | |
| 54 | /** |
| 55 | * Class for stars in black hole-neutron star binaries. |
| 56 | * \ingroup(star) |
| 57 | * |
| 58 | */ |
| 59 | class Star_bhns : public Star { |
| 60 | |
| 61 | // Data : |
| 62 | // ----- |
| 63 | protected: |
| 64 | /** Affine mapping for solving poisson's equations of |
| 65 | * metric quantities |
| 66 | */ |
| 67 | Map_af mp_aff ; |
| 68 | |
| 69 | /** \c true for an irrotational star, \c false for |
| 70 | * a corotating one |
| 71 | */ |
| 72 | bool irrotational ; |
| 73 | |
| 74 | /** Scalar potential \f$\Psi_0\f$ of the non-translational part of |
| 75 | * fluid 4-velocity (in the irrotational case) |
| 76 | */ |
| 77 | Scalar psi0 ; |
| 78 | |
| 79 | /** Gradient of \f$\Psi\f$ (in the irrotational case) |
| 80 | * (Spherical components with respect to the mapping of the star) |
| 81 | */ |
| 82 | Vector d_psi ; |
| 83 | |
| 84 | /** Spatial projection of the fluid 3-velocity with respect to |
| 85 | * the co-orbiting observer. |
| 86 | * (Spherical components with respect to the mapping of the star) |
| 87 | */ |
| 88 | Vector wit_w ; |
| 89 | |
| 90 | /** Logarithm of the Lorentz factor between the fluid and |
| 91 | * the co-orbiting observer. |
| 92 | */ |
| 93 | Scalar loggam ; |
| 94 | |
| 95 | /** 3-vector shift, divided by \e N , of the rotating coordinates, |
| 96 | * \f$\beta^i/N\f$. |
| 97 | * (Spherical components with respect to the mapping of the star) |
| 98 | */ |
| 99 | Vector bsn ; |
| 100 | |
| 101 | /// Lorentz factor between the fluid and the co-orbiting observer |
| 102 | Scalar gam ; |
| 103 | |
| 104 | /** Lorentz factor between the co-orbiting observer |
| 105 | * and the Eulerian one |
| 106 | */ |
| 107 | Scalar gam0 ; |
| 108 | |
| 109 | /// Centrifugal potential |
| 110 | Scalar pot_centri ; |
| 111 | |
| 112 | /// Lapconf function generated by the star |
| 113 | Scalar lapconf_auto ; |
| 114 | |
| 115 | /// Lapconf function generated by the companion black hole |
| 116 | Scalar lapconf_comp ; |
| 117 | |
| 118 | /// Total lapconf function |
| 119 | Scalar lapconf_tot ; |
| 120 | |
| 121 | /// Lapse function generated by the "star" |
| 122 | Scalar lapse_auto ; // = lapconf_auto / confo_tot |
| 123 | |
| 124 | /// Total lapse function |
| 125 | Scalar lapse_tot ; |
| 126 | |
| 127 | /** Derivative of the lapconf function generated by the star |
| 128 | * \f$ \partial_j \alpha \f$ |
| 129 | */ |
| 130 | Vector d_lapconf_auto ; |
| 131 | |
| 132 | /** Derivative of the lapconf function generated by the companion |
| 133 | * black hole |
| 134 | */ |
| 135 | Vector d_lapconf_comp ; |
| 136 | |
| 137 | /// Shift vector generated by the star |
| 138 | Vector shift_auto ; |
| 139 | |
| 140 | /// Shift vector generated by the companion black hole |
| 141 | Vector shift_comp ; |
| 142 | |
| 143 | /// Total shift vector |
| 144 | Vector shift_tot ; |
| 145 | |
| 146 | /** Derivative of the shift vector generated by the star |
| 147 | * \f$ \eta^{ik} \partial_k \beta^j \f$ |
| 148 | */ |
| 149 | Tensor d_shift_auto ; |
| 150 | |
| 151 | /** Derivative of the shift vector generated by the companion |
| 152 | * black hole |
| 153 | */ |
| 154 | Tensor d_shift_comp ; |
| 155 | |
| 156 | /// Conformal factor generated by the star |
| 157 | Scalar confo_auto ; |
| 158 | |
| 159 | /// Conformal factor generated by the companion black hole |
| 160 | Scalar confo_comp ; |
| 161 | |
| 162 | /// Total conformal factor |
| 163 | Scalar confo_tot ; |
| 164 | |
| 165 | /** Derivative of the conformal factor generated by the star |
| 166 | * \f$ \partial_j \psi \f$ |
| 167 | */ |
| 168 | Vector d_confo_auto ; |
| 169 | |
| 170 | /** Derivative of the conformal factor generated by the companion |
| 171 | * black hole |
| 172 | */ |
| 173 | Vector d_confo_comp ; |
| 174 | |
| 175 | /// Fourth power of the total conformal factor |
| 176 | Scalar psi4 ; // psi4 = pow(confo_tot, 4.) |
| 177 | |
| 178 | /** Part of the extrinsic curvature tensor \f$ A^{ij}\f$ |
| 179 | * generated by \c shift_auto , \c lapse_auto , and |
| 180 | * \c confo_auto . |
| 181 | */ |
| 182 | Sym_tensor taij_auto ; |
| 183 | |
| 184 | /** Part of the scalar \f$\eta_{ik} \eta_{jl} A^{ij} A^{kl}\f$ |
| 185 | * generated by \f$A_{ij}^{\rm auto}\f$ |
| 186 | */ |
| 187 | Scalar taij_quad_auto ; |
| 188 | |
| 189 | /** Flat metric defined on the mapping (Spherical components |
| 190 | * with respect to the mapping of the star ). |
| 191 | */ |
| 192 | Metric_flat flat ; |
| 193 | |
| 194 | /** Effective source at the previous step for the resolution of |
| 195 | * the Poisson equation for \c lapconf_auto . |
| 196 | */ |
| 197 | Scalar ssjm1_lapconf ; |
| 198 | |
| 199 | /** Effective source at the previous step for the resolution of |
| 200 | * the Poisson equation for \c confo_auto . |
| 201 | */ |
| 202 | Scalar ssjm1_confo ; |
| 203 | |
| 204 | /** Effective source at the previous step for the resolution of |
| 205 | * the Poisson equation for the scalar \f$\chi\f$ by means of |
| 206 | * \c Map_et::poisson . |
| 207 | * \f$\chi\f$ is an intermediate quantity for the resolution of the |
| 208 | * elliptic equation for the shift vector \f$N^i\f$ |
| 209 | */ |
| 210 | Scalar ssjm1_khi ; |
| 211 | |
| 212 | /** Effective source at the previous step for the resolution of |
| 213 | * the vector Poisson equation for \f$W^i\f$ by means of |
| 214 | * \c Map_et::poisson . |
| 215 | * \f$W^i\f$ is an intermediate quantity for the resolution of the |
| 216 | * elliptic equation for the shift vector \f$N^i\f$ |
| 217 | * (Components with respect to the Cartesian triad associated with |
| 218 | * the mapping \c mp ) |
| 219 | */ |
| 220 | Vector ssjm1_wshift ; |
| 221 | |
| 222 | // Derived data |
| 223 | // ------------ |
| 224 | protected: |
| 225 | mutable double* p_mass_b_bhns ; ///< Baryon mass |
| 226 | mutable double* p_mass_g_bhns ; ///< Gravitational mass |
| 227 | |
| 228 | // Constructors - Destructor |
| 229 | // ------------------------- |
| 230 | public: |
| 231 | /** Standard constructor |
| 232 | * |
| 233 | * @param mp_i Mapping on which the star will be defined |
| 234 | * @param nzet_i Number of domains occupied by the star |
| 235 | * @param eos_i Equation of state of the stellar matter |
| 236 | * @param irrot_i should be \c true for an irrotational star, |
| 237 | * \c false for a corotating one |
| 238 | */ |
| 239 | Star_bhns(Map& mp_i, int nzet_i, const Eos& eos_i, bool irrot_i) ; |
| 240 | |
| 241 | Star_bhns(const Star_bhns& ) ; ///< Copy constructor |
| 242 | |
| 243 | /** Constructor from a file (see \c sauve(FILE*) ) |
| 244 | * @param mp_i Mapping on which the star will be defined |
| 245 | * @param eos_i Equation of state of the stellar matter |
| 246 | * @param fich input file (must have been created by the function |
| 247 | * \c sauve ) |
| 248 | */ |
| 249 | Star_bhns(Map& mp_i, const Eos& eos_i, FILE* fich) ; |
| 250 | |
| 251 | virtual ~Star_bhns() ; ///< Destructor |
| 252 | |
| 253 | |
| 254 | // Memory management |
| 255 | // ----------------- |
| 256 | protected: |
| 257 | /// Deletes all the derived quantities |
| 258 | virtual void del_deriv() const ; |
| 259 | |
| 260 | /// Sets to \c 0x0 all the pointers on derived quantities |
| 261 | void set_der_0x0() const ; |
| 262 | |
| 263 | // Mutators / assignment |
| 264 | // --------------------- |
| 265 | public: |
| 266 | /// Assignment to another Star_bhns |
| 267 | void operator=(const Star_bhns&) ; |
| 268 | |
| 269 | /// Read/write the centrifugal potential |
| 270 | Scalar& set_pot_centri() ; |
| 271 | |
| 272 | /// Read/write of the lapconf function generated by the neutron star |
| 273 | Scalar& set_lapconf_auto() ; |
| 274 | |
| 275 | /** Read/write of the lapconf function generated by the companion |
| 276 | * black hole |
| 277 | */ |
| 278 | Scalar& set_lapconf_comp() ; |
| 279 | |
| 280 | /// Read/write of the shift vector generated by the neutron star |
| 281 | Vector& set_shift_auto() ; |
| 282 | |
| 283 | /** Read/write of the shift vector generated by the companion |
| 284 | * black hole |
| 285 | */ |
| 286 | Vector& set_shift_comp() ; |
| 287 | |
| 288 | /// Read/write of the conformal factor generated by the neutron star |
| 289 | Scalar& set_confo_auto() ; |
| 290 | |
| 291 | /** Read/write of the conformal factor generated by the companion |
| 292 | * black hole |
| 293 | */ |
| 294 | Scalar& set_confo_comp() ; |
| 295 | |
| 296 | // Accessors |
| 297 | // --------- |
| 298 | public: |
| 299 | /** Returns \c true for an irrotational motion, \c false for |
| 300 | * a corotating one. |
| 301 | */ |
| 302 | bool is_irrotational() const {return irrotational; } ; |
| 303 | |
| 304 | /// Returns the non-translational part of the velocity potential |
| 305 | const Scalar& get_psi0() const {return psi0; } ; |
| 306 | |
| 307 | /** Returns the covariant derivative of the velocity potential |
| 308 | * (Spherical components with respect to the mapping of the star) |
| 309 | */ |
| 310 | const Vector& get_d_psi() const {return d_psi; } ; |
| 311 | |
| 312 | /** Returns the spatial projection of the fluid 3-velocity with |
| 313 | * respect to the co-orbiting observer. |
| 314 | * (Spherical components with respect to the mapping of the star) |
| 315 | */ |
| 316 | const Vector& get_wit_w() const {return wit_w; } ; |
| 317 | |
| 318 | /** Returns the logarithm of the Lorentz factor between the fluid and |
| 319 | * the co-orbiting observer. |
| 320 | */ |
| 321 | const Scalar& get_loggam() const {return loggam; } ; |
| 322 | |
| 323 | /** Returns the shift vector, divided by \e N , of the rotating |
| 324 | * coordinates, \f$\beta^i/N\f$. |
| 325 | * (Spherical components with respect to the mapping of the star) |
| 326 | */ |
| 327 | const Vector& get_bsn() const {return bsn; } ; |
| 328 | |
| 329 | /// Returns the Lorentz factor gam |
| 330 | const Scalar& get_gam() const {return gam; } ; |
| 331 | |
| 332 | /// Returns the Lorentz factor gam0 |
| 333 | const Scalar& get_gam0() const {return gam0; } ; |
| 334 | |
| 335 | /// Returns the centrifugal potential |
| 336 | const Scalar& get_pot_centri() const {return pot_centri; } ; |
| 337 | |
| 338 | /// Returns the part of the lapconf function generated by the star |
| 339 | const Scalar& get_lapconf_auto() const {return lapconf_auto; } ; |
| 340 | |
| 341 | /** Returns the part of the lapconf function generated by the |
| 342 | * companion black hole |
| 343 | */ |
| 344 | const Scalar& get_lapconf_comp() const {return lapconf_comp; } ; |
| 345 | |
| 346 | /// Returns the total lapconf function |
| 347 | const Scalar& get_lapconf_tot() const {return lapconf_tot; } ; |
| 348 | |
| 349 | // Returns the part of the lapse function generated by the star |
| 350 | const Scalar& get_lapse_auto() const {return lapse_auto; } ; |
| 351 | |
| 352 | /// Returns the total lapse function |
| 353 | const Scalar& get_lapse_tot() const {return lapse_tot; } ; |
| 354 | |
| 355 | /// Returns the derivative of the lapse function generated by the star |
| 356 | const Vector& get_d_lapconf_auto() const {return d_lapconf_auto; } ; |
| 357 | |
| 358 | /** Returns the derivative of the lapse function generated by |
| 359 | * the companion black hole |
| 360 | */ |
| 361 | const Vector& get_d_lapconf_comp() const {return d_lapconf_comp; } ; |
| 362 | |
| 363 | /// Returns the part of the shift vector generated by the star |
| 364 | const Vector& get_shift_auto() const {return shift_auto; } ; |
| 365 | |
| 366 | /** Returns the part of the shift vector generated by the |
| 367 | * companion black hole |
| 368 | */ |
| 369 | const Vector& get_shift_comp() const {return shift_comp; } ; |
| 370 | |
| 371 | /// Returns the part total shift vector |
| 372 | const Vector& get_shift_tot() const {return shift_tot; } ; |
| 373 | |
| 374 | /// Returns the derivative of the shift vector generated by the star |
| 375 | const Tensor& get_d_shift_auto() const {return d_shift_auto; } ; |
| 376 | |
| 377 | /** Returns the derivative of the shift vector generated by the |
| 378 | * companion black hole |
| 379 | */ |
| 380 | const Tensor& get_d_shift_comp() const {return d_shift_comp; } ; |
| 381 | |
| 382 | /// Returns the part of the conformal factor generated by the star |
| 383 | const Scalar& get_confo_auto() const {return confo_auto; } ; |
| 384 | |
| 385 | /** Returns the part of the conformal factor generated by the |
| 386 | * companion black hole |
| 387 | */ |
| 388 | const Scalar& get_confo_comp() const {return confo_comp; } ; |
| 389 | |
| 390 | /// Returns the total conformal factor |
| 391 | const Scalar& get_confo_tot() const {return confo_tot; } ; |
| 392 | |
| 393 | /** Returns the derivative of the conformal factor generated |
| 394 | * by the star |
| 395 | */ |
| 396 | const Vector& get_d_confo_auto() const {return d_confo_auto; } ; |
| 397 | |
| 398 | /** Returns the derivative of the conformal factor generated |
| 399 | * by the companion black hole |
| 400 | */ |
| 401 | const Vector& get_d_confo_comp() const {return d_confo_comp; } ; |
| 402 | |
| 403 | /// Returns the fourth power of the total conformal factor |
| 404 | const Scalar& get_psi4() const {return psi4; } ; |
| 405 | |
| 406 | /** Returns the part of the extrinsic curvature tensor |
| 407 | * \f$\tilde A^{ij}\f$ generated by the neutron star part. |
| 408 | */ |
| 409 | const Sym_tensor& get_taij_auto() const {return taij_auto; } ; |
| 410 | |
| 411 | /** Returns the part of the scalar |
| 412 | * \f$\eta_{ik} \eta_{jl} A^{ij} A^{kl}\f$ |
| 413 | * generated by \f$A_{ij}^{\rm auto}\f$ |
| 414 | */ |
| 415 | const Scalar& get_taij_quad_auto() const {return taij_quad_auto; } ; |
| 416 | |
| 417 | // Outputs |
| 418 | // ------- |
| 419 | public: |
| 420 | virtual void sauve(FILE *) const ; ///< Save in a file |
| 421 | |
| 422 | protected: |
| 423 | /// Operator >> (virtual function called by the operator <<). |
| 424 | virtual ostream& operator>>(ostream& ) const ; |
| 425 | |
| 426 | // Global quantities |
| 427 | // ----------------- |
| 428 | public: |
| 429 | /// Baryon mass |
| 430 | virtual double mass_b() const ; |
| 431 | |
| 432 | virtual double mass_b_bhns(bool kerrschild, const double& mass_bh, |
| 433 | const double& sepa) const ; |
| 434 | |
| 435 | /// Gravitational mass |
| 436 | virtual double mass_g() const ; |
| 437 | |
| 438 | virtual double mass_g_bhns() const ; |
| 439 | |
| 440 | // Computational routines |
| 441 | // ---------------------- |
| 442 | public: |
| 443 | /** Computes the hydrodynamical quantities relative to the Eulerian |
| 444 | * observer from those in the fluid frame, as well as |
| 445 | * \c wit_w and \c loggam . |
| 446 | * |
| 447 | * The calculation is performed starting from the quantities |
| 448 | * \c ent , \c ener , \c press , \c a_car and \c bsn , |
| 449 | * which are supposed to be up to date. |
| 450 | * From these, the following fields are updated: |
| 451 | * \c gam_euler , \c u_euler , \c ener_euler , |
| 452 | * \c s_euler , \c stress_euler , |
| 453 | * \c wit_w and \c loggam . |
| 454 | * |
| 455 | * @param kerrschild should be \c true for a Kerr-Schild background, |
| 456 | * \c false for a Conformally flat one |
| 457 | * @param mass_bh BH mass in the background metric |
| 458 | * @param sepa Separation between NS and BH |
| 459 | * |
| 460 | */ |
| 461 | void hydro_euler_bhns(bool kerrschild, const double& mass_bh, |
| 462 | const double& sepa) ; |
| 463 | |
| 464 | /** Computes metric coefficients from known potentials |
| 465 | * with relaxation when the companion is a black hole. |
| 466 | * |
| 467 | * The calculation is performed starting from the quantities |
| 468 | * \c lapse_auto , \c shift_auto , \c confo_auto , |
| 469 | * \c comp.lapse_auto , \c comp.confo_auto |
| 470 | * which are supposed to be up to date. |
| 471 | * From these, the following fields are updated: |
| 472 | * \c lapse_comp , \c lapse_tot, \c confo_comp, |
| 473 | * \c confo_tot , \c psi4 , |
| 474 | * |
| 475 | * @param hole companion black hole |
| 476 | * @param star_prev previous value of the star |
| 477 | * @param relax relaxation parameter |
| 478 | * |
| 479 | */ |
| 480 | void update_metric_bhns(const Hole_bhns& hole, |
| 481 | const Star_bhns& star_prev, |
| 482 | double relax) ; |
| 483 | |
| 484 | /** Computes derivative of metric quantities from |
| 485 | * the companion black hole |
| 486 | * |
| 487 | * @param hole companion black hole |
| 488 | * |
| 489 | */ |
| 490 | void update_met_der_comp_bhns(const Hole_bhns& hole) ; |
| 491 | |
| 492 | /** Computes the quantities \c bsn and \c pot_centri . |
| 493 | * |
| 494 | * The calculation is performed starting from the quantities |
| 495 | * \c lapse_tot , \c shift_tot , |
| 496 | * which are supposed to be up to date. |
| 497 | * |
| 498 | * @param kerrschild should be \c true for a Kerr-Schild background, |
| 499 | * \c false for a Conformally flat one |
| 500 | * @param mass_bh BH mass in the background metric |
| 501 | * @param sepa Separation between NS and BH |
| 502 | * @param omega angular velocity with respect to an asymptotically |
| 503 | * inertial observer |
| 504 | * @param x_rot absolute X coordinate of the rotation axis |
| 505 | * @param y_rot absolute Y coordinate of the rotation axis |
| 506 | * |
| 507 | */ |
| 508 | void kinema_bhns(bool kerrschild, const double& mass_bh, |
| 509 | const double& sepa, double omega, |
| 510 | double x_rot, double y_rot) ; |
| 511 | |
| 512 | /// Computes the gradient of the total velocity potential \f$\psi\f$. |
| 513 | void fait_d_psi_bhns() ; |
| 514 | |
| 515 | /** Computes \c taij_auto , \c taij_quad_auto from |
| 516 | * \c shift_auto , \c lapse_auto , \c confo_auto . |
| 517 | */ |
| 518 | void extr_curv_bhns() ; |
| 519 | |
| 520 | /** Computes an equilibrium configuration |
| 521 | * |
| 522 | * @param ent_c [input] Central enthalpy |
| 523 | * @param mass_bh [input] BH mass in the background metric |
| 524 | * @param sepa [input] Separation between NS and BH |
| 525 | * @param kerrschild should be \c true for a Kerr-Schild background, |
| 526 | * \c false for a Conformally flat one |
| 527 | * @param mer [input] Number of iteration |
| 528 | * @param mermax_ns [input] Maximum number of iteration steps |
| 529 | * @param mermax_potvit [input] Maximum number of steps in |
| 530 | * Map_radial::poisson_compact |
| 531 | * @param mermax_poisson [input] Maximum number of steps in |
| 532 | * poisson scalar |
| 533 | * @param filter_r [input] No. points to be deleted for (r): lap,conf |
| 534 | * @param filter_r_s [input] No. points to be deleted for (r): shift |
| 535 | * @param filter_p_s [input] No. points to be deleted for (phi): shift |
| 536 | * @param relax_poisson [input] Relaxation factor in poisson scalar |
| 537 | * @param relax_potvit [input] Relaxation factor in |
| 538 | * Map_radial::poisson_compact |
| 539 | * @param thres_adapt [input] Threshold on dH/dr for the adaptation |
| 540 | * of the mapping |
| 541 | * @param resize_ns [input] Resize factor for the first shell |
| 542 | * @param fact_resize [input] 1-D \c Tbl for the input of some |
| 543 | * factors : \\ |
| 544 | * \c fact(0) : A resizing factor for the first shell |
| 545 | * @param diff [output] 1-D \c Tbl for the storage of some |
| 546 | * error indicators : |
| 547 | */ |
| 548 | void equilibrium_bhns(double ent_c, const double& mass_bh, |
| 549 | const double& sepa, bool kerrschild, |
| 550 | int mer, int mermax_ns, int mermax_potvit, |
| 551 | int mermax_poisson, int filter_r, int filter_r_s, |
| 552 | int filter_p_s, double relax_poisson, |
| 553 | double relax_potvit, double thres_adapt, |
| 554 | double resize_ns, |
| 555 | const Tbl& fact_resize, Tbl& diff) ; |
| 556 | |
| 557 | /** Computes the non-translational part of the velocity scalar |
| 558 | * potential \f$\psi0\f$ by solving the continuity equation. |
| 559 | * |
| 560 | * @param mass_bh [input] BH mass in the background metric |
| 561 | * @param sepa [input] Separation between NS and BH |
| 562 | * @param kerrschild should be \c true for a Kerr-Schild background, |
| 563 | * \c false for a Conformally flat one |
| 564 | * @param mermax [input] Maximum number of steps in the iteration |
| 565 | * @param precis [input] Required precision: the iteration will |
| 566 | * be stopped when the relative difference |
| 567 | * on \f$\psi0\f$ between two successive steps |
| 568 | * is lower than \c precis . |
| 569 | * @param relax [input] Relaxation factor. |
| 570 | * |
| 571 | * @return Relative error of the resolution obtained by comparing |
| 572 | * the operator acting on the solution with the source. |
| 573 | */ |
| 574 | double velo_pot_bhns(const double& mass_bh, const double& sepa, |
| 575 | bool kerrschild, |
| 576 | int mermax, double precis, double relax) ; |
| 577 | |
| 578 | /** Sensitive indicator of the mass-shedding to the direction of |
| 579 | * \f$r\f$, \f$\theta=\pi/2\f$, \f$\phi\f$. |
| 580 | * |
| 581 | * @param radius [input] Radial coordinate |
| 582 | * @param phi [input] Azimuthal angle |
| 583 | */ |
| 584 | double chi_rp(double radius, double phi) ; |
| 585 | |
| 586 | /** Radius of the star to the direction of |
| 587 | * \f$\theta=\pi/2\f$ and \f$\phi\f$. |
| 588 | * |
| 589 | * @param phi [input] Azimuthal angle |
| 590 | */ |
| 591 | double radius_p(double phi) ; |
| 592 | |
| 593 | /** Azimuthal angle when the indicator of the mass-shedding |
| 594 | * takes its minimum chi_min |
| 595 | */ |
| 596 | double phi_min() ; |
| 597 | |
| 598 | /** Azimuthal angle when the indicator of the mass-shedding |
| 599 | * takes its local minimum |
| 600 | * |
| 601 | * @param phi_ini [input] Initial azumuthal angle to search minimum |
| 602 | */ |
| 603 | double phi_local_min(double phi_ini) ; |
| 604 | |
| 605 | /** Performs a relaxation on \c ent , \c lapse_auto , |
| 606 | * \c shift_auto , \c confo_auto . |
| 607 | * |
| 608 | * @param star_prev [input] star at the previous step |
| 609 | * @param relax_ent [input] Relaxation factor for \c ent |
| 610 | * @param relax_met [input] Relaxation factor for \c lapse_auto , |
| 611 | * \c shift_auto , \c confo_auto , |
| 612 | * only if \c (mer%fmer_met=0) . |
| 613 | * @param mer [input] Step number |
| 614 | * @param fmer_met [input] Step interval between metric updates |
| 615 | */ |
| 616 | void relax_bhns(const Star_bhns& star_prev, double relax_ent, |
| 617 | double relax_met, int mer, int fmer_met) ; |
| 618 | |
| 619 | /** Computes a spherical configuration |
| 620 | * |
| 621 | * @param ent_c [input] Central enthalpy |
| 622 | * @param precis [input] precision |
| 623 | */ |
| 624 | void equil_spher_bhns(double ent_c, double precis) ; |
| 625 | |
| 626 | friend class Bin_bhns ; |
| 627 | |
| 628 | }; |
| 629 | |
| 630 | } |
| 631 | #endif |