blackhole.h
/*
* Definition of Lorene class Black_hole
*
*/
/*
* Copyright (c) 2005-2007 Keisuke Taniguchi
*
* This file is part of LORENE.
*
* LORENE is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation.
*
* LORENE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with LORENE; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
#ifndef __BLACKHOLE_H_
#define __BLACKHOLE_H_
/*
* $Id: blackhole.h,v 1.4 2014/10/13 08:52:32 j_novak Exp $
* $Log: blackhole.h,v $
* Revision 1.4 2014/10/13 08:52:32 j_novak
* Lorene classes and functions now belong to the namespace Lorene.
*
* Revision 1.3 2008/07/02 20:41:40 k_taniguchi
* Addition of the routines to compute angular momentum
* and modification of the argument of equilibrium_spher.
*
* Revision 1.2 2008/05/15 18:53:37 k_taniguchi
* Change of some parameters and introduction of some
* computational routines.
*
* Revision 1.1 2007/06/22 01:02:57 k_taniguchi
* *** empty log message ***
*
*
* $Header: /cvsroot/Lorene/C++/Include/blackhole.h,v 1.4 2014/10/13 08:52:32 j_novak Exp $
*
*/
// External classes which appear in the declaration of class Black_hole:
//class YYY ;
// Headers Lorene
#include "metric.h"
//-------------------------------//
// Base class Black_hole //
//-------------------------------//
namespace Lorene {
class Black_hole {
// Data :
// -----
protected:
Map& mp ;
bool kerrschild ;
double mass_bh ;
// Metric quantities
// -----------------
Scalar lapconf ; // lapconf = lapconf_rs + lapconf_bh
Scalar lapconf_rs ;
Scalar lapconf_bh ;
Scalar lapse ;
Vector shift ; // shift = shift_rs + shift_bh
Vector shift_rs ;
Vector shift_bh ;
Scalar confo ;
// Scalar trace_k ;
Sym_tensor taij ;
Sym_tensor taij_rs ;
Scalar taij_quad ;
Scalar taij_quad_rs ;
Metric_flat flat ;
// Metric tgij ;
// Derived data :
// ------------
protected:
mutable double* p_mass_irr ;
mutable double* p_mass_adm ;
mutable double* p_mass_kom ;
mutable double* p_rad_ah ;
mutable double* p_spin_am_bh ;
mutable Tbl* p_angu_mom_bh ;
// Constructors - Destructor
// -------------------------
public:
Black_hole(Map& mp_i, bool Kerr_schild, double massbh) ;
Black_hole(const Black_hole& ) ;
Black_hole(Map& mp_i, FILE* fich) ;
virtual ~Black_hole() ;
// Memory management
// -----------------
protected:
virtual void del_deriv() const ;
void set_der_0x0() const ;
// Mutators / assignment
// ---------------------
public:
void operator=(const Black_hole&) ;
Map& set_mp() {return mp; } ;
double& set_mass_bh() {return mass_bh; } ;
// Accessors
// ---------
public:
const Map& get_mp() const {return mp; } ;
bool is_kerrschild() const {return kerrschild; } ;
double get_mass_bh() const {return mass_bh; } ;
const Scalar& get_lapconf() const {return lapconf; } ;
const Scalar& get_lapconf_rs() const {return lapconf_rs; } ;
const Scalar& get_lapse() const {return lapse; } ;
const Vector& get_shift() const {return shift; } ;
const Vector& get_shift_rs() const {return shift_rs; } ;
const Scalar& get_confo() const {return confo; } ;
// Outputs
// -------
public:
virtual void sauve(FILE *) const ;
friend ostream& operator<<(ostream& , const Black_hole& ) ;
protected:
virtual ostream& operator>>(ostream& ) const ;
// Global quantities
// -----------------
public:
virtual double mass_irr() const ;
virtual double mass_adm() const ;
virtual double mass_kom() const ;
virtual double rad_ah() const ;
double spin_am_bh(bool bclapconf_nd, bool bclapconf_fs,
const Tbl& xi_i, const double& phi_i,
const double& theta_i, const int& nrk_phi,
const int& nrk_theta) const ;
const Tbl& angu_mom_bh() const ;
// Computational routines
// ----------------------
public:
const Valeur bc_lapconf(bool neumann, bool first) const ;
const Valeur bc_shift_x(double omega_r) const ;
const Valeur bc_shift_y(double omega_r) const ;
const Valeur bc_shift_z() const ;
const Valeur bc_confo() const ;
void extr_curv_bh() ;
void equilibrium_spher(bool neumann, bool first, double spin_omega,
double precis = 1.e-14,
double precis_shift = 1.e-8) ;
void static_bh(bool neumann, bool first) ;
double rah_iso(bool neumann, bool first) const ;
const Scalar r_coord(bool neumann, bool first) const ;
Tbl runge_kutta_phi_bh(const Tbl& xi_i, const double& phi_i,
const int& nrk) const ;
Tbl runge_kutta_theta_bh(const Tbl& xi_i, const double& theta_i,
const double& phi, const int& nrk) const ;
Vector killing_vect_bh(const Tbl& xi_i, const double& phi_i,
const double& theta_i, const int& nrk_phi,
const int& nrk_theta) const ;
};
ostream& operator<<(ostream& , const Black_hole& ) ;
}
#endif
Lorene::Black_hole
Base class for black holes.
Definition blackhole.h:74
Lorene::Black_hole::shift_bh
Vector shift_bh
Part of the shift vector from the analytic background.
Definition blackhole.h:115
Lorene::Black_hole::rah_iso
double rah_iso(bool neumann, bool first) const
Computes a radius of apparent horizon (excised surface) in isotropic coordinates.
Definition blackhole_rah_iso.C:69
Lorene::Black_hole::mass_kom
virtual double mass_kom() const
Komar mass.
Definition blackhole_global.C:289
Lorene::Black_hole::shift_rs
Vector shift_rs
Part of the shift vector from the numerical computation.
Definition blackhole.h:112
Lorene::Black_hole::runge_kutta_phi_bh
Tbl runge_kutta_phi_bh(const Tbl &xi_i, const double &phi_i, const int &nrk) const
Compute a forth-order Runge-Kutta integration to the phi direction for the solution of the Killing ve...
Definition blackhole_rk_phi.C:67
Lorene::Black_hole::spin_am_bh
double spin_am_bh(bool bclapconf_nd, bool bclapconf_fs, const Tbl &xi_i, const double &phi_i, const double &theta_i, const int &nrk_phi, const int &nrk_theta) const
Spin angular momentum.
Definition blackhole_global.C:528
Lorene::Black_hole::operator<<
friend ostream & operator<<(ostream &, const Black_hole &)
Display.
Definition blackhole.C:280
Lorene::Black_hole::Black_hole
Black_hole(Map &mp_i, bool Kerr_schild, double massbh)
Standard constructor.
Definition blackhole.C:71
Lorene::Black_hole::bc_confo
const Valeur bc_confo() const
Boundary condition on the apparent horizon of the black hole for the conformal factor: 2-D Valeur.
Definition blackhole_bc.C:410
Lorene::Black_hole::set_mass_bh
double & set_mass_bh()
Read/write of the gravitational mass of BH [{\tt m_unit}].
Definition blackhole.h:207
Lorene::Black_hole::taij_quad
Scalar taij_quad
Part of the scalar generated by .
Definition blackhole.h:135
Lorene::Black_hole::get_lapse
const Scalar & get_lapse() const
Returns the lapse function generated by the black hole.
Definition blackhole.h:230
Lorene::Black_hole::bc_shift_x
const Valeur bc_shift_x(double omega_r) const
Boundary condition on the apparent horizon of the black hole for the shift vector of the \fx\f direct...
Definition blackhole_bc.C:211
Lorene::Black_hole::taij_quad_rs
Scalar taij_quad_rs
Part of the scalar.
Definition blackhole.h:138
Lorene::Black_hole::taij
Sym_tensor taij
Trace of the extrinsic curvature.
Definition blackhole.h:127
Lorene::Black_hole::r_coord
const Scalar r_coord(bool neumann, bool first) const
Expresses the areal radial coordinate by that in spatially isotropic coordinates.
Definition blackhole_r_coord.C:66
Lorene::Black_hole::get_shift
const Vector & get_shift() const
Returns the shift vector generated by the black hole.
Definition blackhole.h:233
Lorene::Black_hole::set_mp
Map & set_mp()
Read/write of the mapping.
Definition blackhole.h:204
Lorene::Black_hole::mass_irr
virtual double mass_irr() const
Irreducible mass of the black hole.
Definition blackhole_global.C:69
Lorene::Black_hole::p_spin_am_bh
double * p_spin_am_bh
Radius of the apparent horizon.
Definition blackhole.h:159
Lorene::Black_hole::taij_rs
Sym_tensor taij_rs
Part of the extrinsic curvature tensor.
Definition blackhole.h:130
Lorene::Black_hole::mp
Map & mp
Mapping associated with the black hole.
Definition blackhole.h:80
Lorene::Black_hole::is_kerrschild
bool is_kerrschild() const
Returns true for a Kerr-Schild background, false for a Conformally flat one.
Definition blackhole.h:218
Lorene::Black_hole::lapconf
Scalar lapconf
A function (lapse function * conformal factor) lapconf generated by the black hole.
Definition blackhole.h:97
Lorene::Black_hole::bc_lapconf
const Valeur bc_lapconf(bool neumann, bool first) const
Boundary condition on the apparent horizon of the black hole for the lapse function: 2-D Valeur.
Definition blackhole_bc.C:71
Lorene::Black_hole::shift
Vector shift
Shift vector generated by the black hole.
Definition blackhole.h:109
Lorene::Black_hole::flat
Metric_flat flat
Flat metric defined on the mapping (Spherical components with respect to the mapping of the black hol...
Definition blackhole.h:143
Lorene::Black_hole::rad_ah
virtual double rad_ah() const
Radius of the apparent horizon.
Definition blackhole_global.C:505
Lorene::Black_hole::get_lapconf_rs
const Scalar & get_lapconf_rs() const
Returns the part of lapconf from the numerical computation.
Definition blackhole.h:227
Lorene::Black_hole::lapconf_rs
Scalar lapconf_rs
Part of lapconf from the numerical computation.
Definition blackhole.h:100
Lorene::Black_hole::get_confo
const Scalar & get_confo() const
Returns the conformal factor generated by the black hole.
Definition blackhole.h:241
Lorene::Black_hole::set_der_0x0
void set_der_0x0() const
Sets to 0x0 all the pointers on derived quantities.
Definition blackhole.C:218
Lorene::Black_hole::static_bh
void static_bh(bool neumann, bool first)
Sets the metric quantities to a spherical, static blach-hole analytic solution.
Definition blackhole_static.C:60
Lorene::Black_hole::runge_kutta_theta_bh
Tbl runge_kutta_theta_bh(const Tbl &xi_i, const double &theta_i, const double &phi, const int &nrk) const
Compute a forth-order Runge-Kutta integration to the theta direction for the solution of the Killing ...
Definition blackhole_rk_theta.C:67
Lorene::Black_hole::equilibrium_spher
void equilibrium_spher(bool neumann, bool first, double spin_omega, double precis=1.e-14, double precis_shift=1.e-8)
Computes a spherical, static black-hole by giving boundary conditions on the apparent horizon.
Definition blackhole_eq_spher.C:70
Lorene::Black_hole::get_mp
const Map & get_mp() const
Returns the mapping.
Definition blackhole.h:213
Lorene::Black_hole::p_angu_mom_bh
Tbl * p_angu_mom_bh
Spin angular momentum.
Definition blackhole.h:162
Lorene::Black_hole::~Black_hole
virtual ~Black_hole()
Destructor.
Definition blackhole.C:194
Lorene::Black_hole::get_lapconf
const Scalar & get_lapconf() const
Returns lapconf generated by the black hole.
Definition blackhole.h:224
Lorene::Black_hole::killing_vect_bh
Vector killing_vect_bh(const Tbl &xi_i, const double &phi_i, const double &theta_i, const int &nrk_phi, const int &nrk_theta) const
Compute the Killing vector of a black hole normalized so that its affine length is 2 M_PI.
Definition blackhole_killing.C:66
Lorene::Black_hole::mass_adm
virtual double mass_adm() const
ADM mass.
Definition blackhole_global.C:103
Lorene::Black_hole::p_rad_ah
double * p_rad_ah
Komar mass.
Definition blackhole.h:157
Lorene::Black_hole::sauve
virtual void sauve(FILE *) const
Save in a file.
Definition blackhole.C:267
Lorene::Black_hole::bc_shift_z
const Valeur bc_shift_z() const
Boundary condition on the apparent horizon of the black hole for the shift vector of the \fz\f direct...
Definition blackhole_bc.C:350
Lorene::Black_hole::lapconf_bh
Scalar lapconf_bh
Part of lapconf from the analytic background.
Definition blackhole.h:103
Lorene::Black_hole::bc_shift_y
const Valeur bc_shift_y(double omega_r) const
Boundary condition on the apparent horizon of the black hole for the shift vector of the \fy\f direct...
Definition blackhole_bc.C:281
Lorene::Black_hole::p_mass_kom
double * p_mass_kom
ADM mass.
Definition blackhole.h:155
Lorene::Black_hole::operator=
void operator=(const Black_hole &)
Assignment to another Black_hole.
Definition blackhole.C:236
Lorene::Black_hole::get_shift_rs
const Vector & get_shift_rs() const
Returns the part of the shift vector from the numerical computation.
Definition blackhole.h:238
Lorene::Black_hole::angu_mom_bh
const Tbl & angu_mom_bh() const
Total angular momentum.
Definition blackhole_global.C:634
Lorene::Black_hole::lapse
Scalar lapse
Lapse function generated by the black hole.
Definition blackhole.h:106
Lorene::Black_hole::kerrschild
bool kerrschild
true for a Kerr-Schild background, false for a conformally flat background
Definition blackhole.h:85
Lorene::Black_hole::confo
Scalar confo
Conformal factor generated by the black hole.
Definition blackhole.h:118
Lorene::Black_hole::mass_bh
double mass_bh
Gravitational mass of BH.
Definition blackhole.h:88
Lorene::Black_hole::p_mass_adm
double * p_mass_adm
Irreducible mass of the black hole.
Definition blackhole.h:153
Lorene::Black_hole::extr_curv_bh
void extr_curv_bh()
Computes taij , taij_quad from shift , lapse , confo .
Definition blackhole_extr_curv.C:62
Lorene::Black_hole::operator>>
virtual ostream & operator>>(ostream &) const
Operator >> (virtual function called by the operator <<).
Definition blackhole.C:287
Lorene::Black_hole::get_mass_bh
double get_mass_bh() const
Returns the gravitational mass of BH [{\tt m_unit}].
Definition blackhole.h:221
Lorene::Black_hole::p_mass_irr
double * p_mass_irr
Conformal metric .
Definition blackhole.h:151
Lorene::Black_hole::del_deriv
virtual void del_deriv() const
Deletes all the derived quantities.
Definition blackhole.C:205
Lorene::Metric_flat
Flat metric for tensor calculation.
Definition metric.h:261
Lorene::Scalar
Tensor field of valence 0 (or component of a tensorial field).
Definition scalar.h:387
Lorene::Sym_tensor
Class intended to describe valence-2 symmetric tensors.
Definition sym_tensor.h:223
Lorene::Tbl
Basic array class.
Definition tbl.h:161
Lorene::Valeur
Values and coefficients of a (real-value) function.
Definition valeur.h:287
Lorene::Vector
Tensor field of valence 1.
Definition vector.h:188
Lorene
Lorene prototypes.
Definition app_hor.h:64
Lorene::Map
Map(const Mg3d &)
Constructor from a multi-domain 3D grid.
Definition map.C:139
Lorene::phi
Coord phi
coordinate centered on the grid
Definition map.h:720