LORENE
bin_bhns.h
1/*
2 * Definition of Lorene class Bin_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 __BIN_BHNS_H_
27#define __BIN_BHNS_H_
28
29/*
30 * $Id: bin_bhns.h,v 1.3 2014/10/13 08:52:32 j_novak Exp $
31 * $Log: bin_bhns.h,v $
32 * Revision 1.3 2014/10/13 08:52:32 j_novak
33 * Lorene classes and functions now belong to the namespace Lorene.
34 *
35 * Revision 1.2 2008/05/15 18:50:06 k_taniguchi
36 * Addition of new global quantities.
37 *
38 * Revision 1.1 2007/06/22 01:03:50 k_taniguchi
39 * *** empty log message ***
40 *
41 *
42 * $Header: /cvsroot/Lorene/C++/Include/bin_bhns.h,v 1.3 2014/10/13 08:52:32 j_novak Exp $
43 *
44 */
45
46// Lorene headers
47#include "hole_bhns.h"
48#include "star_bhns.h"
49
50namespace Lorene {
51
52// External classes which appear in the declaration of class Bin_bhns:
53class Hole_bhns ;
54class Star_bhns ;
55
56
63class Bin_bhns {
64
65 // Data :
66 // -----
67 protected:
70
73
76
80 double omega ;
81
83 double separ ;
84
86 double x_rot ;
87
89 double y_rot ;
90
91 // Derived data :
92 // ------------
93 protected:
97 mutable double* p_mass_adm_bhns_surf ;
98
102 mutable double* p_mass_adm_bhns_vol ;
103
107 mutable double* p_mass_kom_bhns_surf ;
108
112 mutable double* p_mass_kom_bhns_vol ;
113
116
119
123 mutable double* p_virial_bhns_surf ;
124
128 mutable double* p_virial_bhns_vol ;
129
131 mutable double* p_xa_barycenter ;
132
134 mutable double* p_ya_barycenter ;
135
137 mutable double* p_omega_two_points ;
138
140 // mutable double* p_ham_constr_bhns ;
141
143 // mutable Tbl* p_mom_constr_bhns ;
144
145
146 // Constructors - Destructor
147 // -------------------------
148 public:
169 Bin_bhns(Map& mp_bh, Map& mp_ns, int nzet, const Eos& eos,
170 bool irrot_ns, bool kerrschild,
171 bool bc_lapse_nd, bool bc_lapse_fs, bool irrot_bh,
172 double mass_bh) ;
173
174 Bin_bhns(const Bin_bhns& ) ;
175
177 Bin_bhns(Map& mp_bh, Map& mp_ns, const Eos& eos, FILE* fich) ;
178
179 virtual ~Bin_bhns() ;
180
181
182 // Memory management
183 // -----------------
184 protected:
186 void del_deriv() const ;
187
189 void set_der_0x0() const ;
190
191
192 // Mutators / assignment
193 // ---------------------
194 public:
196 void operator=(const Bin_bhns&) ;
197
200 { del_deriv() ;
201 return hole ; } ;
202
205 { del_deriv() ;
206 return star ; } ;
207
209 double& set_omega() { return omega ; } ;
210
212 double& set_separ() { return separ ; } ;
213
215 double& set_x_rot() {return x_rot; } ;
216
218 double& set_y_rot() {return y_rot; } ;
219
220
221 // Accessors
222 // ---------
223 public:
225 const Hole_bhns& get_bh() const { return hole ; } ;
226
228 const Star_bhns& get_ns() const { return star ; } ;
229
231 double get_omega() const { return omega ; } ;
232
236 double get_separ() const { return separ ; } ;
237
241 double get_x_rot() const {return x_rot; } ;
242
246 double get_y_rot() const {return y_rot; } ;
247
248
249 // Outputs
250 // -------
251 public:
252 virtual void sauve(FILE *) const ;
253
255 friend ostream& operator<<(ostream& , const Bin_bhns& ) ;
256
258 void display_poly(ostream& ) const ;
259
260 private:
262 ostream& operator>>(ostream& ) const ;
263
264 // Computational routines
265 // ----------------------
266 public:
267
269 double mass_adm_bhns_surf() const ;
270
271 double mass_adm_bhns_vol() const ;
272
274 double mass_kom_bhns_surf() const ;
275
276 double mass_kom_bhns_vol() const ;
277
285 const Tbl& line_mom_bhns() const ;
286
294 const Tbl& angu_mom_bhns() const ;
295
299 double virial_bhns_surf() const ;
300
304 double virial_bhns_vol() const ;
305
307 double xa_barycenter() const ;
308
310 double ya_barycenter() const ;
311
313 double omega_two_points() const ;
314
317 // double ham_constr() const ;
318
321 // const Tbl& mom_constr() const ;
322
341 void orbit_omega(double fact_omeg_min, double fact_omeg_max) ;
342
349 void rotation_axis_x(double rot_exp_x) ;
350
359 void rotation_axis_y(double thres_rot, double rot_exp_y, double fact) ;
360
369 void shift_analytic(double reduce_shift_bh, double reduce_shift_ns) ;
370
371
372};
373ostream& operator<<(ostream& , const Bin_bhns& ) ;
374
375}
376#endif
Cartesian vectorial bases (triads).
Definition base_vect.h:201
Class for computing a black hole - neutron star binary system with comparable mass ()
Definition bin_bhns.h:63
void display_poly(ostream &) const
Display in polytropic units.
Definition bin_bhns.C:309
void del_deriv() const
Deletes all the derived quantities.
Definition bin_bhns.C:142
double * p_mass_adm_bhns_surf
Total ADM mass of the system calculated by the surface integral at infinity.
Definition bin_bhns.h:97
virtual void sauve(FILE *) const
Save in a file.
Definition bin_bhns.C:210
double y_rot
Absolute Y coordinate of the rotation axis.
Definition bin_bhns.h:89
const Base_vect_cart ref_triad
Cartesian triad of the absolute reference frame.
Definition bin_bhns.h:69
double get_separ() const
Returns the coordinate separation of the binary system [{\tt r_unit}].
Definition bin_bhns.h:236
double * p_mass_kom_bhns_surf
Total Komar mass of the system calculated by the surface integral at infinity.
Definition bin_bhns.h:107
Hole_bhns hole
Black hole.
Definition bin_bhns.h:72
double mass_kom_bhns_surf() const
Total Komar mass.
double get_omega() const
Returns the orbital angular velocity [{\tt f_unit}].
Definition bin_bhns.h:231
double ya_barycenter() const
Absolute coordinate Y of the barycenter of the baryon density.
void shift_analytic(double reduce_shift_bh, double reduce_shift_ns)
Sets some analytical template for the initial shift vector.
void set_der_0x0() const
Sets to 0x0 all the pointers on derived quantities.
Definition bin_bhns.C:162
double omega
Angular velocity with respect to an asymptotically inertial observer.
Definition bin_bhns.h:80
double & set_y_rot()
Sets the absolute coordinate Y of the rotation axis [{\tt r_unit}].
Definition bin_bhns.h:218
double * p_mass_adm_bhns_vol
Total ADM mass of the system calculated by the volume integral and the surface integral at the appare...
Definition bin_bhns.h:102
double * p_virial_bhns_vol
Virial theorem error calculated by the ADM mass and the Komar mass of the volume integral.
Definition bin_bhns.h:128
const Tbl & line_mom_bhns() const
Total linear momentum.
friend ostream & operator<<(ostream &, const Bin_bhns &)
Display.
Definition bin_bhns.C:224
double * p_omega_two_points
Orbital angular velocity derived from another method.
Definition bin_bhns.h:137
double xa_barycenter() const
Absolute coordinate X of the barycenter of the baryon density.
double separ
Absolute orbital separation between two centers of BH and NS.
Definition bin_bhns.h:83
void rotation_axis_y(double thres_rot, double rot_exp_y, double fact)
Computes the position of the rotation axis Y.
Tbl * p_angu_mom_bhns
Total angular momentum of the system.
Definition bin_bhns.h:118
double get_y_rot() const
Returns the absolute coordinate Y of the rotation axis [{\tt r_unit}].
Definition bin_bhns.h:246
const Hole_bhns & get_bh() const
Returns a reference to the black hole.
Definition bin_bhns.h:225
double virial_bhns_surf() const
Estimates the relative error on the virial theorem $|1 - M_{\rm Komar} / M_{\rm ADM}|$.
void orbit_omega(double fact_omeg_min, double fact_omeg_max)
Estimates the relative error on the Hamiltonian constraint.
const Tbl & angu_mom_bhns() const
Total angular momentum.
double virial_bhns_vol() const
Estimates the relative error on the virial theorem $|1 - M_{\rm Komar} / M_{\rm ADM}|$.
double * p_ya_barycenter
Absolute coordinate Y of the barycenter of the baryon density.
Definition bin_bhns.h:134
double omega_two_points() const
Orbital angular velocity derived from another method.
double x_rot
Absolute X coordinate of the rotation axis.
Definition bin_bhns.h:86
virtual ~Bin_bhns()
Destructor.
Definition bin_bhns.C:130
Hole_bhns & set_bh()
Read/write of the black hole.
Definition bin_bhns.h:199
void operator=(const Bin_bhns &)
Assignment to another Bin_bhns.
Definition bin_bhns.C:187
const Star_bhns & get_ns() const
Returns a reference to the neutron star.
Definition bin_bhns.h:228
double & set_x_rot()
Sets the absolute coordinate X of the rotation axis [{\tt r_unit}].
Definition bin_bhns.h:215
double * p_virial_bhns_surf
Virial theorem error calculated by the ADM mass and the Komar mass of the surface integral at infinit...
Definition bin_bhns.h:123
double * p_mass_kom_bhns_vol
Total Komar mass of the system calculated by the volume integral and the surface integral at the appa...
Definition bin_bhns.h:112
Star_bhns star
Neutron star.
Definition bin_bhns.h:75
double * p_xa_barycenter
Absolute coordinate X of the barycenter of the baryon density.
Definition bin_bhns.h:131
ostream & operator>>(ostream &) const
Operator >> (function called by the operator <<)
Definition bin_bhns.C:231
void rotation_axis_x(double rot_exp_x)
Computes the position of the rotation axis X.
double & set_separ()
Sets the orbital separation [{\tt r_unit}].
Definition bin_bhns.h:212
Tbl * p_line_mom_bhns
Total linear momentum of the system.
Definition bin_bhns.h:115
double mass_adm_bhns_surf() const
Total ADM mass.
double & set_omega()
Sets the orbital angular velocity [{\tt f_unit}].
Definition bin_bhns.h:209
double get_x_rot() const
Returns the absolute coordinate X of the rotation axis [{\tt r_unit}].
Definition bin_bhns.h:241
Star_bhns & set_ns()
Read/write of the neutron star.
Definition bin_bhns.h:204
Equation of state base class.
Definition eos.h:190
Class for black holes in black hole-neutron star binaries.
Definition hole_bhns.h:65
Base class for coordinate mappings.
Definition map.h:670
Class for stars in black hole-neutron star binaries.
Definition star_bhns.h:59
Basic array class.
Definition tbl.h:161
Lorene prototypes.
Definition app_hor.h:64