star_bhns.h

00001 /*
00002  *  Definition of Lorene class Star_bhns
00003  *
00004  */
00005 
00006 /*
00007  *   Copyright (c) 2005-2007 Keisuke Taniguchi
00008  *
00009  *   This file is part of LORENE.
00010  *
00011  *   LORENE is free software; you can redistribute it and/or modify
00012  *   it under the terms of the GNU General Public License version 2
00013  *   as published by the Free Software Foundation.
00014  *
00015  *   LORENE is distributed in the hope that it will be useful,
00016  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018  *   GNU General Public License for more details.
00019  *
00020  *   You should have received a copy of the GNU General Public License
00021  *   along with LORENE; if not, write to the Free Software
00022  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023  *
00024  */
00025 
00026 #ifndef __STAR_BHNS_H_ 
00027 #define __STAR_BHNS_H_ 
00028 
00029 /*
00030  * $Id: star_bhns.h,v 1.2 2008/05/15 18:55:55 k_taniguchi Exp $
00031  * $Log: star_bhns.h,v $
00032  * Revision 1.2  2008/05/15 18:55:55  k_taniguchi
00033  * Change of some parameters.
00034  *
00035  * Revision 1.1  2007/06/22 01:04:35  k_taniguchi
00036  * *** empty log message ***
00037  *
00038  *
00039  * $Header: /cvsroot/Lorene/C++/Include/star_bhns.h,v 1.2 2008/05/15 18:55:55 k_taniguchi Exp $
00040  *
00041  */
00042 
00043 // External classes which appear in the declaration of class Star_bhns:
00044 class Hole_bhns ; 
00045 
00046 // Lorene headers
00047 #include "star.h"
00048 
00054 class Star_bhns : public Star {
00055 
00056     // Data : 
00057     // -----
00058     protected:
00062         Map_af mp_aff ;
00063 
00067     bool irrotational ;
00068 
00072     Scalar psi0 ;
00073 
00077     Vector d_psi ;
00078 
00083     Vector wit_w ;
00084 
00088     Scalar loggam ;
00089 
00094     Vector bsn ;
00095 
00097     Scalar gam ;
00098 
00102     Scalar gam0 ;
00103 
00105     Scalar pot_centri ;
00106 
00108         Scalar lapconf_auto ;
00109 
00111     Scalar lapconf_comp ;
00112 
00114     Scalar lapconf_tot ;
00115 
00117         Scalar lapse_auto ;  // = lapconf_auto / confo_tot
00118 
00120     Scalar lapse_tot ;
00121 
00125     Vector d_lapconf_auto ;
00126 
00130     Vector d_lapconf_comp ;
00131 
00133     Vector shift_auto ;
00134 
00136     Vector shift_comp ;
00137 
00139     Vector shift_tot ;
00140 
00144     Tensor d_shift_auto ;
00145 
00149     Tensor d_shift_comp ;
00150 
00152     Scalar confo_auto ;
00153 
00155     Scalar confo_comp ;
00156 
00158     Scalar confo_tot ;
00159 
00163     Vector d_confo_auto ;
00164 
00168     Vector d_confo_comp ;
00169 
00171     Scalar psi4 ;  // psi4 = pow(confo_tot, 4.)
00172 
00177     Sym_tensor taij_auto ;
00178 
00182     Scalar taij_quad_auto ;
00183 
00187     Metric_flat flat ;
00188 
00192     Scalar ssjm1_lapconf ;
00193 
00197     Scalar ssjm1_confo ;
00198 
00205     Scalar ssjm1_khi ;
00206 
00215     Vector ssjm1_wshift ;
00216 
00217     // Derived data
00218     // ------------
00219     protected:
00220     mutable double* p_mass_b_bhns ;  
00221     mutable double* p_mass_g_bhns ;  
00222 
00223     // Constructors - Destructor
00224     // -------------------------
00225     public:
00234     Star_bhns(Map& mp_i, int nzet_i, const Eos& eos_i, bool irrot_i) ;
00235 
00236     Star_bhns(const Star_bhns& ) ;      
00237 
00244     Star_bhns(Map& mp_i, const Eos& eos_i, FILE* fich) ;
00245 
00246     virtual ~Star_bhns() ;          
00247  
00248 
00249     // Memory management
00250     // -----------------
00251     protected:
00253     virtual void del_deriv() const ;
00254 
00256     void set_der_0x0() const ;
00257 
00258     // Mutators / assignment
00259     // ---------------------
00260     public:
00262     void operator=(const Star_bhns&) ;
00263 
00265     Scalar& set_pot_centri() ;
00266 
00268     Scalar& set_lapconf_auto() ;
00269 
00273     Scalar& set_lapconf_comp() ;
00274 
00276     Vector& set_shift_auto() ;
00277 
00281     Vector& set_shift_comp() ;
00282 
00284     Scalar& set_confo_auto() ;
00285 
00289     Scalar& set_confo_comp() ;
00290     
00291     // Accessors
00292     // ---------
00293     public:
00297     bool is_irrotational() const {return irrotational; } ;
00298 
00300     const Scalar& get_psi0() const {return psi0; } ;
00301 
00305     const Vector& get_d_psi() const {return d_psi; } ;
00306 
00311     const Vector& get_wit_w() const {return wit_w; } ;
00312 
00316     const Scalar& get_loggam() const {return loggam; } ;
00317 
00322     const Vector& get_bsn() const {return bsn; } ;
00323 
00325     const Scalar& get_gam() const {return gam; } ;
00326 
00328     const Scalar& get_gam0() const {return gam0; } ;
00329 
00331     const Scalar& get_pot_centri() const {return pot_centri; } ;
00332 
00334     const Scalar& get_lapconf_auto() const {return lapconf_auto; } ;
00335 
00339     const Scalar& get_lapconf_comp() const {return lapconf_comp; } ;
00340 
00342     const Scalar& get_lapconf_tot() const {return lapconf_tot; } ;
00343 
00344     // Returns the part of the lapse function generated by the star
00345     const Scalar& get_lapse_auto() const {return lapse_auto; } ;
00346 
00348     const Scalar& get_lapse_tot() const {return lapse_tot; } ;
00349 
00351     const Vector& get_d_lapconf_auto() const {return d_lapconf_auto; } ;
00352 
00356     const Vector& get_d_lapconf_comp() const {return d_lapconf_comp; } ;
00357 
00359     const Vector& get_shift_auto() const {return shift_auto; } ;
00360 
00364     const Vector& get_shift_comp() const {return shift_comp; } ;
00365 
00367     const Vector& get_shift_tot() const {return shift_tot; } ;
00368 
00370     const Tensor& get_d_shift_auto() const {return d_shift_auto; } ;
00371 
00375     const Tensor& get_d_shift_comp() const {return d_shift_comp; } ;
00376 
00378     const Scalar& get_confo_auto() const {return confo_auto; } ;
00379 
00383     const Scalar& get_confo_comp() const {return confo_comp; } ;
00384 
00386     const Scalar& get_confo_tot() const {return confo_tot; } ;
00387 
00391     const Vector& get_d_confo_auto() const {return d_confo_auto; } ;
00392 
00396     const Vector& get_d_confo_comp() const {return d_confo_comp; } ;
00397 
00399     const Scalar& get_psi4() const {return psi4; } ;
00400 
00404     const Sym_tensor& get_taij_auto() const {return taij_auto; } ;
00405 
00410     const Scalar& get_taij_quad_auto() const {return taij_quad_auto; } ;
00411 
00412     // Outputs
00413     // -------
00414     public:
00415     virtual void sauve(FILE *) const ;      
00416 
00417     protected:
00419     virtual ostream& operator>>(ostream& ) const ;
00420 
00421     // Global quantities
00422     // -----------------
00423     public:
00425     virtual double mass_b() const ;
00426 
00427     virtual double mass_b_bhns(bool kerrschild, const double& mass_bh,
00428                    const double& sepa) const ;
00429 
00431     virtual double mass_g() const ;
00432 
00433     virtual double mass_g_bhns() const ;
00434 
00435     // Computational routines
00436     // ----------------------
00437     public:
00456     void hydro_euler_bhns(bool kerrschild, const double& mass_bh,
00457                   const double& sepa) ;
00458 
00475     void update_metric_bhns(const Hole_bhns& hole,
00476                 const Star_bhns& star_prev,
00477                 double relax) ;
00478 
00485     void update_met_der_comp_bhns(const Hole_bhns& hole) ;
00486 
00503     void kinema_bhns(bool kerrschild, const double& mass_bh,
00504              const double& sepa, double omega,
00505              double x_rot, double y_rot) ;
00506 
00508     void fait_d_psi_bhns() ;
00509 
00513     void extr_curv_bhns() ;
00514 
00543     void equilibrium_bhns(double ent_c, const double& mass_bh,
00544                   const double& sepa, bool kerrschild,
00545                   int mer, int mermax_ns, int mermax_potvit,
00546                   int mermax_poisson, int filter_r, int filter_r_s,
00547                   int filter_p_s, double relax_poisson,
00548                   double relax_potvit, double thres_adapt,
00549                   double resize_ns,
00550                   const Tbl& fact_resize, Tbl& diff) ;
00551 
00569     double velo_pot_bhns(const double& mass_bh, const double& sepa,
00570                  bool kerrschild,
00571                  int mermax, double precis, double relax) ;
00572 
00579     double chi_rp(double radius, double phi) ;
00580 
00586     double radius_p(double phi) ;
00587 
00591     double phi_min() ;
00592 
00598     double phi_local_min(double phi_ini) ;
00599 
00611     void relax_bhns(const Star_bhns& star_prev, double relax_ent,
00612             double relax_met, int mer, int fmer_met) ;
00613 
00619     void equil_spher_bhns(double ent_c, double precis) ;
00620 
00621     friend class Bin_bhns ;
00622 
00623 };
00624 
00625 #endif

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