30 char bhole_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Bhole/bhole.C,v 1.15 2014/10/13 08:52:39 j_novak Exp $" ;
171 #include "utilitaires.h" 172 #include "et_bin_nsbh.h" 173 #include "graphique.h" 178 rayon ((mp.get_alpha())[0]),
179 omega(0), omega_local(0), rot_state(COROT), boost (new double[3]), regul(0),
180 n_auto(mpi), n_comp(mpi), n_tot(mpi),
181 psi_auto(mpi), psi_comp(mpi), psi_tot(mpi),
182 grad_n_tot (mpi, 1, COV, mpi.get_bvect_cart()),
183 grad_psi_tot (mpi, 1, COV, mpi.get_bvect_cart()),
184 shift_auto(mpi, 1, CON, mpi.get_bvect_cart()),
185 taij_auto(mpi, 2, CON, mpi.get_bvect_cart()),
186 taij_comp(mpi, 2, CON, mpi.get_bvect_cart()),
187 taij_tot (mpi, 2, CON, mpi.get_bvect_cart()),
188 tkij_auto (mpi, 2, CON, mpi.get_bvect_cart()),
189 tkij_tot (mpi, 2, CON, mpi.get_bvect_cart()),
191 for (
int i=0 ; i<3 ; i++)
208 for (
int i=0 ; i<3 ; i++)
220 assert (&
mp == &source.
mp) ;
226 for (
int i=0 ; i<3 ; i++)
266 Tenseur grad_comp (
mp, 1, COV, *auxi.get_triad()) ;
268 grad_comp.set(0).import_symy(auxi(0)) ;
269 grad_comp.set(1).import_asymy(auxi(1)) ;
270 grad_comp.set(2).import_symy(auxi(2)) ;
271 grad_comp.set_std_base() ;
272 grad_comp.inc2_dzpuis() ;
293 Tenseur grad_comp (
mp, 1, COV, *auxi.get_triad()) ;
295 grad_comp.set(0).import_symy(auxi(0)) ;
296 grad_comp.set(1).import_asymy(auxi(1)) ;
297 grad_comp.set(2).import_symy(auxi(2)) ;
298 grad_comp.set_std_base() ;
299 grad_comp.inc2_dzpuis() ;
323 grad_comp.set_etat_qcq() ;
325 grad_comp.set(0).import(auxi(0)) ;
326 grad_comp.set(1).import(auxi(1)) ;
327 grad_comp.set(2).import(auxi(2)) ;
330 grad_comp.set(0).import_symy(auxi(0)) ;
331 grad_comp.set(1).import_asymy(auxi(1)) ;
332 grad_comp.set(2).import_symy(auxi(2)) ;
334 grad_comp.set_std_base() ;
335 grad_comp.inc2_dzpuis() ;
336 grad_comp.set_triad( *(auxi.get_triad()) ) ;
359 grad_comp.set_etat_qcq() ;
361 grad_comp.set(0).import(auxi(0)) ;
362 grad_comp.set(1).import(auxi(1)) ;
363 grad_comp.set(2).import(auxi(2)) ;
366 grad_comp.set(0).import_symy(auxi(0)) ;
367 grad_comp.set(1).import_asymy(auxi(1)) ;
368 grad_comp.set(2).import_symy(auxi(2)) ;
370 grad_comp.set_std_base() ;
371 grad_comp.inc2_dzpuis() ;
372 grad_comp.set_triad( *(auxi.get_triad()) ) ;
386 trace = grad(0, 0)+grad(1, 1)+grad(2, 2) ;
390 for (
int i=0 ; i<3 ; i++) {
391 for (
int j=i+1 ; j<3 ; j++)
396 for (
int i=0 ; i<3 ; i++)
397 for (
int j=0 ; j<3 ; j++)
500 grad_n_tot (mpi, 1, COV, mpi.get_bvect_cart()),
502 shift_auto(mpi, 1, CON, mpi.get_bvect_cart()),
503 taij_auto(mpi, 2, CON, mpi.get_bvect_cart()),
504 taij_comp(mpi, 2, CON, mpi.get_bvect_cart()),
505 taij_tot (mpi, 2, CON, mpi.get_bvect_cart()),
506 tkij_auto (mpi, 2, CON, mpi.get_bvect_cart()) ,
507 tkij_tot (mpi, 2, CON, mpi.get_bvect_cart()) ,
560 double Bhole::local_momentum()
const {
572 for (
int i=0 ; i<3 ; i++)
574 vecteur.set_std_base() ;
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
double integrale_surface(const Cmp &ci, double rayon) const
Performs the surface integration of ci on the sphere of radius rayon .
void dec2_dzpuis()
dzpuis -= 2 ;
Tenseur grad_n_tot
Total gradient of N .
void annule(int l)
Sets the Cmp to zero in a given domain.
void set_std_base()
Set the standard spectal basis of decomposition for each component.
const Base_vect_spher & get_bvect_spher() const
Returns the orthonormal vectorial basis associated with the coordinates of the mapping.
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
Bhole(Map_af &mapping)
Standard constructor.
void init_bhole_seul()
Initiates for a single the black hole.
double omega_local
local angular velocity
Tenseur psi_auto
Part of generated by the hole.
Tenseur n_comp
Part of N generated by the companion hole.
Tenseur_sym taij_tot
Total , which must be zero on the horizon of the regularisation on the shift has been done...
void fait_taij_auto()
Calculates the part of generated by shift_auto .
Tenseur_sym taij_auto
Part of generated by the hole.
void fait_n_comp(const Bhole &comp)
Imports the part of N due to the companion hole comp .
Tenseur shift_auto
Part of generated by the hole.
Tenseur_sym taij_comp
Part of generated by the companion hole.
void set_etat_zero()
Sets the logical state to ETATZERO (zero).
Cmp & set()
Read/write for a scalar (see also operator=(const Cmp&) ).
void sauve(FILE *) const
Save in a file.
void regularise_shift(const Tenseur &comp)
Corrects shift_auto in such a way that the total is equal to zero in the horizon, which should ensure the regularity of , using the stored values of the boost and the angular velocity.
Tenseur psi_comp
Part of generated by the companion hole.
double area() const
Computes the area of the throat.
Map_af & mp
Affine mapping.
const Tenseur & get_n_auto() const
Returns the part of the lapse { N} generated principaly by the star.
void set_val_inf(double val)
Sets the value of the Cmp to val at infinity.
int get_nzone() const
Returns the number of domains.
int get_etat() const
Returns the logical state.
const Tenseur & get_d_confpsi_auto() const
Returns the gradient of { confpsi_auto} (Cartesian components with respect to { ref_triad}) ...
int fwrite_be(const int *aa, int size, int nb, FILE *fich)
Writes integer(s) into a binary file according to the big endian convention.
void sauve(FILE *fich) const
Write on a file.
double rayon
Radius of the horizon in LORENE's units.
Cmp pow(const Cmp &, int)
Power .
Tenseur_sym tkij_auto
Auto .
void import_symy(const Cmp &ci)
Assignment to another Cmp defined on a different mapping.
double * boost
Lapse on the horizon.
void std_base_scal()
Sets the spectral bases of the Valeur va to the standard ones for a scalar.
Tenseur_sym tkij_tot
Total .
int fread_be(int *aa, int size, int nb, FILE *fich)
Reads integer(s) from a binary file according to the big endian convention.
Tenseur grad_psi_tot
Total gradient of .
void init_bhole()
Sets the values of the fields to :
void operator=(const Bhole &)
Affectation.
const Base_vect_cart & get_bvect_cart() const
Returns the Cartesian basis associated with the coordinates (x,y,z) of the mapping, i.e.
Class for a star in a NS-BH binary system.
const Tenseur & get_confpsi_auto() const
Returns the part of the conformal factor $$ generated principaly by the star.
int rot_state
State of rotation.
Coord y
y coordinate centered on the grid
Cmp decouple
Function used to construct the part of generated by the hole from the total .
void raccord(int n)
Performs the matching of the nucleus with respect to the first shell.
Coord x
x coordinate centered on the grid
double omega
Angular velocity in LORENE's units.
void set_dzpuis(int)
Set a value to dzpuis.
Tenseur n_auto
Part of N generated by the hole.
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
void fait_psi_comp(const Bhole &comp)
Imports the part of due to the companion hole comp .
void import(const Cmp &ci)
Assignment to another Cmp defined on a different mapping.
void set_etat_zero()
Sets the logical state to ETATZERO (zero state).
Tensor handling *** DEPRECATED : use class Tensor instead ***.
double regul
Intensity of the correction on the shift vector.
const Tenseur & gradient() const
Returns the gradient of *this (Cartesian coordinates)
Coord r
r coordinate centered on the grid
const Tenseur & get_d_n_auto() const
Returns the gradient of { n_auto} (Cartesian components with respect to { ref_triad}) ...