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