00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 char binary_anashift_C[] = "$Header: /cvsroot/Lorene/C++/Source/Binary/binary_anashift.C,v 1.8 2005/09/13 19:38:31 f_limousin Exp $" ;
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060 #include "math.h"
00061
00062
00063 #include "binary.h"
00064 #include "tenseur.h"
00065 #include "unites.h"
00066
00067 void Binary::analytical_shift(){
00068
00069 using namespace Unites ;
00070
00071 for (int i=0; i<2; i++) {
00072
00073
00074 double a0 = et[i]->ray_eq() ;
00075
00076
00077 double p_mass = et[i]->mass_g() / et[1-i]->mass_g() ;
00078
00079
00080 double www = ggrav * et[i]->mass_g() * omega
00081 * separation() / (1. + p_mass) ;
00082
00083 const Map& mp = et[i]->get_mp() ;
00084 Scalar tmp(mp) ;
00085 Scalar tmp_ext(mp) ;
00086 int nzet = et[i]->get_nzet() ;
00087 int nzm1 = mp.get_mg()->get_nzone() - 1 ;
00088
00089 Vector w_beta (mp, CON, mp.get_bvect_cart()) ;
00090 Scalar khi_beta (mp) ;
00091
00092
00093
00094
00095
00096
00097 w_beta.set(1) = 0 ;
00098
00099
00100
00101
00102
00103 tmp = - 6 * www / a0 * ( 1 - (mp.r)*(mp.r) / (3*a0*a0) ) ;
00104
00105 tmp.annule(nzet, nzm1) ;
00106 tmp_ext = - 4 * www / mp.r ;
00107 tmp_ext.annule(0, nzet-1) ;
00108
00109 w_beta.set(2) = tmp + tmp_ext ;
00110
00111
00112
00113 w_beta.set(3) = 0 ;
00114
00115 w_beta.std_spectral_base() ;
00116
00117
00118
00119
00120 tmp = 2 * www / a0 * (mp.y) * ( 1 - 3 * (mp.r)*(mp.r) / (5*a0*a0) ) ;
00121 tmp.annule(nzet, nzm1) ;
00122 tmp_ext = 0.8 * www * a0*a0 * (mp.sint) * (mp.sinp)
00123 / (mp.r * mp.r) ;
00124 tmp_ext.annule(0, nzet-1) ;
00125
00126 khi_beta = tmp + tmp_ext ;
00127
00128
00129 khi_beta.std_spectral_base() ;
00130
00131
00132
00133
00134
00135 Tensor xdw_temp (w_beta.derive_con(et[i]->get_flat())) ;
00136
00137 Tenseur x_d_w_temp (et[i]->get_mp(),2,CON,et[i]->get_mp().get_bvect_cart()) ;
00138 x_d_w_temp.set_etat_qcq() ;
00139 for (int j=0; j<3; j++)
00140 for (int k=0; k<3; k++)
00141 x_d_w_temp.set(j,k) = xdw_temp(k+1, j+1) ;
00142
00143 Tenseur x_d_w = skxk (x_d_w_temp) ;
00144 x_d_w.dec_dzpuis() ;
00145
00146 Vector xdw (et[i]->get_mp(), CON, et[i]->get_mp().get_bvect_cart()) ;
00147 for (int j=0; j<3; j++)
00148 xdw.set(j+1) = x_d_w(j) ;
00149
00150
00151
00152
00153 Vector d_khi = khi_beta.derive_con(et[i]->get_flat()) ;
00154 d_khi.dec_dzpuis(2) ;
00155
00156 et[i]->set_beta_auto() = - 7./8. * w_beta + 1./8. *
00157 (d_khi + xdw) ;
00158
00159 et[i]->set_beta_auto().std_spectral_base() ;
00160
00161 }
00162
00163 }