bhole.h

00001 /*
00002  *  Definition of Lorene classes Bhole
00003  *               Bhole_binaire
00004  *
00005  */
00006 
00007 /*
00008  *   Copyright (c) 2000-2001 Philippe Grandclement
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 as published by
00014  *   the Free Software Foundation; either version 2 of the License, or
00015  *   (at your option) any later version.
00016  *
00017  *   LORENE is distributed in the hope that it will be useful,
00018  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00019  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00020  *   GNU General Public License for more details.
00021  *
00022  *   You should have received a copy of the GNU General Public License
00023  *   along with LORENE; if not, write to the Free Software
00024  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00025  *
00026  */
00027 
00028 
00029 #ifndef __BHOLE_H_ 
00030 #define __BHOLE_H_ 
00031 
00032 /*
00033  * $Id: bhole.h,v 1.17 2007/05/15 12:44:18 p_grandclement Exp $
00034  * $Log: bhole.h,v $
00035  * Revision 1.17  2007/05/15 12:44:18  p_grandclement
00036  * Scalar version of reevaluate
00037  *
00038  * Revision 1.16  2007/04/24 20:15:30  f_limousin
00039  * Implementation of Dirichlet and Neumann BC for the lapse
00040  *
00041  * Revision 1.15  2006/04/27 09:12:29  p_grandclement
00042  * First try at irrotational black holes
00043  *
00044  * Revision 1.14  2005/08/29 15:10:12  p_grandclement
00045  * Addition of things needed :
00046  *   1) For BBH with different masses
00047  *   2) Provisory files for the mixted binaries (Bh and NS) : THIS IS NOT
00048  *   WORKING YET !!!
00049  *
00050  * Revision 1.13  2004/12/02 09:33:04  p_grandclement
00051  * *** empty log message ***
00052  *
00053  * Revision 1.12  2004/03/25 12:35:34  j_novak
00054  * now using namespace Unites
00055  *
00056  * Revision 1.11  2004/03/25 09:14:06  j_novak
00057  * *** empty log message ***
00058  *
00059  * Revision 1.10  2004/03/25 08:53:33  j_novak
00060  * Error in the doc corrected.
00061  *
00062  * Revision 1.9  2004/03/24 17:14:04  j_novak
00063  * Translation of comments to doxygen
00064  *
00065  * Revision 1.8  2003/11/25 07:12:58  k_taniguchi
00066  * Change the argument of update_metric from the class Etoile_bin to Et_bin_nsbh.
00067  *
00068  * Revision 1.7  2003/11/13 13:43:53  p_grandclement
00069  * Addition of things needed for Bhole::update_metric (const Etoile_bin&, double, double)
00070  *
00071  * Revision 1.6  2003/10/24 13:05:48  p_grandclement
00072  * correction of the equations for Bin_ns_bh...
00073  *
00074  * Revision 1.5  2003/02/13 16:40:24  p_grandclement
00075  * Addition of various things for the Bin_ns_bh project, non of them being
00076  * completely tested
00077  *
00078  * Revision 1.4  2003/01/31 16:57:12  p_grandclement
00079  * addition of the member Cmp decouple used to compute the K_ij auto, once
00080  * the K_ij total is known
00081  *
00082  * Revision 1.3  2002/12/18 10:28:49  e_gourgoulhon
00083  *
00084  * Added the set_mp function.
00085  *
00086  * Revision 1.2  2002/09/13 09:17:31  j_novak
00087  * Modif. commentaires
00088  *
00089  * Revision 1.1.1.1  2001/11/20 15:19:27  e_gourgoulhon
00090  * LORENE
00091  *
00092  * Revision 2.45  2001/06/28  15:08:16  eric
00093  * Ajout de la fonction area().
00094  *
00095  * Revision 2.44  2001/05/16  11:32:45  phil
00096  * ajout de init_bhole_seul
00097  *
00098  * Revision 2.43  2001/05/07  12:35:28  phil
00099  * mmodifi commentaires
00100  *
00101  * Revision 2.42  2001/05/07  11:43:43  phil
00102  * *** empty log message ***
00103  *
00104  * Revision 2.41  2001/05/07  11:40:50  phil
00105  * mise a jour des commentaires
00106  *
00107  * Revision 2.40  2001/05/07  09:30:37  phil
00108  * *** empty log message ***
00109  *
00110  * Revision 2.39  2001/05/07  09:28:37  phil
00111  * *** empty log message ***
00112  *
00113  * Revision 2.38  2001/05/07  09:11:31  phil
00114  * *** empty log message ***
00115  *
00116  * Revision 2.37  2001/04/27  09:25:11  phil
00117  * fait_decouple est devenu public
00118  *
00119  * Revision 2.36  2001/04/26  12:04:11  phil
00120  * *** empty log message ***
00121  *
00122  * Revision 2.35  2001/04/05  13:42:40  phil
00123  * *** empty log message ***
00124  *
00125  * Revision 2.34  2001/04/05  13:34:29  phil
00126  * ajout resolution en utilisant phi
00127  *
00128  * Revision 2.33  2001/03/22  10:49:34  phil
00129  * *** empty log message ***
00130  *
00131  * Revision 2.32  2001/03/22  10:41:25  phil
00132  * pleins de modif
00133  *
00134  * Revision 2.31  2001/02/28  13:22:31  phil
00135  * modif vire kk_auto
00136  *
00137  * Revision 2.30  2001/02/12  15:37:42  phil
00138  * ajout calcul de J a linfini
00139  *
00140  * Revision 2.29  2001/01/29  14:29:56  phil
00141  * ajout type rotation
00142  *
00143  * Revision 2.28  2001/01/24  10:57:08  phil
00144  * ajout de set_rayonm
00145  *
00146  * Revision 2.27  2001/01/22  09:29:08  phil
00147  * vire les procedures qui servent pas
00148  *
00149  * Revision 2.26  2001/01/10  09:31:05  phil
00150  * modification de fait_kk_auto (membre de binaire maintenant)
00151  *
00152  * Revision 2.25  2001/01/09  13:38:15  phil
00153  * ajout memebre kk_auto
00154  *
00155  * Revision 2.24  2000/12/21  10:47:07  phil
00156  * retour eventuel a 2.21
00157  *
00158  * Revision 2.21  2000/12/20  09:07:56  phil
00159  * ajout set_statiques
00160  *
00161  * Revision 2.20  2000/12/18  16:40:39  phil
00162  * *** empty log message ***
00163  *
00164  * Revision 2.19  2000/12/18  16:38:04  phil
00165  * ajout convergence vers une masse donnee
00166  *
00167  * Revision 2.18  2000/12/15  16:41:28  phil
00168  * ajout calcul de la separation
00169  *
00170  * Revision 2.17  2000/12/14  10:44:28  phil
00171  * ATTENTION : PASSAGE DE PHI A PSI
00172  *
00173  * Revision 2.16  2000/12/13  15:35:18  phil
00174  * ajout calcul bare_masse
00175  *
00176  * Revision 2.15  2000/12/04  14:29:37  phil
00177  * ajout de grad_n_tot
00178  *
00179  * Revision 2.14  2000/12/01  16:12:52  phil
00180  * *** empty log message ***
00181  *
00182  * Revision 2.13  2000/12/01  14:16:20  phil
00183  * *** empty log message ***
00184  *
00185  * Revision 2.12  2000/11/24  15:14:44  phil
00186  * ajout de find_horizon
00187  *
00188  * Revision 2.11  2000/11/24  09:57:18  phil
00189  * ajout calcul masse et moment pour systeme
00190  *
00191  * Revision 2.10  2000/11/17  10:03:13  phil
00192  * ajout de coal
00193  *
00194  * Revision 2.9  2000/11/15  18:26:29  phil
00195  * simplifaction resolution du shift : on bosse a omega bloque
00196  *
00197  * Revision 2.8  2000/11/15  12:59:50  phil
00198  * changement solve_shift_omega
00199  *
00200  * Revision 2.7  2000/11/15  09:41:03  phil
00201  * *** empty log message ***
00202  *
00203  * Revision 2.6  2000/11/15  09:39:26  phil
00204  * ajout viriel
00205  *
00206  * Revision 2.5  2000/11/03  12:56:41  phil
00207  * ajout de const
00208  *
00209  * Revision 2.4  2000/10/26  08:20:45  phil
00210  * ajout verifie_shift
00211  *
00212  * Revision 2.3  2000/10/23  09:15:12  phil
00213  * modif commentaires
00214  *
00215  * Revision 2.2  2000/10/20  10:51:13  phil
00216  * Modif commentaires (minimale !)
00217  *
00218  * Revision 2.1  2000/10/20  09:27:28  phil
00219  * *** empty log message ***
00220  *
00221  * Revision 2.0  2000/10/20  09:22:04  phil
00222  * *** empty log message ***
00223  *
00224  *
00225  * $Header: /cvsroot/Lorene/C++/Include/bhole.h,v 1.17 2007/05/15 12:44:18 p_grandclement Exp $
00226  *
00227  */
00228 
00229 class Tenseur ;
00230 class Tenseur_sym ;
00231 class Map_af ;
00232 class Bhole_binaire ;
00233 class Et_bin_nsbh ;
00234 
00235 #include "tenseur.h"
00236 
00237 #define COROT 0
00238 #define IRROT 1
00239 
00263 class Bhole {
00264 
00265     // Data :
00266     protected:
00267     
00268     Map_af& mp ;  
00269     double rayon ; 
00270     double omega ; 
00271     double omega_local ; 
00272     int rot_state ; 
00273     double lapse_hori ; 
00274     
00278     double* boost ;
00279     double regul ; 
00280     
00281     Tenseur n_auto ; 
00282     Tenseur n_comp ; 
00283     Tenseur n_tot ; 
00284     
00285     Tenseur psi_auto ; 
00286     Tenseur psi_comp ; 
00287     Tenseur psi_tot ; 
00288     
00289     Tenseur grad_n_tot ; 
00290     Tenseur grad_psi_tot ; 
00291     
00292     Tenseur shift_auto ; 
00293     
00294     Tenseur_sym taij_auto ; 
00295     Tenseur_sym taij_comp ;
00296 
00300     Tenseur_sym taij_tot ;
00301     
00302     Tenseur_sym tkij_auto ; 
00303     Tenseur_sym tkij_tot ; 
00304     
00313     Cmp decouple ;
00314     
00315     //Constructors :
00316     public:
00321     Bhole (Map_af& mapping) ;
00322     Bhole (const Bhole&) ;  
00323     Bhole (Map_af&, FILE*, bool old=false) ; 
00324     ~Bhole() ; 
00325     
00326     public:
00327     //sauvegarde
00328     void sauve (FILE* fich) const ; 
00329     
00330     public:
00331     void operator= (const Bhole&) ; 
00332     
00334     const Map_af& get_mp() const {return mp;} ; 
00335 
00337     Map_af& set_mp() {return mp; } ;
00338 
00342     double get_rayon() const {return rayon;} ;
00343     
00347     void set_rayon(double ray) {rayon = ray ;} ;
00348     
00352     double get_omega() const {return omega;} ;
00356     void set_omega(double ome) {omega = ome ;} ;
00360     double get_omega_local() const {return omega_local;} ;
00364     void set_omega_local(double ome) {omega_local = ome ;} ;
00368     double get_rot_state() const {return rot_state;} ;
00372     void set_rot_state(int rotation) {rot_state = rotation;} ;
00377     double* get_boost () const {return boost;} ;
00378     void set_boost (double vx, double vy, double vz) {
00379         boost[0] = vx ; boost[1] = vy ; boost[2] = vz ;
00380     }
00381     
00385     double get_regul() const {return regul;} ;
00386     
00390     const Tenseur& get_n_auto() const {return n_auto ;} ;
00394     Cmp return_n_auto() const {return n_auto() ;} ;
00398     const Tenseur& get_n_comp() const {return n_comp ;} ;
00402     const Tenseur& get_n_tot() const {return n_tot ;} ;
00403     
00407     const Tenseur& get_psi_auto() const {return psi_auto ;} ;
00411     Cmp return_psi_auto() const {return psi_auto() ;} ;
00415     const Tenseur& get_psi_comp() const {return psi_comp ;} ;
00419     const Tenseur& get_psi_tot() const {return psi_tot ;} ;
00420     
00424     const Tenseur& get_grad_psi_tot() const {return grad_psi_tot ;} ;
00425     
00429     const Tenseur& get_grad_n_tot() const {return grad_n_tot ;} ;
00430     
00431     
00435     const Tenseur& get_shift_auto() const {return shift_auto ;} ;
00436     
00437     Cmp return_shift_auto(int i) const {return shift_auto(i) ;} ;
00438     
00442     const Tenseur& get_taij_auto() const {return taij_auto ;} ;
00446     const Tenseur& get_taij_comp() const {return taij_comp ;} ;
00450     const Tenseur& get_taij_tot() const {return taij_tot ;}
00451     
00455     const Tenseur& get_tkij_tot() const {return tkij_tot ;}
00459     const Tenseur& get_tkij_auto() const {return tkij_auto ;}
00463     const Cmp get_decouple() const {return decouple ;}
00464     
00465     Cmp& set_n_auto() {return n_auto.set() ;}
00466     Cmp& set_psi_auto() {return psi_auto.set() ;}
00467     
00468     void set_lapse_hori(double xx) {lapse_hori = xx;} 
00469     public:
00470     
00477     void fait_n_comp (const Bhole& comp) ;
00478     
00485     void fait_psi_comp (const Bhole& comp) ;
00492     void fait_n_comp (const Et_bin_nsbh& comp) ;
00493     
00500     void fait_psi_comp (const Et_bin_nsbh& comp) ;
00501 
00505     void fait_taij_auto () ;
00506     
00507 
00520     void regularise_shift (const Tenseur& comp) ;
00521     
00528      double viriel_seul () const ;
00529      
00539     void init_bhole () ;
00540     
00567     void init_kerr (double masse, double moment) ;
00568     
00580     void solve_lapse_seul (double relax) ;
00581     
00595     void solve_psi_seul (double relax) ;
00596     
00612     void solve_shift_seul (double precis, double relax) ;
00613     
00623     void regularise_seul () ;
00636     void solve_lapse_with_ns (double relax, int bound_nn, 
00637                   double lim_nn) ;
00638     
00652     void solve_psi_with_ns (double relax) ;
00653     
00670     void solve_shift_with_ns (const Et_bin_nsbh& ns, 
00671                   double precis, double relax,
00672                   int bound_nn, double lim_nn) ;
00673     
00674     void equilibrium (const Et_bin_nsbh& ns, double precis, double relax,
00675               int bound_nn, double lim_nn) ;
00676     void update_metric (const Et_bin_nsbh& ns) ;
00677         
00678     
00683     void fait_tkij() ;
00684     
00686     double area() const ; 
00687     
00694     double masse_adm_seul () const ;
00695     
00702     double masse_komar_seul() const ;
00703     
00712     double moment_seul_inf() const ;
00713     
00722     double moment_seul_hor() const ;
00723     
00724     /*
00725     * local angular momentum
00726     */
00727     double local_momentum() const ;
00728     
00732     void init_bhole_phi () ;
00733     
00740     void init_bhole_seul () ;
00741     
00742     friend class Bhole_binaire ; 
00743     friend class Bin_ns_bh ; 
00744 } ;
00745 
00752 class Bhole_binaire {
00753     
00754     // data :
00755     private:
00756     // les deux trous noirs.
00757     Bhole hole1 ;   
00758     Bhole hole2 ;   
00759     
00760     // Tableau sur les deux trous.
00761     Bhole* holes[2] ; 
00762     
00763     double pos_axe ; 
00764     double omega ;  
00765     
00766     public:
00767     // constructeurs & destructeur
00768     Bhole_binaire(Map_af& mp1, Map_af& mp2) ;   
00769     Bhole_binaire(const Bhole_binaire& ) ;  
00770     ~Bhole_binaire() ;  
00771     
00772     public:
00773     // trucs pour modifier
00774     void operator=(const Bhole_binaire&) ; 
00775     
00780     Bhole& set(int i) 
00781         { assert( (i==1) || (i==2) ); 
00782           return *holes[i-1] ;} ; 
00786     void set_omega(double ome) {omega = ome ; 
00787                  hole1.set_omega (ome) ;
00788                  hole2.set_omega (ome) ;} ;
00789     
00790     void set_pos_axe (double) ;
00791                  
00792     public:
00793     // trucs pour lire :
00798     const Bhole& operator()(int i) const 
00799         { assert( (i==1) || (i==2) ); 
00800           return *holes[i-1] ;} ;
00801           
00803     double get_omega() const {return omega; } ; 
00804     
00812     void init_bhole_binaire() ;
00813     
00818     double viriel() const ;
00832     void solve_lapse (double precis, double relax) ;
00833     
00849     void solve_psi (double precis, double relax) ;
00850    
00867     void solve_shift (double precis, double relax) ;
00868     
00878     void fait_tkij () ;
00879     
00886     void fait_decouple () ;
00887     
00888     public:
00896      void set_statiques (double precis, double relax) ;
00897      
00908       void coal (double precis, double relax, int nbre_ome, double search_ome, 
00909             double m1, double m2, const int sortie = 0) ;  
00910 
00911                 
00916     double adm_systeme() const ;
00917     
00922     double komar_systeme() const ;
00923     
00929     double moment_systeme_inf() ;
00930     
00938     double moment_systeme_hor() const ;
00939     
00945      double distance_propre(const int nr = 65) const ;
00946      
00947     Tbl linear_momentum_systeme_inf() const ;
00948     
00952     void solve_phi (double precision, double relax) ;
00956     void init_phi() ;
00957 } ;
00958 
00959 #endif

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