LORENE
bin_ns_bh.h
1 /*
2  * Definition of Lorene 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 #ifndef __BIN_NS_BH_H_
28 #define __BIN_NS_BH_H_
29 
30 /*
31  * $Id: bin_ns_bh.h,v 1.20 2017/02/24 15:34:59 j_novak Exp $
32  * $Log: bin_ns_bh.h,v $
33  * Revision 1.20 2017/02/24 15:34:59 j_novak
34  * Removal of spurious comments
35  *
36  * Revision 1.19 2014/10/13 08:52:32 j_novak
37  * Lorene classes and functions now belong to the namespace Lorene.
38  *
39  * Revision 1.18 2007/04/26 14:14:59 f_limousin
40  * The function fait_tkij now have default values for bound_nn and lim_nn
41  *
42  * Revision 1.17 2007/04/24 20:15:30 f_limousin
43  * Implementation of Dirichlet and Neumann BC for the lapse
44  *
45  * Revision 1.16 2006/09/25 10:01:45 p_grandclement
46  * Addition of N-dimensional Tbl
47  *
48  * Revision 1.15 2006/06/23 07:09:22 p_grandclement
49  * Addition of spinning black hole
50  *
51  * Revision 1.14 2006/06/01 12:47:50 p_grandclement
52  * update of the Bin_ns_bh project
53  *
54  * Revision 1.13 2006/04/25 07:21:54 p_grandclement
55  * Various changes for the NS_BH project
56  *
57  * Revision 1.12 2005/12/01 12:59:08 p_grandclement
58  * Files for bin_ns_bh project
59  *
60  * Revision 1.11 2005/11/30 11:09:03 p_grandclement
61  * Changes for the Bin_ns_bh project
62  *
63  * Revision 1.10 2005/10/18 13:12:31 p_grandclement
64  * update of the mixted binary codes
65  *
66  * Revision 1.9 2005/08/29 15:10:12 p_grandclement
67  * Addition of things needed :
68  * 1) For BBH with different masses
69  * 2) Provisory files for the mixted binaries (Bh and NS) : THIS IS NOT
70  * WORKING YET !!!
71  *
72  * Revision 1.8 2004/06/09 06:23:50 k_taniguchi
73  * Introduce analytical_omega() and analytical_shift().
74  *
75  * Revision 1.7 2003/11/25 07:25:44 k_taniguchi
76  * Change the attribute of fait_decouple() from private to public.
77  *
78  * Revision 1.6 2003/10/24 16:56:30 k_taniguchi
79  * Add the method for the calculation of the orbital angular velocity
80  *
81  * Revision 1.5 2003/10/24 12:45:22 k_taniguchi
82  * Change the class for the star from Etoile_bin to Et_bin_nsbh
83  *
84  * Revision 1.4 2003/02/13 16:40:24 p_grandclement
85  * Addition of various things for the Bin_ns_bh project, non of them being
86  * completely tested
87  *
88  * Revision 1.3 2002/12/19 14:46:16 e_gourgoulhon
89  *
90  * Modified prototype of functions set_omega and set_x_axe
91  *
92  * Revision 1.2 2002/12/18 10:29:18 e_gourgoulhon
93  *
94  * Added set_omega() and set_x_axe()
95  *
96  * Revision 1.1 2002/12/17 13:10:49 e_gourgoulhon
97  * Definition of class Bin_ns_bh
98  *
99  *
100  *
101  *
102  * $Header: /cvsroot/Lorene/C++/Include/bin_ns_bh.h,v 1.20 2017/02/24 15:34:59 j_novak Exp $
103  *
104  */
105 
106 
107 // Lorene headers
108 #include "et_bin_nsbh.h"
109 #include "bhole.h"
110 
111 namespace Lorene {
120 class Bin_ns_bh {
121 
122  // Data :
123  // -----
124  private:
129 
132 
135 
139  double omega ;
140 
143  double x_axe ;
144 
145  // Derived data :
146  // ------------
147  private:
149  mutable double* p_mass_adm ;
150 
152  mutable double* p_mass_kom ;
153 
155  mutable Tbl* p_angu_mom ;
156 
158  mutable double* p_total_ener ;
159 
161  mutable double* p_virial ;
162 
164  mutable double* p_virial_gb ;
165 
167  mutable double* p_virial_fus ;
168 
170  mutable double* p_ham_constr ;
171 
173  mutable Tbl* p_mom_constr ;
174 
175 
176  // Constructors - Destructor
177  // -------------------------
178  public:
189  Bin_ns_bh(Map& mp_ns, int nzet, const Eos& eos, bool irrot_ns,
190  Map_af& mp_bh) ;
191 
192 
193  Bin_ns_bh(const Bin_ns_bh& ) ;
194 
203  Bin_ns_bh(Map& mp_ns, const Eos& eos, Map_af& mp_bh, FILE* fich, bool old = false) ;
204 
205  virtual ~Bin_ns_bh() ;
206 
207 
208  // Memory management
209  // -----------------
210  private:
212  void del_deriv() const ;
213 
215  void set_der_0x0() const ;
216 
217 
218  // Mutators / assignment
219  // ---------------------
220  public:
222  void operator=(const Bin_ns_bh& ) ;
223 
226  { del_deriv() ;
227  return star ;} ;
228 
231  { del_deriv() ;
232  return hole ;} ;
233 
235  void set_omega(double ) ;
236 
238  void set_x_axe(double ) ;
239 
240  // Accessors
241  // ---------
242  public:
244  const Et_bin_nsbh& get_ns() const
245  { return star ;} ;
246 
248  const Bhole& get_bh() const
249  { return hole ;} ;
250 
252  double get_omega() const
253  { return omega ;} ;
254 
256  double get_x_axe() const
257  { return x_axe ;} ;
258 
260  double separation() const ;
261 
262  // Outputs
263  // -------
264  public:
265  virtual void sauve(FILE *) const ;
266 
267  // Display
268  friend ostream& operator<<(ostream& , const Bin_ns_bh& ) ;
269 
270  private:
272  ostream& operator>>(ostream& ) const ;
273 
274  public:
278  void fait_decouple() ;
279 
283  void fait_tkij(int bound_nn = -1, double lim_nn = 0) ;
284 
285  // Computational routines
286  // ----------------------
287  public:
307  void orbit_omega(double fact_omeg_min, double fact_omeg_max) ;
308 
312  void analytical_omega() ;
313 
317  void analytical_shift() ;
318 
319  void init_auto () ;
320  void affecte (const Bin_ns_bh&) ;
321  void pseudo_misner (int&, int, double, double, int, double) ;
322  double adm_systeme() const ;
323  double adm_systeme_volume() const ;
324  double komar_systeme() const ;
325  double moment_systeme_inf() const ;
326  double moment_systeme_hor() const ;
327  double smarr() const ;
328  Tbl linear_momentum_systeme_inf() const ;
329  double viriel() const ;
330  void coal (double, double, int, int, double, double, double, double, double, double, double, const int, int, double) ;
331  double distance_propre_axe_bh (const int nr = 65) const ;
332  double distance_propre_axe_ns (const int nr = 65) const ;
333 
334 };
335 ostream& operator<<(ostream& , const Bin_ns_bh& ) ;
336 
337 }
338 #endif
void set_omega(double)
Sets the orbital angular velocity [{ f_unit}].
Definition: bin_ns_bh.C:221
void set_der_0x0() const
Sets to { 0x0} all the pointers on derived quantities.
Definition: bin_ns_bh.C:184
Neutron star - black hole binary system.
Definition: bin_ns_bh.h:120
void analytical_omega()
Sets the orbital angular velocity of the neutron star to some 2-PN analytical value.
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
double * p_total_ener
Total energy of the system.
Definition: bin_ns_bh.h:158
Lorene prototypes.
Definition: app_hor.h:67
Equation of state base class.
Definition: eos.h:209
const Et_bin_nsbh & get_ns() const
Returns a constant reference to the neutron star.
Definition: bin_ns_bh.h:244
double get_omega() const
Returns the orbital velocity.
Definition: bin_ns_bh.h:252
Base class for coordinate mappings.
Definition: map.h:688
double * p_ham_constr
Relative error on the Hamiltonian constraint.
Definition: bin_ns_bh.h:170
double * p_mass_adm
Total ADM mass of the system.
Definition: bin_ns_bh.h:149
Black hole.
Definition: bhole.h:268
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
void analytical_shift()
Sets some analytical template for the shift vector (via the members { w_shift} and { khi_shift} of th...
double * p_mass_kom
Total Komar mass of the system.
Definition: bin_ns_bh.h:152
friend ostream & operator<<(ostream &, const Bin_ns_bh &)
Save in a file.
Definition: bin_ns_bh.C:478
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
Bhole & set_bh()
Read/write of the black hole.
Definition: bin_ns_bh.h:230
void fait_decouple()
Function used to compute the { decouple} functions for both the NS and the BH.
ostream & operator>>(ostream &) const
Operator >> (function called by the operator <<).
Definition: bin_ns_bh.C:484
double omega
Angular velocity with respect to an asymptotically inertial observer.
Definition: bin_ns_bh.h:139
void orbit_omega(double fact_omeg_min, double fact_omeg_max)
Computes the orbital angular velocity { omega}.
Et_bin_nsbh & set_ns()
Read/write of the neutron star.
Definition: bin_ns_bh.h:225
Cartesian vectorial bases (triads).
Definition: base_vect.h:201
Affine radial mapping.
Definition: map.h:2048
Class for a star in a NS-BH binary system.
Definition: et_bin_nsbh.h:79
void operator=(const Bin_ns_bh &)
Assignment to another Bin_ns_bh.
Definition: bin_ns_bh.C:205
double get_x_axe() const
Returns a constant reference to the black hole.
Definition: bin_ns_bh.h:256
const Bhole & get_bh() const
Returns a constant reference to the black hole.
Definition: bin_ns_bh.h:248
Tbl * p_angu_mom
Total angular momentum of the system.
Definition: bin_ns_bh.h:155
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
Basic array class.
Definition: tbl.h:164
void set_x_axe(double)
Sets the absolute coordinate X of the rotation axis [{ r_unit}].
Definition: bin_ns_bh.C:230
double separation() const
Return the separation.
Definition: bin_ns_bh.C:238