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 
50 namespace Lorene {
51 
52 // External classes which appear in the declaration of class Bin_bhns:
53 class Hole_bhns ;
54 class Star_bhns ;
55 
56 
63 class 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 
115  mutable Tbl* p_line_mom_bhns ;
116 
118  mutable Tbl* p_angu_mom_bhns ;
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 };
373 ostream& operator<<(ostream& , const Bin_bhns& ) ;
374 
375 }
376 #endif
Lorene::Bin_bhns::p_angu_mom_bhns
Tbl * p_angu_mom_bhns
Total angular momentum of the system.
Definition: bin_bhns.h:118
Lorene::Bin_bhns::hole
Hole_bhns hole
Black hole.
Definition: bin_bhns.h:72
Lorene::Bin_bhns::virial_bhns_vol
double virial_bhns_vol() const
Estimates the relative error on the virial theorem $|1 - M_{\rm Komar} / M_{\rm ADM}|$.
Definition: bin_bhns_global.C:2187
Lorene::Bin_bhns::virial_bhns_surf
double virial_bhns_surf() const
Estimates the relative error on the virial theorem $|1 - M_{\rm Komar} / M_{\rm ADM}|$.
Definition: bin_bhns_global.C:2172
Lorene::Bin_bhns::p_virial_bhns_surf
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
Lorene::Bin_bhns::operator<<
friend ostream & operator<<(ostream &, const Bin_bhns &)
Display.
Definition: bin_bhns.C:224
Lorene::Bin_bhns::y_rot
double y_rot
Absolute Y coordinate of the rotation axis.
Definition: bin_bhns.h:89
Lorene::Bin_bhns::sauve
virtual void sauve(FILE *) const
Save in a file.
Definition: bin_bhns.C:210
Lorene::Bin_bhns::p_mass_adm_bhns_vol
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
Lorene::Bin_bhns::get_omega
double get_omega() const
Returns the orbital angular velocity [{\tt f_unit}].
Definition: bin_bhns.h:231
Lorene::Bin_bhns::set_ns
Star_bhns & set_ns()
Read/write of the neutron star.
Definition: bin_bhns.h:204
Lorene::Bin_bhns::display_poly
void display_poly(ostream &) const
Display in polytropic units.
Definition: bin_bhns.C:309
Lorene::Base_vect_cart
Cartesian vectorial bases (triads).
Definition: base_vect.h:201
Lorene
Lorene prototypes.
Definition: app_hor.h:64
Lorene::Bin_bhns::set_bh
Hole_bhns & set_bh()
Read/write of the black hole.
Definition: bin_bhns.h:199
Lorene::Bin_bhns::p_omega_two_points
double * p_omega_two_points
Orbital angular velocity derived from another method.
Definition: bin_bhns.h:137
Lorene::Bin_bhns::line_mom_bhns
const Tbl & line_mom_bhns() const
Total linear momentum.
Definition: bin_bhns_global.C:1133
Lorene::Hole_bhns
Class for black holes in black hole-neutron star binaries.
Definition: hole_bhns.h:65
Lorene::Bin_bhns::operator=
void operator=(const Bin_bhns &)
Assignment to another Bin_bhns.
Definition: bin_bhns.C:187
Lorene::Eos
Equation of state base class.
Definition: eos.h:190
Lorene::Bin_bhns::mass_adm_bhns_surf
double mass_adm_bhns_surf() const
Total ADM mass.
Definition: bin_bhns_global.C:68
Lorene::Bin_bhns::shift_analytic
void shift_analytic(double reduce_shift_bh, double reduce_shift_ns)
Sets some analytical template for the initial shift vector.
Definition: bin_bhns_shift_ana.C:59
Lorene::Bin_bhns::p_mass_kom_bhns_vol
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
Lorene::Bin_bhns::set_separ
double & set_separ()
Sets the orbital separation [{\tt r_unit}].
Definition: bin_bhns.h:212
Lorene::Bin_bhns
Class for computing a black hole - neutron star binary system with comparable mass.
Definition: bin_bhns.h:63
Lorene::Bin_bhns::rotation_axis_x
void rotation_axis_x(double rot_exp_x)
Computes the position of the rotation axis X.
Definition: bin_bhns_rotaxis.C:58
Lorene::Bin_bhns::Bin_bhns
Bin_bhns(Map &mp_bh, Map &mp_ns, int nzet, const Eos &eos, bool irrot_ns, bool kerrschild, bool bc_lapse_nd, bool bc_lapse_fs, bool irrot_bh, double mass_bh)
Relative error on the Hamiltonian constraint.
Definition: bin_bhns.C:70
Lorene::Bin_bhns::get_separ
double get_separ() const
Returns the coordinate separation of the binary system [{\tt r_unit}].
Definition: bin_bhns.h:236
Lorene::Bin_bhns::get_x_rot
double get_x_rot() const
Returns the absolute coordinate X of the rotation axis [{\tt r_unit}].
Definition: bin_bhns.h:241
Lorene::Bin_bhns::get_ns
const Star_bhns & get_ns() const
Returns a reference to the neutron star.
Definition: bin_bhns.h:228
Lorene::Star_bhns
Class for stars in black hole-neutron star binaries.
Definition: star_bhns.h:59
Lorene::Bin_bhns::angu_mom_bhns
const Tbl & angu_mom_bhns() const
Total angular momentum.
Definition: bin_bhns_global.C:1613
Lorene::Bin_bhns::ref_triad
const Base_vect_cart ref_triad
Cartesian triad of the absolute reference frame.
Definition: bin_bhns.h:69
Lorene::Bin_bhns::p_virial_bhns_vol
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
Lorene::Bin_bhns::get_y_rot
double get_y_rot() const
Returns the absolute coordinate Y of the rotation axis [{\tt r_unit}].
Definition: bin_bhns.h:246
Lorene::Bin_bhns::p_xa_barycenter
double * p_xa_barycenter
Absolute coordinate X of the barycenter of the baryon density.
Definition: bin_bhns.h:131
Lorene::Bin_bhns::p_ya_barycenter
double * p_ya_barycenter
Absolute coordinate Y of the barycenter of the baryon density.
Definition: bin_bhns.h:134
Lorene::Bin_bhns::rotation_axis_y
void rotation_axis_y(double thres_rot, double rot_exp_y, double fact)
Computes the position of the rotation axis Y.
Definition: bin_bhns_rotaxis.C:101
Lorene::Bin_bhns::separ
double separ
Absolute orbital separation between two centers of BH and NS.
Definition: bin_bhns.h:83
Lorene::Bin_bhns::operator>>
ostream & operator>>(ostream &) const
Operator >> (function called by the operator <<)
Definition: bin_bhns.C:231
Lorene::Tbl
Basic array class.
Definition: tbl.h:161
Lorene::Bin_bhns::p_mass_kom_bhns_surf
double * p_mass_kom_bhns_surf
Total Komar mass of the system calculated by the surface integral at infinity.
Definition: bin_bhns.h:107
Lorene::Bin_bhns::omega_two_points
double omega_two_points() const
Orbital angular velocity derived from another method.
Definition: bin_bhns_omega_tp.C:67
Lorene::Bin_bhns::orbit_omega
void orbit_omega(double fact_omeg_min, double fact_omeg_max)
Estimates the relative error on the Hamiltonian constraint.
Definition: bin_bhns_orbit.C:68
Lorene::Bin_bhns::mass_kom_bhns_surf
double mass_kom_bhns_surf() const
Total Komar mass.
Definition: bin_bhns_global.C:537
Lorene::Bin_bhns::set_der_0x0
void set_der_0x0() const
Sets to 0x0 all the pointers on derived quantities.
Definition: bin_bhns.C:162
Lorene::Bin_bhns::p_mass_adm_bhns_surf
double * p_mass_adm_bhns_surf
Total ADM mass of the system calculated by the surface integral at infinity.
Definition: bin_bhns.h:97
Lorene::Bin_bhns::omega
double omega
Angular velocity with respect to an asymptotically inertial observer.
Definition: bin_bhns.h:80
Lorene::Bin_bhns::p_line_mom_bhns
Tbl * p_line_mom_bhns
Total linear momentum of the system.
Definition: bin_bhns.h:115
Lorene::Bin_bhns::set_omega
double & set_omega()
Sets the orbital angular velocity [{\tt f_unit}].
Definition: bin_bhns.h:209
Lorene::Bin_bhns::xa_barycenter
double xa_barycenter() const
Absolute coordinate X of the barycenter of the baryon density.
Definition: bin_bhns_global.C:2205
Lorene::Bin_bhns::set_x_rot
double & set_x_rot()
Sets the absolute coordinate X of the rotation axis [{\tt r_unit}].
Definition: bin_bhns.h:215
Lorene::Bin_bhns::star
Star_bhns star
Neutron star.
Definition: bin_bhns.h:75
Lorene::Bin_bhns::del_deriv
void del_deriv() const
Deletes all the derived quantities.
Definition: bin_bhns.C:142
Lorene::Bin_bhns::x_rot
double x_rot
Absolute X coordinate of the rotation axis.
Definition: bin_bhns.h:86
Lorene::Map
Base class for coordinate mappings.
Definition: map.h:670
Lorene::Bin_bhns::~Bin_bhns
virtual ~Bin_bhns()
Destructor.
Definition: bin_bhns.C:130
Lorene::Bin_bhns::get_bh
const Hole_bhns & get_bh() const
Returns a reference to the black hole.
Definition: bin_bhns.h:225
Lorene::Bin_bhns::ya_barycenter
double ya_barycenter() const
Absolute coordinate Y of the barycenter of the baryon density.
Definition: bin_bhns_global.C:2281
Lorene::Bin_bhns::set_y_rot
double & set_y_rot()
Sets the absolute coordinate Y of the rotation axis [{\tt r_unit}].
Definition: bin_bhns.h:218