24char binhor_hh_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Bin_hor/binhor_hh.C,v 1.5 2014/10/13 08:52:42 j_novak Exp $" ;
58#include "utilitaires.h"
68 int nz1 =
hole1.mp.get_mg()->get_nzone() ;
69 int nz2 =
hole2.mp.get_mg()->get_nzone() ;
109 for (
int i=0; i<
hole1.mp.get_mg()->get_nr(nz1-1); i++)
110 for (
int j=0; j<
hole1.mp.get_mg()->get_nt(nz1-1); j++)
111 for (
int k=0; k<
hole1.mp.get_mg()->get_np(nz1-1); k++)
112 for (
int ind=1; ind<=3; ind++){
130 rr2_2.
set(1) = xx_2 ;
131 rr2_2.
set(2) = yy_2 ;
132 rr2_2.
set(3) = zz_2 ;
147 for (
int i=0; i<
hole2.mp.get_mg()->get_nr(nz2-1); i++)
148 for (
int j=0; j<
hole2.mp.get_mg()->get_nt(nz2-1); j++)
149 for (
int k=0; k<
hole2.mp.get_mg()->get_np(nz2-1); k++)
150 for (
int ind=1; ind<=3; ind++){
151 nn2_2.
set(ind).
set_grid_point(nz2-1,k,j,i) = nn2_2(ind).val_grid_point(1,k,j,0) ;
155 unsr1 = 1./
hole1.mp.r ;
192 for (
int i=1 ; i<=3 ; i++){
200 unsr2_2 = 1./
hole2.mp.r ;
212 Scalar r2sr1 (1./unsr2*unsr1) ;
248 r12 =
sqrt( rr12(1)*rr12(1) + rr12(2)*rr12(2) + rr12(3)*rr12(3)) ;
277 double r0 =
hole1.mp.val_r(nz1-2, 1, 0, 0) ;
278 double sigma = 1.*r0 ;
284 fexp =
exp( -(rr - r0)*(rr - r0)/sigma/sigma ) ;
285 for (
int ii=0; ii<nz1-1; ii++)
301 f_delta = -5.*r1/(8.*r12*r12*r12) - 15./(8.*r1*r12) +
302 5.*r1*r1*unsr2/(8.*r12*r12*r12) + 1./(r1+1./unsr2+r12)/(r1+1./unsr2+r12)*
303 (1 + r1/r12 + r12/r1 - r1sr2 - r1*r1sr2/r12 + r12*r12*unsr2/(2*r1)) +
304 1./(r1+1./unsr2+r12)*(-7./r1 + 2./r12) ;
308 f_delta_zec = - 15./(8.*r1*r12) + 1./(r1+1./unsr2+r12)/(r1+1./unsr2+r12)*
309 (1 + r1/r12 + r12/r1 - r1sr2 - r1*r1sr2/r12 + r12*r12*unsr2/(2*r1)) +
310 1./(r1+1./unsr2+r12)*(-7./r1 + 2./r12) ;
311 f_delta_zec += fexp*(-5.*r1/(8.*r12*r12*r12)+5.*r1*r1*unsr2/(8.*r12*r12*r12)) ;
314 for (
int i=0 ;i<nz1-1 ; i++){
318 f_delta = f_delta + f_delta_zec ;
334 f_1_1 = r1/(8.*r12*r12*r12) + 11./(8.*r1*r12) -
335 1./(8.*r1*unsr2*unsr2*r12*r12*r12) + 7./(r1+1./unsr2+r12)/(r1+1./unsr2+r12) +
336 7./r1/(r1+1./unsr2+r12) ;
339 f_1_1_zec = 11./(8.*r1*r12) + 7./(r1+1./unsr2+r12)/(r1+1./unsr2+r12) +
340 7./r1/(r1+1./unsr2+r12) ;
341 f_1_1_zec += fexp*(r1/(8.*r12*r12*r12)-1./(8.*r1*unsr2*unsr2*r12*r12*r12)) ;
344 for (
int i=0 ; i<nz1-1 ; i++){
348 f_1_1 = f_1_1 + f_1_1_zec ;
364 f_1_12 = - 7./(2*r12*r12) + 8./(r1+1./unsr2+r12)/(r1+1./unsr2+r12) ;
367 f_1_12_zec = 8./(r1+1./unsr2+r12)/(r1+1./unsr2+r12) ;
368 f_1_12_zec += fexp*(- 7./(2*r12*r12)) ;
371 for (
int i=0 ; i<nz1-1 ; i++){
375 f_1_12 = f_1_12 + f_1_12_zec ;
391 f_12_12 = (-4./(r1+1./unsr2+r12)/(r1+1./unsr2+r12) -
392 4./r12/(r1+1./unsr2+r12)) ;
409 f_1_2 = 11./(r1+1./unsr2+r12)/(r1+1./unsr2+r12);
428 for (
int i=1 ; i<= 3 ; i++){
429 for (
int j=i ; j<= 3 ; j++){
430 hh_temp.
set(i,j) = f_delta *
hole1.ff.con()(i,j) + f_1_1 * nn1(i)*nn1(j)
431 + f_1_12 * 0.5 *(nn1(i) * nn12(j) + nn1(j) * nn12(i))
432 + f_12_12 * nn12(i)*nn12(j)
433 + f_1_2 * 0.5*(nn1(i)*nn2(j) + nn1(j)*nn2(i) ) ;
459 int nz1 =
hole1.mp.get_mg()->get_nzone() ;
460 int nz2 =
hole2.mp.get_mg()->get_nzone() ;
501 for (
int i=0; i<
hole2.mp.get_mg()->get_nr(nz2-1); i++)
502 for (
int j=0; j<
hole2.mp.get_mg()->get_nt(nz2-1); j++)
503 for (
int k=0; k<
hole2.mp.get_mg()->get_np(nz2-1); k++)
504 for (
int ind=1; ind<=3; ind++){
511 rr1_1.
set(1) = xx_1 ;
512 rr1_1.
set(2) = yy_1 ;
513 rr1_1.
set(3) = zz_1 ;
528 for (
int i=0; i<
hole1.mp.get_mg()->get_nr(nz1-1); i++)
529 for (
int j=0; j<
hole1.mp.get_mg()->get_nt(nz1-1); j++)
530 for (
int k=0; k<
hole1.mp.get_mg()->get_np(nz1-1); k++)
531 for (
int ind=1; ind<=3; ind++){
532 nn1_1.
set(ind).
set_grid_point(nz1-1,k,j,i) = nn1_1(ind).val_grid_point(1,k,j,0) ;
536 unsr2 = 1./
hole2.mp.r ;
545 for (
int i=1 ; i<=3 ; i++){
553 unsr1_1 = 1./
hole1.mp.r ;
565 Scalar r1sr2 (1./unsr1*unsr2) ;
580 r21 =
sqrt( rr21(1)*rr21(1) + rr21(2)*rr21(2) + rr21(3)*rr21(3)) ;
609 double r0 =
hole2.mp.val_r(nz2-2, 1, 0, 0) ;
610 double sigma = 1.*r0 ;
616 fexp =
exp( -(rr - r0)*(rr - r0)/sigma/sigma ) ;
617 for (
int ii=0; ii<nz2-1; ii++)
633 f_delta = -5.*r2/(8.*r21*r21*r21) - 15./(8.*r2*r21) +
634 5.*r2*r2*unsr1/(8.*r21*r21*r21) + 1./(r2+1./unsr1+r21)/(r2+1./unsr1+r21)*
635 (1 + r2/r21 + r21/r2 - r2sr1 - r2*r2sr1/r21 + r21*r21*unsr1/(2*r2)) +
636 1./(r2+1./unsr1+r21)*(-7./r2 + 2./r21) ;
640 f_delta_zec = - 15./(8.*r2*r21) + 1./(r2+1./unsr1+r21)/(r2+1./unsr1+r21)*
641 (1 + r2/r21 + r21/r2 - r2sr1 - r2*r2sr1/r21 + r21*r21*unsr1/(2*r2)) +
642 1./(r2+1./unsr1+r21)*(-7./r2 + 2./r21) ;
643 f_delta_zec += fexp*(-5.*r2/(8.*r21*r21*r21)+5.*r2*r2*unsr1/(8.*r21*r21*r21)) ;
646 for (
int i=0 ;i<nz2-1 ; i++){
650 f_delta = f_delta + f_delta_zec ;
666 f_2_2 = r2/(8.*r21*r21*r21) + 11./(8.*r2*r21) -
667 1./(8.*r2*unsr1*unsr1*r21*r21*r21) + 7./(r2+1./unsr1+r21)/(r2+1./unsr1+r21) +
668 7./r2/(r2+1./unsr1+r21) ;
671 f_2_2_zec = 11./(8.*r2*r21) + 7./(r2+1./unsr1+r21)/(r2+1./unsr1+r21) +
672 7./r2/(r2+1./unsr1+r21) ;
673 f_2_2_zec += fexp*(r2/(8.*r21*r21*r21)-1./(8.*r2*unsr1*unsr1*r21*r21*r21)) ;
676 for (
int i=0 ; i<nz2-1 ; i++){
680 f_2_2 = f_2_2 + f_2_2_zec ;
696 f_2_21 = - 7./(2*r21*r21) + 8./(r2+1./unsr1+r21)/(r2+1./unsr1+r21) ;
699 f_2_21_zec = 8./(r2+1./unsr1+r21)/(r2+1./unsr1+r21) ;
700 f_2_21_zec += fexp*(- 7./(2*r21*r21)) ;
703 for (
int i=0 ; i<nz2-1 ; i++){
707 f_2_21 = f_2_21 + f_2_21_zec ;
723 f_21_21 = (-4./(r2+1./unsr1+r21)/(r2+1./unsr1+r21) -
724 4./r21/(r2+1./unsr1+r21)) ;
741 f_2_1 = 11./(r2+1./unsr1+r21)/(r2+1./unsr1+r21);
760 for (
int i=1 ; i<= 3 ; i++){
761 for (
int j=i ; j<= 3 ; j++){
762 hh_temp.
set(i,j) = f_delta *
hole2.ff.con()(i,j) + f_2_2 * nn2(i)*nn2(j)
763 - f_2_21 * 0.5 *(nn2(i) * nn21(j) + nn2(j) * nn21(i))
764 + f_21_21 * nn21(i)*nn21(j)
765 + f_2_1 * 0.5*(nn2(i)*nn1(j) + nn2(j)*nn1(i) ) ;
796 surface_un.
annule(
hole1.mp.get_mg()->get_nzone()-1) ;
801 surface_deux.
annule(
hole1.mp.get_mg()->get_nzone()-1) ;
850 for (
int i=1 ; i<=3 ; i++)
851 for (
int j=i ; j<=3 ; j++){
866 for (
int i=1 ; i<=3 ; i++){
867 for (
int j=i ; j<=3 ; j++){
875 for (
int i=1 ; i<=3 ; i++){
876 for (
int j=i ; j<=3 ; j++){
891 cout <<
hole1.mp.r << endl ;
892 cout <<
hole1.mp.phi << endl ;
893 cout <<
hole1.mp.tet << endl ;
897 for (
int i=1 ; i<= 3 ; i++)
898 for (
int j=i ; j<= 3 ; j++){
902 des_coupe_z (hh1(i,j), 0., 5) ;
908 hole1.hh = m1*m2* hh1 ;
909 hole2.hh = m1*m2* hh2 ;
914 hole1.tgam = tgam_1 ;
915 hole2.tgam = tgam_2 ;
918 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).