isol_hor.h

00001 /*
00002  *  Definition of Lorene class Isol_Hor
00003  *
00004  */
00005 
00006 /*
00007  *   Copyright (c) 2004-2005 Jose Luis Jaramillo
00008  *                      Francois Limousin
00009  *
00010  *   This file is part of LORENE.
00011  *
00012  *   LORENE is free software; you can redistribute it and/or modify
00013  *   it under the terms of the GNU General Public License version 2
00014  *   as published by the Free Software Foundation.
00015  *
00016  *   LORENE is distributed in the hope that it will be useful,
00017  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019  *   GNU General Public License for more details.
00020  *
00021  *   You should have received a copy of the GNU General Public License
00022  *   along with LORENE; if not, write to the Free Software
00023  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00024  *
00025  */
00026 
00027 #ifndef __Isol_hor_H_ 
00028 #define __Isol_hor_H_ 
00029 
00030 /*
00031  * $Id: isol_hor.h,v 1.53 2007/08/22 16:10:37 f_limousin Exp $
00032  * $Log: isol_hor.h,v $
00033  * Revision 1.53  2007/08/22 16:10:37  f_limousin
00034  * Correction of many errors in binhor_hh.C
00035  *
00036  * Revision 1.52  2007/04/13 15:29:44  f_limousin
00037  * Lots of improvements, generalisation to an arbitrary state of
00038  * rotation, implementation of the spatial metric given by Samaya.
00039  *
00040  * Revision 1.51  2006/08/01 14:36:25  f_limousin
00041  * New argument for the functions vv_bound_cart_bin( )
00042  *
00043  * Revision 1.50  2006/06/29 08:58:57  f_limousin
00044  * Boundary conditions in argument of write_global()
00045  *
00046  * Revision 1.49  2006/06/28 13:36:26  f_limousin
00047  * Convergence to a given irreductible mass
00048  *
00049  * Revision 1.48  2006/05/24 16:53:51  f_limousin
00050  * Funtion import(Bin_hor&)
00051  *
00052  * Revision 1.47  2006/02/22 16:55:42  f_limousin
00053  * boundary_nn_Neu_kk(int nn = 1)
00054  *
00055  * Revision 1.46  2006/02/22 16:20:54  jl_jaramillo
00056  * 2nc correction Valeur boundary_nn_Neu_kk(int nn)
00057  *
00058  * Revision 1.45  2006/02/20 16:48:14  jl_jaramillo
00059  * corrections numerical viscosity
00060  *
00061  * Revision 1.44  2006/02/20 15:01:37  jl_jaramillo
00062  * function for computing generalised Conformal THin Sandwich eqautions
00063  *
00064  * Revision 1.43  2006/01/18 12:29:18  jl_jaramillo
00065  * new method (chi,theta) for the spherically symmetric case
00066  *
00067  * Revision 1.42  2006/01/16 17:15:34  jl_jaramillo
00068  * function for solving the spherical case
00069  *
00070  * Revision 1.41  2005/11/02 16:10:38  jl_jaramillo
00071  * change in boundary_nn_Dir_lapl
00072  *
00073  * Revision 1.40  2005/10/24 16:45:16  jl_jaramillo
00074  * Cook boundary condition
00075  *
00076  * Revision 1.39  2005/10/23 12:32:00  f_limousin
00077  * Pure Dirichlet boundary condition for Psi.
00078  *
00079  * Revision 1.38  2005/09/13 18:33:17  f_limousin
00080  * New function vv_bound_cart_bin(double) for computing binaries with
00081  * berlin condition for the shift vector.
00082  * Suppress all the symy and asymy in the importations.
00083  *
00084  * Revision 1.37  2005/07/11 08:19:54  f_limousin
00085  * New function axi_break() to compute the departure to axisymmetry.
00086  *
00087  * Revision 1.36  2005/06/09 07:56:24  f_limousin
00088  * Implement a new function sol_elliptic_boundary() and
00089  * Vector::poisson_boundary(...) which solve the vectorial poisson
00090  * equation (method 6) with an inner boundary condition.
00091  *
00092  * Revision 1.35  2005/05/12 14:48:55  f_limousin
00093  * New boundary condition for the lapse : boundary_nn_lapl().
00094  *
00095  * Revision 1.34  2005/04/29 14:05:03  f_limousin
00096  * Important changes : manage the dependances between quantities (for
00097  * instance psi and psi4). New function write_global(ost).
00098  *
00099  * Revision 1.33  2005/04/15 11:20:39  jl_jaramillo
00100  * Function adapt_hor(double c_min, double c_max)  for adapting a given surface
00101  * to the excised surface
00102  *
00103  * Revision 1.32  2005/04/08 12:15:38  f_limousin
00104  * Function set_psi(). And dependance in phi.
00105  *
00106  * Revision 1.31  2005/04/03 19:48:38  f_limousin
00107  * Implementation of set_psi(psi_in).
00108  *
00109  * Revision 1.30  2005/04/02 15:50:08  f_limousin
00110  * New data member nz (number of zones). Delete ww.
00111  *
00112  * Revision 1.29  2005/03/31 09:48:04  f_limousin
00113  * New functions compute_ww(..) and aa_kerr_ww() and new data ww.
00114  *
00115  * Revision 1.28  2005/03/28 19:45:41  f_limousin
00116  * Implement Isol_hor::aa_kerr_perturb(...) and new member aa_quad_evol.
00117  *
00118  * Revision 1.27  2005/03/24 16:50:40  f_limousin
00119  * Add parameters solve_shift and solve_psi in par_isol.d and in function
00120  * init_dat(...). Implement Isolhor::kerr_perturb().
00121  *
00122  * Revision 1.26  2005/03/10 16:57:01  f_limousin
00123  * Improve the convergence of the code coal_bh.
00124  *
00125  * Revision 1.25  2005/03/10 10:19:42  f_limousin
00126  * Add the regularisation of the shift in the case of a single black hole
00127  * and lapse zero on the horizon.
00128  *
00129  * Revision 1.24  2005/03/09 10:28:37  f_limousin
00130  * Delete functions init_data_b_neumann(...) and init_data_berlin(...)
00131  * --> New parameter solve_lapse in the function init_data(...).
00132  * New function update_aa().
00133  *
00134  * Revision 1.23  2005/03/06 16:59:33  f_limousin
00135  * New function Isol_hor::aa() (the one belonging to the class
00136  * Time_slice_conf need to compute the time derivative of hh and thus
00137  * cannot work in the class Isol_hor).
00138  *
00139  * Revision 1.22  2005/03/04 09:39:31  f_limousin
00140  * Implement the constructor from a file, operator>>, operator<<
00141  * and function sauve in the class Bin_hor.
00142  *
00143  * Revision 1.21  2005/03/03 10:25:16  f_limousin
00144  * In the class Isol_hor :
00145  *    - Add the boost in x and z-direction (members boost_x and boost_z,
00146  *    and functions get_boost_x(), set_boost_x(double))
00147  *    - Add function area_hor()
00148  *    - Put the boundary conditions for the lapse, psi and beta in
00149  *    the parameter file.
00150  * In the class bin_hor :
00151  *    -  Introduce function to compute global quantities as ADM mass,
00152  *    Komar mass and angular momentum.
00153  *
00154  * Revision 1.20  2005/02/24 17:22:53  f_limousin
00155  * Suppression of the function beta_bound_cart().
00156  * The boundary conditions for psi, N and beta are now some parameters
00157  * in par_init.D and par_coal.d.
00158  *
00159  * Revision 1.19  2005/02/07 10:30:09  f_limousin
00160  * Add the regularisation in the case N=0 on the horizon.
00161  *
00162  * Revision 1.18  2004/12/31 15:33:37  f_limousin
00163  * Change the constructor from a file and the standard constructor.
00164  *
00165  * Revision 1.17  2004/12/29 16:30:00  f_limousin
00166  * Improve comments for doxygen
00167  *
00168  * Revision 1.16  2004/12/29 16:10:25  f_limousin
00169  * Add the new class Bin_hor.
00170  *
00171  * Revision 1.14  2004/11/24 19:32:05  jl_jaramillo
00172  * Method for initial data with Berlin boundary conditions
00173  *
00174  * Revision 1.13  2004/11/18 10:53:03  jl_jaramillo
00175  * Declarations for Berlin boundary conditions
00176  *
00177  * Revision 1.12  2004/11/05 11:01:13  f_limousin
00178  * Delete arguments ener_dens, mom_dens and trace_stress in all functions
00179  * source_nn, source_psi, source_beta, init_data. Delete also
00180  * argument partial_save in function save.
00181  *
00182  * Revision 1.11  2004/11/05 10:11:23  f_limousin
00183  * The member Metric met_gamt replace Sym_tensor gamt.
00184  *
00185  * Revision 1.10  2004/11/03 17:15:46  f_limousin
00186  * Change the standart constructor. Add 4 memebers : trK, trK_point,
00187  * gamt and gamt_point.
00188  * Add also a constructor from a file.
00189  *
00190  * Revision 1.9  2004/11/02 17:42:33  f_limousin
00191  * New method sauve(...) to save in a binary file.
00192  *
00193  * Revision 1.8  2004/11/02 16:15:12  f_limousin
00194  * Add new argument ang_vel in function init_dat(...).
00195  *
00196  * Revision 1.7  2004/10/29 15:46:14  jl_jaramillo
00197  * Remove 2 members, add ADM angular momentum and change name
00198  * of functions.
00199  *
00200  * Revision 1.6  2004/10/01 16:51:16  f_limousin
00201  * Pure Dirichlet boundary condition added
00202  *
00203  * Revision 1.5  2004/09/28 16:03:58  f_limousin
00204  * Add parameter niter in the parameter file par_hor.d. It appears in
00205  * argument of the function init_data_schwarz(...).
00206  *
00207  * Revision 1.4  2004/09/17 13:35:25  f_limousin
00208  * Introduction of relaxation in init_data_schwarz
00209  *
00210  * Revision 1.3  2004/09/16 08:36:57  f_limousin
00211  * New boundary conditions for lapse and psi.
00212  *
00213  * Revision 1.2  2004/09/09 17:04:27  jl_jaramillo
00214  * Elimination of _ih
00215  *
00216  *
00217  *
00218  * $Header: /cvsroot/Lorene/C++/Include/isol_hor.h,v 1.53 2007/08/22 16:10:37 f_limousin Exp $
00219  *
00220  */
00221 
00222 class Sym_tensor_trans ; 
00223 class Sym_tensor ; 
00224 class Vector ; 
00225 class Scalar ; 
00226 class Metric ; 
00227 class Metric_flat ; 
00228 class Base_vect ; 
00229 class Map ; 
00230 class Tbl ;
00231 class Time_slice ;
00232 class Time_slice_conf ;
00233 //class Tslice_dirac_max ;
00234 
00235 #include "time_slice.h"
00236 #include "proto.h"
00237 #include "headcpp.h"
00238 #include "cmp.h"
00239 #include "evolution.h"
00240 
00241                     
00242 //----------------------------//
00243 //       class Isol_Hor       //
00244 //----------------------------//
00245 
00252 class Isol_hor : public Time_slice_conf {
00253 
00254   // Data : 
00255   // -----
00256  protected: 
00258   Map_af& mp ;  
00259 
00261   int nz ;
00262 
00264   double radius ; 
00265 
00267   double omega ; 
00268   
00270   double boost_x ;
00271  
00273   double boost_z ;
00274 
00276   double regul ; 
00277 
00279   mutable Evolution_std<Scalar> n_auto_evol ; 
00280 
00282   mutable Evolution_std<Scalar> n_comp_evol ; 
00283 
00285   mutable Evolution_std<Scalar> psi_auto_evol ; 
00286 
00288   mutable Evolution_std<Scalar> psi_comp_evol ; 
00289 
00292   mutable Evolution_std<Vector> dn_evol ; 
00293 
00296   mutable Evolution_std<Vector> dpsi_evol ;   
00297 
00299   mutable Evolution_std<Vector> beta_auto_evol ; 
00300 
00302   mutable Evolution_std<Vector> beta_comp_evol ; 
00303 
00308   mutable Evolution_std<Sym_tensor> aa_auto_evol ; 
00309 
00314   mutable Evolution_std<Sym_tensor> aa_comp_evol ; 
00315   
00318   mutable Evolution_std<Sym_tensor> aa_nn ; 
00319 
00321   mutable Evolution_std<Scalar> aa_quad_evol ;
00322 
00324   Metric met_gamt ;
00325   
00327   Sym_tensor gamt_point ;
00328   
00330   Scalar trK ;
00331     
00333   Scalar trK_point ;
00334 
00343   Scalar decouple ;
00344 
00345   // Constructors - Destructor
00346   // -------------------------
00347  public:
00348 
00356   Isol_hor(Map_af& mpi, int depth_in = 3) ;
00357 
00380   Isol_hor(Map_af& mpi, const Scalar& lapse_in, const Scalar& psi_in,
00381        const Vector& shift_in, const Sym_tensor& aa_in, 
00382        const Metric& gamt, const Sym_tensor& gamt_point, 
00383        const Scalar& trK, const Scalar& trK_point, 
00384        const Metric_flat& ff_in, int depth_in = 3) ;    
00385   
00387   Isol_hor(const Isol_hor& ) ;  
00388 
00400   Isol_hor (Map_af& mp, FILE* fich, 
00401         bool partial_read, int depth_in = 3) ;  
00402   
00404   virtual ~Isol_hor() ;         
00405   
00406 
00407   // Mutators / assignment
00408   // ---------------------
00409  public:
00411   void operator=(const Isol_hor&) ; 
00412     
00413 
00414  public:
00416   const Map_af& get_mp() const {return mp;} ; 
00417   
00419   Map_af& set_mp() {return mp; } ;
00420 
00424   double get_radius() const {return radius;} ;
00425   
00429   void set_radius(double rad) {radius = rad ;} ;
00430     
00434   double get_omega() const {return omega ;} ;
00438   void set_omega(double ome) {omega = ome ;} ;
00439 
00443   double get_boost_x() const {return boost_x ;} ;
00447   void set_boost_x(double bo) {boost_x = bo ;} ;
00448 
00452   double get_boost_z() const {return boost_z ;} ;
00456   void set_boost_z(double bo) {boost_z = bo ;} ;
00457 
00458 
00459   
00460   // Accessors
00461   // ---------
00462  public:
00463 
00465   virtual const Scalar& n_auto() const ;
00466 
00468   virtual const Scalar& n_comp() const ;
00469 
00471   virtual const Scalar& psi_auto() const ;
00472 
00474   virtual const Scalar& psi_comp() const ;
00475 
00478   virtual const Vector& dnn() const ;
00479 
00483   virtual const Vector& dpsi() const ;
00484 
00486   virtual const Vector& beta_auto() const ;
00487 
00489   virtual const Vector& beta_comp() const ;
00490 
00495   virtual const Sym_tensor& aa_auto() const ; 
00496 
00501   virtual const Sym_tensor& aa_comp() const ; 
00502 
00506   virtual const Scalar& aa_quad() const ; 
00507 
00512   virtual const Metric& tgam() const {return met_gamt ;}
00513 
00517   const Scalar get_decouple() const {return decouple ;}
00518 
00519 
00520  public:
00528   void n_comp (const Isol_hor& comp) ;
00529   
00537   void psi_comp (const Isol_hor& comp) ;
00538 
00544   void beta_comp (const Isol_hor& comp) ;
00545 
00554   double viriel_seul () const ;
00555 
00565   void init_bhole () ;
00566   
00572   void init_met_trK() ;
00573 
00580   void init_bhole_seul () ;
00581 
00592   void set_psi(const Scalar& psi_in) ; 
00593 
00595   void set_nn(const Scalar& nn_in) ; 
00596   
00598   void set_gamt(const Metric& gam_tilde) ;
00599 
00600   // Physical parameters
00601   //--------------------
00602  public:
00603  
00604   
00606   const Vector radial_vect_hor() const ;
00607 
00609   const Vector tradial_vect_hor() const ;
00610 
00612   const Scalar b_tilde() const ;
00613 
00615   const Scalar darea_hor() const ;
00616 
00618   double area_hor() const ;
00619 
00621   double radius_hor() const ;
00622   
00624   double ang_mom_hor() const ;
00625   
00627   double mass_hor() const ;
00628   
00630   double kappa_hor() const ;
00631   
00633   double omega_hor() const ;
00634   
00636   double ang_mom_adm() const ;
00637 
00639   Scalar expansion() const ;
00640 
00641 
00642   //Computational methods
00643   //---------------------
00644  public:
00645   
00646   /* function to compute initial data for a single black hole
00647    *  @param bound_nn boundary condition for the lapse
00648    *  @param lim_nn value of the boundary condition for the lapse 
00649    *  @param bound_psi boundary condition for \f$ \Psi \f$
00650    *  @param bound_beta boundary condition for the shift
00651    *  @param solve_lapse do we solve the equation for the lapse ?
00652    *  @param precis precision for the convergence
00653    *  @param relax relaxation
00654    *  @param niter number of iterations
00655    */
00656   void init_data(int bound_nn, double lim_nn, int bound_psi, int bound_beta,
00657          int solve_lapse, int solve_psi, int solve_shift, 
00658          double precis = 1.e-12,
00659          double relax_nn = 0.5, double relax_psi = 0.5,  
00660          double relax_beta = 0.5, int niter = 100) ; 
00661 
00662   void init_data_loop(int bound_nn, double lim_nn, int bound_psi, 
00663               int bound_beta, int solve_lapse, int solve_psi,
00664               int solve_shift, double precis= 1.e-12, 
00665               double precis_loop= 1.e-12,
00666               double relax_nn = 1., double relax_psi= 1.,  
00667               double relax_beta = 1., double relax_loop = 1., 
00668               int niter = 100) ;
00669 
00670 
00671 
00672   void init_data_spher(int bound_nn, double lim_nn, int bound_psi, 
00673                int bound_beta, int solve_lapse, int solve_psi, 
00674                int solve_shift, double precis = 1.e-12, 
00675                double relax = 1., int niter = 100) ; 
00676 
00677   void init_data_alt(int bound_nn, double lim_nn, int bound_psi, 
00678                int bound_beta, int solve_lapse, int solve_psi, 
00679                int solve_shift, double precis = 1.e-12, 
00680                double relax = 1., int niter = 100) ; 
00681 
00682   void init_data_CTS_gen(int bound_nn, double lim_nn, int bound_psi, int bound_beta,
00683          int solve_lapse, int solve_psi, int solve_shift, 
00684          double precis = 1.e-12, double relax_nn = 1.,
00685          double relax_psi = 1., double relax_beta = 1., 
00686          int niter = 100, double a = 1., double zeta = 4.) ; 
00687 
00688 
00689 
00690 
00691   //Sources
00692   //-------
00693   
00695   const Scalar source_psi() const ;
00696 
00698   const Scalar source_nn() const ;
00699 
00701   const Vector source_beta() const ;
00702 
00704   const Scalar source_b_tilde() const ;
00705 
00707   const Vector source_vector_b() const ;
00708   
00709   
00710   // BOUNDARY CONDITIONS
00711   //--------------------
00712   
00714   const Valeur boundary_psi_Dir_evol() const ;
00715 
00717   const Valeur boundary_psi_Neu_evol() const ;
00718 
00720   const Valeur boundary_psi_Dir_spat() const ;
00721 
00723   const Valeur boundary_psi_Neu_spat() const ;
00724 
00726   const Valeur boundary_psi_app_hor() const ;
00727 
00729   const Valeur boundary_psi_Dir() const ;
00730 
00732   const Valeur boundary_nn_Dir_kk() const ;
00733 
00735   const Valeur boundary_nn_Neu_kk(int nn = 1) const ;   
00736 
00738   const Valeur boundary_nn_Neu_Cook() const ;   
00739 
00742   const Valeur boundary_nn_Dir_eff(double aa) const ;
00743 
00746   const Valeur boundary_nn_Dir_lapl(int mer = 1) const ;
00747 
00750   const Valeur boundary_nn_Neu_eff(double aa) const ;   
00751 
00753   const Valeur boundary_nn_Dir(double aa) const ;
00754 
00756   const Valeur boundary_beta_r() const ;
00757   
00759   const Valeur boundary_beta_theta() const ;
00760   
00762   const Valeur boundary_beta_phi(double om) const ;
00763   
00765   const Valeur boundary_beta_x(double om) const ;
00766   
00768   const Valeur boundary_beta_y(double om) const ;
00769   
00771   const Valeur boundary_beta_z() const ;
00772 
00774   const Valeur beta_boost_x() const ;  
00775 
00777   const Valeur beta_boost_z() const ;  
00778 
00780   const Vector vv_bound_cart(double om) const ;
00781 
00784   const Vector vv_bound_cart_bin(double om, int hole = 0) const ;
00785 
00787   const Valeur boundary_vv_x(double om) const ;
00788 
00790   const Valeur boundary_vv_y(double om) const ;
00791   
00793   const Valeur boundary_vv_z(double om) const ;
00794 
00796   const Valeur boundary_vv_x_bin(double om, int hole = 0) const ;
00797 
00799   const Valeur boundary_vv_y_bin(double om, int hole = 0) const ;
00800 
00802   const Valeur boundary_vv_z_bin(double om, int hole = 0) const ;
00803 
00805   const Valeur boundary_b_tilde_Neu() const ;
00806 
00808   const Valeur boundary_b_tilde_Dir() const ;
00809  
00814   void update_aa() ; 
00815   
00827   double regularisation (const Vector& shift_auto, const Vector& shift_comp, 
00828              double ang_vel) ;
00829 
00839   double regularise_one() ;
00840 
00843   void met_kerr_perturb() ;
00844   
00845   /* Perturbation of Kerr using  \f$ A^{ij}A_{ij} \f$ from 
00846    * equation (14) of Dain (2002).
00847    * @param mm mass of the Kerr black hole metric.
00848    * @param aa rotation parameter of the Kerr black hole metric.
00849    */
00850   void aa_kerr_ww(double mm, double aa) ;
00851   
00853     
00854   double axi_break() const ;
00855 
00856   /*  Calculation of the outermost trapped surface and adaptation
00857    *  of all necessary quantities
00858    */
00859 
00860   void adapt_hor(double c_min, double c_max) ;
00861   
00862 
00863   // Outputs
00864   // -------
00865  protected:
00867   virtual ostream& operator>>(ostream& ) const ;    
00868   
00869 
00870   public :
00877     virtual void sauve(FILE* fich, bool partial_save) const ; 
00878     
00879   friend class Bin_hor ; 
00880 
00881 };
00882 
00892 class Single_hor {
00893 
00894   // Data : 
00895   // -----
00896  protected: 
00898   Map_af& mp ;  
00899 
00901   int nz ;
00902 
00904   double radius ; 
00905 
00907   double omega ; 
00908   
00910   double regul ; 
00911 
00913   Scalar n_auto ; 
00914 
00916   Scalar n_comp ; 
00917 
00919   Scalar nn ; 
00920 
00922   Scalar psi_auto ; 
00923 
00925   Scalar psi_comp ; 
00926 
00928   Scalar psi ; 
00929 
00931   mutable Scalar* p_psi4 ; 
00932 
00935   Vector dn ; 
00936 
00939   Vector dpsi ;   
00940 
00942   Vector beta_auto ; 
00943 
00945   Vector beta_comp ; 
00946 
00948   Vector beta ; 
00949 
00951   mutable Metric* p_gam ;
00952 
00957   Sym_tensor aa_auto ; 
00958 
00963   Sym_tensor aa_comp ;
00964  
00969   Sym_tensor aa ; 
00970 
00972   mutable Sym_tensor* p_k_dd ; 
00973 
00975   Metric tgam ;
00976   
00978   Metric_flat ff ;
00979   
00981   Sym_tensor hh ;
00982   
00984   Sym_tensor gamt_point ;
00985   
00987   Scalar trK ;
00988     
00990   Scalar trK_point ;
00991 
01000   Scalar decouple ;
01001 
01002   // Constructors - Destructor
01003   // -------------------------
01004  public:
01005 
01009   Single_hor(Map_af& mpi) ;
01010  
01012   Single_hor(const Single_hor& ) ;  
01013 
01021   Single_hor (Map_af& mp, FILE* fich) ;  
01022   
01024   virtual ~Single_hor() ;           
01025   
01026 
01027   // Mutators / assignment
01028   // ---------------------
01029  public:
01031   void operator=(const Single_hor&) ;   
01032     
01033 
01034  public:
01036   const Map_af& get_mp() const {return mp;} ; 
01037   
01039   Map_af& set_mp() {return mp; } ;
01040 
01044   double get_radius() const {return radius;} ;
01045   
01049   void set_radius(double rad) {radius = rad ;} ;
01050     
01054   double get_omega() const {return omega ;} ;
01058   void set_omega(double ome) {omega = ome ;} ;
01059 
01060   // Memory management
01061   // -----------------
01062  protected:
01063   
01065   void del_deriv() const ; 
01066   
01068   void set_der_0x0() const ; 
01069   
01070 
01071   
01072   // Accessors
01073   // ---------
01074  public:
01075 
01077   const Scalar& get_n_auto() const ;
01078 
01080   const Scalar& get_n_comp() const ;
01081 
01083   const Scalar& get_nn() const ;
01084 
01086   const Scalar& get_psi_auto() const ;
01087 
01089   const Scalar& get_psi_comp() const ;
01090 
01092   const Scalar& get_psi() const ;
01093 
01095   const Scalar& get_psi4() const ;
01096 
01098   const Vector& get_dn() const ;
01099 
01102   const Vector& get_dpsi() const ;
01103 
01105   const Vector& get_beta_auto() const ;
01106 
01108   const Vector& get_beta_comp() const ;
01109 
01111   const Vector& get_beta() const ;
01112 
01116   const Sym_tensor& get_aa_auto() const ; 
01117 
01121   const Sym_tensor& get_aa_comp() const ; 
01122 
01126   const Sym_tensor& get_aa() const ; 
01127 
01131   const Metric& get_tgam() const {return tgam ;}
01132 
01135   const Metric& get_gam() const ;
01136 
01139   const Sym_tensor& get_k_dd() const ;
01140 
01144   const Scalar get_decouple() const {return decouple ;}
01145 
01146 
01147  public:
01155   void n_comp_import (const Single_hor& comp) ;
01156   
01164   void psi_comp_import (const Single_hor& comp) ;
01165 
01171   void beta_comp_import (const Single_hor& comp) ;
01172 
01181   double viriel_seul () const ;
01182 
01192   void init_bhole () ;
01193   
01199   void init_met_trK() ;
01200 
01207   void init_bhole_seul () ;
01208 
01219   void set_psi_auto(const Scalar& psi_in) ; 
01220 
01222   void set_n_auto(const Scalar& nn_in) ; 
01223   
01225   void set_beta_auto(const Scalar& shift_in) ; 
01226 
01228   void set_aa_auto(const Scalar& aa_auto_in) ; 
01229 
01231   void set_aa_comp(const Scalar& aa_comp_in) ; 
01232 
01234   void set_aa(const Scalar& aa_in) ; 
01235 
01236 
01237   // Physical parameters
01238   //--------------------
01239  public:
01240  
01241 
01243   const Scalar b_tilde() const ;
01244 
01246   const Scalar darea_hor() const ;
01247 
01249   double area_hor() const ;
01250 
01252   double radius_hor() const ;
01253   
01255   double ang_mom_hor() const ;
01256   
01258   double mass_hor() const ;
01259   
01261   double kappa_hor() const ;
01262   
01264   double omega_hor() const ;
01265   
01267   double ang_mom_adm() const ;
01268 
01270   Scalar expansion() const ;
01271 
01272   
01273   // BOUNDARY CONDITIONS
01274   //--------------------
01275 
01277   const Valeur boundary_psi_app_hor() const ;
01278 
01281   const Valeur boundary_nn_Dir(double aa) const ;
01282 
01285   const Valeur boundary_nn_Neu(double aa) const ;   
01286   
01288   const Valeur boundary_beta_x(double om_orb, double om_loc) const ;
01289   
01291   const Valeur boundary_beta_y(double om_orb, double om_loc) const ;
01292   
01294   const Valeur boundary_beta_z() const ;
01295 
01296   
01308   double regularisation (const Vector& shift_auto, const Vector& shift_comp, 
01309              double ang_vel) ;
01310 
01320   double regularise_one() ;  
01321 
01322   public :
01329     virtual void sauve(FILE* fich) const ; 
01330     
01331   friend class Bin_hor ; 
01332 
01333 };
01334 
01335 class Bin_hor {
01336     
01337     // data :
01338     private:
01339     // lThe two black holes
01340     Single_hor hole1 ;  
01341     Single_hor hole2 ;  
01342     
01344     Single_hor* holes[2] ; 
01345     
01346     double omega ;  
01347     
01348     public:
01349 
01358     Bin_hor(Map_af& mp1, Map_af& mp2) ; 
01359 
01360     Bin_hor(const Bin_hor& ) ;  
01361 
01374     Bin_hor (Map_af& mp1, Map_af& mp2, FILE* fich) ;  
01375     
01376     virtual ~Bin_hor() ;  
01377     
01378      public :
01385       void sauve(FILE* fich) const ; 
01386       
01390     void write_global(ostream&, double lim_nn, int bound_nn, 
01391               int bound_psi, int bound_beta, double alpha) const  ;
01392 
01393        public:
01394     
01395     void operator=(const Bin_hor&) ; 
01396     
01401     Single_hor& set(int i) 
01402         { assert( (i==1) || (i==2) ); 
01403           return *holes[i-1] ;} ; 
01407     void set_omega(double ome) {omega = ome ; 
01408                  hole1.set_omega (ome) ;
01409                  hole2.set_omega (ome) ;} ;
01410     
01411     public: const Single_hor& operator()(int i) const 
01416         { assert( (i==1) || (i==2) ); 
01417           return *holes[i-1] ;} ;
01418           
01420     double get_omega() const {return omega; } ; 
01421     
01430     void init_bin_hor() ;
01431     
01438     double viriel() const ;
01439 
01444     void extrinsic_curvature () ;
01445     
01450     void decouple () ;
01451     
01452     public:
01468     void set_statiques (double precis, double relax, int bound_nn,
01469                 double lim_nn, int bound_psi) ;
01470      
01497     double coal (double ang_vel, double relax, int nb_om,
01498              int nb_it, int bound_nn, double lim_nn, 
01499              int bound_psi, int bound_beta, double omega_eff, 
01500              double alpha,
01501              ostream& fich_iteration, ostream& fich_correction,
01502              ostream& fich_viriel, ostream& fich_kss, 
01503              int step, int search_mass, double mass_irr, 
01504              const int sortie = 0) ;
01505 
01506       
01521       void solve_lapse (double precis, double relax, int bound_nn,
01522                 double lim_nn) ;
01523       
01536       void solve_psi (double precis, double relax, int bound_psi) ;
01537       
01551       void solve_shift (double precis, double relax, int bound_beta,
01552                 double omega_eff) ;
01553     
01558       void import_bh (const Bin_hor& bin) ;
01559 
01563       double adm_mass() const ;
01564       
01569       double komar_mass() const ;
01570       
01575       double ang_mom_hor() const ;
01576 
01580       double ang_mom_adm() const ;
01581 
01588       double proper_distance(const int nr = 65) const ;
01589 
01594       Sym_tensor hh_Samaya_hole1() ;
01595       
01600       Sym_tensor hh_Samaya_hole2() ;
01601 
01605       void set_hh_Samaya() ;
01606 
01607 
01608 
01609 } ;
01610 
01611 
01612 #endif
01613 

Generated on Tue Feb 7 01:35:17 2012 for LORENE by  doxygen 1.4.6