85 #include "bin_ns_bh.h" 87 #include "utilitaires.h" 89 #include "graphique.h" 112 for (
int i=0 ; i<3 ; i++)
113 for (
int j=i ; j<3 ; j++)
115 for (
int i=0 ; i<3 ; i++)
129 double lim_ns = distance/2. ;
130 double lim_bh = distance/2. ;
131 double int_ns = lim_ns/3. ;
132 double int_bh = lim_bh/3. ;
148 double xabs, yabs, zabs, air_ns, air_bh, theta, phi ;
151 for (
int l=0 ; l<nz_ns ; l++) {
160 for (
int k=0 ; k<np ; k++)
161 for (
int j=0 ; j<nt ; j++)
162 for (
int i=0 ; i<nr ; i++) {
164 xabs = xabs_ns (l, k, j, i) ;
165 yabs = yabs_ns (l, k, j, i) ;
166 zabs = zabs_ns (l, k, j, i) ;
170 (xabs, yabs, zabs, air_ns, theta, phi) ;
172 (xabs, yabs, zabs, air_bh, theta, phi) ;
174 if (air_ns <= lim_ns)
176 decouple_ns.
set(l, k, j, i) = 1 ;
178 decouple_ns.
set(l, k, j, i) =
179 0.5*
pow(
cos((air_ns-int_ns)*M_PI/2./(lim_ns-int_ns)), 2.)+0.5
182 if (air_bh <= lim_bh)
184 decouple_ns.
set(l, k, j, i) = 0 ;
186 decouple_ns.
set(l, k, j, i) = 0.5*
187 pow(
sin((air_bh-int_bh)*M_PI/2./(lim_bh-int_bh)), 2.)
191 decouple_ns.
set(l, k, j, i) = 0.5 ;
196 for (
int k=0 ; k<np ; k++)
197 for (
int j=0 ; j<nt ; j++)
198 decouple_ns.
set(nz_ns-1, k, j, nr) = 0.5 ;
201 for (
int l=0 ; l<nz_bh ; l++) {
210 for (
int k=0 ; k<np ; k++)
211 for (
int j=0 ; j<nt ; j++)
212 for (
int i=0 ; i<nr ; i++) {
214 xabs = xabs_bh (l, k, j, i) ;
215 yabs = yabs_bh (l, k, j, i) ;
216 zabs = zabs_bh (l, k, j, i) ;
220 (xabs, yabs, zabs, air_ns, theta, phi) ;
222 (xabs, yabs, zabs, air_bh, theta, phi) ;
224 if (air_bh <= lim_bh)
226 decouple_bh.
set(l, k, j, i) = 1 ;
228 decouple_bh.
set(l, k, j, i) = 0.5*
229 pow(
cos((air_bh-int_bh)*M_PI/2./(lim_bh-int_bh)), 2.)+0.5 ;
231 if (air_ns <= lim_ns)
233 decouple_bh.
set(l, k, j, i) = 0 ;
235 decouple_bh.
set(l, k, j, i) = 0.5*
236 pow(
sin((air_ns-int_ns)*M_PI/2./(lim_ns-int_ns)), 2.) ;
240 decouple_bh.
set(l, k, j, i) = 0.5 ;
245 for (
int k=0 ; k<np ; k++)
246 for (
int j=0 ; j<nt ; j++)
247 decouple_bh.
set(nz_bh-1, k, j, nr) = 0.5 ;
264 double norme_hole = 0 ;
265 double norme_star = 0 ;
267 for (
int i=0 ; i<3 ; i++) {
273 bool zero_shift_hole = (norme_hole <1e-14) ?
true :
false ;
275 bool zero_shift_star = (norme_star <1e-14) ?
true :
false ;
277 assert (zero_shift_hole == zero_shift_star) ;
279 if (zero_shift_star ==
true) {
298 for (
int k=0; k<nnp; k++)
299 for (
int j=0; j<nnt; j++){
308 if (bound_nn != 0 || lim_nn != 0){
328 ns_taij_comp.
set(0, 0).
import(copie_bh(0, 0)) ;
329 ns_taij_comp.
set(0, 1).
import(copie_bh(0, 1)) ;
330 ns_taij_comp.
set(0, 2).
import(copie_bh(0, 2)) ;
331 ns_taij_comp.
set(1, 1).
import(copie_bh(1, 1)) ;
332 ns_taij_comp.
set(1, 2).
import(copie_bh(1, 2)) ;
333 ns_taij_comp.
set(2, 2).
import(copie_bh(2, 2)) ;
368 for (
int i = 0 ; i<3 ; i++)
369 for (
int j = i ; j<3 ; j++) {
377 for (
int lig=0 ; lig<3 ; lig++)
378 for (
int col=lig ; col<3 ; col++) {
453 ntot_bh = division_xpun (ntot_bh, 0) ;
459 for (
int lig = 0 ; lig<3 ; lig++)
460 for (
int col = lig ; col<3 ; col++) {
465 auxi_bh = division_xpun (auxi_bh, 0) ;
468 auxi_bh = auxi_bh / ntot_bh ;
476 Cmp copie_ns_bis (ns_taij_tot(lig, col)) ;
486 double xabs, yabs, zabs, air, theta, phi ;
489 for (
int l=0 ; l<nz_ns ; l++) {
499 for (
int k=0 ; k<np ; k++)
500 for (
int j=0 ; j<nt ; j++)
501 for (
int i=0 ; i<nr ; i++) {
503 xabs = xabs_ns (l, k, j, i) ;
504 yabs = yabs_ns (l, k, j, i) ;
505 zabs = zabs_ns (l, k, j, i) ;
509 (xabs, yabs, zabs, air, theta, phi) ;
513 auxi_ns.
set(l, k, j, i) =
514 copie_ns_bis(l, k, j, i) / ntot_ns (l, k, j, i)/2. ;
517 auxi_ns.
set(l, k, j, i) = auxi_bh.
val_point (air, theta, phi) ;
522 for (
int k=0 ; k<np ; k++)
523 for (
int j=0 ; j<nt ; j++)
524 auxi_ns.
set(nz_ns-1, k, j, nr) = 0 ;
547 for (
int lig=0 ; lig<3 ; lig++)
548 for (
int col=lig ; col<3 ; col++) {
566 for (
int i=0; i<3; i++)
567 for (
int j=0; j<3; j++)
576 for (
int i=0; i<3; i++)
577 for (
int j=0; j<3; j++)
Coord xa
Absolute x coordinate.
const Base_vect & ref_triad
Reference triad ("absolute frame"), with respect to which the components of all the member Tenseur 's...
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
const double * get_alpha() const
Returns the pointer on the array alpha.
void dec2_dzpuis()
dzpuis -= 2 ;
void set_triad(const Base_vect &new_triad)
Assigns a new vectorial basis (triad) of decomposition.
int get_np(int l) const
Returns the number of points in the azimuthal direction ( ) in domain no. l.
void set_std_base()
Set the standard spectal basis of decomposition for each component.
Class intended to describe tensors with a symmetry on the two last indices *** DEPRECATED : use class...
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
Tenseur nnn
Total lapse function.
double get_ori_x() const
Returns the x coordinate of the origin.
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.
Cmp cos(const Cmp &)
Cosine.
void inc2_dzpuis()
dzpuis += 2 ;
Tenseur shift_auto
Part of the shift vector generated principaly by the star.
Tenseur_sym taij_comp
Part of generated by the companion hole.
const Base_vect_cart ref_triad
Cartesian triad of the absolute reference frame.
void fait_taij_auto()
Computes (LB)^{ij} auto.
Tenseur_sym taij_tot
Total extrinsic curvature tensor $ A^{ij} = 2 N K^{ij}$ generated by { shift_auto} and { shift_comp}...
Cmp & set()
Read/write for a scalar (see also operator=(const Cmp&) ).
void change_triad(const Base_vect &new_triad)
Sets a new vectorial basis (triad) of decomposition and modifies the components accordingly.
Tbl norme(const Cmp &)
Sums of the absolute values of all the values of the Cmp in each domain.
Et_bin_nsbh star
The neutron star.
const Base_vect * get_triad() const
Returns the vectorial basis (triad) on which the components are defined.
Map_af & mp
Affine mapping.
Cmp decouple
Function used to construct the part of generated by the star from the total .
const double * get_beta() const
Returns the pointer on the array beta.
Tenseur akcar_comp
Part of the scalar generated by shift_auto and shift_comp , i.e.
void fait_decouple()
Function used to compute the { decouple} functions for both the NS and the BH.
Map & mp
Mapping associated with the star.
int get_nzone() const
Returns the number of domains.
Tbl max(const Cmp &)
Maximum values of a Cmp in each domain.
const Tenseur & get_nnn() const
Returns the total lapse function N.
int get_etat() const
Returns the logical state.
void dec2_dzpuis()
Decreases by 2 the value of dzpuis and changes accordingly the values of the Cmp in the external comp...
Tenseur_sym tkij_auto
Auto .
Cmp pow(const Cmp &, int)
Power .
Tenseur contract(const Tenseur &, int id1, int id2)
Self contraction of two indices of a Tenseur .
void import_symy(const Cmp &ci)
Assignment to another Cmp defined on a different mapping.
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 get_nr(int l) const
Returns the number of points in the radial direction ( ) in domain no. l.
Tenseur a_car
Total conformal factor .
Coord ya
Absolute y coordinate.
void allocate_all()
Sets the logical state to ETATQCQ (ordinary state) and performs the memory allocation of all the elem...
Tbl & set(int l)
Read/write of the value in a given domain.
const Base_vect_cart & get_bvect_cart() const
Returns the Cartesian basis associated with the coordinates (x,y,z) of the mapping, i.e.
Tenseur_sym taij_auto
Part of the extrinsic curvature tensor $ A^{ij} = 2 N K^{ij}$ generated by { shift_auto}.
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 za
Absolute z coordinate.
void fait_tkij(int bound_nn=-1, double lim_nn=0)
Computation of the extrinsic curvature tensor for both { star} and { bhole}.
const Tenseur & get_shift_auto() const
Returns the part of generated by the hole.
Tenseur_sym tkij_tot
Total extrinsic curvature tensor $K^{ij}$ generated by { shift_auto} and { shift_comp}.
Bhole hole
The black hole.
Cmp sin(const Cmp &)
Sine.
Tenseur n_auto
Part of N generated by the hole.
int get_nt(int l) const
Returns the number of points in the co-latitude direction ( ) in domain no. l.
Tenseur_sym tkij_auto
Part of the extrinsic curvature tensor $K^{ij}$ generated by { shift_auto}.
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
void import(const Cmp &ci)
Assignment to another Cmp defined on a different mapping.
const Tenseur & get_shift_auto() const
Returns the part of the shift vector generated principaly by the star.
void convert_absolute(double xx, double yy, double zz, double &rr, double &theta, double &pphi) const
Determines the coordinates corresponding to given absolute Cartesian coordinates (X...
Tenseur akcar_auto
Part of the scalar generated by shift_auto , i.e.
void import_asymy(const Cmp &ci)
Assignment to another Cmp defined on a different mapping.
void set_etat_zero()
Sets the logical state to ETATZERO (zero state).
Tenseur_sym tkij_comp
Part of the extrinsic curvature tensor generated by shift_comp .
double val_point(double r, double theta, double phi) const
Computes the value of the field represented by *this at an arbitrary point , by means of the spectral...
Tensor handling *** DEPRECATED : use class Tensor instead ***.
const Tenseur & gradient() const
Returns the gradient of *this (Cartesian coordinates)