Debian Codegraph @

C++/Include/bhole.h

raw symbols SCIP
1 /*
2 * Definition of Lorene classes Bhole
3 * Bhole_binaire
4 *
5 */
6
7 /*
8 * Copyright (c) 2000-2001 Philippe Grandclement
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 as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
16 *
17 * LORENE is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with LORENE; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 *
26 */
27
28
29 #ifndef __BHOLE_H_
30 #define __BHOLE_H_
31
32 /*
33 * $Id: bhole.h,v 1.18 2014/10/13 08:52:32 j_novak Exp $
34 * $Log: bhole.h,v $
35 * Revision 1.18 2014/10/13 08:52:32 j_novak
36 * Lorene classes and functions now belong to the namespace Lorene.
37 *
38 * Revision 1.17 2007/05/15 12:44:18 p_grandclement
39 * Scalar version of reevaluate
40 *
41 * Revision 1.16 2007/04/24 20:15:30 f_limousin
42 * Implementation of Dirichlet and Neumann BC for the lapse
43 *
44 * Revision 1.15 2006/04/27 09:12:29 p_grandclement
45 * First try at irrotational black holes
46 *
47 * Revision 1.14 2005/08/29 15:10:12 p_grandclement
48 * Addition of things needed :
49 * 1) For BBH with different masses
50 * 2) Provisory files for the mixted binaries (Bh and NS) : THIS IS NOT
51 * WORKING YET !!!
52 *
53 * Revision 1.13 2004/12/02 09:33:04 p_grandclement
54 * *** empty log message ***
55 *
56 * Revision 1.12 2004/03/25 12:35:34 j_novak
57 * now using namespace Unites
58 *
59 * Revision 1.11 2004/03/25 09:14:06 j_novak
60 * *** empty log message ***
61 *
62 * Revision 1.10 2004/03/25 08:53:33 j_novak
63 * Error in the doc corrected.
64 *
65 * Revision 1.9 2004/03/24 17:14:04 j_novak
66 * Translation of comments to doxygen
67 *
68 * Revision 1.8 2003/11/25 07:12:58 k_taniguchi
69 * Change the argument of update_metric from the class Etoile_bin to Et_bin_nsbh.
70 *
71 * Revision 1.7 2003/11/13 13:43:53 p_grandclement
72 * Addition of things needed for Bhole::update_metric (const Etoile_bin&, double, double)
73 *
74 * Revision 1.6 2003/10/24 13:05:48 p_grandclement
75 * correction of the equations for Bin_ns_bh...
76 *
77 * Revision 1.5 2003/02/13 16:40:24 p_grandclement
78 * Addition of various things for the Bin_ns_bh project, non of them being
79 * completely tested
80 *
81 * Revision 1.4 2003/01/31 16:57:12 p_grandclement
82 * addition of the member Cmp decouple used to compute the K_ij auto, once
83 * the K_ij total is known
84 *
85 * Revision 1.3 2002/12/18 10:28:49 e_gourgoulhon
86 *
87 * Added the set_mp function.
88 *
89 * Revision 1.2 2002/09/13 09:17:31 j_novak
90 * Modif. commentaires
91 *
92 * Revision 1.1.1.1 2001/11/20 15:19:27 e_gourgoulhon
93 * LORENE
94 *
95 * Revision 2.45 2001/06/28 15:08:16 eric
96 * Ajout de la fonction area().
97 *
98 * Revision 2.44 2001/05/16 11:32:45 phil
99 * ajout de init_bhole_seul
100 *
101 * Revision 2.43 2001/05/07 12:35:28 phil
102 * mmodifi commentaires
103 *
104 * Revision 2.42 2001/05/07 11:43:43 phil
105 * *** empty log message ***
106 *
107 * Revision 2.41 2001/05/07 11:40:50 phil
108 * mise a jour des commentaires
109 *
110 * Revision 2.40 2001/05/07 09:30:37 phil
111 * *** empty log message ***
112 *
113 * Revision 2.39 2001/05/07 09:28:37 phil
114 * *** empty log message ***
115 *
116 * Revision 2.38 2001/05/07 09:11:31 phil
117 * *** empty log message ***
118 *
119 * Revision 2.37 2001/04/27 09:25:11 phil
120 * fait_decouple est devenu public
121 *
122 * Revision 2.36 2001/04/26 12:04:11 phil
123 * *** empty log message ***
124 *
125 * Revision 2.35 2001/04/05 13:42:40 phil
126 * *** empty log message ***
127 *
128 * Revision 2.34 2001/04/05 13:34:29 phil
129 * ajout resolution en utilisant phi
130 *
131 * Revision 2.33 2001/03/22 10:49:34 phil
132 * *** empty log message ***
133 *
134 * Revision 2.32 2001/03/22 10:41:25 phil
135 * pleins de modif
136 *
137 * Revision 2.31 2001/02/28 13:22:31 phil
138 * modif vire kk_auto
139 *
140 * Revision 2.30 2001/02/12 15:37:42 phil
141 * ajout calcul de J a linfini
142 *
143 * Revision 2.29 2001/01/29 14:29:56 phil
144 * ajout type rotation
145 *
146 * Revision 2.28 2001/01/24 10:57:08 phil
147 * ajout de set_rayonm
148 *
149 * Revision 2.27 2001/01/22 09:29:08 phil
150 * vire les procedures qui servent pas
151 *
152 * Revision 2.26 2001/01/10 09:31:05 phil
153 * modification de fait_kk_auto (membre de binaire maintenant)
154 *
155 * Revision 2.25 2001/01/09 13:38:15 phil
156 * ajout memebre kk_auto
157 *
158 * Revision 2.24 2000/12/21 10:47:07 phil
159 * retour eventuel a 2.21
160 *
161 * Revision 2.21 2000/12/20 09:07:56 phil
162 * ajout set_statiques
163 *
164 * Revision 2.20 2000/12/18 16:40:39 phil
165 * *** empty log message ***
166 *
167 * Revision 2.19 2000/12/18 16:38:04 phil
168 * ajout convergence vers une masse donnee
169 *
170 * Revision 2.18 2000/12/15 16:41:28 phil
171 * ajout calcul de la separation
172 *
173 * Revision 2.17 2000/12/14 10:44:28 phil
174 * ATTENTION : PASSAGE DE PHI A PSI
175 *
176 * Revision 2.16 2000/12/13 15:35:18 phil
177 * ajout calcul bare_masse
178 *
179 * Revision 2.15 2000/12/04 14:29:37 phil
180 * ajout de grad_n_tot
181 *
182 * Revision 2.14 2000/12/01 16:12:52 phil
183 * *** empty log message ***
184 *
185 * Revision 2.13 2000/12/01 14:16:20 phil
186 * *** empty log message ***
187 *
188 * Revision 2.12 2000/11/24 15:14:44 phil
189 * ajout de find_horizon
190 *
191 * Revision 2.11 2000/11/24 09:57:18 phil
192 * ajout calcul masse et moment pour systeme
193 *
194 * Revision 2.10 2000/11/17 10:03:13 phil
195 * ajout de coal
196 *
197 * Revision 2.9 2000/11/15 18:26:29 phil
198 * simplifaction resolution du shift : on bosse a omega bloque
199 *
200 * Revision 2.8 2000/11/15 12:59:50 phil
201 * changement solve_shift_omega
202 *
203 * Revision 2.7 2000/11/15 09:41:03 phil
204 * *** empty log message ***
205 *
206 * Revision 2.6 2000/11/15 09:39:26 phil
207 * ajout viriel
208 *
209 * Revision 2.5 2000/11/03 12:56:41 phil
210 * ajout de const
211 *
212 * Revision 2.4 2000/10/26 08:20:45 phil
213 * ajout verifie_shift
214 *
215 * Revision 2.3 2000/10/23 09:15:12 phil
216 * modif commentaires
217 *
218 * Revision 2.2 2000/10/20 10:51:13 phil
219 * Modif commentaires (minimale !)
220 *
221 * Revision 2.1 2000/10/20 09:27:28 phil
222 * *** empty log message ***
223 *
224 * Revision 2.0 2000/10/20 09:22:04 phil
225 * *** empty log message ***
226 *
227 *
228 * $Header: /cvsroot/Lorene/C++/Include/bhole.h,v 1.18 2014/10/13 08:52:32 j_novak Exp $
229 *
230 */
231
232 #include "tenseur.h"
233
234 namespace Lorene {
235
236 class Tenseur ;
237 class Tenseur_sym ;
238 class Map_af ;
239 class Bhole_binaire ;
240 class Et_bin_nsbh ;
241
242 #define COROT 0
243 #define IRROT 1
244
245 /**
246 * Black hole. \ingroup (star)
247 *
248 * This class represents a black hole in a comformaly flat approximation. It is
249 * defined with an affine mapping with a nucleus, not used in calculations, and
250 * must have, at least two shells. The horizon (i.e. the surface where \e N=0 )
251 * is located at the inner boudary of the innermost shell (i.e. the domain
252 * number 1).
253 *
254 * It can described either :
255 *
256 * \li \b an \b isolated \b black \b hole . The fields of the companion and the total
257 * fields being zero.
258 * \li \b a \b black \b hole \b in \b a \b binary \b system . The boost having no direct
259 * meaning in this case.
260 *
261 * The tensor \f$K^{ij}\f$ is the the extrinsic curavature tensor with the conformal
262 * factor extracted.
263 *
264 * The tensor \f$A^{ij}\f$ denotes \f$\nabla^i N^j + \nabla^j N^i-\frac{2}{3}
265 * \nabla_k N^k \delta^{ij}\f$, that is \f$2NK^{ij}\f$.
266 *
267 */
268 class Bhole {
269
270 // Data :
271 protected:
272
273 Map_af& mp ; ///< Affine mapping.
274 double rayon ; ///< Radius of the horizon in LORENE's units.
275 double omega ; ///< Angular velocity in LORENE's units.
276 double omega_local ; ///< local angular velocity
277 int rot_state ; ///< State of rotation
278 double lapse_hori ; /// Lapse on the horizon
279
280 /**
281 * Cartesian components of the boost in the reference frame.
282 */
283 double* boost ;
284 double regul ; ///< Intensity of the correction on the shift vector.
285
286 Tenseur n_auto ; ///< Part of \e N generated by the hole.
287 Tenseur n_comp ; ///<Part of \e N generated by the companion hole.
288 Tenseur n_tot ; ///< Total \e N .
289
290 Tenseur psi_auto ; ///< Part of \f$\Psi\f$ generated by the hole.
291 Tenseur psi_comp ; ///< Part of \f$\Psi\f$ generated by the companion hole.
292 Tenseur psi_tot ; ///< Total \f$\Psi\f$.
293
294 Tenseur grad_n_tot ; ///< Total gradient of \e N .
295 Tenseur grad_psi_tot ; ///< Total gradient of \f$\Psi\f$.
296
297 Tenseur shift_auto ; ///< Part of \f$\beta^i\f$ generated by the hole.
298
299 Tenseur_sym taij_auto ; ///< Part of \f$A^{ij}\f$ generated by the hole.
300 Tenseur_sym taij_comp ;///< Part of \f$A^{ij}\f$ generated by the companion hole.
301 /**
302 * Total \f$A^{ij}\f$, which must be zero on the horizon of the
303 * regularisation on the shift has been done.
304 */
305 Tenseur_sym taij_tot ;
306
307 Tenseur_sym tkij_auto ; ///< Auto \f$K^{ij}\f$.
308 Tenseur_sym tkij_tot ; ///< Total \f$K^{ij}\f$.
309
310 /**
311 * Function used to construct the part of \f$K^{ij}\f$ generated by the hole
312 * from the total \f$K^{ij}\f$. Only used for a binary system.
313 *
314 * Mainly this \c Cmp is 1 around the hole and 0 around the companion
315 * and the sum of \c decouple for the hole and his companion is 1
316 * everywhere.
317 */
318 Cmp decouple ;
319
320 //Constructors :
321 public:
322 /**
323 * Standard constructor. All the fields are set to zero, except
324 * \c rayon , which value is deducted from the \c mapping
325 */
326 Bhole (Map_af& mapping) ;
327 Bhole (const Bhole&) ; ///< Constructor by copy
328 Bhole (Map_af&, FILE*, bool old=false) ; ///< Constructor from a \c Map_af and a file
329 ~Bhole() ; ///< Destructor
330
331 public:
332 //sauvegarde
333 void sauve (FILE* fich) const ; ///< Write on a file
334
335 public:
336 void operator= (const Bhole&) ; ///< Affectation
337
338 /// Returns the mapping (readonly).
339 const Map_af& get_mp() const {return mp;} ;
340
341 /// Read/write of the mapping
342 Map_af& set_mp() {return mp; } ;
343
344 /**
345 * Returns the radius of the horizon.
346 */
347 double get_rayon() const {return rayon;} ;
348
349 /**
350 * Sets the radius of the horizon to \c ray .
351 */
352 void set_rayon(double ray) {rayon = ray ;} ;
353
354 /**
355 * Returns the angular velocity.
356 */
357 double get_omega() const {return omega;} ;
358 /**
359 * Sets the angular velocity to \c ome .
360 */
361 void set_omega(double ome) {omega = ome ;} ;
362 /**
363 * Returns the local angular velocity.
364 */
365 double get_omega_local() const {return omega_local;} ;
366 /**
367 * Sets the local angular velocity to \c ome .
368 */
369 void set_omega_local(double ome) {omega_local = ome ;} ;
370 /**
371 * Returns the state of rotation.
372 */
373 double get_rot_state() const {return rot_state;} ;
374 /**
375 * Returns the state of rotation.
376 */
377 void set_rot_state(int rotation) {rot_state = rotation;} ;
378 /**
379 * Returns the cartesian components of the boost with respect to the
380 * reference frame.
381 */
382 double* get_boost () const {return boost;} ;
383 void set_boost (double vx, double vy, double vz) {
384 boost[0] = vx ; boost[1] = vy ; boost[2] = vz ;
385 }
386
387 /**
388 * Returns the intensity of the regularisation on \f$\vec{N}\f$.
389 */
390 double get_regul() const {return regul;} ;
391
392 /**
393 * Returns the part of \e N generated by the hole.
394 */
395 const Tenseur& get_n_auto() const {return n_auto ;} ;
396 /**
397 * Returns the part of \e N generated by the hole as a cmp
398 */
399 Cmp return_n_auto() const {return n_auto() ;} ;
400 /**
401 * Returns the part of \e N generated by the companion hole.
402 */
403 const Tenseur& get_n_comp() const {return n_comp ;} ;
404 /**
405 * Returns the total \e N .
406 */
407 const Tenseur& get_n_tot() const {return n_tot ;} ;
408
409 /**
410 * Returns the part of \f$\Psi\f$ generated by the hole.
411 */
412 const Tenseur& get_psi_auto() const {return psi_auto ;} ;
413 /**
414 * Returns the part of \f$\Psi\f$ generated by the hole as a cmp
415 */
416 Cmp return_psi_auto() const {return psi_auto() ;} ;
417 /**
418 * Returns the part of \f$\Psi\f$ generated by the companion hole.
419 */
420 const Tenseur& get_psi_comp() const {return psi_comp ;} ;
421 /**
422 * Returns the total \f$\Psi\f$.
423 */
424 const Tenseur& get_psi_tot() const {return psi_tot ;} ;
425
426 /**
427 * Returns the gradient of \f$\Psi\f$.
428 */
429 const Tenseur& get_grad_psi_tot() const {return grad_psi_tot ;} ;
430
431 /**
432 * Returns the gradient of \e N .
433 */
434 const Tenseur& get_grad_n_tot() const {return grad_n_tot ;} ;
435
436
437 /**
438 * Returns the part of \f$\beta^i\f$ generated by the hole.
439 */
440 const Tenseur& get_shift_auto() const {return shift_auto ;} ;
441
442 Cmp return_shift_auto(int i) const {return shift_auto(i) ;} ;
443
444 /**
445 * Returns the part of \f$A^{ij}\f$ generated by the hole.
446 */
447 const Tenseur& get_taij_auto() const {return taij_auto ;} ;
448 /**
449 * Returns the part of \f$A^{ij}\f$ generated by the companion hole.
450 */
451 const Tenseur& get_taij_comp() const {return taij_comp ;} ;
452 /**
453 * Returns the total \f$A^{ij}\f$.
454 */
455 const Tenseur& get_taij_tot() const {return taij_tot ;}
456
457 /**
458 * Returns the total \f$K^{ij}\f$.
459 */
460 const Tenseur& get_tkij_tot() const {return tkij_tot ;}
461 /**
462 * Returns the part of \f$K^{ij}\f$ generated by the hole.
463 */
464 const Tenseur& get_tkij_auto() const {return tkij_auto ;}
465 /**
466 * Returns the function used to construct \c tkij_auto from \c tkij_tot .
467 */
468 const Cmp get_decouple() const {return decouple ;}
469
470 Cmp& set_n_auto() {return n_auto.set() ;}
471 Cmp& set_psi_auto() {return psi_auto.set() ;}
472
473 void set_lapse_hori(double xx) {lapse_hori = xx;}
474 public:
475
476 /**
477 * Imports the part of \e N due to the companion hole \c comp . The
478 * total \e N is then calculated.
479 *
480 * It also imports the gradient of \e N and construct the total \f$\nabla N\f$.
481 */
482 void fait_n_comp (const Bhole& comp) ;
483
484 /**
485 * Imports the part of \f$\Psi\f$ due to the companion hole \c comp . The
486 * total \f$\Psi\f$ is then calculated.
487 *
488 * It also imports the gradient of \f$\Psi\f$ and construct the total \f$\nabla \Psi\f$.
489 */
490 void fait_psi_comp (const Bhole& comp) ;
491 /**
492 * Imports the part of \e N due to the companion ns \c comp . The
493 * total \e N is then calculated.
494 *
495 * It also imports the gradient of \e N and construct the total \f$\nabla N\f$.
496 */
497 void fait_n_comp (const Et_bin_nsbh& comp) ;
498
499 /**
500 * Imports the part of \f$\Psi\f$ due to the companion ns \c comp . The
501 * total \f$\Psi\f$ is then calculated.
502 *
503 * It also imports the gradient of \f$\Psi\f$ and construct the total \f$\nabla \Psi\f$.
504 */
505 void fait_psi_comp (const Et_bin_nsbh& comp) ;
506
507 /**
508 * Calculates the part of \f$A^{ij}\f$ generated by \c shift_auto .
509 */
510 void fait_taij_auto () ;
511
512
513 /**
514 * Corrects \c shift_auto in such a way that the total \f$A^{ij}\f$ is
515 * equal to zero in the horizon, which should ensure the regularity
516 * of \f$K^{ij}\f$, using the stored values of the boost and the angular
517 * velocity.
518 *
519 * \b WARNING : this should only be used for a black hole in
520 * a binary system \c Bhole_binaire or \c Bin_ns_bh .
521 *
522 * @param comp [input] : the part of \f$\beta^i\f$ generated by the companion
523 * hole.
524 */
525 void regularise_shift (const Tenseur& comp) ;
526
527 /**
528 * Computes the viriel error, that is the difference between the ADM and the Komar
529 * masses, calculated by the asymptotic behaviours of respectively \f$\Psi\f$ and \e N .
530 *
531 * \b WARNING this should only be used for an isolated black hole.
532 */
533 double viriel_seul () const ;
534
535 /**
536 * Sets the values of the fields to :
537 * \li \c n_auto \f$= \frac{1}{2}-2\frac{a}{r}\f$
538 * \li \c n_comp \f$= \frac{1}{2}\f$
539 * \li \c psi_auto \f$= \frac{1}{2}+\frac{a}{r}\f$
540 * \li \c psi_comp \f$= \frac{1}{2}\f$
541 *
542 * \e a being the radius of the hole, the other fields being set to zero.
543 */
544 void init_bhole () ;
545
546 /**
547 * Set the inital values to those of Kerr
548 * @param masse [input] : ADM mass in LORENE's units.
549 * @param moment [input] : \f$\frac{J}{M}=a\f$, in LORENE's units.
550 *
551 * The radius \f$r_0\f$ of \c *this is supposed to be equal to
552 * \f$\frac{1}{2}\sqrt{M^2-a^2}\f$.
553 *
554 * The fields have then the following values~:
555 *
556 * \li \f$\Omega = \frac{a}{2M\sqrt{M^2-a^2}}\f$
557 *
558 * \li \f$\Psi^4 =
559 * 1+\frac{2M}{r}+\frac{3M^2+a^2\cos^2\theta}{2r^2}+\frac{2Mr_0^2}{r^3}+
560 * \frac{r_0^4}{r^4}\f$.
561 * \li \f$N = \left(1-\frac{2MR}{\Sigma}+\frac{4a^2M^2R^2\sin^2\theta}
562 * {\Sigma^2\left(R^2+a^2\right)+2a^2\Sigma R\sin^2\theta}\right)^{\frac{1}{2}}\f$
563 * \li \f$N^\phi = \frac{2aMR}{\Sigma\left(R^2+a^2\right)+2a^2MR\sin^2\theta}\f$
564 * \end {itemize}
565 * where~:
566 *
567 * \li \f$R = r+\frac{M^2-a^2}{4r}+M\f$.
568 * \li \f$\Sigma = R^2+a^2-2MR\f$
569 * \li \f$r_0\f$ is equal to \c rayon .
570 *
571 */
572 void init_kerr (double masse, double moment) ;
573
574 /**
575 * Solves the equation for \e N ~:
576 * \f[
577 *\Delta N = -\frac{2}{\Psi}\nabla_i \Psi \nabla^i N
578 * + N \Psi^4 K_{ij} K^{ij}
579 * \f]
580 * with the condition that \c N =0 on the horizon.
581 * @param relax [input] : the relaxation parameter.
582 *
583 * \b WARNING this should only be used for an isolated black hole.
584 */
585 void solve_lapse_seul (double relax) ;
586
587 /**
588 * Solves the equation for \f$\Psi\f$~:
589 * \f[
590 * \Delta \Psi = - \frac{\Psi^5} {8} K_{ij}K^{ij}
591 * \f]
592 * with the condition that \f$\partial_r \Psi =-\frac{1}{2 {\tt rayon}}
593 * f\left(\theta, \phi\right)\f$ on the horizon, where \c f is
594 * the value of \f$\Psi\f$ on the horizon at the preceeding step.
595 * @param relax [input] : the relaxation parameter.
596 *
597 * \b WARNING this should only be used for an isolated black hole.
598 */
599
600 void solve_psi_seul (double relax) ;
601
602 /**
603 * Solves the equation for \f$\vec{\beta}\f$~:
604 * \f[
605 *\Delta \beta^i +\frac{1}{3} \nabla^i \left(\nabla_j \beta^j\right)
606 * = -6A^{ij}\frac{\nabla_j \Psi}{\Psi} + 2 K^{ij}\nabla_j N
607 * \f]
608 * with \f$\vec{\beta} = -\Omega \vec{m} - \vec{V}\f$ on the horizon,
609 * \f$\vec{V}\f$ being the boost and \f$\vec{m} = \frac{\partial}{\partial \phi}\f$.
610 * The solution is solved using Oohara-scheme and an iteration.
611 * @param precis [input] : parameter for the Oohara-solver which is an iterative
612 scheme.
613 * @param relax [input] : the relaxation parameter.
614 *
615 * \b WARNING this should only be used for an isolated black hole.
616 */
617 void solve_shift_seul (double precis, double relax) ;
618
619 /**
620 * Corrects the shift in the innermost shell, so that it remains \f$
621 * {\mathcal{C}}^2\f$ and that \f$A^{ij}\f$ equals zero on the horizon.
622 *
623 * \c regul is then, the relative difference between the shift before
624 * and after the regularisation.
625 *
626 * \b WARNING this should only be used for an isolated black hole.
627 */
628 void regularise_seul () ;
629 /**
630 * Solves the equation for \e N ~:
631 * \f[
632 *\Delta N = -\frac{2}{\Psi}\nabla_i \Psi \nabla^i N
633 * + N \Psi^4 K_{ij} K^{ij}
634 * \f]
635 * with the condition that \c N =0 on the horizon.
636 * @param relax [input] : the relaxation parameter.
637 *
638 * \b WARNING this should only be used for BH in a \c Bin_ns_bh .
639 */
640
641 void solve_lapse_with_ns (double relax, int bound_nn,
642 double lim_nn) ;
643
644 /**
645 * Solves the equation for \f$\Psi\f$~:
646 * \f[
647 (\Delta \Psi = - \frac{\Psi^5} {8} K_{ij}K^{ij}
648 * \f]
649 * with the condition that \f$\partial_r \Psi=-\frac{1}{2 {\tt rayon}}
650 * f\left(\theta, \phi\right)\f$ on the horizon, where \c f is the value of \f$\Psi\f$ on
651 * the horizon at the preceeding step.
652 * @param relax [input] : the relaxation parameter.
653 *
654 * \b WARNING this should only be used for BH in a \c Bin_ns_bh .
655 */
656
657 void solve_psi_with_ns (double relax) ;
658
659 /**
660 * Solves the equation for \f$\vec{\beta}\f$~:
661 * \f[
662 *\Delta \beta^i +\frac{1}{3} \nabla^i \left(\nabla_j \beta^j\right)
663 * = -6A^{ij}\frac{\nabla_j \Psi}{\Psi} + 2 K^{ij}\nabla_j N
664 * \f]
665 * with \f$\vec{\beta} = -\Omega \vec{m} - \vec{V}\f$ on the horizon,
666 * \f$\vec{V}\f$ being the boost and \f$\vec{m} = \frac{\partial}{\partial \phi}\f$.
667 * The solution is solved using Oohara-scheme and an iteration.
668 * @param ns [input] : the companion.
669 * @param precis [input] : parameter for the Oohara-solver which is an iterative
670 scheme.
671 * @param relax [input] : the relaxation parameter.
672 *
673 * \b WARNING this should only be used for BH in a \c Bin_ns_bh .
674 */
675 void solve_shift_with_ns (const Et_bin_nsbh& ns,
676 double precis, double relax,
677 int bound_nn, double lim_nn) ;
678
679 void equilibrium (const Et_bin_nsbh& ns, double precis, double relax,
680 int bound_nn, double lim_nn) ;
681 void update_metric (const Et_bin_nsbh& ns) ;
682
683
684 /**
685 * Calculates the total \f$K^{ij}\f$. The regularisation of the shift must be done
686 * before to ensure regularity.
687 */
688 void fait_tkij() ;
689
690 /// Computes the area of the throat.
691 double area() const ;
692
693 /**
694 * Calculates the ADM mass of the black hole using :
695 * \f$M = -\frac{1}{2 \pi} \oint_{\infty} \nabla^i \Psi {\mathrm d} S_i\f$.
696 *
697 * \b WARNING this should only be used for an isolated black hole.
698 */
699 double masse_adm_seul () const ;
700
701 /**
702 * Calculates the Komar mass of the black hole using :
703 * \f$M = \frac{1}{4 \pi} \oint_{\infty} \nabla^i N {\mathrm d} S_i\f$.
704 *
705 * \b WARNING this should only be used for an isolated black hole.
706 */
707 double masse_komar_seul() const ;
708
709 /**
710 * Calculates the angular momentum of the black hole using the formula at infinity :
711 * \f$ J = -\frac{1}{8 \pi} \oint_{\infty} K_j^i m^j {\mathrm d}S_i\f$
712 * where \f$\vec{m} = \frac{\partial}{\partial \phi}\f$.
713 *
714 *\b WARNING It supposes that the boost is zero and should only be
715 * used for an isolated black hole..
716 */
717 double moment_seul_inf() const ;
718
719 /**
720 * Calculates the angular momentum of the black hole using the formula on the horizon :
721 * \f$ J = -\frac{1}{8 \pi} \oint_{H} \Psi^6 K_j^i m^j {\mathrm d}S_i\f$
722 * where \f$\vec{m} = \frac{\partial}{\partial \phi}\f$ and \e H denotes the horizon.
723 *
724 *\b WARNING It supposes that the boost is zero and should only be
725 * used for an isolated black hole..
726 */
727 double moment_seul_hor() const ;
728
729 /*
730 * local angular momentum
731 */
732 double local_momentum() const ;
733
734 /**
735 * Initiates the black hole for a resolution with \f$\Phi = \log \Psi\f$.
736 */
737 void init_bhole_phi () ;
738
739 /**
740 * Initiates for a single the black hole.
741 *
742 * \b WARNING It supposes that the boost is zero and should only be
743 * used for an isolated black hole..
744 */
745 void init_bhole_seul () ;
746
747 friend class Bhole_binaire ; ///< Binary black hole system.
748 friend class Bin_ns_bh ; ///< Binary NS-BH
749 } ;
750
751 /**
752 * Binary black holes system. \ingroup (star)
753 *
754 * This class is intended for dealing with binary black holes configurations
755 * in the conformaly flat approximation.
756 */
757 class Bhole_binaire {
758
759 // data :
760 private:
761 // les deux trous noirs.
762 Bhole hole1 ; ///< Black hole one
763 Bhole hole2 ; ///< Black hole two
764
765 // Tableau sur les deux trous.
766 Bhole* holes[2] ; ///< Array on the black holes
767
768 double pos_axe ; /// Position of the axis of rotation
769 double omega ; ///< Angular velocity
770
771 public:
772 // constructeurs & destructeur
773 Bhole_binaire(Map_af& mp1, Map_af& mp2) ; ///< Standard constructor
774 Bhole_binaire(const Bhole_binaire& ) ; ///< Copy
775 ~Bhole_binaire() ; ///< Destructor
776
777 public:
778 // trucs pour modifier
779 void operator=(const Bhole_binaire&) ; ///< Affectation operator
780
781 /**
782 * Read/write of a component of the system. \c i must be equal to
783 * 1 or 2.
784 */
785 Bhole& set(int i)
786 { assert( (i==1) || (i==2) );
787 return *holes[i-1] ;} ;
788 /**
789 * Sets the orbital velocity to \c ome
790 */
791 void set_omega(double ome) {omega = ome ;
792 hole1.set_omega (ome) ;
793 hole2.set_omega (ome) ;} ;
794
795 void set_pos_axe (double) ;
796
797 public:
798 // trucs pour lire :
799 /**
800 * Read only of a component of the system. \c i must be equal to
801 * 1 or 2.
802 */
803 const Bhole& operator()(int i) const
804 { assert( (i==1) || (i==2) );
805 return *holes[i-1] ;} ;
806
807 /// Returns the angular velocity
808 double get_omega() const {return omega; } ;
809
810 /**
811 * Initialisation of the system. Each hole is set close to a Schwarzschild one
812 * and the parts of the fields generated by
813 * the companion are calculated.
814 *
815 * The angular velocity is set to zero.
816 */
817 void init_bhole_binaire() ;
818
819 /**
820 * Computes the viriel error, that is the difference between the ADM and the Komar
821 * masses, calculated by the asymptotic behaviours of respectively \f$\Psi\f$ and \e N .
822 */
823 double viriel() const ;
824 /**
825 * Solves the equation for the lapse~:
826 * \f[
827 * \Delta N_a = -\frac{2}{\Psi}\nabla_i \Psi_a \nabla^i N + N \Psi^4 K_{ij}K_a^{ij}
828 * \f]
829 * The fields are the total values excpet those with subscript \f$_a\f$, which are
830 * the fields generated by each holes (\e a = 1, 2). The boundary conditions are
831 * such that \e N =0 on both horizons.
832 * The companion contributions are then obtained.
833 * @param precis [input] : precision, for the boudary conditions are
834 * obtained by iteration.
835 * @param relax [input] : relaxation parameter.
836 */
837 void solve_lapse (double precis, double relax) ;
838
839 /**
840 * Solves the equation for the conformal factor~:
841 * \f[
842 *\Delta \Psi_a = -\frac {\Psi^5}{8} K_{ij}K_a^{ij}
843 * \f]
844 * The fields are the total values excpet those with subscript \f$_a\f$, which are
845 * the fields generated by each holes (\e a = 1, 2). The boundary conditions are such that
846 * \f$\partial_r \Psi = -\frac{1}{2 r_0} f\left(\theta, \phi\right)\f$ on both horizons, \f$r_0\f$ being
847 * the radii of those horizons and \e f the value of \f$\Psi\f$ on the
848 * horizons at the preceeding step. The companion contributions are then
849 * obtained.
850 * @param precis [input] : precision, for the boudary conditions are being
851 * obtained by iteration.
852 * @param relax [input] : relaxation parameter.
853 */
854 void solve_psi (double precis, double relax) ;
855
856 /**
857 * Solves the equation for the shift, using the Oohara-Nakarmure scheme~:
858 * \f[
859 *\Delta \beta_a^i +\frac{1}{3} \nabla^i \left(\nabla_j \beta_a^j\right) =
860 * -6A^{ij}\frac{\nabla_i \Psi_a}{\Psi} + 2K^{ij}\nabla_j N_a
861 * \f]
862 * using the current \f$\Omega\f$ for the boudary conditions~:
863 * \f$\vec{N} = -\Omega \vec{m}\f$ on both horizons.
864 * The fields are the total values excpet those with subscript \f$_a\f$, which are
865 * the fields generated by each holes (\c a = 1, 2). The companion contributions are then
866 * obtained.
867 * @param precis [input] : precision for the solver, the boundary
868 * conditions and the inversion of the operator being
869 * obtained by iteration.
870 * @param relax [input] : relaxation parameter.
871 */
872 void solve_shift (double precis, double relax) ;
873
874 /**
875 * Calculation af the extrinsic curvature tensor.
876 *
877 * The regularisation of the shifts must have been done. All the
878 * contributions of \f$A^{ij}\f$ are then calculated and the total tensor
879 * must be zero on both horizons. The computation is done to avoid every singularity
880 * close to the horizons (division by \e N =0) for it is done in the coefficient space
881 * in the two regions surrounding the holes.
882 */
883 void fait_tkij () ;
884
885 /**
886 * Calculates {tt decouple} which is used to obtain \c tkij_auto by the formula :
887 * \c tkij_auto = \c decouple * \c tkij_tot .
888 * (see the membre {tt Cmp decouple for more precisions about its value).
889 *
890 */
891 void fait_decouple () ;
892
893 public:
894 /**
895 * Initialize the systeme to Misner Lindquist solution, that is solving for \e N and
896 * \f$Psi\f$ in the case \f$\Omega = 0\f$.
897 * @param precis [input] : precision for the convergence (on \e N ).
898 * @param relax [input] : relaxation parameter.
899 */
900
901 void set_statiques (double precis, double relax) ;
902
903 /**
904 * Solves the equation for a particular angular velocity, the systeme being
905 * initialized to Misner-Lindquist solution.
906 * @param precis [input] : precision for the convergence (on \f$\beta\f$).
907 * @param relax [input] : relaxation parameter.
908 * @param nbre_ome [input] : number of intermediates velocities to go from 0 to
909 * \c omega , typically 10.
910 * @param sortie [input] : flag for the output on files (0 no output files).
911 * @returns : the virial error.
912 */
913 void coal (double precis, double relax, int nbre_ome, double search_ome,
914 double m1, double m2, const int sortie = 0) ;
915
916
917 /**
918 * Calculates the ADM mass of the system using :
919 * \f$M = -\frac{1}{2 \pi} \oint_{\infty} \nabla^i \Psi {\mathrm d} S_i\f$.
920 */
921 double adm_systeme() const ;
922
923 /**
924 * Calculates the Komar mass of the system using :
925 * \f$M = \frac{1}{4 \pi} \oint_{\infty} \nabla^i N {\mathrm d} S_i\f$.
926 */
927 double komar_systeme() const ;
928
929 /**
930 * Calculates the angular momentum of the black hole using the formula at infinity :
931 * \f$ J = -\frac{1}{8 \pi} \oint_{\infty} K_j^i m^j {\mathrm d}S_i\f$
932 * where \f$\vec{m} = \frac{\partial}{\partial \phi}\f$.
933 */
934 double moment_systeme_inf() ;
935
936 /**
937 * Calculates the angular momentum of the black hole using the formula on the horizon :
938 * \f$ J = -\sum_{a= 1, 2} \frac{1}{8 \pi} \oint_{H_a} \Psi^6 K_j^i m^j {\mathrm d}S_i\f$
939 * where \f$\vec{m} = \frac{\partial}{\partial \phi}\f$ and \f$H_a\f$ denotes the horizon
940 * of the hole \e a .
941 *
942 */
943 double moment_systeme_hor() const ;
944
945 /**
946 * Calculation of the proper distance between the two spheres of inversion,
947 * along the x axis.
948 * @param nr [input] : number of points used for the calculation.
949 */
950 double distance_propre(const int nr = 65) const ;
951
952 Tbl linear_momentum_systeme_inf() const ;
953
954 /**
955 * Solve the equation for the logarithm of \f$\Psi\f$.
956 */
957 void solve_phi (double precision, double relax) ;
958 /**
959 * Initiates the system for a resolution using the logarithm of \f$\Psi\f$.
960 */
961 void init_phi() ;
962 } ;
963
964 }
965 #endif