61#include "utilitaires.h"
71 int nz1 =
hole1.mp.get_mg()->get_nzone() ;
72 int nz2 =
hole2.mp.get_mg()->get_nzone() ;
112 for (
int i=0; i<
hole1.mp.get_mg()->get_nr(nz1-1); i++)
113 for (
int j=0; j<
hole1.mp.get_mg()->get_nt(nz1-1); j++)
114 for (
int k=0; k<
hole1.mp.get_mg()->get_np(nz1-1); k++)
115 for (
int ind=1; ind<=3; ind++){
133 rr2_2.
set(1) = xx_2 ;
134 rr2_2.
set(2) = yy_2 ;
135 rr2_2.
set(3) = zz_2 ;
150 for (
int i=0; i<
hole2.mp.get_mg()->get_nr(nz2-1); i++)
151 for (
int j=0; j<
hole2.mp.get_mg()->get_nt(nz2-1); j++)
152 for (
int k=0; k<
hole2.mp.get_mg()->get_np(nz2-1); k++)
153 for (
int ind=1; ind<=3; ind++){
154 nn2_2.
set(ind).
set_grid_point(nz2-1,k,j,i) = nn2_2(ind).val_grid_point(1,k,j,0) ;
158 unsr1 = 1./
hole1.mp.r ;
195 for (
int i=1 ; i<=3 ; i++){
203 unsr2_2 = 1./
hole2.mp.r ;
215 Scalar r2sr1 (1./unsr2*unsr1) ;
251 r12 =
sqrt( rr12(1)*rr12(1) + rr12(2)*rr12(2) + rr12(3)*rr12(3)) ;
280 double r0 =
hole1.mp.val_r(nz1-2, 1, 0, 0) ;
281 double sigma = 1.*r0 ;
287 fexp =
exp( -(rr - r0)*(rr - r0)/sigma/sigma ) ;
288 for (
int ii=0; ii<nz1-1; ii++)
304 f_delta = -5.*r1/(8.*r12*r12*r12) - 15./(8.*r1*r12) +
305 5.*r1*r1*unsr2/(8.*r12*r12*r12) + 1./(r1+1./unsr2+r12)/(r1+1./unsr2+r12)*
306 (1 + r1/r12 + r12/r1 - r1sr2 - r1*r1sr2/r12 + r12*r12*unsr2/(2*r1)) +
307 1./(r1+1./unsr2+r12)*(-7./r1 + 2./r12) ;
311 f_delta_zec = - 15./(8.*r1*r12) + 1./(r1+1./unsr2+r12)/(r1+1./unsr2+r12)*
312 (1 + r1/r12 + r12/r1 - r1sr2 - r1*r1sr2/r12 + r12*r12*unsr2/(2*r1)) +
313 1./(r1+1./unsr2+r12)*(-7./r1 + 2./r12) ;
314 f_delta_zec += fexp*(-5.*r1/(8.*r12*r12*r12)+5.*r1*r1*unsr2/(8.*r12*r12*r12)) ;
317 for (
int i=0 ;i<nz1-1 ; i++){
321 f_delta = f_delta + f_delta_zec ;
337 f_1_1 = r1/(8.*r12*r12*r12) + 11./(8.*r1*r12) -
338 1./(8.*r1*unsr2*unsr2*r12*r12*r12) + 7./(r1+1./unsr2+r12)/(r1+1./unsr2+r12) +
339 7./r1/(r1+1./unsr2+r12) ;
342 f_1_1_zec = 11./(8.*r1*r12) + 7./(r1+1./unsr2+r12)/(r1+1./unsr2+r12) +
343 7./r1/(r1+1./unsr2+r12) ;
344 f_1_1_zec += fexp*(r1/(8.*r12*r12*r12)-1./(8.*r1*unsr2*unsr2*r12*r12*r12)) ;
347 for (
int i=0 ; i<nz1-1 ; i++){
351 f_1_1 = f_1_1 + f_1_1_zec ;
367 f_1_12 = - 7./(2*r12*r12) + 8./(r1+1./unsr2+r12)/(r1+1./unsr2+r12) ;
370 f_1_12_zec = 8./(r1+1./unsr2+r12)/(r1+1./unsr2+r12) ;
371 f_1_12_zec += fexp*(- 7./(2*r12*r12)) ;
374 for (
int i=0 ; i<nz1-1 ; i++){
378 f_1_12 = f_1_12 + f_1_12_zec ;
394 f_12_12 = (-4./(r1+1./unsr2+r12)/(r1+1./unsr2+r12) -
395 4./r12/(r1+1./unsr2+r12)) ;
412 f_1_2 = 11./(r1+1./unsr2+r12)/(r1+1./unsr2+r12);
431 for (
int i=1 ; i<= 3 ; i++){
432 for (
int j=i ; j<= 3 ; j++){
433 hh_temp.
set(i,j) = f_delta *
hole1.ff.con()(i,j) + f_1_1 * nn1(i)*nn1(j)
434 + f_1_12 * 0.5 *(nn1(i) * nn12(j) + nn1(j) * nn12(i))
435 + f_12_12 * nn12(i)*nn12(j)
436 + f_1_2 * 0.5*(nn1(i)*nn2(j) + nn1(j)*nn2(i) ) ;
462 int nz1 =
hole1.mp.get_mg()->get_nzone() ;
463 int nz2 =
hole2.mp.get_mg()->get_nzone() ;
504 for (
int i=0; i<
hole2.mp.get_mg()->get_nr(nz2-1); i++)
505 for (
int j=0; j<
hole2.mp.get_mg()->get_nt(nz2-1); j++)
506 for (
int k=0; k<
hole2.mp.get_mg()->get_np(nz2-1); k++)
507 for (
int ind=1; ind<=3; ind++){
514 rr1_1.
set(1) = xx_1 ;
515 rr1_1.
set(2) = yy_1 ;
516 rr1_1.
set(3) = zz_1 ;
531 for (
int i=0; i<
hole1.mp.get_mg()->get_nr(nz1-1); i++)
532 for (
int j=0; j<
hole1.mp.get_mg()->get_nt(nz1-1); j++)
533 for (
int k=0; k<
hole1.mp.get_mg()->get_np(nz1-1); k++)
534 for (
int ind=1; ind<=3; ind++){
535 nn1_1.
set(ind).
set_grid_point(nz1-1,k,j,i) = nn1_1(ind).val_grid_point(1,k,j,0) ;
539 unsr2 = 1./
hole2.mp.r ;
548 for (
int i=1 ; i<=3 ; i++){
556 unsr1_1 = 1./
hole1.mp.r ;
568 Scalar r1sr2 (1./unsr1*unsr2) ;
583 r21 =
sqrt( rr21(1)*rr21(1) + rr21(2)*rr21(2) + rr21(3)*rr21(3)) ;
612 double r0 =
hole2.mp.val_r(nz2-2, 1, 0, 0) ;
613 double sigma = 1.*r0 ;
619 fexp =
exp( -(rr - r0)*(rr - r0)/sigma/sigma ) ;
620 for (
int ii=0; ii<nz2-1; ii++)
636 f_delta = -5.*r2/(8.*r21*r21*r21) - 15./(8.*r2*r21) +
637 5.*r2*r2*unsr1/(8.*r21*r21*r21) + 1./(r2+1./unsr1+r21)/(r2+1./unsr1+r21)*
638 (1 + r2/r21 + r21/r2 - r2sr1 - r2*r2sr1/r21 + r21*r21*unsr1/(2*r2)) +
639 1./(r2+1./unsr1+r21)*(-7./r2 + 2./r21) ;
643 f_delta_zec = - 15./(8.*r2*r21) + 1./(r2+1./unsr1+r21)/(r2+1./unsr1+r21)*
644 (1 + r2/r21 + r21/r2 - r2sr1 - r2*r2sr1/r21 + r21*r21*unsr1/(2*r2)) +
645 1./(r2+1./unsr1+r21)*(-7./r2 + 2./r21) ;
646 f_delta_zec += fexp*(-5.*r2/(8.*r21*r21*r21)+5.*r2*r2*unsr1/(8.*r21*r21*r21)) ;
649 for (
int i=0 ;i<nz2-1 ; i++){
653 f_delta = f_delta + f_delta_zec ;
669 f_2_2 = r2/(8.*r21*r21*r21) + 11./(8.*r2*r21) -
670 1./(8.*r2*unsr1*unsr1*r21*r21*r21) + 7./(r2+1./unsr1+r21)/(r2+1./unsr1+r21) +
671 7./r2/(r2+1./unsr1+r21) ;
674 f_2_2_zec = 11./(8.*r2*r21) + 7./(r2+1./unsr1+r21)/(r2+1./unsr1+r21) +
675 7./r2/(r2+1./unsr1+r21) ;
676 f_2_2_zec += fexp*(r2/(8.*r21*r21*r21)-1./(8.*r2*unsr1*unsr1*r21*r21*r21)) ;
679 for (
int i=0 ; i<nz2-1 ; i++){
683 f_2_2 = f_2_2 + f_2_2_zec ;
699 f_2_21 = - 7./(2*r21*r21) + 8./(r2+1./unsr1+r21)/(r2+1./unsr1+r21) ;
702 f_2_21_zec = 8./(r2+1./unsr1+r21)/(r2+1./unsr1+r21) ;
703 f_2_21_zec += fexp*(- 7./(2*r21*r21)) ;
706 for (
int i=0 ; i<nz2-1 ; i++){
710 f_2_21 = f_2_21 + f_2_21_zec ;
726 f_21_21 = (-4./(r2+1./unsr1+r21)/(r2+1./unsr1+r21) -
727 4./r21/(r2+1./unsr1+r21)) ;
744 f_2_1 = 11./(r2+1./unsr1+r21)/(r2+1./unsr1+r21);
763 for (
int i=1 ; i<= 3 ; i++){
764 for (
int j=i ; j<= 3 ; j++){
765 hh_temp.
set(i,j) = f_delta *
hole2.ff.con()(i,j) + f_2_2 * nn2(i)*nn2(j)
766 - f_2_21 * 0.5 *(nn2(i) * nn21(j) + nn2(j) * nn21(i))
767 + f_21_21 * nn21(i)*nn21(j)
768 + f_2_1 * 0.5*(nn2(i)*nn1(j) + nn2(j)*nn1(i) ) ;
799 surface_un.
annule(
hole1.mp.get_mg()->get_nzone()-1) ;
804 surface_deux.
annule(
hole1.mp.get_mg()->get_nzone()-1) ;
853 for (
int i=1 ; i<=3 ; i++)
854 for (
int j=i ; j<=3 ; j++){
869 for (
int i=1 ; i<=3 ; i++){
870 for (
int j=i ; j<=3 ; j++){
878 for (
int i=1 ; i<=3 ; i++){
879 for (
int j=i ; j<=3 ; j++){
894 cout <<
hole1.mp.r << endl ;
895 cout <<
hole1.mp.phi << endl ;
896 cout <<
hole1.mp.tet << endl ;
900 for (
int i=1 ; i<= 3 ; i++)
901 for (
int j=i ; j<= 3 ; j++){
905 des_coupe_z (hh1(i,j), 0., 5) ;
911 hole1.hh = m1*m2* hh1 ;
912 hole2.hh = m1*m2* hh2 ;
917 hole1.tgam = tgam_1 ;
918 hole2.tgam = tgam_2 ;
921 des_meridian(hh1, 0., 20.,
"hh1", 0) ;
Single_hor hole1
Black hole one.
Single_hor hole2
Black hole two.
void set_hh_Samaya()
Calculation of the Post-Newtonian correction to .
Sym_tensor hh_Samaya_hole2()
Calculation of the hole2 part of the Post-Newtonian correction to .
Sym_tensor hh_Samaya_hole1()
Calculation of the hole1 part of the Post-Newtonian correction to .
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
void std_base_scal()
Sets the spectral bases of the Valeur va to the standard ones for a scalar.
void annule(int l)
Sets the Cmp to zero in a given domain.
Active physical coordinates and mapping derivatives.
Metric for tensor calculation.
Tensor field of valence 0 (or component of a tensorial field).
void raccord(int n)
Performs the matching of the nucleus with respect to the first shell.
virtual void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
virtual void std_spectral_base()
Sets the spectral bases of the Valeur va to the standard ones for a scalar field.
Tbl & set_domain(int l)
Read/write of the value in a given domain.
Valeur & set_spectral_va()
Returns va (read/write version).
const Valeur & get_spectral_va() const
Returns va (read only version).
double & set_grid_point(int l, int k, int j, int i)
Setting the value of the field at a given grid point.
const Tbl & domain(int l) const
Read-only of the value in a given domain.
void set_outer_boundary(int l, double x)
Sets the value of the Scalar at the outer boundary of a given domain.
void import(const Scalar &ci)
Assignment to another Scalar defined on a different mapping.
Class intended to describe valence-2 symmetric tensors.
const Base_val & get_base() const
Return the bases for spectral expansions (member base ).
void set_base(const Base_val &)
Sets the bases for spectral expansions (member base ).
Tensor field of valence 1.
virtual void std_spectral_base()
Sets the standard spectal bases of decomposition for each component.
virtual void change_triad(const Base_vect &)
Sets a new vectorial basis (triad) of decomposition and modifies the components accordingly.
Scalar & set(int)
Read/write access to a component.
Cmp sqrt(const Cmp &)
Square root.
Cmp exp(const Cmp &)
Exponential.
Cmp pow(const Cmp &, int)
Power .
virtual void change_triad(const Base_vect &new_triad)
Sets a new vectorial basis (triad) of decomposition and modifies the components accordingly.
void annule_domain(int l)
Sets the Tensor to zero in a given domain.
virtual void set_etat_qcq()
Sets the logical state of all components to ETATQCQ (ordinary state).
Scalar & set(const Itbl &ind)
Returns the value of a component (read/write version).