blackhole.h

00001 /*
00002  *  Definition of Lorene class Black_hole
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 __BLACKHOLE_H_ 
00027 #define __BLACKHOLE_H_ 
00028 
00029 /*
00030  * $Id: blackhole.h,v 1.3 2008/07/02 20:41:40 k_taniguchi Exp $
00031  * $Log: blackhole.h,v $
00032  * Revision 1.3  2008/07/02 20:41:40  k_taniguchi
00033  * Addition of the routines to compute angular momentum
00034  *  and modification of the argument of equilibrium_spher.
00035  *
00036  * Revision 1.2  2008/05/15 18:53:37  k_taniguchi
00037  * Change of some parameters and introduction of some
00038  * computational routines.
00039  *
00040  * Revision 1.1  2007/06/22 01:02:57  k_taniguchi
00041  * *** empty log message ***
00042  *
00043  *
00044  * $Header: /cvsroot/Lorene/C++/Include/blackhole.h,v 1.3 2008/07/02 20:41:40 k_taniguchi Exp $
00045  *
00046  */
00047 
00048 // External classes which appear in the declaration of class Black_hole:
00049 //class YYY ; 
00050 
00051 // Headers Lorene
00052 #include "metric.h"
00053 
00054                     //-------------------------------//
00055                     //     Base class Black_hole     //
00056                     //-------------------------------//
00057 
00070 class Black_hole {
00071 
00072     // Data : 
00073     // -----
00074     protected:
00076         Map& mp ;
00077 
00081     bool kerrschild ;
00082 
00084     double mass_bh ;
00085 
00086     // Metric quantities
00087     // -----------------
00088 
00093     Scalar lapconf ;  // lapconf = lapconf_rs + lapconf_bh
00094 
00096     Scalar lapconf_rs ;
00097 
00099     Scalar lapconf_bh ;
00100 
00102     Scalar lapse ;
00103 
00105     Vector shift ;  // shift = shift_rs + shift_bh
00106 
00108     Vector shift_rs ;
00109 
00111     Vector shift_bh ;
00112 
00114     Scalar confo ;
00115 
00117     //  Scalar trace_k ;
00118 
00123     Sym_tensor taij ;
00124 
00126     Sym_tensor taij_rs ;
00127 
00131     Scalar taij_quad ;
00132 
00134     Scalar taij_quad_rs ;
00135 
00139     Metric_flat flat ;
00140 
00142     //  Metric tgij ;
00143 
00144     // Derived data : 
00145     // ------------
00146     protected:
00147     mutable double* p_mass_irr ;  
00148 
00149     mutable double* p_mass_adm ;  
00150 
00151     mutable double* p_mass_kom ;  
00152 
00153     mutable double* p_rad_ah ; 
00154 
00155     mutable double* p_spin_am_bh ; 
00156 
00158     mutable Tbl* p_angu_mom_bh ;
00159 
00160     // Constructors - Destructor
00161     // -------------------------
00162     public:
00163 
00168     Black_hole(Map& mp_i, bool Kerr_schild, double massbh) ;
00169 
00170     Black_hole(const Black_hole& ) ;       
00171 
00178     Black_hole(Map& mp_i, FILE* fich) ;         
00179 
00180     virtual ~Black_hole() ;         
00181  
00182 
00183     // Memory management
00184     // -----------------
00185     protected:
00187     virtual void del_deriv() const ;
00188 
00190     void set_der_0x0() const ;
00191 
00192 
00193     // Mutators / assignment
00194     // ---------------------
00195     public:
00197     void operator=(const Black_hole&) ;
00198 
00200     Map& set_mp() {return mp; } ;
00201 
00203     double& set_mass_bh() {return mass_bh; } ;
00204 
00205     // Accessors
00206     // ---------
00207     public:
00209     const Map& get_mp() const {return mp; } ;
00210 
00214     bool is_kerrschild() const {return kerrschild; } ;
00215 
00217     double get_mass_bh() const {return mass_bh; } ;
00218 
00220     const Scalar& get_lapconf() const {return lapconf; } ;
00221 
00223     const Scalar& get_lapconf_rs() const {return lapconf_rs; } ;
00224 
00226     const Scalar& get_lapse() const {return lapse; } ;
00227 
00229     const Vector& get_shift() const {return shift; } ;
00230 
00234     const Vector& get_shift_rs() const {return shift_rs; } ;
00235 
00237     const Scalar& get_confo() const {return confo; } ;
00238 
00239     // Outputs
00240     // -------
00241     public:
00242     virtual void sauve(FILE *) const ;      
00243     
00245     friend ostream& operator<<(ostream& , const Black_hole& ) ; 
00246 
00247     protected:
00249     virtual ostream& operator>>(ostream& ) const ;
00250 
00251     // Global quantities
00252     // -----------------
00253     public:
00255     virtual double mass_irr() const ;
00256 
00258     virtual double mass_adm() const ;
00259 
00261     virtual double mass_kom() const ;
00262 
00264     virtual double rad_ah() const ;
00265 
00267     double spin_am_bh(bool bclapconf_nd, bool bclapconf_fs,
00268               const Tbl& xi_i, const double& phi_i,
00269               const double& theta_i, const int& nrk_phi,
00270               const int& nrk_theta) const ;
00271 
00279     const Tbl& angu_mom_bh() const ;
00280 
00281     // Computational routines
00282     // ----------------------
00283     public:
00287     const Valeur bc_lapconf(bool neumann, bool first) const ;
00288 
00292     const Valeur bc_shift_x(double omega_r) const ;
00293 
00297     const Valeur bc_shift_y(double omega_r) const ;
00298 
00302     const Valeur bc_shift_z() const ;
00303 
00307     const Valeur bc_confo() const ; 
00308 
00312     void extr_curv_bh() ;
00313 
00331     void equilibrium_spher(bool neumann, bool first, double spin_omega,
00332                    double precis = 1.e-14,
00333                    double precis_shift = 1.e-8) ;
00334 
00343     void static_bh(bool neumann, bool first) ;
00344 
00353     double rah_iso(bool neumann, bool first) const ;
00354 
00363     const Scalar r_coord(bool neumann, bool first) const ;
00364 
00376     Tbl runge_kutta_phi_bh(const Tbl& xi_i, const double& phi_i,
00377                    const int& nrk) const ;
00378 
00392     Tbl runge_kutta_theta_bh(const Tbl& xi_i, const double& theta_i,
00393                  const double& phi, const int& nrk) const ;
00394 
00411     Vector killing_vect_bh(const Tbl& xi_i, const double& phi_i,
00412                    const double& theta_i, const int& nrk_phi,
00413                    const int& nrk_theta) const ;
00414 
00415 };
00416 ostream& operator<<(ostream& , const Black_hole& ) ;
00417 
00418 #endif

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