LORENE
bin_ns_bh.C
1 /*
2  * Basic methods for class Bin_ns_bh
3  *
4  */
5 
6 /*
7  * Copyright (c) 2002 Philippe Grandclement, Keisuke Taniguchi,
8  * Eric Gourgoulhon
9  *
10  * This file is part of LORENE.
11  *
12  * LORENE is free software; you can redistribute it and/or modify
13  * it under the terms of the GNU General Public License version 2
14  * as published by the Free Software Foundation.
15  *
16  * LORENE is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with LORENE; if not, write to the Free Software
23  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24  *
25  */
26 
27 
28 
29 /*
30  * $Id: bin_ns_bh.C,v 1.16 2016/12/05 16:17:46 j_novak Exp $
31  * $Log: bin_ns_bh.C,v $
32  * Revision 1.16 2016/12/05 16:17:46 j_novak
33  * Suppression of some global variables (file names, loch, ...) to prevent redefinitions
34  *
35  * Revision 1.15 2014/10/13 08:52:42 j_novak
36  * Lorene classes and functions now belong to the namespace Lorene.
37  *
38  * Revision 1.14 2014/10/06 15:13:01 j_novak
39  * Modified #include directives to use c++ syntax.
40  *
41  * Revision 1.13 2007/04/26 14:14:59 f_limousin
42  * The function fait_tkij now have default values for bound_nn and lim_nn
43  *
44  * Revision 1.12 2007/04/24 20:13:53 f_limousin
45  * Implementation of Dirichlet and Neumann BC for the lapse
46  *
47  * Revision 1.11 2006/09/25 10:01:49 p_grandclement
48  * Addition of N-dimensional Tbl
49  *
50  * Revision 1.10 2006/03/30 07:33:45 p_grandclement
51  * *** empty log message ***
52  *
53  * Revision 1.9 2005/12/06 07:01:58 p_grandclement
54  * addition of Bhole::mp scaling in affecte()
55  *
56  * Revision 1.8 2005/12/01 12:59:10 p_grandclement
57  * Files for bin_ns_bh project
58  *
59  * Revision 1.6 2005/08/29 15:10:15 p_grandclement
60  * Addition of things needed :
61  * 1) For BBH with different masses
62  * 2) Provisory files for the mixted binaries (Bh and NS) : THIS IS NOT
63  * WORKING YET !!!
64  *
65  * Revision 1.5 2004/03/25 10:28:58 j_novak
66  * All LORENE's units are now defined in the namespace Unites (in file unites.h).
67  *
68  * Revision 1.4 2003/02/13 16:40:25 p_grandclement
69  * Addition of various things for the Bin_ns_bh project, non of them being
70  * completely tested
71  *
72  * Revision 1.3 2002/12/19 14:51:19 e_gourgoulhon
73  * Added the new functions set_omega and set_x_axe
74  *
75  * Revision 1.2 2002/12/18 10:31:15 e_gourgoulhon
76  * irrot : int -> bool
77  *
78  * Revision 1.1 2002/12/17 13:10:11 e_gourgoulhon
79  * Methods for class Bin_ns_bh
80  *
81  *
82  *
83  *
84  * $Header: /cvsroot/Lorene/C++/Source/Bin_ns_bh/bin_ns_bh.C,v 1.16 2016/12/05 16:17:46 j_novak Exp $
85  *
86  */
87 
88 // C++ headers
89 #include "headcpp.h"
90 
91 // C headers
92 #include <cmath>
93 
94 // Lorene headers
95 #include "map.h"
96 #include "bhole.h"
97 #include "bin_ns_bh.h"
98 #include "utilitaires.h"
99 #include "unites.h"
100 #include "graphique.h"
101 #include "param.h"
102 
103  //--------------//
104  // Constructors //
105  //--------------//
106 
107 // Standard constructor
108 // --------------------
109 namespace Lorene {
110 Bin_ns_bh::Bin_ns_bh(Map& mp_ns, int nzet, const Eos& eos, bool irrot_ns,
111  Map_af& mp_bh)
112  : ref_triad(0., "Absolute frame Cartesian basis"),
113  star(mp_ns, nzet, true, eos, irrot_ns, ref_triad),
114  hole(mp_bh),
115  omega(0),
116  x_axe(0) {
117 
118  // Pointers of derived quantities initialized to zero :
119  set_der_0x0() ;
120 }
121 
122 // Copy constructor
123 // ----------------
124 Bin_ns_bh::Bin_ns_bh(const Bin_ns_bh& bibi)
125  : ref_triad(0., "Absolute frame Cartesian basis"),
126  star(bibi.star),
127  hole(bibi.hole),
128  omega(bibi.omega),
129  x_axe(bibi.x_axe) {
130 
131  // Pointers of derived quantities initialized to zero :
132  set_der_0x0() ;
133 }
134 
135 // Constructor from a file
136 // -----------------------
137 Bin_ns_bh::Bin_ns_bh(Map& mp_ns, const Eos& eos, Map_af& mp_bh, FILE* fich, bool old)
138  : ref_triad(0., "Absolute frame Cartesian basis"),
139  star(mp_ns, eos, ref_triad, fich, old),
140  hole(mp_bh, fich, old) {
141 
142  // omega and x_axe are read in the file:
143  fread_be(&omega, sizeof(double), 1, fich) ;
144  fread_be(&x_axe, sizeof(double), 1, fich) ;
145 
146  assert(hole.get_omega() == omega) ;
147 
148  // Pointers of derived quantities initialized to zero :
149  set_der_0x0() ;
150 }
151 
152  //------------//
153  // Destructor //
154  //------------//
155 
156 Bin_ns_bh::~Bin_ns_bh(){
157 
158  del_deriv() ;
159 
160 }
161 
162  //----------------------------------//
163  // Management of derived quantities //
164  //----------------------------------//
165 
166 void Bin_ns_bh::del_deriv() const {
167 
168  if (p_mass_adm != 0x0) delete p_mass_adm ;
169  if (p_mass_kom != 0x0) delete p_mass_kom ;
170  if (p_angu_mom != 0x0) delete p_angu_mom ;
171  if (p_total_ener != 0x0) delete p_total_ener ;
172  if (p_virial != 0x0) delete p_virial ;
173  if (p_virial_gb != 0x0) delete p_virial_gb ;
174  if (p_virial_fus != 0x0) delete p_virial_fus ;
175  if (p_ham_constr != 0x0) delete p_ham_constr ;
176  if (p_mom_constr != 0x0) delete p_mom_constr ;
177 
178  set_der_0x0() ;
179 }
180 
181 
182 
183 
185 
186  p_mass_adm = 0x0 ;
187  p_mass_kom = 0x0 ;
188  p_angu_mom = 0x0 ;
189  p_total_ener = 0x0 ;
190  p_virial = 0x0 ;
191  p_virial_gb = 0x0 ;
192  p_virial_fus = 0x0 ;
193  p_ham_constr = 0x0 ;
194  p_mom_constr = 0x0 ;
195 
196 }
197 
198  //--------------//
199  // Assignment //
200  //--------------//
201 
202 // Assignment to another Binaire
203 // -----------------------------
204 
205 void Bin_ns_bh::operator=(const Bin_ns_bh& bibi) {
206 
207  assert( bibi.ref_triad == ref_triad ) ;
208 
209  star = bibi.star ;
210  hole = bibi.hole ;
211 
212  omega = bibi.omega ;
213  x_axe = bibi.x_axe ;
214 
215  // ref_triad remains unchanged
216 
217  del_deriv() ; // Deletes all derived quantities
218 
219 }
220 
221 void Bin_ns_bh::set_omega(double omega_i) {
222 
223  omega = omega_i ;
224  hole.set_omega(omega) ;
225 
226  del_deriv() ;
227 
228 }
229 
230 void Bin_ns_bh::set_x_axe(double x_axe_i) {
231 
232  x_axe = x_axe_i ;
233 
234  del_deriv() ;
235 
236 }
237 
238 double Bin_ns_bh::separation() const {
239  return star.mp.get_ori_x() - hole.mp.get_ori_x() ;
240 }
241 
242 
243  //--------------//
244  // Outputs //
245  //--------------//
246 
247 // Save in a file
248 // --------------
249 void Bin_ns_bh::sauve(FILE* fich) const {
250 
251  star.sauve(fich) ;
252  hole.sauve(fich) ;
253 
254  fwrite_be(&omega, sizeof(double), 1, fich) ;
255  fwrite_be(&x_axe, sizeof(double), 1, fich) ;
256 
257 }
258 
259 
260 void Bin_ns_bh::init_auto () {
261 
262  // On doit faire fonction pour assurer que tout va bien sur les trucs limites
263  Cmp filtre_ns(star.get_mp()) ;
264  Cmp radius_ns (star.get_mp()) ;
265  radius_ns = star.get_mp().r ;
266  double rlim_ns = star.get_mp().val_r (0, 1, 0, 0) ;
267  filtre_ns = 0.5 * (1 + exp(-radius_ns*radius_ns/rlim_ns/rlim_ns)) ;
268  filtre_ns.std_base_scal() ;
269 
270  Cmp filtre_bh(hole.get_mp()) ;
271  Cmp radius_bh (hole.get_mp()) ;
272  radius_bh = hole.get_mp().r ;
273  double rlim_bh = hole.get_mp().val_r (0, 1, 0, 0) ;
274  filtre_bh = 0.5 * (1 + exp(-radius_bh*radius_bh/rlim_bh/rlim_bh)) ;
275  filtre_bh.std_base_scal() ;
276 
277  // Facteur conforme : pas de soucis
280  hole.set_psi_auto() = hole.get_psi_auto()() * filtre_bh ;
281  hole.set_psi_auto().std_base_scal() ;
282 
283  // Le lapse
284  star.set_n_auto() = sqrt(exp(star.get_beta_auto()()-star.get_logn_auto()()))*filtre_ns ;
286 
287  hole.set_n_auto() = hole.get_n_auto()() * filtre_bh ;
288  hole.set_n_auto().std_base_scal() ;
289 
290  // On doit assurer que le lapse tot est bien zero sur l'horizon...
291  Cmp soustrait ((filtre_bh-0.5)*2*exp(1.)) ;
292  int nz = hole.get_mp().get_mg()->get_nzone() ;
293  Mtbl xa_hole (hole.get_mp().get_mg()) ;
294  xa_hole = hole.get_mp().xa ;
295  Mtbl ya_hole (hole.get_mp().get_mg()) ;
296  ya_hole = hole.get_mp().ya ;
297  Mtbl za_hole (hole.get_mp().get_mg()) ;
298  za_hole = hole.get_mp().za ;
299  double xa_abs, ya_abs, za_abs ;
300  double air, tet, phi ;
301 
302  int np = hole.get_mp().get_mg()->get_np(0) ;
303  int nt = hole.get_mp().get_mg()->get_nt(0) ;
304  for (int k=0 ; k<np ; k++)
305  for (int j=0 ; j<nt ; j++) {
306  double val_hole = hole.n_auto()(1, k,j,0) ;
307  xa_abs = xa_hole(1,k,j,0) ;
308  ya_abs = ya_hole(1,k,j,0) ;
309  za_abs = za_hole(1,k,j,0) ;
310  star.get_mp().convert_absolute (xa_abs, ya_abs, za_abs, air, tet, phi) ;
311  double val_star = star.get_n_auto()().val_point (air, tet, phi) ;
312  for (int l=1 ; l<nz ; l++)
313  for (int i=0 ; i<hole.get_mp().get_mg()->get_nr(l) ; i++)
314  hole.set_n_auto().set(l,k,j,i) -= (val_star+val_hole)*soustrait(l,k,j,i) ;
315  }
316  hole.set_n_auto().std_base_scal() ;
317  hole.set_n_auto().raccord(1) ;
318 }
319 
320  // *********************************
321  // Affectation to another Bin_ns_bh
322  //**********************************
323 
324 void Bin_ns_bh::affecte(const Bin_ns_bh& so) {
325 
326  // Kinematic quantities :
327  star.nzet = so.star.nzet ;
328  set_omega(so.omega) ;
329  x_axe = so.x_axe ;
330  star.set_mp().set_ori (so.star.mp.get_ori_x(), 0., 0.) ;
331  hole.set_mp().set_ori (so.hole.mp.get_ori_x(), 0., 0.) ;
332  star.set_mp().set_rot_phi (so.star.mp.get_rot_phi()) ;
333  hole.set_mp().set_rot_phi (so.hole.mp.get_rot_phi()) ;
334 
335  hole.set_mp().homothetie_interne (so.hole.get_rayon()/hole.rayon) ;
336  hole.set_rayon(so.hole.get_rayon()) ;
337 
338  // Faut gêrer le map_et :
339  Map_et* map_et = dynamic_cast<Map_et*>(&star.mp) ;
340  Map_et* map_et_so = dynamic_cast<Map_et*>(&so.star.mp) ;
341 
342  int kmax = -1 ;
343  int jmax = -1 ;
344  int np = map_et->get_mg()->get_np(star.nzet-1) ;
345  int nt = map_et->get_mg()->get_nt(star.nzet-1) ;
346  Mtbl phi (map_et->get_mg()) ;
347  phi = map_et->phi ;
348  Mtbl tet (map_et->get_mg()) ;
349  tet = map_et->tet ;
350  double rmax = 0 ;
351  for (int k=0 ; k<np ; k++)
352  for (int j=0 ; j<nt ; j++) {
353  double rcourant = map_et_so->val_r(star.nzet-1, 1, tet(0,k,j,0), phi(0,k,j,0)) ;
354  if (rcourant > rmax) {
355  rmax = rcourant ;
356  kmax = k ;
357  jmax = j ;
358  }
359  }
360 
361  double old_r = map_et->val_r(star.nzet-1, 1, tet(0,kmax,jmax,0), phi(0,kmax,jmax,0)) ;
362  map_et->homothetie (rmax/old_r) ;
363 
364  star.ent.allocate_all() ;
365  star.ent.set().import(star.nzet, so.star.ent()) ;
366  star.ent.set_std_base() ;
367 
368  Param par_adapt ;
369  int nitermax = 100 ;
370  int niter_adapt ;
371  int adapt_flag = 1 ;
372  int nz_search = star.nzet + 1 ;
373  double precis_secant = 1.e-14 ;
374  double alpha_r = 1. ;
375  double reg_map = 1. ;
376  Tbl ent_limit(star.nzet) ;
377 
378  par_adapt.add_int(nitermax, 0) ;
379  par_adapt.add_int(star.nzet, 1) ;
380  par_adapt.add_int(nz_search, 2) ;
381  par_adapt.add_int(adapt_flag, 3) ;
382  par_adapt.add_int(jmax, 4) ;
383  par_adapt.add_int(kmax, 5) ;
384  par_adapt.add_int_mod(niter_adapt, 0) ;
385  par_adapt.add_double(precis_secant, 0) ;
386  par_adapt.add_double(reg_map, 1) ;
387  par_adapt.add_double(alpha_r, 2) ;
388  par_adapt.add_tbl(ent_limit, 0) ;
389 
390  Map_et mp_prev = *map_et ;
391  ent_limit.set_etat_qcq() ;
392  for (int l=0; l<star.nzet-1; l++) {
393  int nr = map_et->get_mg()->get_nr(l) ;
394  ent_limit.set(l) = star.ent()(l, kmax, jmax, nr-1) ;
395  }
396  ent_limit.set(star.nzet-1) = 0 ;
397 
398  // On adapte :
399  map_et->adapt(star.ent(), par_adapt) ;
400  mp_prev.homothetie(alpha_r) ;
401  map_et->reevaluate_symy (&mp_prev, star.nzet, star.ent.set()) ;
402 
403  star.ent.set().import(star.nzet, so.star.ent()) ;
404 
405  // The BH part :
406  // Lapse :
408  Cmp auxi_n (so.hole.n_auto()) ;
409  auxi_n.raccord(1) ;
410  hole.n_auto.set().import(auxi_n) ;
412  hole.n_auto.set().raccord(1) ;
413 
414  // Psi :
416  Cmp auxi_psi (so.hole.psi_auto()) ;
417  auxi_psi.raccord(1) ;
418  hole.psi_auto.set().import(auxi_psi) ;
420  hole.psi_auto.set().raccord(1) ;
421 
422  // Shift :
424  Tenseur auxi_shift (so.hole.shift_auto) ;
425  for (int i=0 ; i<3 ; i++)
426  auxi_shift.set(i).raccord(1) ;
427  hole.shift_auto.set(0).import(auxi_shift(0)) ;
428  hole.shift_auto.set(1).import(auxi_shift(1)) ;
429  hole.shift_auto.set(2).import(auxi_shift(2)) ;
431 
432  // The NS part :
434  star.n_auto.set().import(so.star.n_auto()) ;
436 
437  // Psi :
439  star.confpsi_auto.set().import(so.star.confpsi_auto()) ;
441  // Shift :
443  star.w_shift.set(0).import(so.star.w_shift(0)) ;
444  star.w_shift.set(1).import(so.star.w_shift(1)) ;
445  star.w_shift.set(2).import(so.star.w_shift(2)) ;
448  star.khi_shift.set().import(so.star.khi_shift()) ;
451 
452  Tenseur copie_dpsi (so.star.d_psi) ;
453  copie_dpsi.set(2).dec2_dzpuis() ;
454  if (so.star.is_irrotational()) {
456  star.d_psi.set(0).import(star.nzet, copie_dpsi(0)) ;
457  star.d_psi.set(1).import(star.nzet, copie_dpsi(1)) ;
458  star.d_psi.set(2).import(star.nzet, copie_dpsi(2)) ;
460  }
461 
462 
463 
464  // Reconstruction of the fields :
465  hole.update_metric(star) ;
468  fait_tkij() ;
469 
472  star.hydro_euler() ;
473 }
474 
475 
476 // Printing
477 // --------
478 ostream& operator<<(ostream& ost, const Bin_ns_bh& bibi) {
479  bibi >> ost ;
480  return ost ;
481 }
482 
483 
484 ostream& Bin_ns_bh::operator>>(ostream& ost) const {
485 
486  using namespace Unites ;
487 
488  ost << endl ;
489  ost << "Neutron star - black hole binary system" << endl ;
490  ost << "=======================================" << endl ;
491  ost << endl <<
492  "Orbital angular velocity : " << omega * f_unit << " rad/s" << endl ;
493  ost <<
494  "Absolute coordinate X of the rotation axis : " << x_axe / km
495  << " km" << endl ;
496  ost << endl << "Neutron star : " << endl ;
497  ost << "============ " << endl ;
498  ost << star << endl ;
499 
500  ost << "Black hole : " << endl ;
501  ost << "========== " << endl ;
502  ost << "Coordinate radius of the throat : " << hole.get_rayon() / km << " km" << endl ;
503  ost << "Absolute abscidia of the throat center : " << (hole.get_mp()).get_ori_x() / km
504  << " km" << endl ;
505  return ost ;
506 }
507 }
Coord xa
Absolute x coordinate.
Definition: map.h:742
void set_omega(double)
Sets the orbital angular velocity [{ f_unit}].
Definition: bin_ns_bh.C:221
Cmp exp(const Cmp &)
Exponential.
Definition: cmp_math.C:273
void set_der_0x0() const
Sets to { 0x0} all the pointers on derived quantities.
Definition: bin_ns_bh.C:184
const Map & get_mp() const
Returns the mapping.
Definition: etoile.h:662
Neutron star - black hole binary system.
Definition: bin_ns_bh.h:120
int get_np(int l) const
Returns the number of points in the azimuthal direction ( ) in domain no. l.
Definition: grilles.h:479
void fait_shift_auto()
Computes shift_auto from w_shift and khi_shift according to Shibata&#39;s prescription [Prog...
Definition: etoile_bin.C:829
Cmp sqrt(const Cmp &)
Square root.
Definition: cmp_math.C:223
Bin_ns_bh(Map &mp_ns, int nzet, const Eos &eos, bool irrot_ns, Map_af &mp_bh)
Standard constructor.
Definition: bin_ns_bh.C:110
void set_rot_phi(double phi0)
Sets a new rotation angle.
Definition: map.C:266
void set_std_base()
Set the standard spectal basis of decomposition for each component.
Definition: tenseur.C:1186
double * p_total_ener
Total energy of the system.
Definition: bin_ns_bh.h:158
Lorene prototypes.
Definition: app_hor.h:67
Standard units of space, time and mass.
Equation of state base class.
Definition: eos.h:209
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
Definition: map.h:777
virtual void kinematics(double omega, double x_axe)
Computes the quantities bsn and pot_centri .
void set_rayon(double ray)
Sets the radius of the horizon to ray .
Definition: bhole.h:352
Base class for coordinate mappings.
Definition: map.h:682
double get_ori_x() const
Returns the x coordinate of the origin.
Definition: map.h:780
virtual double val_r(int l, double xi, double theta, double pphi) const
Returns the value of the radial coordinate r for a given in a given domain.
Definition: map_af_radius.C:99
double * p_ham_constr
Relative error on the Hamiltonian constraint.
Definition: bin_ns_bh.h:170
const Tenseur & get_n_auto() const
Returns the part of N generated by the hole.
Definition: bhole.h:395
const Tenseur & get_logn_auto() const
Returns the logarithm of the part of the lapse N generated principaly by the star.
Definition: etoile.h:704
void update_metric_der_comp(const Bhole &comp)
Computes the derivative of metric functions related to the companion black hole.
Tenseur psi_auto
Part of generated by the hole.
Definition: bhole.h:290
Tenseur & set_n_auto()
Read/write the lapse { N} generated principaly by the star.
Definition: et_bin_nsbh.C:281
double * p_mass_adm
Total ADM mass of the system.
Definition: bin_ns_bh.h:149
virtual void sauve(FILE *) const
Save in a file.
Definition: et_bin_nsbh.C:315
Tenseur n_auto
Part of the lapse { N} generated principaly by the star.
Definition: et_bin_nsbh.h:85
Tenseur & set_confpsi_auto()
Read/write the conformal factor $$ generated principaly by the star.
Definition: et_bin_nsbh.C:295
Tenseur shift_auto
Part of generated by the hole.
Definition: bhole.h:297
void set_ori(double xa0, double ya0, double za0)
Sets a new origin.
Definition: map.C:256
const Tenseur & get_psi_auto() const
Returns the part of generated by the hole.
Definition: bhole.h:412
void del_deriv() const
Destructor.
Definition: bin_ns_bh.C:166
const Base_vect_cart ref_triad
Cartesian triad of the absolute reference frame.
Definition: bin_ns_bh.h:128
double * p_virial_fus
Virial theorem error by J.L.Friedman, K.Uryu, and M.Shibata.
Definition: bin_ns_bh.h:167
double * p_virial
Virial theorem error.
Definition: bin_ns_bh.h:161
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.
Cmp & set()
Read/write for a scalar (see also operator=(const Cmp&) ).
Definition: tenseur.C:840
Tenseur w_shift
Vector used in the decomposition of shift_auto , following Shibata&#39;s prescription [Prog...
Definition: etoile.h:911
double * p_mass_kom
Total Komar mass of the system.
Definition: bin_ns_bh.h:152
Map & set_mp()
Read/write of the mapping.
Definition: etoile.h:604
double x_axe
Absolute X coordinate of the rotation axis.
Definition: bin_ns_bh.h:143
Et_bin_nsbh star
The neutron star.
Definition: bin_ns_bh.h:131
Tbl * p_mom_constr
Relative error on the momentum constraint.
Definition: bin_ns_bh.h:173
Map_af & mp
Affine mapping.
Definition: bhole.h:273
const Tenseur & get_n_auto() const
Returns the part of the lapse { N} generated principaly by the star.
Definition: et_bin_nsbh.h:239
Map & mp
Mapping associated with the star.
Definition: etoile.h:432
int get_nzone() const
Returns the number of domains.
Definition: grilles.h:465
virtual void equation_of_state()
Computes the proper baryon and energy density, as well as pressure from the enthalpy.
Definition: etoile.C:569
ostream & operator>>(ostream &) const
Operator >> (function called by the operator <<).
Definition: bin_ns_bh.C:484
double get_rayon() const
Returns the radius of the horizon.
Definition: bhole.h:347
Tenseur khi_shift
Scalar used in the decomposition of shift_auto , following Shibata&#39;s prescription [Prog...
Definition: etoile.h:921
double omega
Angular velocity with respect to an asymptotically inertial observer.
Definition: bin_ns_bh.h:139
int fwrite_be(const int *aa, int size, int nb, FILE *fich)
Writes integer(s) into a binary file according to the big endian convention.
Definition: fwrite_be.C:73
void sauve(FILE *fich) const
Write on a file.
Definition: bhole.C:485
double rayon
Radius of the horizon in LORENE&#39;s units.
Definition: bhole.h:274
void update_metric(const Bhole &comp)
Computes metric coefficients from known potentials, when the companion is a black hole...
const Map_af & get_mp() const
Returns the mapping (readonly).
Definition: bhole.h:339
void std_base_scal()
Sets the spectral bases of the Valeur va to the standard ones for a scalar.
Definition: cmp.C:647
int nzet
Number of domains of *mp occupied by the star.
Definition: etoile.h:435
int fread_be(int *aa, int size, int nb, FILE *fich)
Reads integer(s) from a binary file according to the big endian convention.
Definition: fread_be.C:72
int get_nr(int l) const
Returns the number of points in the radial direction ( ) in domain no. l.
Definition: grilles.h:469
Coord ya
Absolute y coordinate.
Definition: map.h:743
Tbl & set(int l)
Read/write of the value in a given domain.
Definition: cmp.h:724
double get_omega() const
Returns the angular velocity.
Definition: bhole.h:357
Tenseur confpsi_auto
Part of the conformal factor $$ generated principaly by the star.
Definition: et_bin_nsbh.h:104
void allocate_all()
Sets the logical state to ETATQCQ (ordinary state) and performs the memory allocation of all the elem...
Definition: tenseur.C:673
Affine radial mapping.
Definition: map.h:2042
Map_af & set_mp()
Read/write of the mapping.
Definition: bhole.h:342
void operator=(const Bin_ns_bh &)
Assignment to another Bin_ns_bh.
Definition: bin_ns_bh.C:205
Tenseur ent
Log-enthalpy (relativistic case) or specific enthalpy (Newtonian case)
Definition: etoile.h:460
void raccord(int n)
Performs the matching of the nucleus with respect to the first shell.
Definition: cmp_raccord.C:173
Tbl * p_angu_mom
Total angular momentum of the system.
Definition: bin_ns_bh.h:155
Coord za
Absolute z coordinate.
Definition: map.h:744
void set_omega(double ome)
Sets the angular velocity to ome .
Definition: bhole.h:361
void fait_tkij(int bound_nn=-1, double lim_nn=0)
Computation of the extrinsic curvature tensor for both { star} and { bhole}.
double * p_virial_gb
Virial theorem error by E.Gourgoulhon and S.Bonazzola.
Definition: bin_ns_bh.h:164
Bhole hole
The black hole.
Definition: bin_ns_bh.h:134
Tenseur n_auto
Part of N generated by the hole.
Definition: bhole.h:286
int get_nt(int l) const
Returns the number of points in the co-latitude direction ( ) in domain no. l.
Definition: grilles.h:474
void set_x_axe(double)
Sets the absolute coordinate X of the rotation axis [{ r_unit}].
Definition: bin_ns_bh.C:230
void homothetie_interne(double lambda)
Sets a new radial scale at the bondary between the nucleus and the first shell.
Definition: map_af.C:741
void import(const Cmp &ci)
Assignment to another Cmp defined on a different mapping.
Definition: cmp_import.C:76
double separation() const
Return the separation.
Definition: bin_ns_bh.C:238
void convert_absolute(double xx, double yy, double zz, double &rr, double &theta, double &pphi) const
Determines the coordinates corresponding to given absolute Cartesian coordinates (X...
Definition: map.C:305
const Tenseur & get_beta_auto() const
Returns the logarithm of the part of the product AN generated principaly by the star.
Definition: etoile.h:727
Coord r
r coordinate centered on the grid
Definition: map.h:730
Tenseur d_psi
Gradient of (in the irrotational case) (Cartesian components with respect to ref_triad ) ...
Definition: etoile.h:841
virtual void hydro_euler()
Computes the hydrodynamical quantities relative to the Eulerian observer from those in the fluid fram...
Definition: et_bin_hydro.C:109