85#include "utilitaires.h"
90 Cmp der_un (
hole1.psi_auto().dsdr()) ;
91 Cmp der_deux (
hole2.psi_auto().dsdr()) ;
93 double masse =
hole1.mp.integrale_surface_infini(der_un) +
94 hole2.mp.integrale_surface_infini(der_deux) ;
101 Cmp der_un (
hole1.n_auto().dsdr()) ;
102 Cmp der_deux (
hole2.n_auto().dsdr()) ;
104 double masse =
hole1.mp.integrale_surface_infini(der_un) +
105 hole2.mp.integrale_surface_infini(der_deux) ;
117 double orientation_un =
hole1.mp.get_rot_phi() ;
118 assert ((orientation_un==0) || (orientation_un==M_PI)) ;
119 double orientation_deux =
hole2.mp.get_rot_phi() ;
120 assert ((orientation_deux==0) || (orientation_deux==M_PI)) ;
121 int same_orient = (orientation_un == orientation_deux) ? 1 : -1 ;
125 xa_un =
hole1.mp.xa ;
129 ya_un =
hole1.mp.ya ;
134 for (
int i=0 ; i<3 ; i++)
135 vecteur_un.
set(i) = (-ya_un*
hole1.tkij_tot(0, i)+
136 xa_un *
hole1.tkij_tot(1, i)) ;
138 vecteur_un.
annule(
hole1.mp.get_mg()->get_nzone()-1) ;
141 Cmp integrant_un (
pow(
hole1.psi_tot(), 6)*vecteur_un(0)) ;
143 double moment_un =
hole1.mp.integrale_surface
144 (integrant_un,
hole1.rayon)/8/M_PI ;
148 xa_deux =
hole2.mp.xa ;
152 ya_deux =
hole2.mp.ya ;
157 for (
int i=0 ; i<3 ; i++)
158 vecteur_deux.
set(i) = -ya_deux*
hole2.tkij_tot(0, i)+
159 xa_deux *
hole2.tkij_tot(1, i) ;
161 vecteur_deux.
annule(
hole2.mp.get_mg()->get_nzone()-1) ;
164 Cmp integrant_deux (
pow(
hole2.psi_tot(), 6)*vecteur_deux(0)) ;
166 double moment_deux =
hole2.mp.integrale_surface
167 (integrant_deux,
hole2.rayon)/8/M_PI ;
169 return moment_un+same_orient*moment_deux ;
179 double orientation_un =
hole1.mp.get_rot_phi() ;
180 assert ((orientation_un==0) || (orientation_un==M_PI)) ;
181 double orientation_deux =
hole2.mp.get_rot_phi() ;
182 assert ((orientation_deux==0) || (orientation_deux==M_PI)) ;
183 int same_orient = (orientation_un == orientation_deux) ? 1 : -1 ;
186 int nzones =
hole1.mp.get_mg()->get_nzone() ;
187 double* bornes =
new double [nzones+1] ;
188 double courant = (
hole1.mp.get_ori_x()-
hole2.mp.get_ori_x())+1 ;
189 for (
int i=nzones-1 ; i>0 ; i--) {
190 bornes[i] = courant ;
194 bornes[nzones] = __infinity ;
201 Tenseur_sym k_total (mapping, 2, CON, mapping.get_bvect_cart()) ;
204 Tenseur shift_un (mapping, 1, CON, mapping.get_bvect_cart()) ;
207 Tenseur shift_deux (mapping, 1, CON, mapping.get_bvect_cart()) ;
218 Tenseur shift_tot (shift_un+shift_deux) ;
220 shift_tot.
annule(0, nzones-2) ;
226 Tenseur trace (grad(0, 0)+grad(1, 1)+grad(2, 2)) ;
227 for (
int i=0 ; i<3 ; i++) {
228 k_total.
set(i, i) = grad(i, i)-trace()/3. ;
229 for (
int j=i+1 ; j<3 ; j++)
230 k_total.
set(i, j) = (grad(i, j)+grad(j, i))/2. ;
233 for (
int lig=0 ; lig<3 ; lig++)
234 for (
int col=lig ; col<3 ; col++)
237 Tenseur vecteur_un (mapping, 1, CON, mapping.get_bvect_cart()) ;
239 for (
int i=0 ; i<3 ; i++)
240 vecteur_un.
set(i) = k_total(0, i) ;
242 Cmp integrant_un (vecteur_un(0)) ;
244 Tenseur vecteur_deux (mapping, 1, CON, mapping.get_bvect_cart()) ;
246 for (
int i=0 ; i<3 ; i++)
247 vecteur_deux.
set(i) = k_total(1, i) ;
249 Cmp integrant_deux (vecteur_deux(0)) ;
268 double x_un =
hole1.mp.get_ori_x() -
hole1.rayon ;
269 double x_deux =
hole2.mp.get_ori_x() +
hole2.rayon ;
272 double pente = 2./(x_un-x_deux) ;
273 double constante = - (x_un+x_deux)/(x_un-x_deux) ;
278 double air_un, theta_un, phi_un ;
279 double air_deux, theta_deux, phi_deux ;
281 double* coloc =
new double[nr] ;
282 double* coef =
new double[nr] ;
283 int* deg =
new int[3] ;
284 deg[0] = 1 ; deg[1] = 1 ; deg[2] = nr ;
286 for (
int i=0 ; i<nr ; i++) {
287 ksi = -
cos (M_PI*i/(nr-1)) ;
288 xabs = (ksi-constante)/pente ;
290 hole1.mp.convert_absolute (xabs, 0, 0, air_un, theta_un, phi_un) ;
291 hole2.mp.convert_absolute (xabs, 0, 0, air_deux, theta_deux, phi_deux) ;
293 coloc[i] =
pow (
hole1.psi_auto().val_point (air_un, theta_un, phi_un) +
294 hole2.psi_auto().val_point (air_deux, theta_deux, phi_deux), 2.) ;
298 cfrcheb(deg, deg, coloc, deg, coef) ;
301 double* som =
new double[nr] ;
303 for (
int i=2 ; i<nr ; i+=2)
304 som[i] = 1./(i+1)-1./(i-1) ;
305 for (
int i=1 ; i<nr ; i+=2)
309 for (
int i=0 ; i<nr ; i++)
310 res += som[i]*coef[i] ;
322Tbl Bhole_binaire::linear_momentum_systeme_inf()
const {
328 double orientation_un =
hole1.
mp.get_rot_phi() ;
329 assert ((orientation_un==0) || (orientation_un==M_PI)) ;
330 double orientation_deux =
hole2.
mp.get_rot_phi() ;
331 assert ((orientation_deux==0) || (orientation_deux==M_PI)) ;
332 int same_orient = (orientation_un == orientation_deux) ? 1 : -1 ;
335 int nzones =
hole1.
mp.get_mg()->get_nzone() ;
336 double* bornes =
new double [nzones+1] ;
338 for (
int i=nzones-1 ; i>0 ; i--) {
339 bornes[i] = courant ;
343 bornes[nzones] = __infinity ;
345 Map_af mapping (*
hole1.
mp.get_mg(), bornes) ;
350 Tenseur_sym k_total (mapping, 2, CON, mapping.get_bvect_cart()) ;
351 k_total.set_etat_qcq() ;
353 Tenseur shift_un (mapping, 1, CON, mapping.get_bvect_cart()) ;
354 shift_un.set_etat_qcq() ;
356 Tenseur shift_deux (mapping, 1, CON, mapping.get_bvect_cart()) ;
357 shift_deux.set_etat_qcq() ;
367 Tenseur shift_tot (shift_un+shift_deux) ;
368 shift_tot.set_std_base() ;
369 shift_tot.annule(0, nzones-2) ;
372 Tenseur shift_old (shift_tot) ;
373 shift_tot.inc2_dzpuis() ;
374 shift_tot.dec2_dzpuis() ;
375 for (
int i=0 ; i< 3 ; i++)
379 Tenseur grad (shift_tot.gradient()) ;
380 Tenseur trace (grad(0, 0)+grad(1, 1)+grad(2, 2)) ;
381 for (
int i=0 ; i<3 ; i++) {
382 k_total.set(i, i) = grad(i, i)-trace()/3. ;
383 for (
int j=i+1 ; j<3 ; j++)
384 k_total.set(i, j) = (grad(i, j)+grad(j, i))/2. ;
388 for (
int lig=0 ; lig<3 ; lig++)
389 for (
int col=lig ; col<3 ; col++)
390 k_total.set(lig, col).mult_r_zec() ;
392 for (
int comp=0 ; comp<3 ; comp++) {
393 Tenseur vecteur (mapping, 1, CON, mapping.get_bvect_cart()) ;
394 vecteur.set_etat_qcq() ;
395 for (
int i=0 ; i<3 ; i++)
396 vecteur.set(i) = k_total(i, comp) ;
397 vecteur.change_triad (mapping.get_bvect_spher()) ;
398 Cmp integrant (vecteur(0)) ;
400 res.set(comp) = mapping.integrale_surface_infini (integrant)/8/M_PI ;
double moment_systeme_inf()
Calculates the angular momentum of the black hole using the formula at infinity : where .
double omega
Position of the axis of rotation.
Bhole hole1
Black hole one.
Bhole hole2
Black hole two.
double komar_systeme() const
Calculates the Komar mass of the system using : .
double adm_systeme() const
Calculates the ADM mass of the system using : .
double moment_systeme_hor() const
Calculates the angular momentum of the black hole using the formula on the horizon : where and den...
double distance_propre(const int nr=65) const
Calculation of the proper distance between the two spheres of inversion, along the x axis.
Tenseur shift_auto
Part of generated by the hole.
Map_af & mp
Affine mapping.
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
void mult_r_zec()
Multiplication by r in the external compactified domain (ZEC).
Valeur va
The numerical value of the Cmp.
void std_base_scal()
Sets the spectral bases of the Valeur va to the standard ones for a scalar.
void import_symy(const Cmp &ci)
Assignment to another Cmp defined on a different mapping.
void import_asymy(const Cmp &ci)
Assignment to another Cmp defined on a different mapping.
double integrale_surface_infini(const Cmp &ci) const
Performs the surface integration of ci at infinity.
Class intended to describe tensors with a symmetry on the two last indices *** DEPRECATED : use class...
Tensor handling *** DEPRECATED : use class Tensor instead ***.
Cmp & set()
Read/write for a scalar (see also operator=(const Cmp&) ).
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
void annule(int l)
Sets the Tenseur to zero in a given domain.
void dec2_dzpuis()
dzpuis -= 2 ;
const Tenseur & gradient() const
Returns the gradient of *this (Cartesian coordinates).
void set_std_base()
Set the standard spectal basis of decomposition for each component.
void inc2_dzpuis()
dzpuis += 2 ;
void change_triad(const Base_vect &new_triad)
Sets a new vectorial basis (triad) of decomposition and modifies the components accordingly.
const Valeur & mult_st() const
Returns applied to *this.
const Valeur & mult_cp() const
Returns applied to *this.
const Valeur & mult_sp() const
Returns applied to *this.
Tbl max(const Cmp &)
Maximum values of a Cmp in each domain.
Cmp pow(const Cmp &, int)
Power .
Cmp cos(const Cmp &)
Cosine.
Tbl diffrelmax(const Cmp &a, const Cmp &b)
Relative difference between two Cmp (max version).