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 char bin_ns_bh_C[] = "$Header: /cvsroot/Lorene/C++/Source/Bin_ns_bh/bin_ns_bh.C,v 1.15 2014/10/13 08:52:42 j_novak Exp $" ;
28 
29 /*
30  * $Id: bin_ns_bh.C,v 1.15 2014/10/13 08:52:42 j_novak Exp $
31  * $Log: bin_ns_bh.C,v $
32  * Revision 1.15 2014/10/13 08:52:42 j_novak
33  * Lorene classes and functions now belong to the namespace Lorene.
34  *
35  * Revision 1.14 2014/10/06 15:13:01 j_novak
36  * Modified #include directives to use c++ syntax.
37  *
38  * Revision 1.13 2007/04/26 14:14:59 f_limousin
39  * The function fait_tkij now have default values for bound_nn and lim_nn
40  *
41  * Revision 1.12 2007/04/24 20:13:53 f_limousin
42  * Implementation of Dirichlet and Neumann BC for the lapse
43  *
44  * Revision 1.11 2006/09/25 10:01:49 p_grandclement
45  * Addition of N-dimensional Tbl
46  *
47  * Revision 1.10 2006/03/30 07:33:45 p_grandclement
48  * *** empty log message ***
49  *
50  * Revision 1.9 2005/12/06 07:01:58 p_grandclement
51  * addition of Bhole::mp scaling in affecte()
52  *
53  * Revision 1.8 2005/12/01 12:59:10 p_grandclement
54  * Files for bin_ns_bh project
55  *
56  * Revision 1.6 2005/08/29 15:10:15 p_grandclement
57  * Addition of things needed :
58  * 1) For BBH with different masses
59  * 2) Provisory files for the mixted binaries (Bh and NS) : THIS IS NOT
60  * WORKING YET !!!
61  *
62  * Revision 1.5 2004/03/25 10:28:58 j_novak
63  * All LORENE's units are now defined in the namespace Unites (in file unites.h).
64  *
65  * Revision 1.4 2003/02/13 16:40:25 p_grandclement
66  * Addition of various things for the Bin_ns_bh project, non of them being
67  * completely tested
68  *
69  * Revision 1.3 2002/12/19 14:51:19 e_gourgoulhon
70  * Added the new functions set_omega and set_x_axe
71  *
72  * Revision 1.2 2002/12/18 10:31:15 e_gourgoulhon
73  * irrot : int -> bool
74  *
75  * Revision 1.1 2002/12/17 13:10:11 e_gourgoulhon
76  * Methods for class Bin_ns_bh
77  *
78  *
79  *
80  *
81  * $Header: /cvsroot/Lorene/C++/Source/Bin_ns_bh/bin_ns_bh.C,v 1.15 2014/10/13 08:52:42 j_novak Exp $
82  *
83  */
84 
85 // C++ headers
86 #include "headcpp.h"
87 
88 // C headers
89 #include <cmath>
90 
91 // Lorene headers
92 #include "map.h"
93 #include "bhole.h"
94 #include "bin_ns_bh.h"
95 #include "utilitaires.h"
96 #include "unites.h"
97 #include "graphique.h"
98 #include "param.h"
99 
100  //--------------//
101  // Constructors //
102  //--------------//
103 
104 // Standard constructor
105 // --------------------
106 namespace Lorene {
107 Bin_ns_bh::Bin_ns_bh(Map& mp_ns, int nzet, const Eos& eos, bool irrot_ns,
108  Map_af& mp_bh)
109  : ref_triad(0., "Absolute frame Cartesian basis"),
110  star(mp_ns, nzet, true, eos, irrot_ns, ref_triad),
111  hole(mp_bh),
112  omega(0),
113  x_axe(0) {
114 
115  // Pointers of derived quantities initialized to zero :
116  set_der_0x0() ;
117 }
118 
119 // Copy constructor
120 // ----------------
121 Bin_ns_bh::Bin_ns_bh(const Bin_ns_bh& bibi)
122  : ref_triad(0., "Absolute frame Cartesian basis"),
123  star(bibi.star),
124  hole(bibi.hole),
125  omega(bibi.omega),
126  x_axe(bibi.x_axe) {
127 
128  // Pointers of derived quantities initialized to zero :
129  set_der_0x0() ;
130 }
131 
132 // Constructor from a file
133 // -----------------------
134 Bin_ns_bh::Bin_ns_bh(Map& mp_ns, const Eos& eos, Map_af& mp_bh, FILE* fich, bool old)
135  : ref_triad(0., "Absolute frame Cartesian basis"),
136  star(mp_ns, eos, ref_triad, fich, old),
137  hole(mp_bh, fich, old) {
138 
139  // omega and x_axe are read in the file:
140  fread_be(&omega, sizeof(double), 1, fich) ;
141  fread_be(&x_axe, sizeof(double), 1, fich) ;
142 
143  assert(hole.get_omega() == omega) ;
144 
145  // Pointers of derived quantities initialized to zero :
146  set_der_0x0() ;
147 }
148 
149  //------------//
150  // Destructor //
151  //------------//
152 
153 Bin_ns_bh::~Bin_ns_bh(){
154 
155  del_deriv() ;
156 
157 }
158 
159  //----------------------------------//
160  // Management of derived quantities //
161  //----------------------------------//
162 
163 void Bin_ns_bh::del_deriv() const {
164 
165  if (p_mass_adm != 0x0) delete p_mass_adm ;
166  if (p_mass_kom != 0x0) delete p_mass_kom ;
167  if (p_angu_mom != 0x0) delete p_angu_mom ;
168  if (p_total_ener != 0x0) delete p_total_ener ;
169  if (p_virial != 0x0) delete p_virial ;
170  if (p_virial_gb != 0x0) delete p_virial_gb ;
171  if (p_virial_fus != 0x0) delete p_virial_fus ;
172  if (p_ham_constr != 0x0) delete p_ham_constr ;
173  if (p_mom_constr != 0x0) delete p_mom_constr ;
174 
175  set_der_0x0() ;
176 }
177 
178 
179 
180 
182 
183  p_mass_adm = 0x0 ;
184  p_mass_kom = 0x0 ;
185  p_angu_mom = 0x0 ;
186  p_total_ener = 0x0 ;
187  p_virial = 0x0 ;
188  p_virial_gb = 0x0 ;
189  p_virial_fus = 0x0 ;
190  p_ham_constr = 0x0 ;
191  p_mom_constr = 0x0 ;
192 
193 }
194 
195  //--------------//
196  // Assignment //
197  //--------------//
198 
199 // Assignment to another Binaire
200 // -----------------------------
201 
202 void Bin_ns_bh::operator=(const Bin_ns_bh& bibi) {
203 
204  assert( bibi.ref_triad == ref_triad ) ;
205 
206  star = bibi.star ;
207  hole = bibi.hole ;
208 
209  omega = bibi.omega ;
210  x_axe = bibi.x_axe ;
211 
212  // ref_triad remains unchanged
213 
214  del_deriv() ; // Deletes all derived quantities
215 
216 }
217 
218 void Bin_ns_bh::set_omega(double omega_i) {
219 
220  omega = omega_i ;
221  hole.set_omega(omega) ;
222 
223  del_deriv() ;
224 
225 }
226 
227 void Bin_ns_bh::set_x_axe(double x_axe_i) {
228 
229  x_axe = x_axe_i ;
230 
231  del_deriv() ;
232 
233 }
234 
235 double Bin_ns_bh::separation() const {
236  return star.mp.get_ori_x() - hole.mp.get_ori_x() ;
237 }
238 
239 
240  //--------------//
241  // Outputs //
242  //--------------//
243 
244 // Save in a file
245 // --------------
246 void Bin_ns_bh::sauve(FILE* fich) const {
247 
248  star.sauve(fich) ;
249  hole.sauve(fich) ;
250 
251  fwrite_be(&omega, sizeof(double), 1, fich) ;
252  fwrite_be(&x_axe, sizeof(double), 1, fich) ;
253 
254 }
255 
256 
257 void Bin_ns_bh::init_auto () {
258 
259  // On doit faire fonction pour assurer que tout va bien sur les trucs limites
260  Cmp filtre_ns(star.get_mp()) ;
261  Cmp radius_ns (star.get_mp()) ;
262  radius_ns = star.get_mp().r ;
263  double rlim_ns = star.get_mp().val_r (0, 1, 0, 0) ;
264  filtre_ns = 0.5 * (1 + exp(-radius_ns*radius_ns/rlim_ns/rlim_ns)) ;
265  filtre_ns.std_base_scal() ;
266 
267  Cmp filtre_bh(hole.get_mp()) ;
268  Cmp radius_bh (hole.get_mp()) ;
269  radius_bh = hole.get_mp().r ;
270  double rlim_bh = hole.get_mp().val_r (0, 1, 0, 0) ;
271  filtre_bh = 0.5 * (1 + exp(-radius_bh*radius_bh/rlim_bh/rlim_bh)) ;
272  filtre_bh.std_base_scal() ;
273 
274  // Facteur conforme : pas de soucis
277  hole.set_psi_auto() = hole.get_psi_auto()() * filtre_bh ;
278  hole.set_psi_auto().std_base_scal() ;
279 
280  // Le lapse
281  star.set_n_auto() = sqrt(exp(star.get_beta_auto()()-star.get_logn_auto()()))*filtre_ns ;
283 
284  hole.set_n_auto() = hole.get_n_auto()() * filtre_bh ;
285  hole.set_n_auto().std_base_scal() ;
286 
287  // On doit assurer que le lapse tot est bien zero sur l'horizon...
288  Cmp soustrait ((filtre_bh-0.5)*2*exp(1.)) ;
289  int nz = hole.get_mp().get_mg()->get_nzone() ;
290  Mtbl xa_hole (hole.get_mp().get_mg()) ;
291  xa_hole = hole.get_mp().xa ;
292  Mtbl ya_hole (hole.get_mp().get_mg()) ;
293  ya_hole = hole.get_mp().ya ;
294  Mtbl za_hole (hole.get_mp().get_mg()) ;
295  za_hole = hole.get_mp().za ;
296  double xa_abs, ya_abs, za_abs ;
297  double air, tet, phi ;
298 
299  int np = hole.get_mp().get_mg()->get_np(0) ;
300  int nt = hole.get_mp().get_mg()->get_nt(0) ;
301  for (int k=0 ; k<np ; k++)
302  for (int j=0 ; j<nt ; j++) {
303  double val_hole = hole.n_auto()(1, k,j,0) ;
304  xa_abs = xa_hole(1,k,j,0) ;
305  ya_abs = ya_hole(1,k,j,0) ;
306  za_abs = za_hole(1,k,j,0) ;
307  star.get_mp().convert_absolute (xa_abs, ya_abs, za_abs, air, tet, phi) ;
308  double val_star = star.get_n_auto()().val_point (air, tet, phi) ;
309  for (int l=1 ; l<nz ; l++)
310  for (int i=0 ; i<hole.get_mp().get_mg()->get_nr(l) ; i++)
311  hole.set_n_auto().set(l,k,j,i) -= (val_star+val_hole)*soustrait(l,k,j,i) ;
312  }
313  hole.set_n_auto().std_base_scal() ;
314  hole.set_n_auto().raccord(1) ;
315 }
316 
317  // *********************************
318  // Affectation to another Bin_ns_bh
319  //**********************************
320 
321 void Bin_ns_bh::affecte(const Bin_ns_bh& so) {
322 
323  // Kinematic quantities :
324  star.nzet = so.star.nzet ;
325  set_omega(so.omega) ;
326  x_axe = so.x_axe ;
327  star.set_mp().set_ori (so.star.mp.get_ori_x(), 0., 0.) ;
328  hole.set_mp().set_ori (so.hole.mp.get_ori_x(), 0., 0.) ;
331 
333  hole.set_rayon(so.hole.get_rayon()) ;
334 
335  // Faut gêrer le map_et :
336  Map_et* map_et = dynamic_cast<Map_et*>(&star.mp) ;
337  Map_et* map_et_so = dynamic_cast<Map_et*>(&so.star.mp) ;
338 
339  int kmax = -1 ;
340  int jmax = -1 ;
341  int np = map_et->get_mg()->get_np(star.nzet-1) ;
342  int nt = map_et->get_mg()->get_nt(star.nzet-1) ;
343  Mtbl phi (map_et->get_mg()) ;
344  phi = map_et->phi ;
345  Mtbl tet (map_et->get_mg()) ;
346  tet = map_et->tet ;
347  double rmax = 0 ;
348  for (int k=0 ; k<np ; k++)
349  for (int j=0 ; j<nt ; j++) {
350  double rcourant = map_et_so->val_r(star.nzet-1, 1, tet(0,k,j,0), phi(0,k,j,0)) ;
351  if (rcourant > rmax) {
352  rmax = rcourant ;
353  kmax = k ;
354  jmax = j ;
355  }
356  }
357 
358  double old_r = map_et->val_r(star.nzet-1, 1, tet(0,kmax,jmax,0), phi(0,kmax,jmax,0)) ;
359  map_et->homothetie (rmax/old_r) ;
360 
361  star.ent.allocate_all() ;
362  star.ent.set().import(star.nzet, so.star.ent()) ;
363  star.ent.set_std_base() ;
364 
365  Param par_adapt ;
366  int nitermax = 100 ;
367  int niter_adapt ;
368  int adapt_flag = 1 ;
369  int nz_search = star.nzet + 1 ;
370  double precis_secant = 1.e-14 ;
371  double alpha_r = 1. ;
372  double reg_map = 1. ;
373  Tbl ent_limit(star.nzet) ;
374 
375  par_adapt.add_int(nitermax, 0) ;
376  par_adapt.add_int(star.nzet, 1) ;
377  par_adapt.add_int(nz_search, 2) ;
378  par_adapt.add_int(adapt_flag, 3) ;
379  par_adapt.add_int(jmax, 4) ;
380  par_adapt.add_int(kmax, 5) ;
381  par_adapt.add_int_mod(niter_adapt, 0) ;
382  par_adapt.add_double(precis_secant, 0) ;
383  par_adapt.add_double(reg_map, 1) ;
384  par_adapt.add_double(alpha_r, 2) ;
385  par_adapt.add_tbl(ent_limit, 0) ;
386 
387  Map_et mp_prev = *map_et ;
388  ent_limit.set_etat_qcq() ;
389  for (int l=0; l<star.nzet-1; l++) {
390  int nr = map_et->get_mg()->get_nr(l) ;
391  ent_limit.set(l) = star.ent()(l, kmax, jmax, nr-1) ;
392  }
393  ent_limit.set(star.nzet-1) = 0 ;
394 
395  // On adapte :
396  map_et->adapt(star.ent(), par_adapt) ;
397  mp_prev.homothetie(alpha_r) ;
398  map_et->reevaluate_symy (&mp_prev, star.nzet, star.ent.set()) ;
399 
400  star.ent.set().import(star.nzet, so.star.ent()) ;
401 
402  // The BH part :
403  // Lapse :
405  Cmp auxi_n (so.hole.n_auto()) ;
406  auxi_n.raccord(1) ;
407  hole.n_auto.set().import(auxi_n) ;
409  hole.n_auto.set().raccord(1) ;
410 
411  // Psi :
413  Cmp auxi_psi (so.hole.psi_auto()) ;
414  auxi_psi.raccord(1) ;
415  hole.psi_auto.set().import(auxi_psi) ;
417  hole.psi_auto.set().raccord(1) ;
418 
419  // Shift :
421  Tenseur auxi_shift (so.hole.shift_auto) ;
422  for (int i=0 ; i<3 ; i++)
423  auxi_shift.set(i).raccord(1) ;
424  hole.shift_auto.set(0).import(auxi_shift(0)) ;
425  hole.shift_auto.set(1).import(auxi_shift(1)) ;
426  hole.shift_auto.set(2).import(auxi_shift(2)) ;
428 
429  // The NS part :
431  star.n_auto.set().import(so.star.n_auto()) ;
433 
434  // Psi :
438  // Shift :
440  star.w_shift.set(0).import(so.star.w_shift(0)) ;
441  star.w_shift.set(1).import(so.star.w_shift(1)) ;
442  star.w_shift.set(2).import(so.star.w_shift(2)) ;
448 
449  Tenseur copie_dpsi (so.star.d_psi) ;
450  copie_dpsi.set(2).dec2_dzpuis() ;
451  if (so.star.is_irrotational()) {
453  star.d_psi.set(0).import(star.nzet, copie_dpsi(0)) ;
454  star.d_psi.set(1).import(star.nzet, copie_dpsi(1)) ;
455  star.d_psi.set(2).import(star.nzet, copie_dpsi(2)) ;
457  }
458 
459 
460 
461  // Reconstruction of the fields :
462  hole.update_metric(star) ;
465  fait_tkij() ;
466 
469  star.hydro_euler() ;
470 }
471 
472 
473 // Printing
474 // --------
475 ostream& operator<<(ostream& ost, const Bin_ns_bh& bibi) {
476  bibi >> ost ;
477  return ost ;
478 }
479 
480 
481 ostream& Bin_ns_bh::operator>>(ostream& ost) const {
482 
483  using namespace Unites ;
484 
485  ost << endl ;
486  ost << "Neutron star - black hole binary system" << endl ;
487  ost << "=======================================" << endl ;
488  ost << endl <<
489  "Orbital angular velocity : " << omega * f_unit << " rad/s" << endl ;
490  ost <<
491  "Absolute coordinate X of the rotation axis : " << x_axe / km
492  << " km" << endl ;
493  ost << endl << "Neutron star : " << endl ;
494  ost << "============ " << endl ;
495  ost << star << endl ;
496 
497  ost << "Black hole : " << endl ;
498  ost << "========== " << endl ;
499  ost << "Coordinate radius of the throat : " << hole.get_rayon() / km << " km" << endl ;
500  ost << "Absolute abscidia of the throat center : " << (hole.get_mp()).get_ori_x() / km
501  << " km" << endl ;
502  return ost ;
503 }
504 }
Coord xa
Absolute x coordinate.
Definition: map.h:730
void set_omega(double)
Sets the orbital angular velocity [{ f_unit}].
Definition: bin_ns_bh.C:218
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
Definition: cmp.h:446
Cmp exp(const Cmp &)
Exponential.
Definition: cmp_math.C:270
void set_der_0x0() const
Sets to { 0x0} all the pointers on derived quantities.
Definition: bin_ns_bh.C:181
const Map & get_mp() const
Returns the mapping.
Definition: etoile.h:659
Radial mapping of rather general form.
Definition: map.h:2752
void add_int(const int &n, int position=0)
Adds the address of a new int to the list.
Definition: param.C:246
Neutron star - black hole binary system.
Definition: bin_ns_bh.h:117
int get_np(int l) const
Returns the number of points in the azimuthal direction ( ) in domain no. l.
Definition: grilles.h:462
void fait_shift_auto()
Computes shift_auto from w_shift and khi_shift according to Shibata&#39;s prescription [Prog...
Definition: etoile_bin.C:826
Cmp sqrt(const Cmp &)
Square root.
Definition: cmp_math.C:220
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:107
void set_rot_phi(double phi0)
Sets a new rotation angle.
Definition: map.C:263
void set_std_base()
Set the standard spectal basis of decomposition for each component.
Definition: tenseur.C:1170
Multi-domain array.
Definition: mtbl.h:118
double * p_total_ener
Total energy of the system.
Definition: bin_ns_bh.h:155
Lorene prototypes.
Definition: app_hor.h:64
Standard units of space, time and mass.
Equation of state base class.
Definition: eos.h:190
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
Definition: map.h:765
virtual void kinematics(double omega, double x_axe)
Computes the quantities bsn and pot_centri .
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_et_radius.C:92
double & set(int i)
Read/write of a particular element (index i) (1D case)
Definition: tbl.h:281
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:670
double get_ori_x() const
Returns the x coordinate of the origin.
Definition: map.h:768
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:96
double * p_ham_constr
Relative error on the Hamiltonian constraint.
Definition: bin_ns_bh.h:167
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:701
void update_metric_der_comp(const Bhole &comp)
Computes the derivative of metric functions related to the companion black hole.
bool is_irrotational() const
Returns true for an irrotational motion, false for a corotating one.
Definition: etoile.h:1092
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:278
double * p_mass_adm
Total ADM mass of the system.
Definition: bin_ns_bh.h:146
virtual void sauve(FILE *) const
Save in a file.
Definition: et_bin_nsbh.C:312
double get_rot_phi() const
Returns the angle between the x –axis and X –axis.
Definition: map.h:775
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:292
Coord tet
coordinate centered on the grid
Definition: map.h:719
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:253
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:163
Coord phi
coordinate centered on the grid
Definition: map.h:720
const Base_vect_cart ref_triad
Cartesian triad of the absolute reference frame.
Definition: bin_ns_bh.h:125
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
Definition: tbl.C:361
double * p_virial_fus
Virial theorem error by J.L.Friedman, K.Uryu, and M.Shibata.
Definition: bin_ns_bh.h:164
double * p_virial
Virial theorem error.
Definition: bin_ns_bh.h:158
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:824
Tenseur w_shift
Vector used in the decomposition of shift_auto , following Shibata&#39;s prescription [Prog...
Definition: etoile.h:908
double * p_mass_kom
Total Komar mass of the system.
Definition: bin_ns_bh.h:149
friend ostream & operator<<(ostream &, const Bin_ns_bh &)
Save in a file.
Definition: bin_ns_bh.C:475
Map & set_mp()
Read/write of the mapping.
Definition: etoile.h:601
double x_axe
Absolute X coordinate of the rotation axis.
Definition: bin_ns_bh.h:140
Et_bin_nsbh star
The neutron star.
Definition: bin_ns_bh.h:128
Tbl * p_mom_constr
Relative error on the momentum constraint.
Definition: bin_ns_bh.h:170
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
Parameter storage.
Definition: param.h:125
void add_tbl(const Tbl &ti, int position=0)
Adds the address of a new Tbl to the list.
Definition: param.C:522
Map & mp
Mapping associated with the star.
Definition: etoile.h:429
int get_nzone() const
Returns the number of domains.
Definition: grilles.h:448
virtual void equation_of_state()
Computes the proper baryon and energy density, as well as pressure from the enthalpy.
Definition: etoile.C:566
virtual void homothetie(double lambda)
Sets a new radial scale.
Definition: map_et.C:905
ostream & operator>>(ostream &) const
Operator >> (function called by the operator <<).
Definition: bin_ns_bh.C:481
virtual void reevaluate_symy(const Map *mp_prev, int nzet, Cmp &uu) const
Recomputes the values of a Cmp at the collocation points after a change in the mapping.
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:918
void dec2_dzpuis()
Decreases by 2 the value of dzpuis and changes accordingly the values of the Cmp in the external comp...
Definition: cmp_r_manip.C:180
double omega
Angular velocity with respect to an asymptotically inertial observer.
Definition: bin_ns_bh.h:136
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:70
void sauve(FILE *fich) const
Write on a file.
Definition: bhole.C:482
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:644
int nzet
Number of domains of *mp occupied by the star.
Definition: etoile.h:432
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:69
int get_nr(int l) const
Returns the number of points in the radial direction ( ) in domain no. l.
Definition: grilles.h:452
Coord ya
Absolute y coordinate.
Definition: map.h:731
virtual void adapt(const Cmp &ent, const Param &par, int nbr_filtre=0)
Adaptation of the mapping to a given scalar field.
Definition: map_et_adapt.C:108
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:657
Affine radial mapping.
Definition: map.h:2027
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:202
Tenseur ent
Log-enthalpy (relativistic case) or specific enthalpy (Newtonian case)
Definition: etoile.h:457
void raccord(int n)
Performs the matching of the nucleus with respect to the first shell.
Definition: cmp_raccord.C:170
Tbl * p_angu_mom
Total angular momentum of the system.
Definition: bin_ns_bh.h:152
Coord za
Absolute z coordinate.
Definition: map.h:732
void set_omega(double ome)
Sets the angular velocity to ome .
Definition: bhole.h:361
void add_double(const double &x, int position=0)
Adds the the address of a new double to the list.
Definition: param.C:315
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:161
Bhole hole
The black hole.
Definition: bin_ns_bh.h:131
Tenseur n_auto
Part of N generated by the hole.
Definition: bhole.h:286
Basic array class.
Definition: tbl.h:161
int get_nt(int l) const
Returns the number of points in the co-latitude direction ( ) in domain no. l.
Definition: grilles.h:457
void set_x_axe(double)
Sets the absolute coordinate X of the rotation axis [{ r_unit}].
Definition: bin_ns_bh.C:227
void homothetie_interne(double lambda)
Sets a new radial scale at the bondary between the nucleus and the first shell.
Definition: map_af.C:614
void import(const Cmp &ci)
Assignment to another Cmp defined on a different mapping.
Definition: cmp_import.C:73
double separation() const
Return the separation.
Definition: bin_ns_bh.C:235
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:302
Tensor handling *** DEPRECATED : use class Tensor instead ***.
Definition: tenseur.h:301
void add_int_mod(int &n, int position=0)
Adds the address of a new modifiable int to the list.
Definition: param.C:385
const Tenseur & get_beta_auto() const
Returns the logarithm of the part of the product AN generated principaly by the star.
Definition: etoile.h:724
Coord r
r coordinate centered on the grid
Definition: map.h:718
Tenseur d_psi
Gradient of (in the irrotational case) (Cartesian components with respect to ref_triad ) ...
Definition: etoile.h:838
virtual void hydro_euler()
Computes the hydrodynamical quantities relative to the Eulerian observer from those in the fluid fram...
Definition: et_bin_hydro.C:106