Debian Codegraph @

C++/Include/bin_bhns_extr.h

raw symbols SCIP
1 /*
2 * Definition of Lorene class Bin_bhns_extr
3 *
4 */
5
6 /*
7 * Copyright (c) 2004-2005 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_EXTR_H_
27 #define __BIN_BHNS_EXTR_H_
28
29 /*
30 * $Id: bin_bhns_extr.h,v 1.3 2014/10/13 08:52:32 j_novak Exp $
31 * $Log: bin_bhns_extr.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 2005/02/28 23:02:51 k_taniguchi
36 * Addition of some codes for the conformally flat case
37 *
38 * Revision 1.1 2004/11/30 20:36:00 k_taniguchi
39 * *** empty log message ***
40 *
41 *
42 * $Header: /cvsroot/Lorene/C++/Include/bin_bhns_extr.h,v 1.3 2014/10/13 08:52:32 j_novak Exp $
43 *
44 */
45
46 // Lorene header
47 #include "et_bin_bhns_extr.h"
48 #include "etoile.h"
49
50 namespace Lorene {
51 /**
52 * Class for computing a Black hole - Neutron star binary system
53 * with an extreme mass ratio.
54 * \ingroup(star)
55 *
56 */
57 class Bin_bhns_extr {
58
59 // Data :
60 // -----
61 private:
62 /// Cartesian triad of the absolute reference frame
63 const Base_vect_cart ref_triad ;
64
65 /// Neutron star
66 Et_bin_bhns_extr star ;
67
68 /** Angular velocity with respect to an asymptotically inertial
69 * observer
70 */
71 double omega ;
72
73 /// Absolute orbital separation between two centers of BH and NS
74 double separ ;
75
76 /// Gravitational mass of BH
77 double mass_bh ;
78
79 // Derived data :
80 // ------------
81 private :
82 /** Absolute coordinate X of the barycenter of the baryon density
83 * in the Kerr-Schild background metric or in the conformally flat
84 * one
85 */
86 mutable double* p_xa_barycenter_extr ;
87
88 /** Absolute coordinate Y of the barycenter of the baryon density
89 * in the Kerr-Schild background metric
90 */
91 mutable double* p_ya_barycenter_extr ;
92
93 /** Baryon mass of the neutron star in the Kerr-Schild background
94 * metric or in the conformally flat one
95 */
96 mutable double* p_mass_b_extr ;
97
98 // Constructors - Destructor
99 // -------------------------
100 public:
101 /** Standard constructor
102 *
103 * @param mp Mapping on which the neutron star will be defined
104 * @param nzet Number of domains occupied by the neutron star
105 * @param eos Equation of state of the neutron star
106 * @param irrot should be {\tt true} if NS is irrotational,
107 * {\tt false} if NS is corotating
108 * @param relat should be {\tt true} for a relativistic configuration,
109 * {\tt false} for a Newtonian one
110 * @param kerrs should be {\tt true} for the Kerr-Schild background
111 * metric, {\tt false} for the conformally flat one
112 * @param multi should be {\tt true} for the multipole falloff
113 * boundary condition, {\tt true} for the \f$1/r\f$ one
114 *
115 */
116 Bin_bhns_extr(Map& mp, int nzet, const Eos& eos,
117 bool irrot, bool relat, bool kerrs, bool multi) ;
118
119 Bin_bhns_extr(const Bin_bhns_extr& ) ; ///< Copy constructor
120
121 /** Constructor from a file (see \c sauve(FILE*) )
122 *
123 * @param mp Mapping on which the neutron star will be defined
124 * @param eos Equation of state of the neutron star
125 *
126 */
127 Bin_bhns_extr(Map& mp, const Eos& eos, FILE* fich) ;
128
129 ~Bin_bhns_extr() ; ///< Destructor
130
131
132 // Memory management
133 // -----------------
134 private:
135 /// Deletes all the derived quantities
136 void del_deriv() const ;
137
138 /// Sets to \c 0x0 all the pointers on derived quantities
139 void set_der_0x0() const ;
140
141
142 // Mutators / assignment
143 // ---------------------
144 public:
145 /// Assignment to another Bin_bhns_extr
146 void operator=(const Bin_bhns_extr&) ;
147
148 /// Read/write of the neutron star
149 Et_bin_bhns_extr& set_ns()
150 { del_deriv() ;
151 return star ; } ;
152
153 /// Sets the orbital angular velocity [{\tt f\_unit}]
154 double& set_omega() { return omega ; } ;
155
156 /// Sets the orbital separation [{\tt r\_unit}]
157 double& set_separ() { return separ ; } ;
158
159 /// Sets the gravitational mass of BH [{\tt m\_unit}]
160 double& set_mass_bh() { return mass_bh ; } ;
161
162 // Accessors
163 // ---------
164 public:
165 /// Returns a reference to the neutron star
166 const Et_bin_bhns_extr& get_ns() const
167 { return star ; } ;
168
169 /// Returns the orbital angular velocity [{\tt f\_unit}]
170 double get_omega() const { return omega ; } ;
171
172 /** Returns the coordinate separation of the binary system
173 * [{\tt r\_unit}]
174 */
175 double get_separ() const { return separ ; } ;
176
177 /// Returns the gravitational mass of BH [{\tt m\_unit}]
178 double get_mass_bh() const { return mass_bh ; } ;
179
180 // Outputs
181 // -------
182 public:
183 void sauve(FILE* ) const ; ///< Save in a file
184
185 /// Display
186 friend ostream& operator<<(ostream& , const Bin_bhns_extr& ) ;
187
188 /// Display in polytropic units
189 void display_poly(ostream& ) const ;
190
191 private:
192 /// Operator >> (function called by the operator <<)
193 ostream& operator>>(ostream& ) const ;
194
195 // Computational routines
196 // ----------------------
197 public:
198 /** Absolute coordinate X of the barycenter of the baryon density
199 * in the Kerr-Schild background metric or in the conformally flat
200 * one
201 */
202 double xa_barycenter_extr() const ;
203
204 // Absolute coordinate Y of the barycenter of the baryon density
205 /// in the Kerr-Schild background metric
206 double ya_barycenter_extr() const ;
207
208 /** Baryon mass of the neutron star in the Kerr-Schild background
209 * metric or in the conformally flat
210 */
211 double mass_b_extr() const ;
212
213 /** Computes the orbital angular velocity {\tt omega}
214 * in the Kerr-Schild background metric
215 *
216 * @param fact_omeg_min [input] : determines the lower bound of the
217 * interval {\tt [omega\_min, omega\_max]} in which
218 * {\tt omega} is searched by
219 * {\tt omega\_min = fact\_omeg\_min * omega},
220 * where {\tt omega} is the previous value of the
221 * angular velocity
222 * (typical value : {\tt fact\_omeg\_min = 0.5})
223 *
224 * @param fact_omeg_max [input] : determines the higher bound of the
225 * interval {\tt [omega\_min, omega\_max]} in which
226 * {\tt omega} is searched by
227 * {\tt omega\_max = fact\_omeg\_max * omega},
228 * where {\tt omega} is the previous value of the
229 * angular velocity.
230 * (typical value : {\tt fact\_omeg\_max = 1.5})
231 *
232 */
233 void orbit_omega_ks(double fact_omeg_min, double fact_omeg_max) ;
234
235 /** Computes the orbital angular velocity {\tt omega}
236 * in the conformally flat background metric
237 *
238 * @param fact_omeg_min [input] : determines the lower bound of the
239 * interval {\tt [omega\_min, omega\_max]} in which
240 * {\tt omega} is searched by
241 * {\tt omega\_min = fact\_omeg\_min * omega},
242 * where {\tt omega} is the previous value of the
243 * angular velocity
244 * (typical value : {\tt fact\_omeg\_min = 0.5})
245 *
246 * @param fact_omeg_max [input] : determines the higher bound of the
247 * interval {\tt [omega\_min, omega\_max]} in which
248 * {\tt omega} is searched by
249 * {\tt omega\_max = fact\_omeg\_max * omega},
250 * where {\tt omega} is the previous value of the
251 * angular velocity.
252 * (typical value : {\tt fact\_omeg\_max = 1.5})
253 *
254 */
255 void orbit_omega_cf(double fact_omeg_min, double fact_omeg_max) ;
256
257 /** Sets the orbital angular velocity to some 2-PN analytical
258 * value (Keplerian value in the Newtonian case)
259 */
260 void analytical_omega() ;
261
262 /** Sets some analytical template for the shift vector
263 * (via the members {\tt w\_shift} and {\tt khi\_shift}
264 * of {\tt Etoile\_bin})
265 */
266 void analytical_shift() ;
267
268 };
269 ostream& operator<<(ostream& , const Bin_bhns_extr& ) ;
270
271 }
272 #endif