28 char blackhole_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Black_hole/blackhole.C,v 1.5 2014/10/13 08:52:45 j_novak Exp $" ;
60 #include "blackhole.h" 61 #include "utilitaires.h" 73 kerrschild(kerrschild_i),
79 shift(mp_i, CON, mp_i.get_bvect_cart()),
80 shift_rs(mp_i, CON, mp_i.get_bvect_cart()),
81 shift_bh(mp_i, CON, mp_i.get_bvect_cart()),
83 taij(mp_i, CON, mp_i.get_bvect_cart()),
84 taij_rs(mp_i, CON, mp_i.get_bvect_cart()),
87 flat(mp_i, mp_i.get_bvect_cart()) {
148 shift(mp_i, CON, mp_i.get_bvect_cart()),
149 shift_rs(mp_i, mp_i.get_bvect_cart(), fich),
150 shift_bh(mp_i, CON, mp_i.get_bvect_cart()),
151 confo(mp_i, *(mp_i.get_mg()), fich),
152 taij(mp_i, CON, mp_i.get_bvect_cart()),
153 taij_rs(mp_i, CON, mp_i.get_bvect_cart()),
156 flat(mp_i, mp_i.get_bvect_cart()) {
161 fread(&
mass_bh,
sizeof(
double), 1, fich) ;
238 assert( &(bh.
mp) == &
mp ) ;
274 fwrite(&
mass_bh,
sizeof(
double), 1, fich) ;
296 ost <<
"Kerr-Schild background" << endl ;
297 ost <<
"----------------------" << endl ;
300 ost <<
"Conformally flat background" << endl ;
301 ost <<
"---------------------------" << endl ;
304 ost <<
"lapconf on the AH : " 306 ost <<
"lapse on the AH : " 308 ost <<
"shift(1) on the AH : " 309 <<
shift(1).val_grid_point(1,0,nt-1,0) << endl ;
310 ost <<
"shift(2) on the AH : " 311 <<
shift(2).val_grid_point(1,0,nt-1,0) << endl ;
312 ost <<
"shift(3) on the AH : " 313 <<
shift(3).val_grid_point(1,0,nt-1,0) << endl ;
314 ost <<
"confo on the AH : " 316 ost <<
"Gravitational mass : " 317 <<
mass_bh / msol <<
" M_sol" << endl ;
318 ost <<
"Irreducible mass : " 319 <<
mass_irr() / msol <<
" M_sol" << endl ;
321 <<
mass_adm() / msol <<
" M_sol" << endl ;
322 ost <<
"Komar mass : " 323 <<
mass_kom() / msol <<
" M_sol" << endl ;
325 double irr_gm, adm_gm, kom_gm ;
329 ost <<
"Diff. (Mirr-Mg)/Mg : " << irr_gm << endl ;
330 ost <<
"Diff. (Madm-Mg)/Mg : " << adm_gm << endl ;
331 ost <<
"Diff. (Mkom-Mg)/Mg : " << kom_gm << endl ;
Map & mp
Mapping associated with the black hole.
virtual double mass_irr() const
Irreducible mass of the black hole.
Scalar lapconf_rs
Part of lapconf from the numerical computation.
Scalar taij_quad
Part of the scalar generated by .
double * p_mass_adm
Irreducible mass of the black hole.
virtual void del_deriv() const
Deletes all the derived quantities.
Sym_tensor taij_rs
Part of the extrinsic curvature tensor.
virtual void sauve(FILE *) const
Save in a file.
double mass_bh
Gravitational mass of BH.
Standard units of space, time and mass.
double * p_mass_kom
ADM mass.
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
bool kerrschild
true for a Kerr-Schild background, false for a conformally flat background
Base class for coordinate mappings.
friend ostream & operator<<(ostream &, const Black_hole &)
Display.
virtual void std_spectral_base()
Sets the spectral bases of the Valeur va to the standard ones for a scalar field. ...
virtual double mass_adm() const
ADM mass.
virtual void sauve(FILE *) const
Save in a binary file.
Scalar taij_quad_rs
Part of the scalar.
void operator=(const Black_hole &)
Assignment to another Black_hole.
double val_grid_point(int l, int k, int j, int i) const
Returns the value of the field at a specified grid point.
virtual void std_spectral_base()
Sets the standard spectal bases of decomposition for each component.
Scalar confo
Conformal factor generated by the black hole.
virtual void sauve(FILE *) const
Save in a file.
double * p_mass_irr
Conformal metric .
Scalar lapconf_bh
Part of lapconf from the analytic background.
Vector shift_bh
Part of the shift vector from the analytic background.
double * p_rad_ah
Komar mass.
Black_hole(Map &mp_i, bool Kerr_schild, double massbh)
Standard constructor.
Base class for black holes.
Vector shift_rs
Part of the shift vector from the numerical computation.
double * p_spin_am_bh
Radius of the apparent horizon.
virtual ~Black_hole()
Destructor.
virtual double mass_kom() const
Komar mass.
Tbl * p_angu_mom_bh
Spin angular momentum.
Metric_flat flat
Flat metric defined on the mapping (Spherical components with respect to the mapping of the black hol...
Scalar lapse
Lapse function generated by the black hole.
Vector shift
Shift vector generated by the black hole.
Sym_tensor taij
Trace of the extrinsic curvature.
virtual void set_etat_zero()
Sets the logical state of all components to ETATZERO (zero state).
int get_nt(int l) const
Returns the number of points in the co-latitude direction ( ) in domain no. l.
virtual ostream & operator>>(ostream &) const
Operator >> (virtual function called by the operator <<)
Scalar lapconf
A function (lapse function * conformal factor) lapconf generated by the black hole.
void set_der_0x0() const
Sets to 0x0 all the pointers on derived quantities.