etoile.h

00001 /*
00002  *  Definition of Lorene classes Etoile
00003  *               Etoile_bin
00004  *               Etoile_rot
00005  *
00006  */
00007 
00008 /*
00009  *   Copyright (c) 2000-2001 Eric Gourgoulhon
00010  *   Copyright (c) 2000-2001 Keisuke Taniguchi
00011  *
00012  *   This file is part of LORENE.
00013  *
00014  *   LORENE is free software; you can redistribute it and/or modify
00015  *   it under the terms of the GNU General Public License as published by
00016  *   the Free Software Foundation; either version 2 of the License, or
00017  *   (at your option) any later version.
00018  *
00019  *   LORENE is distributed in the hope that it will be useful,
00020  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00021  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00022  *   GNU General Public License for more details.
00023  *
00024  *   You should have received a copy of the GNU General Public License
00025  *   along with LORENE; if not, write to the Free Software
00026  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00027  *
00028  */
00029 
00030 
00031 #ifndef __ETOILE_H_ 
00032 #define __ETOILE_H_ 
00033 
00034 /*
00035  * $Id: etoile.h,v 1.31 2011/10/06 14:55:36 j_novak Exp $
00036  * $Log: etoile.h,v $
00037  * Revision 1.31  2011/10/06 14:55:36  j_novak
00038  * equation_of_state() is now virtual to be able to call to the magnetized
00039  * Eos_mag.
00040  *
00041  * Revision 1.30  2010/02/02 21:05:49  e_gourgoulhon
00042  * Etoile_bin:equilibrium : suppressed the argument method_khi added by
00043  * mistake during previous commit.
00044  *
00045  * Revision 1.29  2010/02/02 13:34:12  e_gourgoulhon
00046  * Marked DEPRECATED (in the documentation).
00047  *
00048  * Revision 1.28  2008/11/14 13:51:08  e_gourgoulhon
00049  * Added the parameter ent_limit to Etoile::equilibrium_spher and
00050  * Etoile_bin::equilibrium.
00051  *
00052  * Revision 1.27  2005/10/05 15:14:47  j_novak
00053  * Added a Param* as parameter of Etoile_rot::equilibrium
00054  *
00055  * Revision 1.26  2005/08/29 15:10:12  p_grandclement
00056  * Addition of things needed :
00057  *   1) For BBH with different masses
00058  *   2) Provisory files for the mixted binaries (Bh and NS) : THIS IS NOT
00059  *   WORKING YET !!!
00060  *
00061  * Revision 1.25  2005/01/18 22:35:51  k_taniguchi
00062  * Delete a pointer for Etoile::ray_eq(int kk).
00063  *
00064  * Revision 1.24  2005/01/18 20:34:14  k_taniguchi
00065  * Addition of Etoile::ray_eq(int kk).
00066  *
00067  * Revision 1.23  2005/01/17 20:39:32  k_taniguchi
00068  * Addition of Etoile::ray_eq_3pis2().
00069  *
00070  * Revision 1.22  2004/11/30 20:40:06  k_taniguchi
00071  * Addition of the method for calculating a spherical star with falloff
00072  * condition at the outer boundary.
00073  *
00074  * Revision 1.21  2004/05/10 10:18:33  f_limousin
00075  * Change to avoid warning in the compilation of Lorene
00076  *
00077  * Revision 1.20  2004/05/07 12:37:12  f_limousin
00078  * Add new member ssjm1_psi
00079  *
00080  * Revision 1.19  2004/04/08 16:42:31  f_limousin
00081  * Add a function velocity_potential with argument ssjm1_psi for the
00082  * case of strange stars.
00083  *
00084  * Revision 1.18  2004/03/22 13:12:41  j_novak
00085  * Modification of comments to use doxygen instead of doc++
00086  *
00087  * Revision 1.17  2003/10/24 12:24:41  k_taniguchi
00088  * Suppress the methods of update metric for NS-BH
00089  *
00090  * Revision 1.16  2003/10/21 11:44:43  k_taniguchi
00091  * Delete various things for the Bin_ns_bh project.
00092  * They are moved to et_bin_nsbh.h.
00093  *
00094  * Revision 1.15  2003/10/20 14:50:04  k_taniguchi
00095  * Addition of various things for the Bin_ns_bh project
00096  * which are related with the part of the neutron star.
00097  *
00098  * Revision 1.14  2003/10/20 13:11:03  k_taniguchi
00099  * Back to version 1.12
00100  *
00101  * Revision 1.13  2003/10/20 12:15:55  k_taniguchi
00102  * Addition of various things for the Bin_ns_bh project
00103  * which are related with the part of the neutron star.
00104  *
00105  * Revision 1.12  2003/06/20 14:13:16  f_limousin
00106  * Change to virtual the functions equilibrium_spher() and kinematics().
00107  *
00108  * Revision 1.11  2003/02/13 16:40:24  p_grandclement
00109  * Addition of various things for the Bin_ns_bh project, non of them being
00110  * completely tested
00111  *
00112  * Revision 1.10  2003/02/04 16:20:35  f_limousin
00113  * Change to virtual the routine extrinsic_curvature
00114  *
00115  * Revision 1.9  2003/01/31 16:57:12  p_grandclement
00116  * addition of the member Cmp decouple used to compute the K_ij auto, once
00117  * the K_ij total is known
00118  *
00119  * Revision 1.8  2002/12/19 14:48:00  e_gourgoulhon
00120  *
00121  * Class Etoile_bin: added the new functions:
00122  *  void update_metric(const Bhole& comp)
00123  *      void update_metric_der_comp(const Bhole& comp)
00124  * to treat the case where the companion is a black hole
00125  *
00126  * Revision 1.7  2002/12/17 21:17:08  e_gourgoulhon
00127  * Class Etoile_bin: suppression of the member p_companion
00128  *                   as well as the associated functions set_companion
00129  *            and get_companion.
00130  *
00131  * Revision 1.6  2002/09/13 09:17:33  j_novak
00132  * Modif. commentaires
00133  *
00134  * Revision 1.5  2002/06/17 14:05:16  j_novak
00135  * friend functions are now also declared outside the class definition
00136  *
00137  * Revision 1.4  2002/04/05 09:09:36  j_novak
00138  * The inversion of the EOS for 2-fluids polytrope has been modified.
00139  * Some errors in the determination of the surface were corrected.
00140  *
00141  * Revision 1.3  2002/01/11 14:09:34  j_novak
00142  * Added newtonian version for 2-fluid stars
00143  *
00144  * Revision 1.2  2001/12/06 15:11:43  jl_zdunik
00145  * Introduction of the new function f_eq() in the class Etoile_rot
00146  *
00147  * Revision 1.1.1.1  2001/11/20 15:19:27  e_gourgoulhon
00148  * LORENE
00149  *
00150  * Revision 2.61  2001/10/25  08:32:57  eric
00151  * Etoile_rot::display_poly passe de protected a public.
00152  *
00153  * Revision 2.60  2001/10/24  15:35:55  eric
00154  * Classe Etoile_rot: ajout de la fonction display_poly.
00155  *
00156  * Revision 2.59  2001/10/16  14:48:00  eric
00157  * La fonction Etoile_rot::get_omega() devient
00158  *   virtual Etoile_rot::get_omega_c()
00159  *  (retourne la valeur centrale de Omega).
00160  *
00161  * Revision 2.58  2001/10/11  09:24:00  eric
00162  * La fonction Etoile_rot::equilibrium est desormais virtuelle.
00163  *
00164  * Revision 2.57  2001/08/06  15:39:04  keisuke
00165  * Addition of a new argument to Etoile_bin::equilibrium and equil_regular.
00166  *
00167  * Revision 2.56  2001/06/25  12:52:33  eric
00168  * Classe Etoile_bin : ajout du membre p_companion et des fonctions
00169  *  associees set_companion() et get_companion().
00170  *
00171  * Revision 2.55  2001/06/13  14:11:55  eric
00172  * Modif commentaires (mise en conformite Doc++ 3.4.7)
00173  *
00174  * Revision 2.54  2001/03/26  09:29:59  jlz
00175  * Classe Etoile_rot: new members p_espec_isco and p_lspec_isco.
00176  *
00177  * Revision 2.53  2001/02/08  15:37:09  eric
00178  * *** empty log message ***
00179  *
00180  * Revision 2.52  2001/02/08  15:12:42  eric
00181  * Ajout de la fonction Etoile_rot::f_eccentric.
00182  *
00183  * Revision 2.51  2000/11/23  15:43:24  eric
00184  * Ajout de l'argument ent_limit a Etoile_rot::equilibrium.
00185  *
00186  * Revision 2.50  2000/11/19  18:51:13  eric
00187  * Etoile_rot: ajout de la fonction (static) lambda_grv2
00188  *
00189  * Revision 2.49  2000/11/18  23:17:32  eric
00190  * Ajout de l'argument ost a Etoile_rot::r_isco.
00191  *
00192  * Revision 2.48  2000/11/18  21:08:33  eric
00193  * Classe Etoile_rot: ajout des fonctions r_isco() et f_isco()
00194  *   ainsi que des membres associes p_r_isco et p_f_isco.
00195  *
00196  * Revision 2.47  2000/11/10  15:15:38  eric
00197  * Modif arguments Etoile_rot::equilibrium.
00198  *
00199  * Revision 2.46  2000/10/20  13:10:23  eric
00200  * Etoile_rot::equilibrium: ajout de l'argument nzadapt.
00201  *
00202  * Revision 2.45  2000/10/17  15:59:14  eric
00203  * Modif commentaires Etoile_rot::equilibrium
00204  *
00205  * Revision 2.44  2000/10/12  15:22:29  eric
00206  * Modif commentaires Etoile_rot.
00207  *
00208  * Revision 2.43  2000/10/12  10:20:12  eric
00209  * Ajout de la fonction Etoile_rot::fait_nphi().
00210  *
00211  * Revision 2.42  2000/09/22  15:50:13  keisuke
00212  * d_logn_auto_div devient desormais un membre de la classe Etoile
00213  * et non plus de la classe derivee Etoile_bin.
00214  *
00215  * Revision 2.41  2000/09/18  16:14:37  eric
00216  * Classe Etoile_rot: ajout du membre tkij et de la fonction
00217  *   extrinsic curvature().
00218  *
00219  * Revision 2.40  2000/09/07  14:31:09  keisuke
00220  * Ajout des membres logn_auto_regu et get_logn_auto_regu() a la classe Etoile.
00221  * Ajout des membres d_logn_auto_regu et get_d_logn_auto_regu()
00222  *  a la classe Etoile_bin.
00223  *
00224  * Revision 2.39  2000/09/07  10:25:50  keisuke
00225  * Ajout du membre get_logn_auto_div() a la classe Etoile.
00226  * Ajout du membre get_d_logn_auto_div() a la classe Etoile_bin.
00227  *
00228  * Revision 2.38  2000/08/31  11:25:24  eric
00229  * Classe Etoile_rot: ajout des membres tnphi et ak_car.
00230  *
00231  * Revision 2.37  2000/08/29  11:37:06  eric
00232  * Ajout des membres k_div et logn_auto_div a la classe Etoile.
00233  * Ajout du membre d_logn_auto_div a la classe Etoile_bin.
00234  *
00235  * Revision 2.36  2000/08/25  10:25:57  keisuke
00236  * Ajout de Etoile_bin::equil_regular.
00237  *
00238  * Revision 2.35  2000/08/18  14:01:07  eric
00239  * Modif commentaires.
00240  *
00241  * Revision 2.34  2000/08/17  12:38:30  eric
00242  * Modifs classe Etoile_rot : ajout des membres nuf, nuq, ssjm1_nuf et ssjm1_nuq
00243  * Modif arguments Etoile_rot::equilibrium.
00244  * .\
00245  *
00246  * Revision 2.33  2000/08/07  12:11:13  keisuke
00247  * Ajout de Etoile::equil_spher_regular.
00248  *
00249  * Revision 2.32  2000/07/21  12:02:55  eric
00250  * Suppression de Etoile_rot::relaxation.
00251  *
00252  * Revision 2.31  2000/07/20  15:32:28  eric
00253  * *** empty log message ***
00254  *
00255  * Revision 2.30  2000/07/06  09:39:12  eric
00256  * Ajout du membre p_xa_barycenter a Etoile_bin, ainsi que de la
00257  * fonction associee xa_barycenter().
00258  *
00259  * Revision 2.29  2000/05/25  13:47:38  eric
00260  * Modif Etoile_bin::equilibrium: ajout de l'argument thres_adapt
00261  *
00262  * Revision 2.28  2000/03/22  16:41:45  eric
00263  * Ajout de la sortie de nouvelles erreurs dans Etoile_bin::equilibrium.
00264  *
00265  * Revision 2.27  2000/03/22  12:54:44  eric
00266  * Nouveau prototype d'Etoile_bin::velocity_potential : l'erreur est
00267  * retournee en double.
00268  * Nouveau prototype d'Etoile_bin::equilibrium : diff_ent est remplace
00269  *  par le Tbl diff.
00270  *
00271  * Revision 2.26  2000/03/15  11:04:15  eric
00272  * Ajout des fonctions Etoile_bin::set_w_shift() et Etoile_bin::set_khi_shift()
00273  * Amelioration des commentaires.
00274  *
00275  * Revision 2.25  2000/03/08  12:12:49  eric
00276  * Ajout de la fonction Etoile_bin::is_irrotational().
00277  *
00278  * Revision 2.24  2000/03/07  14:48:01  eric
00279  * Ajout de la fonction Etoile_bin::extrinsic_curvature().
00280  *
00281  * Revision 2.23  2000/02/21  13:57:57  eric
00282  * classe Etoile_bin: suppression du membre psi: remplacement par psi0.
00283  *
00284  * Revision 2.22  2000/02/17  16:51:22  eric
00285  * Ajout de l'argument diff_ent dans Etoile_bin::equilibrium.
00286  *
00287  * Revision 2.21  2000/02/17  15:29:38  eric
00288  * Ajout de la fonction Etoile_bin::relaxation.
00289  *
00290  * Revision 2.20  2000/02/17  13:54:21  eric
00291  * Ajout de la fonction Etoile_bin::velocity_potential.
00292  *
00293  * Revision 2.19  2000/02/16  15:05:14  eric
00294  * Ajout des membres w_shift et khi_shift.
00295  * (sauves dans les fichiers a la place de shift_auto).
00296  * Ajout de la fonction Etoile_bin::fait_shift_auto.
00297  *
00298  * Revision 2.18  2000/02/16  13:47:02  eric
00299  * Classe Etoile_bin: ajout des membres ssjm1_khi et ssjm1_wshift.
00300  *
00301  * Revision 2.17  2000/02/16  11:54:13  eric
00302  * Classe Etoile_bin : ajout des membres ssjm1_logn et ssjm1_beta.
00303  *
00304  * Revision 2.16  2000/02/15  15:40:07  eric
00305  * Ajout de Etoile_bin::equilibrium.
00306  *
00307  * Revision 2.15  2000/02/12  18:40:15  eric
00308  * Modif commentaires.
00309  *
00310  * Revision 2.14  2000/02/12  14:44:26  eric
00311  * Ajout des fonctions Etoile_bin::set_logn_comp et set_pot_centri.
00312  *
00313  * Revision 2.13  2000/02/10  20:22:25  eric
00314  * Modif commentaires.
00315  *
00316  * Revision 2.12  2000/02/10  16:11:24  eric
00317  * Classe Etoile_bin : ajout des accesseurs get_psi, etc...
00318  *                     ajout de la fonction fait_d_psi
00319  *
00320  * Revision 2.11  2000/02/08  19:28:29  eric
00321  * La fonction Etoile_bin::scal_prod est rebaptisee Etoile_bin::sprod
00322  *
00323  * Revision 2.10  2000/02/04  17:15:15  eric
00324  * Classe Etoile_bin: ajout du membre ref_triad.
00325  *
00326  * Revision 2.9  2000/02/04  16:36:48  eric
00327  * Ajout des fonctions update_metric* et kinematics.
00328  *
00329  * Revision 2.8  2000/02/02  10:12:37  eric
00330  * Ajout des fonctions de lecture/ecriture mp, nzet, eos, etc...
00331  *
00332  * Revision 2.7  2000/02/01  15:59:43  eric
00333  * Ajout de la fonction Etoile_bin::scal_prod.
00334  *
00335  * Revision 2.6  2000/01/31  15:56:45  eric
00336  * Introduction de la classe derivee Etoile_bin.
00337  *
00338  * Revision 2.5  2000/01/28  17:17:45  eric
00339  * Ajout des fonctions de calcul des quantites globales.
00340  *
00341  * Revision 2.4  2000/01/27  16:46:59  eric
00342  * Ajout des fonctions get_ent(), etc....
00343  *
00344  * Revision 2.3  2000/01/24  17:19:48  eric
00345  * Modif commentaires.
00346  *
00347  * Revision 2.2  2000/01/24  17:13:04  eric
00348  * Le mapping mp n'est plus constant.
00349  * Ajout de la fonction equilibrium_spher.
00350  *
00351  * Revision 2.1  2000/01/24  13:37:19  eric
00352  * *** empty log message ***
00353  *
00354  * Revision 2.0  2000/01/20  17:04:33  eric
00355  * *** empty log message ***
00356  *
00357  *
00358  * $Header: /cvsroot/Lorene/C++/Include/etoile.h,v 1.31 2011/10/06 14:55:36 j_novak Exp $
00359  *
00360  */
00361 
00362 // Headers Lorene
00363 #include "tenseur.h"
00364 class Eos ;
00365 class Bhole ;
00366 
00367 
00368             //---------------------------//
00369             //    base class Etoile      //
00370             //---------------------------//
00371 
00411 class Etoile {
00412 
00413     // Data : 
00414     // -----
00415     protected:
00416     Map& mp ;       
00417 
00421     int nzet ;
00422     
00426     bool relativistic ;
00427     
00431     double unsurc2 ;         
00432     
00438     int k_div ; 
00439     
00440     const Eos& eos ;   
00441     
00442     // Fluid quantities with respect to the fluid frame
00443     // ------------------------------------------------
00445     Tenseur ent ;     
00446     
00447     Tenseur nbar ;     
00448     Tenseur ener ;     
00449     Tenseur press ;    
00450     
00451     // Fluid quantities with respect to the Eulerian frame
00452     // ---------------------------------------------------
00453     Tenseur ener_euler ; 
00454 
00456     Tenseur s_euler ;   
00457     
00459     Tenseur gam_euler ; 
00460     
00462     Tenseur u_euler ; 
00463     
00464     // Metric potentials
00465     // -----------------
00466     
00472     Tenseur logn_auto ;
00473 
00479     Tenseur logn_auto_regu ;
00480     
00485     Tenseur logn_auto_div ; 
00486     
00489     Tenseur d_logn_auto_div ; 
00490 
00494     Tenseur beta_auto ; 
00495     
00497     Tenseur nnn ; 
00498     
00500     Tenseur shift ;
00501     
00503     Tenseur a_car ; 
00504     
00505     // Derived data : 
00506     // ------------
00507     protected:
00509     mutable double* p_ray_eq ; 
00510 
00512     mutable double* p_ray_eq_pis2 ;
00513 
00515     mutable double* p_ray_eq_pi ;
00516     
00518     mutable double* p_ray_eq_3pis2 ;
00519 
00521     mutable double* p_ray_pole ;
00522 
00527     mutable Itbl* p_l_surf ; 
00528     
00533     mutable Tbl* p_xi_surf ; 
00534     
00535     mutable double* p_mass_b ;  
00536     mutable double* p_mass_g ;  
00537 
00538 
00539     // Constructors - Destructor
00540     // -------------------------
00541     public:
00542     
00552     Etoile(Map& mp_i, int nzet_i, bool relat, const Eos& eos_i) ;           
00553     
00554     
00555     Etoile(const Etoile& ) ;        
00556 
00564     Etoile(Map& mp_i, const Eos& eos_i, FILE* fich) ;           
00565 
00566     virtual ~Etoile() ;         
00567 
00568     
00569     // Memory management
00570     // -----------------
00571     protected:
00573     virtual void del_deriv() const ; 
00574     
00576     virtual void set_der_0x0() const ; 
00577 
00581     virtual void del_hydro_euler() ; 
00582     
00583 
00584     // Mutators / assignment
00585     // ---------------------
00586     public:
00588     void operator=(const Etoile&) ; 
00589     
00591     Map& set_mp() {return mp; } ; 
00592 
00594     void set_enthalpy(const Cmp& ) ; 
00595     
00599     virtual void equation_of_state() ; 
00600     
00605     virtual void hydro_euler() ; 
00606     
00616     virtual void equilibrium_spher(double ent_c, double precis = 1.e-14, const Tbl* ent_limit = 0x0 ) ; 
00617 
00627     void equil_spher_regular(double ent_c, double precis = 1.e-14) ; 
00628 
00637     virtual void equil_spher_falloff(double ent_c,
00638                      double precis = 1.e-14) ;
00639 
00640     // Accessors
00641     // ---------
00642     public:
00644     const Map& get_mp() const {return mp; } ; 
00645 
00647     int get_nzet() const {return nzet; } ; 
00648 
00652     bool is_relativistic() const {return relativistic; } ; 
00653 
00655     const Eos& get_eos() const {return eos; } ; 
00656 
00658     const Tenseur& get_ent() const {return ent;} ;
00659 
00661     const Tenseur& get_nbar() const {return nbar;} ;
00662 
00664     const Tenseur& get_ener() const {return ener;} ;
00665 
00667     const Tenseur& get_press() const {return press;} ;
00668 
00670     const Tenseur& get_ener_euler() const {return ener_euler;} ;
00671 
00673     const Tenseur& get_s_euler() const {return s_euler;} ;
00674 
00676     const Tenseur& get_gam_euler() const {return gam_euler;} ;
00677 
00679     const Tenseur& get_u_euler() const {return u_euler;} ;
00680 
00686     const Tenseur& get_logn_auto() const {return logn_auto;} ;
00687 
00693     const Tenseur& get_logn_auto_regu() const {return logn_auto_regu;} ;
00694 
00700     const Tenseur& get_logn_auto_div() const {return logn_auto_div;} ;
00701 
00704     const Tenseur& get_d_logn_auto_div() const {return d_logn_auto_div;} ;
00705 
00709     const Tenseur& get_beta_auto() const {return beta_auto;} ;
00710 
00712     const Tenseur& get_nnn() const {return nnn;} ;
00713 
00715     const Tenseur& get_shift() const {return shift;} ;
00716 
00718     const Tenseur& get_a_car() const {return a_car;} ;
00719 
00720     // Outputs
00721     // -------
00722     public:
00723     virtual void sauve(FILE* ) const ;      
00724     
00726     friend ostream& operator<<(ostream& , const Etoile& ) ; 
00727 
00728     protected:
00730     virtual ostream& operator>>(ostream& ) const ;    
00731 
00732     // Global quantities
00733     // -----------------
00734     public:
00736     double ray_eq() const ; 
00737     
00739     double ray_eq_pis2() const ; 
00740     
00742     double ray_eq_pi() const ; 
00743     
00745     double ray_eq_3pis2() const ;
00746 
00748     double ray_pole() const ; 
00749     
00751     double ray_eq(int kk) const ;
00752 
00760     virtual const Itbl& l_surf() const ; 
00761     
00769     const Tbl& xi_surf() const ; 
00770 
00772         virtual double mass_b() const ;
00773     
00775         virtual double mass_g() const ;
00776     
00777 };
00778 ostream& operator<<(ostream& , const Etoile& ) ;    
00779 
00780 
00781             //---------------------------//
00782             //    class Etoile_bin       //
00783             //---------------------------//
00784 
00799 class Etoile_bin : public Etoile {
00800 
00801     // Data : 
00802     // -----
00803     protected:
00807     bool irrotational ; 
00808     
00813     const Base_vect& ref_triad ; 
00814     
00818     Tenseur psi0 ; 
00819 
00823     Tenseur d_psi ; 
00824     
00829     Tenseur wit_w ; 
00830     
00834     Tenseur loggam ; 
00835 
00839     Tenseur logn_comp ; 
00840     
00844     Tenseur d_logn_auto ; 
00845 
00849     Tenseur d_logn_auto_regu ; 
00850 
00854     Tenseur d_logn_comp ; 
00855 
00859     Tenseur beta_comp ; 
00860     
00864     Tenseur d_beta_auto ; 
00865 
00869     Tenseur d_beta_comp ; 
00870 
00874     Tenseur shift_auto ; 
00875     
00880     Tenseur shift_comp ; 
00881     
00893     Tenseur w_shift ; 
00894     
00903     Tenseur khi_shift ; 
00904 
00910     Tenseur_sym tkij_auto ;
00911     
00917     Tenseur_sym tkij_comp ;
00918     
00923     Tenseur akcar_auto ;
00924     
00929     Tenseur akcar_comp ;
00930     
00935     Tenseur bsn ; 
00936     
00938     Tenseur pot_centri ;    
00939     
00944     Cmp ssjm1_logn ; 
00945 
00950     Cmp ssjm1_beta ; 
00951 
00958      Cmp ssjm1_khi ; 
00959      
00968      Tenseur ssjm1_wshift ; 
00969      
00974      Cmp ssjm1_psi ; 
00975 
00985      Cmp decouple ;
00986     
00987     // Derived data : 
00988     // ------------
00989     protected:
00991     mutable double* p_xa_barycenter ; 
00992      
00993 
00994     // Constructors - Destructor
00995     // -------------------------
00996     public:
01012     Etoile_bin(Map& mp_i, int nzet_i, bool relat, const Eos& eos_i,
01013            bool irrot, const Base_vect& ref_triad_i) ;          
01014     
01015     
01016     Etoile_bin(const Etoile_bin& ) ;        
01017 
01030     Etoile_bin(Map& mp_i, const Eos& eos_i, const Base_vect& ref_triad_i, 
01031            FILE* fich) ;            
01032 
01033     virtual ~Etoile_bin() ;         
01034 
01035 
01036     // Memory management
01037     // -----------------
01038     protected:
01040     virtual void del_deriv() const ; 
01041     
01043     virtual void set_der_0x0() const ; 
01044 
01048     virtual void del_hydro_euler() ; 
01049     
01050 
01051     // Mutators / assignment
01052     // ---------------------
01053     public:
01055     void operator=(const Etoile_bin& ) ;    
01056     
01060     Tenseur& set_logn_comp() ;
01061 
01063     Tenseur& set_pot_centri() ;
01064     
01066     Tenseur& set_w_shift() ;
01067     
01069     Tenseur& set_khi_shift() ;
01070         
01071     // Accessors
01072     // ---------
01073     public:
01077     bool is_irrotational() const {return irrotational; } ; 
01078 
01080     const Tenseur& get_psi0() const {return psi0;} ;
01081 
01085     const Tenseur& get_d_psi() const {return d_psi;} ;
01086 
01091     const Tenseur& get_wit_w() const {return wit_w;} ;
01092 
01096     const Tenseur& get_loggam() const {return loggam;} ;
01097 
01101     const Tenseur& get_logn_comp() const {return logn_comp;} ;
01102 
01106     const Tenseur& get_d_logn_auto() const {return d_logn_auto;} ;
01107 
01111     const Tenseur& get_d_logn_auto_regu() const {return d_logn_auto_regu;} ;
01112 
01116     const Tenseur& get_d_logn_comp() const {return d_logn_comp;} ;
01117 
01121     const Tenseur& get_beta_comp() const {return beta_comp;} ;
01122 
01126     const Tenseur& get_d_beta_auto() const {return d_beta_auto;} ;
01127 
01131     const Tenseur& get_d_beta_comp() const {return d_beta_comp;} ;
01132 
01137     const Tenseur& get_shift_auto() const {return shift_auto;} ;
01138 
01143     const Tenseur& get_shift_comp() const {return shift_comp;} ;
01144 
01157     const Tenseur& get_w_shift() const {return w_shift;} ; 
01158     
01171     const Tenseur& get_khi_shift() const {return khi_shift;} ; 
01172 
01177     const Tenseur_sym& get_tkij_auto() const {return tkij_auto;} ;
01178 
01183     const Tenseur_sym& get_tkij_comp() const {return tkij_comp;} ;
01184 
01189     const Tenseur& get_akcar_auto() const {return akcar_auto;} ;
01190 
01195     const Tenseur& get_akcar_comp() const {return akcar_comp;} ;
01196 
01201     const Tenseur& get_bsn() const {return bsn;} ;
01202 
01204     const Tenseur& get_pot_centri() const {return pot_centri;} ;
01209     const Cmp get_decouple() const {return decouple ;}
01210 
01211     // Outputs
01212     // -------
01213     public:
01214     virtual void sauve(FILE* ) const ;      
01215     
01216     protected:
01218     virtual ostream& operator>>(ostream& ) const ;    
01219 
01220     // Global quantities
01221     // -----------------
01222     public:
01224         virtual double mass_b() const ;
01225     
01227         virtual double mass_g() const ;
01228     
01237         virtual double xa_barycenter() const ;
01238     
01239 
01240     // Computational routines
01241     // ----------------------
01242     public: 
01250     virtual Tenseur sprod(const Tenseur& t1, const Tenseur& t2) const ; 
01251 
01264     virtual void hydro_euler() ; 
01265     
01283     void update_metric(const Etoile_bin& comp) ;
01284 
01293     void update_metric(const Etoile_bin& comp, const Etoile_bin& star_prev, 
01294                double relax) ; 
01295     
01310      void update_metric_der_comp(const Etoile_bin& comp) ;
01311 
01322     virtual void kinematics(double omega, double x_axe) ; 
01323     
01327     void fait_d_psi() ; 
01328     
01337     void fait_shift_auto() ; 
01338     
01342     virtual void extrinsic_curvature() ; 
01343         
01344     
01383     void equilibrium(double ent_c, 
01384                          int mermax, int mermax_poisson, 
01385              double relax_poisson, int mermax_potvit, 
01386              double relax_potvit, double thres_adapt, 
01387              const Tbl& fact, Tbl& diff, const Tbl* ent_limit = 0x0) ;
01388 
01428     void equil_regular(double ent_c, int mermax, int mermax_poisson, 
01429                double relax_poisson, int mermax_potvit, 
01430                double relax_potvit, double thres_adapt, 
01431                const Tbl& fact, Tbl& diff) ;
01432 
01446     double velocity_potential(int mermax, double precis, double relax) ;
01447     
01459     void relaxation(const Etoile_bin& star_prev, double relax_ent, 
01460             double relax_met, int mer, int fmer_met) ;
01461     
01462     friend class Bin_ns_bh ; 
01463 };
01464 
01465 
01466 
01467             //---------------------------//
01468             //    class Etoile_rot       //
01469             //---------------------------//
01470 
01482 class Etoile_rot : public Etoile {
01483 
01484     // Data : 
01485     // -----
01486     protected:
01487     double omega ;      
01488 
01490     Tenseur bbb ; 
01491 
01493     Tenseur b_car ; 
01494 
01496     Tenseur nphi ; 
01497 
01501     Tenseur tnphi ; 
01502 
01504     Tenseur uuu ;       
01505     
01507     Tenseur& logn ; 
01508 
01512     Tenseur nuf ;   
01513 
01517     Tenseur nuq ;   
01518 
01520     Tenseur& dzeta ;    
01521 
01523     Tenseur tggg ; 
01524 
01536     Tenseur w_shift ; 
01537     
01546     Tenseur khi_shift ; 
01547 
01553     Tenseur_sym tkij ; 
01554 
01572      Tenseur ak_car ; 
01573 
01578     Cmp ssjm1_nuf ; 
01579 
01584     Cmp ssjm1_nuq ; 
01585 
01589     Cmp ssjm1_dzeta ; 
01590 
01594     Cmp ssjm1_tggg ; 
01595 
01602      Cmp ssjm1_khi ; 
01603      
01611      Tenseur ssjm1_wshift ; 
01612      
01613     // Derived data : 
01614     // ------------
01615     protected:
01616     
01617     mutable double* p_angu_mom ;    
01618     mutable double* p_tsw ;     
01619     mutable double* p_grv2 ;    
01620     mutable double* p_grv3 ;    
01621     mutable double* p_r_circ ;  
01622     mutable double* p_aplat ;   
01623     mutable double* p_z_eqf ;   
01624     mutable double* p_z_eqb ;   
01625     mutable double* p_z_pole ;  
01626     mutable double* p_mom_quad ;    
01627     mutable double* p_r_isco ;  
01628     mutable double* p_f_isco ;  
01629 
01630     mutable double* p_espec_isco ;  
01632     mutable double* p_lspec_isco ;  
01633         mutable double* p_f_eq ;        
01634     
01635      
01636 
01637     // Constructors - Destructor
01638     // -------------------------
01639     public:
01648     Etoile_rot(Map& mp_i, int nzet_i, bool relat, const Eos& eos_i) ;           
01649     
01650     
01651     Etoile_rot(const Etoile_rot& ) ;        
01652 
01660     Etoile_rot(Map& mp_i, const Eos& eos_i, FILE* fich) ;           
01661 
01662     virtual ~Etoile_rot() ;         
01663 
01664 
01665     // Memory management
01666     // -----------------
01667     protected:
01669     virtual void del_deriv() const ; 
01670     
01672     virtual void set_der_0x0() const ; 
01673 
01677     virtual void del_hydro_euler() ; 
01678     
01679 
01680     // Mutators / assignment
01681     // ---------------------
01682     public:
01684     void operator=(const Etoile_rot& ) ;    
01685     
01686     // Accessors
01687     // ---------
01688     public:
01692     virtual double get_omega_c() const ;        
01693 
01695     const Tenseur& get_bbb() const {return bbb;} ; 
01696 
01698     const Tenseur& get_b_car() const {return b_car;} ; 
01699 
01701     const Tenseur& get_nphi() const {return nphi;} ; 
01702 
01706     const Tenseur& get_tnphi() const {return tnphi;} ; 
01707 
01709     const Tenseur& get_uuu() const {return uuu;} ;      
01710     
01712     const Tenseur& get_logn() const {return logn;} ;    
01713 
01717     const Tenseur& get_nuf() const {return nuf;} ;  
01718 
01722     const Tenseur& get_nuq() const {return nuq;} ;  
01723 
01725     const Tenseur& get_dzeta() const {return dzeta;} ;  
01726 
01728     const Tenseur& get_tggg() const {return tggg;} ; 
01729 
01742     const Tenseur& get_w_shift() const {return w_shift;} ; 
01743     
01756     const Tenseur& get_khi_shift() const {return khi_shift;} ; 
01757 
01763     const Tenseur_sym& get_tkij() const {return tkij;} ; 
01764 
01782      const Tenseur& get_ak_car() const {return ak_car;} ; 
01783 
01784     // Outputs
01785     // -------
01786     public:
01787     virtual void sauve(FILE* ) const ;      
01788     
01790     virtual void display_poly(ostream& ) const ; 
01791 
01792     protected:
01794     virtual ostream& operator>>(ostream& ) const ;    
01795 
01797     virtual void partial_display(ostream& ) const ;    
01798 
01799     // Global quantities
01800     // -----------------
01801     public:
01802     
01810     virtual const Itbl& l_surf() const ; 
01811     
01812     virtual double mass_b() const ;     
01813     virtual double mass_g() const ;     
01814     virtual double angu_mom() const ;   
01815     virtual double tsw() const ;        
01816 
01820     virtual double grv2() const ;   
01821 
01833     virtual double grv3(ostream* ost = 0x0) const ; 
01834 
01835     virtual double r_circ() const ; 
01836     virtual double aplat() const ;  
01837     virtual double z_eqf() const ;  
01838     virtual double z_eqb() const ;  
01839     virtual double z_pole() const ; 
01840     
01850     virtual double mom_quad() const ;   
01851 
01858     virtual double r_isco(ostream* ost = 0x0) const ;   
01859     
01861     virtual double f_isco() const ; 
01862 
01864     virtual double espec_isco() const ; 
01865     
01867     virtual double lspec_isco() const ; 
01868 
01869 
01880     virtual double f_eccentric(double ecc, double periast, 
01881                    ostream* ost = 0x0) const ; 
01882 
01884     virtual double f_eq() const ;
01885     
01886 
01887     // Computational routines
01888     // ----------------------
01889     public: 
01900     virtual void hydro_euler() ; 
01901     
01911     void update_metric() ; 
01912         
01921     void fait_shift() ; 
01922     
01926     void fait_nphi() ; 
01927         
01931     void extrinsic_curvature() ;
01932     
01962     static double lambda_grv2(const Cmp& sou_m, const Cmp& sou_q) ;
01963         
02043     virtual void equilibrium(double ent_c, double omega0, double fact_omega, 
02044              int nzadapt, const Tbl& ent_limit,
02045              const Itbl& icontrol, const Tbl& control,
02046              double mbar_wanted, double aexp_mass, 
02047              Tbl& diff, Param* = 0x0) ;
02048     
02049 
02050 };
02051 
02052 
02053 
02054 
02055 #endif

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