Debian Codegraph @

C++/Include/isol_hor.h

raw symbols SCIP
1 /*
2 * Definition of Lorene class Isol_Hor
3 *
4 */
5
6 /*
7 * Copyright (c) 2004-2005 Jose Luis Jaramillo
8 * Francois Limousin
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 __Isol_hor_H_
28 #define __Isol_hor_H_
29
30 /*
31 * $Id: isol_hor.h,v 1.54 2014/10/13 08:52:35 j_novak Exp $
32 * $Log: isol_hor.h,v $
33 * Revision 1.54 2014/10/13 08:52:35 j_novak
34 * Lorene classes and functions now belong to the namespace Lorene.
35 *
36 * Revision 1.53 2007/08/22 16:10:37 f_limousin
37 * Correction of many errors in binhor_hh.C
38 *
39 * Revision 1.52 2007/04/13 15:29:44 f_limousin
40 * Lots of improvements, generalisation to an arbitrary state of
41 * rotation, implementation of the spatial metric given by Samaya.
42 *
43 * Revision 1.51 2006/08/01 14:36:25 f_limousin
44 * New argument for the functions vv_bound_cart_bin( )
45 *
46 * Revision 1.50 2006/06/29 08:58:57 f_limousin
47 * Boundary conditions in argument of write_global()
48 *
49 * Revision 1.49 2006/06/28 13:36:26 f_limousin
50 * Convergence to a given irreductible mass
51 *
52 * Revision 1.48 2006/05/24 16:53:51 f_limousin
53 * Funtion import(Bin_hor&)
54 *
55 * Revision 1.47 2006/02/22 16:55:42 f_limousin
56 * boundary_nn_Neu_kk(int nn = 1)
57 *
58 * Revision 1.46 2006/02/22 16:20:54 jl_jaramillo
59 * 2nc correction Valeur boundary_nn_Neu_kk(int nn)
60 *
61 * Revision 1.45 2006/02/20 16:48:14 jl_jaramillo
62 * corrections numerical viscosity
63 *
64 * Revision 1.44 2006/02/20 15:01:37 jl_jaramillo
65 * function for computing generalised Conformal THin Sandwich eqautions
66 *
67 * Revision 1.43 2006/01/18 12:29:18 jl_jaramillo
68 * new method (chi,theta) for the spherically symmetric case
69 *
70 * Revision 1.42 2006/01/16 17:15:34 jl_jaramillo
71 * function for solving the spherical case
72 *
73 * Revision 1.41 2005/11/02 16:10:38 jl_jaramillo
74 * change in boundary_nn_Dir_lapl
75 *
76 * Revision 1.40 2005/10/24 16:45:16 jl_jaramillo
77 * Cook boundary condition
78 *
79 * Revision 1.39 2005/10/23 12:32:00 f_limousin
80 * Pure Dirichlet boundary condition for Psi.
81 *
82 * Revision 1.38 2005/09/13 18:33:17 f_limousin
83 * New function vv_bound_cart_bin(double) for computing binaries with
84 * berlin condition for the shift vector.
85 * Suppress all the symy and asymy in the importations.
86 *
87 * Revision 1.37 2005/07/11 08:19:54 f_limousin
88 * New function axi_break() to compute the departure to axisymmetry.
89 *
90 * Revision 1.36 2005/06/09 07:56:24 f_limousin
91 * Implement a new function sol_elliptic_boundary() and
92 * Vector::poisson_boundary(...) which solve the vectorial poisson
93 * equation (method 6) with an inner boundary condition.
94 *
95 * Revision 1.35 2005/05/12 14:48:55 f_limousin
96 * New boundary condition for the lapse : boundary_nn_lapl().
97 *
98 * Revision 1.34 2005/04/29 14:05:03 f_limousin
99 * Important changes : manage the dependances between quantities (for
100 * instance psi and psi4). New function write_global(ost).
101 *
102 * Revision 1.33 2005/04/15 11:20:39 jl_jaramillo
103 * Function adapt_hor(double c_min, double c_max) for adapting a given surface
104 * to the excised surface
105 *
106 * Revision 1.32 2005/04/08 12:15:38 f_limousin
107 * Function set_psi(). And dependance in phi.
108 *
109 * Revision 1.31 2005/04/03 19:48:38 f_limousin
110 * Implementation of set_psi(psi_in).
111 *
112 * Revision 1.30 2005/04/02 15:50:08 f_limousin
113 * New data member nz (number of zones). Delete ww.
114 *
115 * Revision 1.29 2005/03/31 09:48:04 f_limousin
116 * New functions compute_ww(..) and aa_kerr_ww() and new data ww.
117 *
118 * Revision 1.28 2005/03/28 19:45:41 f_limousin
119 * Implement Isol_hor::aa_kerr_perturb(...) and new member aa_quad_evol.
120 *
121 * Revision 1.27 2005/03/24 16:50:40 f_limousin
122 * Add parameters solve_shift and solve_psi in par_isol.d and in function
123 * init_dat(...). Implement Isolhor::kerr_perturb().
124 *
125 * Revision 1.26 2005/03/10 16:57:01 f_limousin
126 * Improve the convergence of the code coal_bh.
127 *
128 * Revision 1.25 2005/03/10 10:19:42 f_limousin
129 * Add the regularisation of the shift in the case of a single black hole
130 * and lapse zero on the horizon.
131 *
132 * Revision 1.24 2005/03/09 10:28:37 f_limousin
133 * Delete functions init_data_b_neumann(...) and init_data_berlin(...)
134 * --> New parameter solve_lapse in the function init_data(...).
135 * New function update_aa().
136 *
137 * Revision 1.23 2005/03/06 16:59:33 f_limousin
138 * New function Isol_hor::aa() (the one belonging to the class
139 * Time_slice_conf need to compute the time derivative of hh and thus
140 * cannot work in the class Isol_hor).
141 *
142 * Revision 1.22 2005/03/04 09:39:31 f_limousin
143 * Implement the constructor from a file, operator>>, operator<<
144 * and function sauve in the class Bin_hor.
145 *
146 * Revision 1.21 2005/03/03 10:25:16 f_limousin
147 * In the class Isol_hor :
148 * - Add the boost in x and z-direction (members boost_x and boost_z,
149 * and functions get_boost_x(), set_boost_x(double))
150 * - Add function area_hor()
151 * - Put the boundary conditions for the lapse, psi and beta in
152 * the parameter file.
153 * In the class bin_hor :
154 * - Introduce function to compute global quantities as ADM mass,
155 * Komar mass and angular momentum.
156 *
157 * Revision 1.20 2005/02/24 17:22:53 f_limousin
158 * Suppression of the function beta_bound_cart().
159 * The boundary conditions for psi, N and beta are now some parameters
160 * in par_init.D and par_coal.d.
161 *
162 * Revision 1.19 2005/02/07 10:30:09 f_limousin
163 * Add the regularisation in the case N=0 on the horizon.
164 *
165 * Revision 1.18 2004/12/31 15:33:37 f_limousin
166 * Change the constructor from a file and the standard constructor.
167 *
168 * Revision 1.17 2004/12/29 16:30:00 f_limousin
169 * Improve comments for doxygen
170 *
171 * Revision 1.16 2004/12/29 16:10:25 f_limousin
172 * Add the new class Bin_hor.
173 *
174 * Revision 1.14 2004/11/24 19:32:05 jl_jaramillo
175 * Method for initial data with Berlin boundary conditions
176 *
177 * Revision 1.13 2004/11/18 10:53:03 jl_jaramillo
178 * Declarations for Berlin boundary conditions
179 *
180 * Revision 1.12 2004/11/05 11:01:13 f_limousin
181 * Delete arguments ener_dens, mom_dens and trace_stress in all functions
182 * source_nn, source_psi, source_beta, init_data. Delete also
183 * argument partial_save in function save.
184 *
185 * Revision 1.11 2004/11/05 10:11:23 f_limousin
186 * The member Metric met_gamt replace Sym_tensor gamt.
187 *
188 * Revision 1.10 2004/11/03 17:15:46 f_limousin
189 * Change the standart constructor. Add 4 memebers : trK, trK_point,
190 * gamt and gamt_point.
191 * Add also a constructor from a file.
192 *
193 * Revision 1.9 2004/11/02 17:42:33 f_limousin
194 * New method sauve(...) to save in a binary file.
195 *
196 * Revision 1.8 2004/11/02 16:15:12 f_limousin
197 * Add new argument ang_vel in function init_dat(...).
198 *
199 * Revision 1.7 2004/10/29 15:46:14 jl_jaramillo
200 * Remove 2 members, add ADM angular momentum and change name
201 * of functions.
202 *
203 * Revision 1.6 2004/10/01 16:51:16 f_limousin
204 * Pure Dirichlet boundary condition added
205 *
206 * Revision 1.5 2004/09/28 16:03:58 f_limousin
207 * Add parameter niter in the parameter file par_hor.d. It appears in
208 * argument of the function init_data_schwarz(...).
209 *
210 * Revision 1.4 2004/09/17 13:35:25 f_limousin
211 * Introduction of relaxation in init_data_schwarz
212 *
213 * Revision 1.3 2004/09/16 08:36:57 f_limousin
214 * New boundary conditions for lapse and psi.
215 *
216 * Revision 1.2 2004/09/09 17:04:27 jl_jaramillo
217 * Elimination of _ih
218 *
219 *
220 *
221 * $Header: /cvsroot/Lorene/C++/Include/isol_hor.h,v 1.54 2014/10/13 08:52:35 j_novak Exp $
222 *
223 */
224
225 #include "time_slice.h"
226 #include "proto.h"
227 #include "headcpp.h"
228 #include "cmp.h"
229 #include "evolution.h"
230
231 namespace Lorene {
232 class Sym_tensor_trans ;
233 class Sym_tensor ;
234 class Vector ;
235 class Scalar ;
236 class Metric ;
237 class Metric_flat ;
238 class Base_vect ;
239 class Map ;
240 class Tbl ;
241 class Time_slice ;
242 class Time_slice_conf ;
243
244 //----------------------------//
245 // class Isol_Hor //
246 //----------------------------//
247
248 /**
249 * Spacelike time-slice of an Isolated Horizon in a 3+1 spacetime with conformal decomposition.
250 * No gauge choice imposed.
251 * \ingroup (evol)
252 *
253 */
254 class Isol_hor : public Time_slice_conf {
255
256 // Data :
257 // -----
258 protected:
259 /// Affine mapping.
260 Map_af& mp ;
261
262 /// Number of zones.
263 int nz ;
264
265 /// Radius of the horizon in LORENE's units.
266 double radius ;
267
268 /// Angular velocity in LORENE's units.
269 double omega ;
270
271 /// Boost velocity in x-direction
272 double boost_x ;
273
274 /// Boost velocity in z-direction
275 double boost_z ;
276
277 /// Intensity of the correction on the shift vector.
278 double regul ;
279
280 /// Values at successive time steps of the lapse function \f$ N_{auto} \f$.
281 mutable Evolution_std<Scalar> n_auto_evol ;
282
283 /// Values at successive time steps of the lapse function \f$ N_{comp} \f$.
284 mutable Evolution_std<Scalar> n_comp_evol ;
285
286 /// Values at successive time steps of the conformal factor \f$ \Psi_{auto} \f$.
287 mutable Evolution_std<Scalar> psi_auto_evol ;
288
289 /// Values at successive time steps of the lapse function \f$ \Psi_{comp} \f$.
290 mutable Evolution_std<Scalar> psi_comp_evol ;
291
292 /// Values at successive time steps of the covariant derivative
293 /// of the lapse with respect to the flat metric \f$ \overline\nabla_i N \f$.
294 mutable Evolution_std<Vector> dn_evol ;
295
296 /// Values at successive time steps of the covariant derivative
297 /// of the conformal factor \f$ \overline\nabla_i \Psi \f$.
298 mutable Evolution_std<Vector> dpsi_evol ;
299
300 /// Values at successive time steps of the shift function \f$ \beta^i_{auto} \f$.
301 mutable Evolution_std<Vector> beta_auto_evol ;
302
303 /// Values at successive time steps of the shift function \f$ \beta^i_{comp} \f$.
304 mutable Evolution_std<Vector> beta_comp_evol ;
305
306 /** Values at successive time steps of the components \f$ A^{ij}_{auto} \f$
307 * of the conformal representation of the traceless part
308 * of the extrinsic curvature:
309 */
310 mutable Evolution_std<Sym_tensor> aa_auto_evol ;
311
312 /** Values at successive time steps of the components \f$ A^{ij}_{comp} \f$
313 * of the conformal representation of the traceless part
314 * of the extrinsic curvature:
315 */
316 mutable Evolution_std<Sym_tensor> aa_comp_evol ;
317
318 /** Values at successive time steps of the components \f$ A^{ij}*2N \f$
319 */
320 mutable Evolution_std<Sym_tensor> aa_nn ;
321
322 /// Values at successive time steps of the components \f$ A^{ij}A_{ij} \f$
323 mutable Evolution_std<Scalar> aa_quad_evol ;
324
325 /// 3 metric tilde
326 Metric met_gamt ;
327
328 /// Time derivative of the 3-metric tilde
329 Sym_tensor gamt_point ;
330
331 /// Trace of the extrinsic curvature
332 Scalar trK ;
333
334 /// Time derivative of the trace of the extrinsic curvature
335 Scalar trK_point ;
336
337 /**
338 * Function used to construct \f$ A^{ij}_{auto} \f$
339 * from the total \f$A^{ij}\f$. Only used for a binary system.
340 *
341 * Mainly this \c Scalar is 1 around the hole and 0 around the companion
342 * and the sum of \c decouple for the hole and his companion is 1
343 * everywhere.
344 */
345 Scalar decouple ;
346
347 // Constructors - Destructor
348 // -------------------------
349 public:
350
351 /** Standard constructor
352 * @param mpi affine mapping
353 * @param depth_in number of stored time slices; this parameter is used
354 * to set the \c scheme_order member with \c scheme_order
355 * = \c depth_in - 1. \c scheme_order can be changed
356 * afterwards by the method \c set_scheme_order(int).
357 */
358 Isol_hor(Map_af& mpi, int depth_in = 3) ;
359
360 /** Constructor from conformal decomposition
361 *
362 * @param mpi affine mapping
363 * @param lapse_in lapse function \e N
364 * @param psi_in conformal factor \f$\Psi\f$ relating the
365 * physical metric \f$ \gamma_{ij} \f$ to the conformal one:
366 * \f$ \gamma_{ij} = \Psi^4 \tilde\gamma_{ij} \f$
367 * @param shift_in shift vector
368 * @param aa_in conformal representation \f$ A^{ij} \f$
369 * of the traceless part of the extrinsic curvature:
370 * \f$ A^{ij} = \Psi^4 \left( K^{ij} - \frac{1}{3} K \gamma^{ij} \right) \f$
371 * @param gamt 3-metric tilde
372 * @param gamt_point time derivative of the 3-metric tilde
373 * @param trK trace \e K of the extrinsic curvature
374 * @param trK_point time derivative of the trace \e K of the extrinsic curvature
375 * @param ff_in reference flat metric with respect to which the
376 * conformal decomposition is performed
377 * @param depth_in number of stored time slices; this parameter is used
378 * to set the \c scheme_order member with \c scheme_order
379 * = \c depth_in - 1. \c scheme_order can be changed
380 * afterwards by the method \c set_scheme_order(int).
381 */
382 Isol_hor(Map_af& mpi, const Scalar& lapse_in, const Scalar& psi_in,
383 const Vector& shift_in, const Sym_tensor& aa_in,
384 const Metric& gamt, const Sym_tensor& gamt_point,
385 const Scalar& trK, const Scalar& trK_point,
386 const Metric_flat& ff_in, int depth_in = 3) ;
387
388 /// Copy constructor
389 Isol_hor(const Isol_hor& ) ;
390
391 /** Constructor from a binary file
392 * @param mpi affine mapping
393 * @param fich file containing the saved \c isol_hor
394 * @param partial_read indicates whether the full object must be read in
395 * file or whether the final construction is devoted
396 * to a constructor of a derived class
397 * @param depth_in number of stored time slices; this parameter is used
398 * to set the \c scheme_order member with \c scheme_order
399 * = \c depth_in - 1. \c scheme_order can be changed
400 * afterwards by the method \c set_scheme_order(int).
401 */
402 Isol_hor (Map_af& mp, FILE* fich,
403 bool partial_read, int depth_in = 3) ;
404
405 /// Destructor
406 virtual ~Isol_hor() ;
407
408
409 // Mutators / assignment
410 // ---------------------
411 public:
412 /// Assignment to another Isol_hor
413 void operator=(const Isol_hor&) ;
414
415
416 public:
417 /// Returns the mapping (readonly).
418 const Map_af& get_mp() const {return mp;} ;
419
420 /// Read/write of the mapping
421 Map_af& set_mp() {return mp; } ;
422
423 /**
424 * Returns the radius of the horizon.
425 */
426 double get_radius() const {return radius;} ;
427
428 /**
429 * Sets the radius of the horizon to \c rad .
430 */
431 void set_radius(double rad) {radius = rad ;} ;
432
433 /**
434 * Returns the angular velocity.
435 */
436 double get_omega() const {return omega ;} ;
437 /**
438 * Sets the angular velocity to \c ome .
439 */
440 void set_omega(double ome) {omega = ome ;} ;
441
442 /**
443 * Returns the boost velocity in x-direction.
444 */
445 double get_boost_x() const {return boost_x ;} ;
446 /**
447 * Sets the boost velocity in x-direction to \c bo .
448 */
449 void set_boost_x(double bo) {boost_x = bo ;} ;
450
451 /**
452 * Returns the boost velocity in z-direction.
453 */
454 double get_boost_z() const {return boost_z ;} ;
455 /**
456 * Sets the boost velocity in z-direction to \c bo .
457 */
458 void set_boost_z(double bo) {boost_z = bo ;} ;
459
460
461
462 // Accessors
463 // ---------
464 public:
465
466 /// Lapse function \f$ N_{auto} \f$ at the current time step \c jtime
467 virtual const Scalar& n_auto() const ;
468
469 /// Lapse function \f$ N_{comp} \f$ at the current time step \c jtime
470 virtual const Scalar& n_comp() const ;
471
472 /// Conformal factor \f$ \Psi_{auto} \f$ at the current time step \c jtime
473 virtual const Scalar& psi_auto() const ;
474
475 /// Conformal factor \f$ \Psi_{comp} \f$ at the current time step \c jtime
476 virtual const Scalar& psi_comp() const ;
477
478 /// Covariant derivative of the lapse function \f$ \overline\nabla_i N \f$ at the
479 /// current time step \c jtime
480 virtual const Vector& dnn() const ;
481
482 /// Covariant derivative with respect to the flat metric
483 /// of the conformal factor \f$ \overline\nabla_i \Psi \f$ at the
484 /// current time step \c jtime
485 virtual const Vector& dpsi() const ;
486
487 /// Shift function \f$ \beta^i_{auto} \f$ at the current time step \c jtime
488 virtual const Vector& beta_auto() const ;
489
490 /// Shift function \f$ \beta^i_{comp} \f$ at the current time step \c jtime
491 virtual const Vector& beta_comp() const ;
492
493 /** Conformal representation \f$ A^{ij}_{auto} \f$ of the traceless part
494 * of the extrinsic curvature:
495 * Returns the value at the current time step \c jtime.
496 */
497 virtual const Sym_tensor& aa_auto() const ;
498
499 /** Conformal representation \f$ A^{ij}_{comp} \f$ of the traceless part
500 * of the extrinsic curvature:
501 * Returns the value at the current time step \c jtime.
502 */
503 virtual const Sym_tensor& aa_comp() const ;
504
505 /** Conformal representation \f$ A^{ij}A_{ij} \f$.
506 * Returns the value at the current time step \c jtime.
507 */
508 virtual const Scalar& aa_quad() const ;
509
510 /** Conformal metric
511 * \f$ \tilde\gamma_{ij} = \Psi^{-4} \gamma_{ij} \f$
512 * Returns the value at the current time step (\c jtime ).
513 */
514 virtual const Metric& tgam() const {return met_gamt ;}
515
516 /**
517 * Returns the function used to construct \c tkij_auto from \c tkij_tot .
518 */
519 const Scalar get_decouple() const {return decouple ;}
520
521
522 public:
523 /**
524 * Imports the part of \e N due to the companion hole \c comp . The
525 * total \e N is then calculated.
526 *
527 * It also imports the covariant derivative of \e N and construct
528 * the total \f$\nabla_i N\f$.
529 */
530 void n_comp (const Isol_hor& comp) ;
531
532 /**
533 * Imports the part of \f$\Psi\f$ due to the companion hole \c comp . The
534 * total \f$\Psi\f$ is then calculated.
535 *
536 * It also imports the covariant derivative of \f$\Psi\f$ and construct
537 * the total \f$\nabla_i \Psi\f$.
538 */
539 void psi_comp (const Isol_hor& comp) ;
540
541 /**
542 * Imports the part of \f$\beta^i\f$ due to the companion hole \c comp. The
543 * total \f$\beta^i\f$ is then calculated.
544 *
545 */
546 void beta_comp (const Isol_hor& comp) ;
547
548 /**
549 * Computes the viriel error, that is the difference between the ADM
550 * and the Komar
551 * masses, calculated by the asymptotic behaviours of
552 * respectively \f$\Psi\f$ and \e N .
553 *
554 * \b WARNING this should only be used for an isolated black hole.
555 */
556 double viriel_seul () const ;
557
558 /**
559 * Sets the values of the fields to :
560 * \li \c n_auto \f$= \frac{1}{2}-2\frac{a}{r}\f$
561 * \li \c n_comp \f$= \frac{1}{2}\f$
562 * \li \c psi_auto \f$= \frac{1}{2}+\frac{a}{r}\f$
563 * \li \c psi_comp \f$= \frac{1}{2}\f$
564 *
565 * \e a being the radius of the hole, the other fields being set to zero.
566 */
567 void init_bhole () ;
568
569 /**
570 * Sets the 3-metric tilde to the flat metric and gamt_point,
571 * trK and trK_point to zero.
572 */
573
574 void init_met_trK() ;
575
576 /**
577 * Initiates for a single black hole.
578 *
579 * \b WARNING It supposes that the boost is zero and should only be
580 * used for an isolated black hole..
581 */
582 void init_bhole_seul () ;
583
584 /** Sets the conformal factor \f$ \Psi \f$ relating the
585 * physical metric \f$ \gamma_{ij} \f$ to the conformal one:
586 * \f$ \gamma_{ij} = \Psi^4 \tilde\gamma_{ij} \f$.
587 * \f$ \Psi \f$ is defined by
588 * \f[ \Psi := \left( \frac{\det\gamma_{ij}}{\det f_{ij}}
589 * \right) ^{1/12} \f]
590 * Sets the value at the current time step (\c jtime ) and
591 * delete all quantities which depend on \f$ \Psi \f$.
592 */
593
594 void set_psi(const Scalar& psi_in) ;
595
596 /// Sets the lapse
597 void set_nn(const Scalar& nn_in) ;
598
599 /// Sets the conformal metric to gam_tilde.
600 void set_gamt(const Metric& gam_tilde) ;
601
602 // Physical parameters
603 //--------------------
604 public:
605
606
607 /// Vector radial normal
608 const Vector radial_vect_hor() const ;
609
610 /// Vector radial normal tilde
611 const Vector tradial_vect_hor() const ;
612
613 /// Radial component of the shift with respect to the conformal metric
614 const Scalar b_tilde() const ;
615
616 /// Element of area of the horizon
617 const Scalar darea_hor() const ;
618
619 /// Area of the horizon
620 double area_hor() const ;
621
622 /// Radius of the horizon
623 double radius_hor() const ;
624
625 /// Angular momentum (modulo)
626 double ang_mom_hor() const ;
627
628 /// Mass computed at the horizon
629 double mass_hor() const ;
630
631 /// Surface gravity
632 double kappa_hor() const ;
633
634 /// Orbital velocity
635 double omega_hor() const ;
636
637 /// ADM angular Momentum
638 double ang_mom_adm() const ;
639
640 /// Expansion of the outgoing null normal (\f$ \bf n + \bf s \f$)
641 Scalar expansion() const ;
642
643
644 //Computational methods
645 //---------------------
646 public:
647
648 /* function to compute initial data for a single black hole
649 * @param bound_nn boundary condition for the lapse
650 * @param lim_nn value of the boundary condition for the lapse
651 * @param bound_psi boundary condition for \f$ \Psi \f$
652 * @param bound_beta boundary condition for the shift
653 * @param solve_lapse do we solve the equation for the lapse ?
654 * @param precis precision for the convergence
655 * @param relax relaxation
656 * @param niter number of iterations
657 */
658 void init_data(int bound_nn, double lim_nn, int bound_psi, int bound_beta,
659 int solve_lapse, int solve_psi, int solve_shift,
660 double precis = 1.e-12,
661 double relax_nn = 0.5, double relax_psi = 0.5,
662 double relax_beta = 0.5, int niter = 100) ;
663
664 void init_data_loop(int bound_nn, double lim_nn, int bound_psi,
665 int bound_beta, int solve_lapse, int solve_psi,
666 int solve_shift, double precis= 1.e-12,
667 double precis_loop= 1.e-12,
668 double relax_nn = 1., double relax_psi= 1.,
669 double relax_beta = 1., double relax_loop = 1.,
670 int niter = 100) ;
671
672
673
674 void init_data_spher(int bound_nn, double lim_nn, int bound_psi,
675 int bound_beta, int solve_lapse, int solve_psi,
676 int solve_shift, double precis = 1.e-12,
677 double relax = 1., int niter = 100) ;
678
679 void init_data_alt(int bound_nn, double lim_nn, int bound_psi,
680 int bound_beta, int solve_lapse, int solve_psi,
681 int solve_shift, double precis = 1.e-12,
682 double relax = 1., int niter = 100) ;
683
684 void init_data_CTS_gen(int bound_nn, double lim_nn, int bound_psi, int bound_beta,
685 int solve_lapse, int solve_psi, int solve_shift,
686 double precis = 1.e-12, double relax_nn = 1.,
687 double relax_psi = 1., double relax_beta = 1.,
688 int niter = 100, double a = 1., double zeta = 4.) ;
689
690
691
692
693 //Sources
694 //-------
695
696 /// Source for \f$ \Psi \f$
697 const Scalar source_psi() const ;
698
699 /// Source for \c N
700 const Scalar source_nn() const ;
701
702 /// Source for \f$ \beta \f$
703 const Vector source_beta() const ;
704
705 /// Source for \c b_tilde
706 const Scalar source_b_tilde() const ;
707
708 /// Source for \c vector_b
709 const Vector source_vector_b() const ;
710
711
712 // BOUNDARY CONDITIONS
713 //--------------------
714
715 /// Dirichlet boundary condition for \f$ \Psi \f$ (evolution)
716 const Valeur boundary_psi_Dir_evol() const ;
717
718 /// Neumann boundary condition for \f$ \Psi \f$ (evolution)
719 const Valeur boundary_psi_Neu_evol() const ;
720
721 /// Dirichlet boundary condition for \f$ \Psi \f$ (spatial)
722 const Valeur boundary_psi_Dir_spat() const ;
723
724 /// Neumann boundary condition for \f$ \Psi \f$ (spatial)
725 const Valeur boundary_psi_Neu_spat() const ;
726
727 /// Neumann boundary condition for \f$ \Psi \f$ (spatial)
728 const Valeur boundary_psi_app_hor() const ;
729
730 /// Dirichlet boundary condition for \f$ \Psi \f$ (spatial)
731 const Valeur boundary_psi_Dir() const ;
732
733 /// Dirichlet boundary condition for \c N using the extrinsic curvature
734 const Valeur boundary_nn_Dir_kk() const ;
735
736 /// Neumann boundary condition for \c N using the extrinsic curvature
737 const Valeur boundary_nn_Neu_kk(int nn = 1) const ;
738
739 /// Neumann boundary condition for \c N using Cook's boundary condition
740 const Valeur boundary_nn_Neu_Cook() const ;
741
742 /// Dirichlet boundary condition for \c N (effectif)
743 /// \f$ \partial_r N + a N = 0 \f$
744 const Valeur boundary_nn_Dir_eff(double aa) const ;
745
746 /// Dirichlet boundary condition for \c N fixing the divergence
747 /// of the connection form \f$ \omega \f$
748 const Valeur boundary_nn_Dir_lapl(int mer = 1) const ;
749
750 /// Neumann boundary condition on nn (effectif)
751 /// \f$ \partial_r N + a N = 0 \f$
752 const Valeur boundary_nn_Neu_eff(double aa) const ;
753
754 /// Dirichlet boundary condition \f$ N = a \f$
755 const Valeur boundary_nn_Dir(double aa) const ;
756
757 /// Component r of boundary value of \f$ \beta \f$
758 const Valeur boundary_beta_r() const ;
759
760 /// Component theta of boundary value of \f$ \beta \f$
761 const Valeur boundary_beta_theta() const ;
762
763 /// Component phi of boundary value of \f$ \beta \f$
764 const Valeur boundary_beta_phi(double om) const ;
765
766 /// Component x of boundary value of \f$ \beta \f$
767 const Valeur boundary_beta_x(double om) const ;
768
769 /// Component y of boundary value of \f$ \beta \f$
770 const Valeur boundary_beta_y(double om) const ;
771
772 /// Component z of boundary value of \f$ \beta \f$
773 const Valeur boundary_beta_z() const ;
774
775 /// Boundary value for a boost in x-direction
776 const Valeur beta_boost_x() const ;
777
778 /// Boundary value for a boost in z-direction
779 const Valeur beta_boost_z() const ;
780
781 /// Vector \f$ V^i \f$ for boundary conditions in cartesian
782 const Vector vv_bound_cart(double om) const ;
783
784 /// Vector \f$ V^i \f$ for boundary conditions in cartesian for
785 /// binary systems.
786 const Vector vv_bound_cart_bin(double om, int hole = 0) const ;
787
788 /// Component x of boundary value of \f$ V^i \f$
789 const Valeur boundary_vv_x(double om) const ;
790
791 /// Component y of boundary value of \f$ V^i \f$
792 const Valeur boundary_vv_y(double om) const ;
793
794 /// Component z of boundary value of \f$ V^i \f$
795 const Valeur boundary_vv_z(double om) const ;
796
797 /// Component x of boundary value of \f$ V^i \f$
798 const Valeur boundary_vv_x_bin(double om, int hole = 0) const ;
799
800 /// Component y of boundary value of \f$ V^i \f$
801 const Valeur boundary_vv_y_bin(double om, int hole = 0) const ;
802
803 /// Component z of boundary value of \f$ V^i \f$
804 const Valeur boundary_vv_z_bin(double om, int hole = 0) const ;
805
806 /// Neumann boundary condition for \c b_tilde
807 const Valeur boundary_b_tilde_Neu() const ;
808
809 /// Dirichlet boundary condition for \c b_tilde
810 const Valeur boundary_b_tilde_Dir() const ;
811
812 /** Conformal representation \f$ A^{ij} \f$ of the traceless part
813 * of the extrinsic curvature:
814 * \f$ A^{ij} = \Psi^4 \left( K^{ij} - \frac{1}{3} K \gamma^{ij} \right) \f$.
815 */
816 void update_aa() ;
817
818 /**
819 * Corrects \c shift_auto in such a way that the total \f$A^{ij}\f$ is
820 * equal to zero in the horizon, which should ensure the regularity
821 * of \f$K^{ij}\f$.
822 *
823 * \b WARNING : this should only be used for a black hole in
824 * a binary system \c Bin_hor.
825 *
826 * @param comp [input]: the part of \f$\beta^i\f$ generated by the companion
827 * hole.
828 */
829 double regularisation (const Vector& shift_auto, const Vector& shift_comp,
830 double ang_vel) ;
831
832 /**
833 * Corrects the shift in the innermost shell, so that it remains \f$
834 * {\mathcal{C}}^2\f$ and that \f$A^{ij}\f$ equals zero on the horizon.
835 *
836 * return the relative difference between the shift before
837 * and after the regularisation.
838 *
839 * \b WARNING this should only be used for an isolated black hole.
840 */
841 double regularise_one() ;
842
843 /// Initialisation of the metric tilde from equation (15) of
844 /// Dain (2002). The determinant of this conformal metric is not one.
845 void met_kerr_perturb() ;
846
847 /* Perturbation of Kerr using \f$ A^{ij}A_{ij} \f$ from
848 * equation (14) of Dain (2002).
849 * @param mm mass of the Kerr black hole metric.
850 * @param aa rotation parameter of the Kerr black hole metric.
851 */
852 void aa_kerr_ww(double mm, double aa) ;
853
854 /// Breaking of the axial symmetry on the horizon
855
856 double axi_break() const ;
857
858 /* Calculation of the outermost trapped surface and adaptation
859 * of all necessary quantities
860 */
861
862 void adapt_hor(double c_min, double c_max) ;
863
864
865 // Outputs
866 // -------
867 protected:
868 /// Operator >> (virtual function called by the operator<<).
869 virtual ostream& operator>>(ostream& ) const ;
870
871
872 public :
873 /** Total or partial saves in a binary file.
874 *
875 * @param fich binary file
876 * @param partial_save indicates whether the whole object must be
877 * saved.
878 */
879 virtual void sauve(FILE* fich, bool partial_save) const ;
880
881 friend class Bin_hor ; /// Binary systems
882
883 };
884
885 /**
886 * Binary black holes system. \ingroup (star)
887 *
888 * This class is intended for dealing with binary black holes configurations
889 * in the conformaly flat approximation.
890 */
891
892
893
894 class Single_hor {
895
896 // Data :
897 // -----
898 protected:
899 /// Affine mapping.
900 Map_af& mp ;
901
902 /// Number of zones.
903 int nz ;
904
905 /// Radius of the horizon in LORENE's units.
906 double radius ;
907
908 /// Angular velocity in LORENE's units.
909 double omega ;
910
911 /// Intensity of the correction on the shift vector.
912 double regul ;
913
914 /// Lapse function \f$ N_{auto} \f$.
915 Scalar n_auto ;
916
917 /// Lapse function \f$ N_{comp} \f$.
918 Scalar n_comp ;
919
920 /// Lapse function \f$ N \f$.
921 Scalar nn ;
922
923 /// Conformal factor \f$ \Psi_{auto} \f$.
924 Scalar psi_auto ;
925
926 /// Conformal factor \f$ \Psi_{comp} \f$.
927 Scalar psi_comp ;
928
929 /// Conformal factor \f$ \Psi \f$.
930 Scalar psi ;
931
932 /// Conformal factor \f$ \Psi^4 \f$.
933 mutable Scalar* p_psi4 ;
934
935 /// Covariant derivative
936 /// of the lapse with respect to the flat metric \f$ \overline\nabla_i N \f$.
937 Vector dn ;
938
939 /// Covariant derivative
940 /// of the conformal factor \f$ \overline\nabla_i \Psi \f$.
941 Vector dpsi ;
942
943 /// Shift function \f$ \beta^i_{auto} \f$.
944 Vector beta_auto ;
945
946 /// Shift function \f$ \beta^i_{comp} \f$.
947 Vector beta_comp ;
948
949 /// Shift function \f$ \beta^i \f$.
950 Vector beta ;
951
952 /// Spatial metric \f$ \gamma \f$.
953 mutable Metric* p_gam ;
954
955 /** Components \f$ A^{ij}_{auto} \f$
956 * of the conformal representation of the traceless part
957 * of the extrinsic curvature:
958 */
959 Sym_tensor aa_auto ;
960
961 /** Components \f$ A^{ij}_{comp} \f$
962 * of the conformal representation of the traceless part
963 * of the extrinsic curvature:
964 */
965 Sym_tensor aa_comp ;
966
967 /** Components \f$ A^{ij} \f$
968 * of the conformal representation of the traceless part
969 * of the extrinsic curvature:
970 */
971 Sym_tensor aa ;
972
973 /// Components \f$ K^{ij} \f$ of the extrinsic curvature:
974 mutable Sym_tensor* p_k_dd ;
975
976 /// 3 metric tilde
977 Metric tgam ;
978
979 /// 3 metric flat
980 Metric_flat ff ;
981
982 /// Deviation metric
983 Sym_tensor hh ;
984
985 /// Time derivative of the 3-metric tilde
986 Sym_tensor gamt_point ;
987
988 /// Trace of the extrinsic curvature
989 Scalar trK ;
990
991 /// Time derivative of the trace of the extrinsic curvature
992 Scalar trK_point ;
993
994 /**
995 * Function used to construct \f$ A^{ij}_{auto} \f$
996 * from the total \f$A^{ij}\f$. Only used for a binary system.
997 *
998 * Mainly this \c Scalar is 1 around the hole and 0 around the companion
999 * and the sum of \c decouple for the hole and his companion is 1
1000 * everywhere.
1001 */
1002 Scalar decouple ;
1003
1004 // Constructors - Destructor
1005 // -------------------------
1006 public:
1007
1008 /** Standard constructor
1009 * @param mpi affine mapping
1010 */
1011 Single_hor(Map_af& mpi) ;
1012
1013 /// Copy constructor
1014 Single_hor(const Single_hor& ) ;
1015
1016 /** Constructor from a binary file
1017 * @param mpi affine mapping
1018 * @param fich file containing the saved \c isol_hor
1019 * @param partial_read indicates whether the full object must be read in
1020 * file or whether the final construction is devoted
1021 * to a constructor of a derived class
1022 */
1023 Single_hor (Map_af& mp, FILE* fich) ;
1024
1025 /// Destructor
1026 virtual ~Single_hor() ;
1027
1028
1029 // Mutators / assignment
1030 // ---------------------
1031 public:
1032 /// Assignment to another Single_hor
1033 void operator=(const Single_hor&) ;
1034
1035
1036 public:
1037 /// Returns the mapping (readonly).
1038 const Map_af& get_mp() const {return mp;} ;
1039
1040 /// Read/write of the mapping
1041 Map_af& set_mp() {return mp; } ;
1042
1043 /**
1044 * Returns the radius of the horizon.
1045 */
1046 double get_radius() const {return radius;} ;
1047
1048 /**
1049 * Sets the radius of the horizon to \c rad .
1050 */
1051 void set_radius(double rad) {radius = rad ;} ;
1052
1053 /**
1054 * Returns the angular velocity.
1055 */
1056 double get_omega() const {return omega ;} ;
1057 /**
1058 * Sets the angular velocity to \c ome .
1059 */
1060 void set_omega(double ome) {omega = ome ;} ;
1061
1062 // Memory management
1063 // -----------------
1064 protected:
1065
1066 /// Deletes all the derived quantities
1067 void del_deriv() const ;
1068
1069 /// Sets to \c 0x0 all the pointers on derived quantities
1070 void set_der_0x0() const ;
1071
1072
1073
1074 // Accessors
1075 // ---------
1076 public:
1077
1078 /// Lapse function \f$ N_{auto} \f$
1079 const Scalar& get_n_auto() const ;
1080
1081 /// Lapse function \f$ N_{comp} \f$
1082 const Scalar& get_n_comp() const ;
1083
1084 /// Lapse function \f$ N\f$
1085 const Scalar& get_nn() const ;
1086
1087 /// Conformal factor \f$ \Psi_{auto} \f$
1088 const Scalar& get_psi_auto() const ;
1089
1090 /// Conformal factor \f$ \Psi_{comp} \f$
1091 const Scalar& get_psi_comp() const ;
1092
1093 /// Conformal factor \f$ \Psi \f$
1094 const Scalar& get_psi() const ;
1095
1096 /// Conformal factor \f$ \Psi^4 \f$
1097 const Scalar& get_psi4() const ;
1098
1099 /// Covariant derivative of the lapse function \f$ \overline\nabla_i N \f$
1100 const Vector& get_dn() const ;
1101
1102 /// Covariant derivative with respect to the flat metric
1103 /// of the conformal factor \f$ \overline\nabla_i \Psi \f$
1104 const Vector& get_dpsi() const ;
1105
1106 /// Shift function \f$ \beta^i_{auto} \f$
1107 const Vector& get_beta_auto() const ;
1108
1109 /// Shift function \f$ \beta^i_{comp} \f$
1110 const Vector& get_beta_comp() const ;
1111
1112 /// Shift function \f$ \beta^i \f$
1113 const Vector& get_beta() const ;
1114
1115 /** Conformal representation \f$ A^{ij}_{auto} \f$ of the traceless part
1116 * of the extrinsic curvature:
1117 */
1118 const Sym_tensor& get_aa_auto() const ;
1119
1120 /** Conformal representation \f$ A^{ij}_{comp} \f$ of the traceless part
1121 * of the extrinsic curvature:
1122 */
1123 const Sym_tensor& get_aa_comp() const ;
1124
1125 /** Conformal representation \f$ A^{ij} \f$ of the traceless part
1126 * of the extrinsic curvature:
1127 */
1128 const Sym_tensor& get_aa() const ;
1129
1130 /** Conformal metric
1131 * \f$ \tilde\gamma_{ij} = \Psi^{-4} \gamma_{ij} \f$
1132 */
1133 const Metric& get_tgam() const {return tgam ;}
1134
1135 /** metric \f$ \gamma_{ij} \f$
1136 */
1137 const Metric& get_gam() const ;
1138
1139 /** k_dd
1140 */
1141 const Sym_tensor& get_k_dd() const ;
1142
1143 /**
1144 * Returns the function used to construct \c tkij_auto from \c tkij_tot .
1145 */
1146 const Scalar get_decouple() const {return decouple ;}
1147
1148
1149 public:
1150 /**
1151 * Imports the part of \e N due to the companion hole \c comp . The
1152 * total \e N is then calculated.
1153 *
1154 * It also imports the covariant derivative of \e N and construct
1155 * the total \f$\nabla_i N\f$.
1156 */
1157 void n_comp_import (const Single_hor& comp) ;
1158
1159 /**
1160 * Imports the part of \f$\Psi\f$ due to the companion hole \c comp . The
1161 * total \f$\Psi\f$ is then calculated.
1162 *
1163 * It also imports the covariant derivative of \f$\Psi\f$ and construct
1164 * the total \f$\nabla_i \Psi\f$.
1165 */
1166 void psi_comp_import (const Single_hor& comp) ;
1167
1168 /**
1169 * Imports the part of \f$\beta^i\f$ due to the companion hole \c comp. The
1170 * total \f$\beta^i\f$ is then calculated.
1171 *
1172 */
1173 void beta_comp_import (const Single_hor& comp) ;
1174
1175 /**
1176 * Computes the viriel error, that is the difference between the ADM
1177 * and the Komar
1178 * masses, calculated by the asymptotic behaviours of
1179 * respectively \f$\Psi\f$ and \e N .
1180 *
1181 * \b WARNING this should only be used for an isolated black hole.
1182 */
1183 double viriel_seul () const ;
1184
1185 /**
1186 * Sets the values of the fields to :
1187 * \li \c n_auto \f$= \frac{1}{2}-2\frac{a}{r}\f$
1188 * \li \c n_comp \f$= \frac{1}{2}\f$
1189 * \li \c psi_auto \f$= \frac{1}{2}+\frac{a}{r}\f$
1190 * \li \c psi_comp \f$= \frac{1}{2}\f$
1191 *
1192 * \e a being the radius of the hole, the other fields being set to zero.
1193 */
1194 void init_bhole () ;
1195
1196 /**
1197 * Sets the 3-metric tilde to the flat metric and gamt_point,
1198 * trK and trK_point to zero.
1199 */
1200
1201 void init_met_trK() ;
1202
1203 /**
1204 * Initiates for a single black hole.
1205 *
1206 * \b WARNING It supposes that the boost is zero and should only be
1207 * used for an isolated black hole..
1208 */
1209 void init_bhole_seul () ;
1210
1211 /** Sets the conformal factor \f$ \Psi \f$ relating the
1212 * physical metric \f$ \gamma_{ij} \f$ to the conformal one:
1213 * \f$ \gamma_{ij} = \Psi^4 \tilde\gamma_{ij} \f$.
1214 * \f$ \Psi \f$ is defined by
1215 * \f[ \Psi := \left( \frac{\det\gamma_{ij}}{\det f_{ij}}
1216 * \right) ^{1/12} \f]
1217 * Sets the value at the current time step (\c jtime ) and
1218 * delete all quantities which depend on \f$ \Psi \f$.
1219 */
1220
1221 void set_psi_auto(const Scalar& psi_in) ;
1222
1223 /// Sets the lapse
1224 void set_n_auto(const Scalar& nn_in) ;
1225
1226 /// Sets the shift
1227 void set_beta_auto(const Scalar& shift_in) ;
1228
1229 /// Sets aa_auto
1230 void set_aa_auto(const Scalar& aa_auto_in) ;
1231
1232 /// Sets aa_comp
1233 void set_aa_comp(const Scalar& aa_comp_in) ;
1234
1235 /// Sets aa
1236 void set_aa(const Scalar& aa_in) ;
1237
1238
1239 // Physical parameters
1240 //--------------------
1241 public:
1242
1243
1244 /// Radial component of the shift with respect to the conformal metric
1245 const Scalar b_tilde() const ;
1246
1247 /// Element of area of the horizon
1248 const Scalar darea_hor() const ;
1249
1250 /// Area of the horizon
1251 double area_hor() const ;
1252
1253 /// Radius of the horizon
1254 double radius_hor() const ;
1255
1256 /// Angular momentum (modulo)
1257 double ang_mom_hor() const ;
1258
1259 /// Mass computed at the horizon
1260 double mass_hor() const ;
1261
1262 /// Surface gravity
1263 double kappa_hor() const ;
1264
1265 /// Orbital velocity
1266 double omega_hor() const ;
1267
1268 /// ADM angular Momentum
1269 double ang_mom_adm() const ;
1270
1271 /// Expansion of the outgoing null normal (\f$ \bf n + \bf s \f$)
1272 Scalar expansion() const ;
1273
1274
1275 // BOUNDARY CONDITIONS
1276 //--------------------
1277
1278 /// Neumann boundary condition for \f$ \Psi \f
1279 const Valeur boundary_psi_app_hor() const ;
1280
1281 /// Dirichlet boundary condition for \c N
1282 /// \f$ \partial_r N + a N = 0 \f$
1283 const Valeur boundary_nn_Dir(double aa) const ;
1284
1285 /// Neumann boundary condition on nn
1286 /// \f$ \partial_r N + a N = 0 \f$
1287 const Valeur boundary_nn_Neu(double aa) const ;
1288
1289 /// Component x of boundary value of \f$ \beta \f$
1290 const Valeur boundary_beta_x(double om_orb, double om_loc) const ;
1291
1292 /// Component y of boundary value of \f$ \beta \f$
1293 const Valeur boundary_beta_y(double om_orb, double om_loc) const ;
1294
1295 /// Component z of boundary value of \f$ \beta \f$
1296 const Valeur boundary_beta_z() const ;
1297
1298
1299 /**
1300 * Corrects \c shift_auto in such a way that the total \f$A^{ij}\f$ is
1301 * equal to zero in the horizon, which should ensure the regularity
1302 * of \f$K^{ij}\f$.
1303 *
1304 * \b WARNING : this should only be used for a black hole in
1305 * a binary system \c Bin_hor.
1306 *
1307 * @param comp [input]: the part of \f$\beta^i\f$ generated by the companion
1308 * hole.
1309 */
1310 double regularisation (const Vector& shift_auto, const Vector& shift_comp,
1311 double ang_vel) ;
1312
1313 /**
1314 * Corrects the shift in the innermost shell, so that it remains \f$
1315 * {\mathcal{C}}^2\f$ and that \f$A^{ij}\f$ equals zero on the horizon.
1316 *
1317 * return the relative difference between the shift before
1318 * and after the regularisation.
1319 *
1320 * \b WARNING this should only be used for an isolated black hole.
1321 */
1322 double regularise_one() ;
1323
1324 public :
1325 /** Total or partial saves in a binary file.
1326 *
1327 * @param fich binary file
1328 * @param partial_save indicates whether the whole object must be
1329 * saved.
1330 */
1331 virtual void sauve(FILE* fich) const ;
1332
1333 friend class Bin_hor ; /// Binary systems
1334
1335 };
1336
1337 class Bin_hor {
1338
1339 // data :
1340 private:
1341 // lThe two black holes
1342 Single_hor hole1 ; ///< Black hole one
1343 Single_hor hole2 ; ///< Black hole two
1344
1345 ///Array on the black holes
1346 Single_hor* holes[2] ;
1347
1348 double omega ; ///< Angular velocity
1349
1350 public:
1351
1352 /** Standard constructor
1353 * @param mp1 affine mapping for the first black hole
1354 * @param mp2 affine mapping for the second black hole
1355 * @param depth_in number of stored time slices; this parameter is
1356 * used to set the \c scheme_order member with \c scheme_order
1357 * = \c depth_in - 1. \c scheme_order can be changed
1358 * afterwards by the method \c set_scheme_order(int).
1359 */
1360 Bin_hor(Map_af& mp1, Map_af& mp2) ;
1361
1362 Bin_hor(const Bin_hor& ) ; ///< Copy constructor
1363
1364 /** Constructor from a binary file
1365 * @param mp1 affine mapping of the first black hole
1366 * @param mp2 affine mapping of the second black hole
1367 * @param fich file containing the saved \c Bin_hor
1368 * @param partial_read indicates whether the full object must be
1369 * read in file or whether the final construction is devoted
1370 * to a constructor of a derived class
1371 * @param depth_in number of stored time slices; this parameter
1372 * is used to set the \c scheme_order member with \c scheme_order
1373 * = \c depth_in - 1. \c scheme_order can be changed
1374 * afterwards by the method \c set_scheme_order(int).
1375 */
1376 Bin_hor (Map_af& mp1, Map_af& mp2, FILE* fich) ;
1377
1378 virtual ~Bin_hor() ; ///< Destructor
1379
1380 public :
1381 /** Total or partial saves in a binary file.
1382 *
1383 * @param fich binary file
1384 * @param partial_save indicates whether the whole object must be
1385 * saved.
1386 */
1387 void sauve(FILE* fich) const ;
1388
1389 /** Write global quantities in a formatted file.
1390 * This file can be read by an external program.
1391 */
1392 void write_global(ostream&, double lim_nn, int bound_nn,
1393 int bound_psi, int bound_beta, double alpha) const ;
1394
1395 public:
1396
1397 void operator=(const Bin_hor&) ; ///< Affectation operator
1398
1399 /**
1400 * Read/write of a component of the system. \c i must be equal to
1401 * 1 or 2.
1402 */
1403 Single_hor& set(int i)
1404 { assert( (i==1) || (i==2) );
1405 return *holes[i-1] ;} ;
1406 /**
1407 * Sets the orbital velocity to \c ome
1408 */
1409 void set_omega(double ome) {omega = ome ;
1410 hole1.set_omega (ome) ;
1411 hole2.set_omega (ome) ;} ;
1412
1413 public:
1414 /**
1415 * Read only of a component of the system. \c i must be equal to
1416 * 1 or 2.
1417 */ const Single_hor& operator()(int i) const
1418 { assert( (i==1) || (i==2) );
1419 return *holes[i-1] ;} ;
1420
1421 /// Returns the angular velocity
1422 double get_omega() const {return omega; } ;
1423
1424 /**
1425 * Initialisation of the system. Each hole is set close to a
1426 * Schwarzschild one
1427 * and the parts of the fields generated by
1428 * the companion are calculated.
1429 *
1430 * The angular velocity is set to zero.
1431 */
1432 void init_bin_hor() ;
1433
1434 /**
1435 * Computes the viriel error, that is the difference between
1436 * the ADM and the Komar
1437 * masses, calculated by the asymptotic behaviours of
1438 * respectively \f$\Psi\f$ and \e N .
1439 */
1440 double viriel() const ;
1441
1442 /**
1443 * Calculation of the extrinsic curvature tensor.
1444 * \c aa_auto_evol and \c aa_auto_comp are also computed.
1445 */
1446 void extrinsic_curvature () ;
1447
1448 /**
1449 * Calculates \c decouple which is used to obtain
1450 * \c tkij_auto and \c tkij_comp
1451 */
1452 void decouple () ;
1453
1454 public:
1455 /**
1456 * Initialize the systeme to Misner Lindquist solution,
1457 * that is solving for \e N and
1458 * \f$\Psi\f$ in the case \f$\Omega = 0\f$.
1459 * @param precis [input] : precision for the convergence (on \e N ).
1460 * @param relax [input] : relaxation parameter.
1461 * @param bound_nn [input] : type of the boundary condition for
1462 * the lapse.
1463 * @param lim_nn [input] : value (double) of the coefficient for
1464 * the boundary condition. Only used for boundary_nn_Dir(double),
1465 * boundary_nn_Neu_eff(double) and boundary_nn_Dir_eff(double).
1466 * @param bound_psi [input] : type of the boundary condition for
1467 * psi.
1468 */
1469
1470 void set_statiques (double precis, double relax, int bound_nn,
1471 double lim_nn, int bound_psi) ;
1472
1473 /**
1474 * Solves the equation for a particular angular velocity,
1475 * the systeme being
1476 * initialized to Misner-Lindquist solution.
1477 * @param angu [input] : angular velocity used for
1478 * the boundary condition on
1479 * \f$\vec{\beta}\f$.
1480 * @param relax [input] : relaxation parameter.
1481 * @param nb_om [input] : number of intermediates
1482 * velocities to go from 0 to
1483 * \c omega , typically 10.
1484 * @param nb_it [input] : number of iteration when omega is fixed
1485 * @param bound_nn [input] : type of the boundary condition for
1486 * the lapse.
1487 * @param lim_nn [input] : value (double) of the coefficient for
1488 * the boundary condition. Only used for boundary_nn_Dir(double),
1489 * boundary_nn_Neu_eff(double) and boundary_nn_Dir_eff(double).
1490 * @param bound_psi [input] : type of the boundary condition for
1491 * psi.
1492 * @param bound_nn [input] : type of the boundary condition for
1493 * the shift.
1494 * @param step current step of the iteration
1495 * @param sortie [input] : flag for the output on files
1496 * (0 no output files).
1497 * @returns : the virial error.
1498 */
1499 double coal (double ang_vel, double relax, int nb_om,
1500 int nb_it, int bound_nn, double lim_nn,
1501 int bound_psi, int bound_beta, double omega_eff,
1502 double alpha,
1503 ostream& fich_iteration, ostream& fich_correction,
1504 ostream& fich_viriel, ostream& fich_kss,
1505 int step, int search_mass, double mass_irr,
1506 const int sortie = 0) ;
1507
1508
1509 /**
1510 * Solves the equation for the lapse :
1511 * The fields are the total values except those with
1512 * subscript \f$_a\f$, which are
1513 * the fields generated by each holes (\e a = 1, 2).
1514 * @param precis [input] : precision, for the boudary conditions are
1515 * obtained by iteration.
1516 * @param relax [input] : relaxation parameter.
1517 * @param bound_nn [input] : type of the boundary condition at the
1518 * horizon.
1519 * @param lim_nn [input] : value (double) of the coefficient for
1520 * the boundary condition. Only used for boundary_nn_Dir(double),
1521 * boundary_nn_Neu_eff(double) and boundary_nn_Dir_eff(double).
1522 */
1523 void solve_lapse (double precis, double relax, int bound_nn,
1524 double lim_nn) ;
1525
1526 /**
1527 * Solves the equation for the conformal factor :
1528 * The fields are the total values excpet those with
1529 * subscript \f$_a\f$, which are
1530 * the fields generated by each holes (\e a = 1, 2).
1531 * @param precis [input] : precision, for the boudary
1532 * conditions are being
1533 * obtained by iteration.
1534 * @param relax [input] : relaxation parameter.
1535 * @param bound_psi [input] : type of the boundary condition at the
1536 * horizon.
1537 */
1538 void solve_psi (double precis, double relax, int bound_psi) ;
1539
1540 /**
1541 * Solves the equation for the shift, using the
1542 * Oohara-Nakarmure scheme :
1543 * The fields are the total values excpet those with
1544 * subscript \f$_a\f$, which are
1545 * the fields generated by each holes (\c a = 1, 2).
1546 * @param precis [input] : precision for the solver, the boundary
1547 * conditions and the inversion of the operator being
1548 * obtained by iteration.
1549 * @param relax [input] : relaxation parameter.
1550 * @param bound_beta [input] : type of the boundary condition at the
1551 * horizon.
1552 */
1553 void solve_shift (double precis, double relax, int bound_beta,
1554 double omega_eff) ;
1555
1556 /**
1557 * Function to initialize a Bin_hor from a solution
1558 * computed with a smaller number of colocation points
1559 */
1560 void import_bh (const Bin_hor& bin) ;
1561
1562 /**
1563 * Calculates the ADM mass of the system.
1564 */
1565 double adm_mass() const ;
1566
1567 /**
1568 * Calculates the Komar mass of the system using :
1569 * \f$M = \frac{1}{4 \pi} \oint_{\infty} D^i N {\mathrm d} S_i\f$.
1570 */
1571 double komar_mass() const ;
1572
1573 /**
1574 * Calculates the angular momentum of the black hole using
1575 * the formula at the horizon.
1576 */
1577 double ang_mom_hor() const ;
1578
1579 /**
1580 * Calculates the angular momentum of the black hole.
1581 */
1582 double ang_mom_adm() const ;
1583
1584 /**
1585 * Calculation of the proper distance between the
1586 * two spheres of inversion,
1587 * along the x axis.
1588 * @param nr [input] : number of points used for the calculation.
1589 */
1590 double proper_distance(const int nr = 65) const ;
1591
1592 /**
1593 * Calculation of the hole1 part of the Post-Newtonian
1594 * correction to \f$h^{ij}\f$
1595 */
1596 Sym_tensor hh_Samaya_hole1() ;
1597
1598 /**
1599 * Calculation of the hole2 part of the Post-Newtonian
1600 * correction to \f$h^{ij}\f$
1601 */
1602 Sym_tensor hh_Samaya_hole2() ;
1603
1604 /**
1605 * Calculation of the Post-Newtonian correction to \f$h^{ij}\f$
1606 */
1607 void set_hh_Samaya() ;
1608
1609
1610
1611 } ;
1612
1613
1614 }
1615 #endif
1616