00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 char binhor_glob_C[] = "$Header: /cvsroot/Lorene/C++/Source/Bin_hor/binhor_global.C,v 1.8 2007/04/13 15:28:55 f_limousin Exp $" ;
00025
00026
00027
00028
00029
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
00061
00062
00063
00064
00065 #include <stdlib.h>
00066 #include <math.h>
00067
00068
00069 #include "nbr_spx.h"
00070 #include "tensor.h"
00071 #include "isol_hor.h"
00072 #include "proto.h"
00073 #include "utilitaires.h"
00074
00075
00076 double Bin_hor::adm_mass() const {
00077
00078 Vector dpsi_un (hole1.psi_auto.derive_con(hole1.ff)) ;
00079 Vector dpsi_deux (hole2.psi_auto.derive_con(hole2.ff)) ;
00080
00081 Tensor hdirac1 (contract((hole1.hh).derive_cov(hole1.ff),0,2)) ;
00082 Vector ww (0.125*(hdirac1 - (hole1.hh.trace(hole1.ff)).
00083 derive_con(hole1.ff))) ;
00084
00085 double inf = hole1.mp.val_r(hole1.mp.get_mg()->get_nzone()-1, 1., 0., 0.) ;
00086
00087 double masse = dpsi_un.flux(inf, hole1.ff) +
00088 dpsi_deux.flux(inf, hole2.ff) +
00089 ww.flux(inf, hole1.ff) ;
00090 masse /= -2*M_PI ;
00091 return masse ;
00092 }
00093
00094 double Bin_hor::komar_mass() const {
00095
00096 Vector dnn_un (hole1.n_auto.derive_con(hole1.ff)) ;
00097 Vector dnn_deux (hole2.n_auto.derive_con(hole2.ff)) ;
00098
00099 Vector ww (contract(hole1.hh, 1, hole1.nn.derive_cov(hole1.ff), 0)) ;
00100
00101 double inf = hole1.mp.val_r(hole1.mp.get_mg()->get_nzone()-1, 1., 0., 0.) ;
00102
00103 double mass = dnn_un.flux(inf, hole1.ff) +
00104 dnn_deux.flux(inf, hole2.ff) +
00105 ww.flux(inf, hole1.ff) ;
00106
00107 mass /= 4*M_PI ;
00108 return mass ;
00109 }
00110
00111 double Bin_hor::ang_mom_hor() const {
00112
00113 if (omega == 0)
00114 return 0 ;
00115 else {
00116
00117 double orientation_un = hole1.mp.get_rot_phi() ;
00118 assert ((orientation_un==0) || (orientation_un==M_PI)) ;
00119 double orientation_deux = hole2.mp.get_rot_phi() ;
00120 assert ((orientation_deux==0) || (orientation_deux==M_PI)) ;
00121 int same_orient = (orientation_un == orientation_deux) ? 1 : -1 ;
00122
00123
00124 Scalar xa_un (hole1.mp) ;
00125 xa_un = hole1.mp.xa ;
00126 xa_un.std_spectral_base() ;
00127
00128 Scalar ya_un (hole1.mp) ;
00129 ya_un = hole1.mp.ya ;
00130 ya_un.std_spectral_base() ;
00131
00132 Sym_tensor tkij_un (hole1.aa) ;
00133 tkij_un.change_triad(hole1.mp.get_bvect_cart()) ;
00134
00135 Vector vecteur_un (hole1.mp, CON, hole1.mp.get_bvect_cart()) ;
00136 for (int i=1 ; i<=3 ; i++)
00137 vecteur_un.set(i) = -ya_un*tkij_un(1, i)+
00138 xa_un * tkij_un(2, i) ;
00139 vecteur_un.annule_domain(hole1.mp.get_mg()->get_nzone()-1) ;
00140 vecteur_un.change_triad (hole1.mp.get_bvect_spher()) ;
00141
00142 Scalar integrant_un (hole1.get_psi4()*hole1.psi*hole1.psi
00143 *vecteur_un(1)) ;
00144 double moment_un = hole1.mp.integrale_surface
00145 (integrant_un, hole1.radius+1e-12)/8/M_PI ;
00146
00147
00148 Scalar xa_deux (hole2.mp) ;
00149 xa_deux = hole2.mp.xa ;
00150 xa_deux.std_spectral_base() ;
00151
00152 Scalar ya_deux (hole2.mp) ;
00153 ya_deux = hole2.mp.ya ;
00154 ya_deux.std_spectral_base() ;
00155
00156 Sym_tensor tkij_deux (hole2.aa) ;
00157 tkij_deux.change_triad(hole2.mp.get_bvect_cart()) ;
00158
00159 Vector vecteur_deux (hole2.mp, CON, hole2.mp.get_bvect_cart()) ;
00160 for (int i=1 ; i<=3 ; i++)
00161 vecteur_deux.set(i) = -ya_deux*tkij_deux(1, i)+
00162 xa_deux * tkij_deux(2, i) ;
00163 vecteur_deux.annule_domain(hole2.mp.get_mg()->get_nzone()-1) ;
00164 vecteur_deux.change_triad (hole2.mp.get_bvect_spher()) ;
00165
00166 Scalar integrant_deux (hole2.get_psi4()*hole2.psi*hole2.psi
00167 *vecteur_deux(1)) ;
00168 double moment_deux = hole2.mp.integrale_surface
00169 (integrant_deux, hole2.radius+1e-12)/8/M_PI ;
00170
00171 return moment_un+same_orient*moment_deux ;
00172 }
00173 }
00174
00175
00176
00177 double Bin_hor::ang_mom_adm() const {
00178
00179
00180
00181
00182
00183
00184
00185
00186
00187
00188 if (omega == 0)
00189 return 0 ;
00190 else {
00191
00192 double orientation_un = hole1.mp.get_rot_phi() ;
00193 assert ((orientation_un==0) || (orientation_un==M_PI)) ;
00194 double orientation_deux = hole2.mp.get_rot_phi() ;
00195 assert ((orientation_deux==0) || (orientation_deux==M_PI)) ;
00196 int same_orient = (orientation_un == orientation_deux) ? 1 : -1 ;
00197
00198
00199 int nzones = hole1.mp.get_mg()->get_nzone() ;
00200 double* bornes = new double [nzones+1] ;
00201 double courant = (hole1.mp.get_ori_x()-hole2.mp.get_ori_x())+1 ;
00202 for (int i=nzones-1 ; i>0 ; i--) {
00203 bornes[i] = courant ;
00204 courant /= 2. ;
00205 }
00206 bornes[0] = 0 ;
00207 bornes[nzones] = __infinity ;
00208
00209 Map_af mapping (*hole1.mp.get_mg(), bornes) ;
00210
00211 delete [] bornes ;
00212
00213
00214 Sym_tensor k_total (mapping, CON, mapping.get_bvect_cart()) ;
00215
00216 Vector shift_un (mapping, CON, mapping.get_bvect_cart()) ;
00217 Vector shift_deux (mapping, CON, mapping.get_bvect_cart()) ;
00218
00219 Vector beta_un (hole1.beta_auto) ;
00220 Vector beta_deux (hole2.beta_auto) ;
00221 beta_un.change_triad(hole1.mp.get_bvect_cart()) ;
00222 beta_deux.change_triad(hole2.mp.get_bvect_cart()) ;
00223
00224 shift_un.set(1).import(beta_un(1)) ;
00225 shift_un.set(2).import(beta_un(2)) ;
00226 shift_un.set(3).import(beta_un(3)) ;
00227
00228 shift_deux.set(1).import(same_orient*beta_deux(1)) ;
00229 shift_deux.set(2).import(same_orient*beta_deux(2)) ;
00230 shift_deux.set(3).import(beta_deux(3)) ;
00231
00232 Vector shift_tot (shift_un+shift_deux) ;
00233 shift_tot.std_spectral_base() ;
00234 shift_tot.annule(0, nzones-2) ;
00235
00236
00237 shift_tot.inc_dzpuis(2) ;
00238 shift_tot.dec_dzpuis(2) ;
00239
00240 const Metric_flat& flat0 (mapping.flat_met_cart()) ;
00241
00242 k_total = shift_tot.ope_killing_conf(flat0) / 2. ;
00243
00244
00245 for (int lig=1 ; lig<=3 ; lig++)
00246 for (int col=lig ; col<=3 ; col++)
00247 k_total.set(lig, col).mult_r_ced() ;
00248
00249 Vector vecteur_un (mapping, CON, mapping.get_bvect_cart()) ;
00250 for (int i=1 ; i<=3 ; i++)
00251 vecteur_un.set(i) = k_total(1, i) ;
00252 vecteur_un.change_triad (mapping.get_bvect_spher()) ;
00253 Scalar integrant_un (vecteur_un(1)) ;
00254
00255 Vector vecteur_deux (mapping, CON, mapping.get_bvect_cart()) ;
00256 for (int i=1 ; i<=3 ; i++)
00257 vecteur_deux.set(i) = k_total(2, i) ;
00258 vecteur_deux.change_triad (mapping.get_bvect_spher()) ;
00259 Scalar integrant_deux (vecteur_deux(1)) ;
00260
00261
00262 integrant_un.set_spectral_va() = integrant_un.get_spectral_va()
00263 .mult_st() ;
00264 integrant_un.set_spectral_va() = integrant_un.get_spectral_va()
00265 .mult_sp() ;
00266
00267 integrant_deux.set_spectral_va() = integrant_deux.get_spectral_va()
00268 .mult_st() ;
00269 integrant_deux.set_spectral_va() = integrant_deux.get_spectral_va()
00270 .mult_cp() ;
00271
00272 double moment = mapping.integrale_surface_infini (-integrant_un
00273 +integrant_deux) ;
00274
00275 moment /= 8*M_PI ;
00276
00277 return moment ;
00278 }
00279 }
00280
00281
00282
00283
00284
00285
00286
00287
00288
00289
00290
00291
00292
00293
00294
00295
00296
00297
00298
00299
00300
00301
00302
00303
00304
00305
00306
00307
00308
00309
00310
00311
00312
00313
00314
00315
00316
00317
00318
00319
00320
00321
00322
00323
00324
00325
00326
00327
00328
00329
00330
00331
00332
00333
00334
00335
00336
00337
00338
00339
00340
00341