blackhole_global.C

00001 /*
00002  *  Methods of class Black_hole to compute global quantities
00003  *
00004  *    (see file blackhole.h for documentation).
00005  *
00006  */
00007 
00008 /*
00009  *   Copyright (c) 2005-2007 Keisuke Taniguchi
00010  *
00011  *   This file is part of LORENE.
00012  *
00013  *   LORENE is free software; you can redistribute it and/or modify
00014  *   it under the terms of the GNU General Public License version 2
00015  *   as published by the Free Software Foundation.
00016  *
00017  *   LORENE is distributed in the hope that it will be useful,
00018  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00019  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00020  *   GNU General Public License for more details.
00021  *
00022  *   You should have received a copy of the GNU General Public License
00023  *   along with LORENE; if not, write to the Free Software
00024  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00025  *
00026  */
00027 
00028 char blackhole_global_C[] = "$Header: /cvsroot/Lorene/C++/Source/Black_hole/blackhole_global.C,v 1.3 2008/07/02 20:45:58 k_taniguchi Exp $" ;
00029 
00030 /*
00031  * $Id: blackhole_global.C,v 1.3 2008/07/02 20:45:58 k_taniguchi Exp $
00032  * $Log: blackhole_global.C,v $
00033  * Revision 1.3  2008/07/02 20:45:58  k_taniguchi
00034  * Addition of routines to compute angular momentum.
00035  *
00036  * Revision 1.2  2008/05/15 19:28:03  k_taniguchi
00037  * Change of some parameters.
00038  *
00039  * Revision 1.1  2007/06/22 01:19:51  k_taniguchi
00040  * *** empty log message ***
00041  *
00042  *
00043  * $Header: /cvsroot/Lorene/C++/Source/Black_hole/blackhole_global.C,v 1.3 2008/07/02 20:45:58 k_taniguchi Exp $
00044  *
00045  */
00046 
00047 // C++ headers
00048 //#include <>
00049 
00050 // C headers
00051 #include <math.h>
00052 
00053 // Lorene headers
00054 #include "blackhole.h"
00055 #include "unites.h"
00056 #include "utilitaires.h"
00057 
00058                //-----------------------------------------//
00059                //          Irreducible mass of BH         //
00060                //-----------------------------------------//
00061 
00062 double Black_hole::mass_irr() const {
00063 
00064     // Fundamental constants and units
00065     // -------------------------------
00066     using namespace Unites ;
00067 
00068     if (p_mass_irr == 0x0) {   // a new computation is required
00069 
00070         Scalar psi4(mp) ;
00071     psi4 = pow(confo, 4.) ;
00072     psi4.std_spectral_base() ;
00073     psi4.annule_domain(0) ;
00074     psi4.raccord(1) ;
00075 
00076     double radius_ah = mp.val_r(1,-1.,M_PI/2.,0.) ;
00077 
00078     Map_af mp_aff(mp) ;
00079 
00080     double a_ah = mp_aff.integrale_surface(psi4, radius_ah) ;
00081     double mirr = sqrt(a_ah/16./M_PI) / ggrav ;
00082 
00083     p_mass_irr = new double( mirr ) ;
00084 
00085     }
00086 
00087     return *p_mass_irr ;
00088 
00089 }
00090 
00091 
00092                     //---------------------------//
00093                     //          ADM mass         //
00094                     //---------------------------//
00095 
00096 double Black_hole::mass_adm() const {
00097 
00098     // Fundamental constants and units
00099     // -------------------------------
00100     using namespace Unites ;
00101 
00102     if (p_mass_adm == 0x0) {   // a new computation is required
00103 
00104         double madm ;
00105     double integ_s ;
00106     double integ_v ;
00107 
00108     double radius_ah = mp.val_r(1,-1.,M_PI/2.,0.) ;
00109     Map_af mp_aff(mp) ;
00110 
00111     Scalar source_surf(mp) ;
00112     source_surf.set_etat_qcq() ;
00113     Scalar source_volm(mp) ;
00114     source_volm.set_etat_qcq() ;
00115 
00116     Scalar rr(mp) ;
00117     rr = mp.r ;
00118     rr.std_spectral_base() ;
00119     Scalar st(mp) ;
00120     st = mp.sint ;
00121     st.std_spectral_base() ;
00122     Scalar ct(mp) ;
00123     ct = mp.cost ;
00124     ct.std_spectral_base() ;
00125     Scalar sp(mp) ;
00126     sp = mp.sinp ;
00127     sp.std_spectral_base() ;
00128     Scalar cp(mp) ;
00129     cp = mp.cosp ;
00130     cp.std_spectral_base() ;
00131 
00132     Vector ll(mp, CON, mp.get_bvect_cart()) ;
00133     ll.set_etat_qcq() ;
00134     ll.set(1) = st * cp ;
00135     ll.set(2) = st * sp ;
00136     ll.set(3) = ct ;
00137     ll.std_spectral_base() ;
00138 
00139     Scalar lldconf = confo.dsdr() ;
00140     lldconf.std_spectral_base() ;
00141 
00142     if (kerrschild) {
00143 
00144       cout << "!!!!! WARNING: Not yet available !!!!!" << endl ;
00145       abort() ;
00146       /*
00147       Scalar divshf(mp) ;
00148       divshf = shift_rs(1).deriv(1) + shift_rs(2).deriv(2)
00149         + shift_rs(3).deriv(3) ;
00150       divshf.std_spectral_base() ;
00151       divshf.dec_dzpuis(2) ;
00152 
00153       Scalar llshift(mp) ;
00154       llshift = ll(1)%shift_rs(1) + ll(2)%shift_rs(2)
00155         + ll(3)%shift_rs(3) ;
00156       llshift.std_spectral_base() ;
00157 
00158       Scalar lldllsh = llshift.dsdr() ;
00159       lldllsh.std_spectral_base() ;
00160       lldllsh.dec_dzpuis(2) ;
00161 
00162       double mass = ggrav * mass_bh ;
00163 
00164       // Surface integral
00165       // ----------------
00166       source_surf = confo/rr - 2.*pow(confo,3.)*lapse_bh*mass/lapse/rr/rr
00167         - pow(confo,3.)*(divshf - 3.*lldllsh
00168                  + 2.*mass*lapse_bh%lapse_bh%llshift/rr/rr
00169                  + 4.*mass*pow(lapse_bh,3.)*lapse_rs
00170                  *(1.+3.*mass/rr)/rr/rr)
00171         /6./lapse/lapse_bh ;
00172 
00173       source_surf.std_spectral_base() ;
00174       source_surf.annule_domain(0) ;
00175       source_surf.raccord(1) ;
00176 
00177       integ_s = mp_aff.integrale_surface(source_surf, radius_ah) ;
00178 
00179       // Volume integral
00180       // ---------------
00181       Scalar lldlldco = lldconf.dsdr() ;
00182       lldlldco.std_spectral_base() ;
00183 
00184       Scalar tmp1 = 2.*mass*mass*pow(lapse_bh,4.)*confo/pow(rr,4.) ;
00185       tmp1.std_spectral_base() ;
00186       tmp1.inc_dzpuis(4) ;
00187 
00188       Scalar tmp2 = 2.*mass*mass*pow(lapse_bh,6.)
00189         *(1.+3.*mass/rr)*(1.+3.*mass/rr)*pow(confo,5.)/3./pow(rr,4.) ;
00190       tmp2.std_spectral_base() ;
00191       tmp2.inc_dzpuis(4) ;
00192 
00193       Scalar tmp3 = 4.*mass*lapse_bh*lapse_bh*lldlldco/rr ;
00194       tmp3.std_spectral_base() ;
00195       tmp3.inc_dzpuis(1) ;
00196 
00197       Scalar tmp4 = 2.*mass*pow(lapse_bh,4.)*lldconf
00198         *(3.+8.*mass/rr)/rr/rr ;
00199       tmp4.std_spectral_base() ;
00200       tmp4.inc_dzpuis(2) ;
00201 
00202       source_volm = 0.25 * taij_quad / pow(confo,7.) - tmp1 - tmp2
00203         - tmp3 - tmp4 ;
00204 
00205       source_volm.annule_domain(0) ;
00206       source_volm.std_spectral_base() ;
00207 
00208       integ_v = source_volm.integrale() ;
00209 
00210       // ADM mass
00211       // --------
00212       madm = mass_bh + integ_s / qpig + integ_v / qpig ;
00213 
00214       // Another ADM mass
00215       // ----------------
00216       double mmm = mass_bh
00217         - 2.*(mp_aff.integrale_surface_infini(lldconf))/qpig ;
00218 
00219       cout << "Another ADM mass :   " << mmm / msol << endl ;
00220       */
00221     }
00222     else {  // Isotropic coordinates with the maximal slicing
00223 
00224       Scalar divshf(mp) ;
00225       divshf = shift(1).deriv(1) + shift(2).deriv(2)
00226         + shift(3).deriv(3) ;
00227       divshf.std_spectral_base() ;
00228       divshf.dec_dzpuis(2) ;
00229 
00230       Scalar llshift(mp) ;
00231       llshift = ll(1)%shift(1) + ll(2)%shift(2) + ll(3)%shift(3) ;
00232       llshift.std_spectral_base() ;
00233 
00234       Scalar lldllsh = llshift.dsdr() ;
00235       lldllsh.std_spectral_base() ;
00236       lldllsh.dec_dzpuis(2) ;
00237 
00238       // Surface integral
00239       // ----------------
00240       source_surf = confo/rr
00241         - pow(confo,4.) * (divshf - 3.*lldllsh) / lapconf / 6. ;
00242 
00243       source_surf.std_spectral_base() ;
00244       source_surf.annule_domain(0) ;
00245       source_surf.raccord(1) ;
00246 
00247       integ_s = mp_aff.integrale_surface(source_surf, radius_ah) ;
00248 
00249       // Volume integral
00250       // ---------------
00251       source_volm = 0.25 * taij_quad / pow(confo,7.) ;
00252 
00253       source_volm.std_spectral_base() ;
00254       source_volm.annule_domain(0) ;
00255 
00256       integ_v = source_volm.integrale() ;
00257 
00258       // ADM mass
00259       // --------
00260       madm = integ_s / qpig + integ_v / qpig ;
00261 
00262       // Another ADM mass
00263       // ----------------
00264       double mmm = - 2.*(mp_aff.integrale_surface_infini(lldconf))/qpig ;
00265 
00266       cout << "Another ADM mass :   " << mmm / msol << endl ;
00267 
00268     }
00269 
00270     p_mass_adm = new double( madm ) ;
00271 
00272     }
00273 
00274     return *p_mass_adm ;
00275 
00276 }
00277 
00278                     //-----------------------------//
00279                     //          Komar mass         //
00280                     //-----------------------------//
00281 
00282 double Black_hole::mass_kom() const {
00283 
00284     // Fundamental constants and units
00285     // -------------------------------
00286     using namespace Unites ;
00287 
00288     if (p_mass_kom == 0x0) {   // a new computation is required
00289 
00290         double mkom ;
00291     double integ_s ;
00292     double integ_v ;
00293 
00294     double radius_ah = mp.val_r(1,-1.,M_PI/2.,0.) ;
00295     Map_af mp_aff(mp) ;
00296 
00297     Scalar source_surf(mp) ;
00298     source_surf.set_etat_qcq() ;
00299     Scalar source_volm(mp) ;
00300     source_volm.set_etat_qcq() ;
00301 
00302     Scalar rr(mp) ;
00303     rr = mp.r ;
00304     rr.std_spectral_base() ;
00305     Scalar st(mp) ;
00306     st = mp.sint ;
00307     st.std_spectral_base() ;
00308     Scalar ct(mp) ;
00309     ct = mp.cost ;
00310     ct.std_spectral_base() ;
00311     Scalar sp(mp) ;
00312     sp = mp.sinp ;
00313     sp.std_spectral_base() ;
00314     Scalar cp(mp) ;
00315     cp = mp.cosp ;
00316     cp.std_spectral_base() ;
00317 
00318     Vector ll(mp, CON, mp.get_bvect_cart()) ;
00319     ll.set_etat_qcq() ;
00320     ll.set(1) = st * cp ;
00321     ll.set(2) = st * sp ;
00322     ll.set(3) = ct ;
00323     ll.std_spectral_base() ;
00324 
00325     Vector dlcnf(mp, CON, mp.get_bvect_cart()) ;
00326     dlcnf.set_etat_qcq() ;
00327     for (int i=1; i<=3; i++)
00328       dlcnf.set(i) = confo.deriv(i) / confo ;
00329 
00330     dlcnf.std_spectral_base() ;
00331 
00332     if (kerrschild) {
00333 
00334       cout << "!!!!! WARNING: Not yet available !!!!!" << endl ;
00335       abort() ;
00336       /*
00337       Scalar llshift(mp) ;
00338       llshift = ll(1)%shift_rs(1) + ll(2)%shift_rs(2)
00339         + ll(3)%shift_rs(3) ;
00340       llshift.std_spectral_base() ;
00341 
00342       Vector dlap(mp, CON, mp.get_bvect_cart()) ;
00343       dlap.set_etat_qcq() ;
00344 
00345       for (int i=1; i<=3; i++)
00346         dlap.set(i) = lapse_rs.deriv(i) ;
00347 
00348       dlap.std_spectral_base() ;
00349 
00350       double mass = ggrav * mass_bh ;
00351 
00352       // Surface integral
00353       // ----------------
00354       Scalar lldlap_bh(mp) ;
00355       lldlap_bh = pow(lapse_bh,3.) * mass / rr / rr ;
00356       lldlap_bh.std_spectral_base() ;
00357       lldlap_bh.annule_domain(0) ;
00358       lldlap_bh.inc_dzpuis(2) ;
00359 
00360       Scalar lldlap_rs = lapse_rs.dsdr() ;
00361       lldlap_rs.std_spectral_base() ;
00362 
00363       source_surf = lldlap_rs + lldlap_bh ;
00364       source_surf.std_spectral_base() ;
00365       source_surf.dec_dzpuis(2) ;
00366       source_surf.annule_domain(0) ;
00367       source_surf.raccord(1) ;
00368 
00369       integ_s = mp_aff.integrale_surface(source_surf, radius_ah) ;
00370 
00371       // Volume integral
00372       // ---------------
00373       Scalar lldlldlap = lldlap_rs.dsdr() ;
00374       lldlldlap.std_spectral_base() ;
00375 
00376       Scalar lldlcnf = lconfo.dsdr() ;
00377       lldlcnf.std_spectral_base() ;
00378 
00379       Scalar tmp1(mp) ;
00380       tmp1 = dlap(1)%dlcnf(1) + dlap(2)%dlcnf(2) + dlap(3)%dlcnf(3)
00381         -2.*mass*lapse_bh%lapse_bh%lldlap_rs%lldlcnf/rr ;
00382       tmp1.std_spectral_base() ;
00383 
00384       Scalar tmp2(mp) ;
00385       tmp2 = 4.*mass*mass*pow(lapse_bh,6.)*(1.+3.*mass/rr)*(1.+3.*mass/rr)
00386         *lapse_rs*pow(confo,4.)/3./pow(rr,4.) ;
00387       tmp2.std_spectral_base() ;
00388       tmp2.inc_dzpuis(4) ;
00389 
00390       Scalar tmp3(mp) ;
00391       tmp3 = -2.*mass*pow(lapse_bh,5.)*llshift
00392         *(2.+10.*mass/rr+9.*mass*mass/rr/rr)*pow(confo,4.)/pow(rr,3.) ;
00393       tmp3.std_spectral_base() ;
00394       tmp3.inc_dzpuis(4) ;
00395 
00396       Scalar tmp4(mp) ;
00397       tmp4 = 2.*mass*lapse_bh%lapse_bh%lldlldlap/rr ;
00398       tmp4.std_spectral_base() ;
00399       tmp4.inc_dzpuis(1) ;
00400 
00401       Scalar tmp5(mp) ;
00402       tmp5 = mass*pow(lapse_bh,4.)*lldlap_rs*(3.+8.*mass/rr)/rr/rr ;
00403       tmp5.std_spectral_base() ;
00404       tmp5.inc_dzpuis(2) ;
00405 
00406       Scalar tmp6(mp) ;
00407       tmp6 = -2.*pow(lapse_bh,5.)*mass*lldlcnf/rr/rr ;
00408       tmp6.std_spectral_base() ;
00409       tmp6.inc_dzpuis(2) ;
00410 
00411       Scalar tmp_bh(mp) ;
00412       tmp_bh = -pow(lapse_bh,7.)*mass*mass
00413         *( 4.*(5.+24.*mass/rr+18.*mass*mass/rr/rr)*pow(confo,4.)/3.
00414            + 1. - 6.*mass/rr) / pow(rr, 4.) ;
00415       tmp_bh.std_spectral_base() ;
00416       tmp_bh.inc_dzpuis(4) ;
00417 
00418       source_volm = lapse % taij_quad / pow(confo,8.) - 2.*tmp1
00419         + tmp2 + tmp3 + tmp4 + tmp5 + tmp6 + tmp_bh ;
00420 
00421       source_volm.annule_domain(0) ;
00422       source_volm.std_spectral_base() ;
00423 
00424       integ_v = source_volm.integrale() ;
00425 
00426       // Komar mass
00427       // ----------
00428       mkom = integ_s / qpig + integ_v / qpig ;
00429 
00430       // Another Komar mass
00431       // ------------------
00432       double mmm = (mp_aff.integrale_surface_infini(lldlap_rs+lldlap_bh))
00433         / qpig ;
00434 
00435       cout << "Another Komar mass : " << mmm / msol << endl ;
00436       */
00437     }
00438     else {  // Isotropic coordinates with the maximal slicing
00439 
00440       // Surface integral
00441       // ----------------
00442       Scalar lldlap = lapconf.dsdr() / confo
00443         - lapconf * confo.dsdr() / confo / confo ;
00444       lldlap.std_spectral_base() ;
00445 
00446       source_surf = lldlap ;
00447 
00448       source_surf.std_spectral_base() ;
00449       source_surf.dec_dzpuis(2) ;
00450       source_surf.annule_domain(0) ;
00451       source_surf.raccord(1) ;
00452 
00453       integ_s = mp_aff.integrale_surface(source_surf, radius_ah) ;
00454 
00455       // Volume integral
00456       // ---------------
00457       Vector dlap(mp, CON, mp.get_bvect_cart()) ;
00458       dlap.set_etat_qcq() ;
00459 
00460       for (int i=1; i<=3; i++)
00461         dlap.set(i) = lapconf.deriv(i) / confo
00462           - lapconf * confo.deriv(i) / confo / confo ;
00463 
00464       dlap.std_spectral_base() ;
00465 
00466       source_volm = lapconf % taij_quad / pow(confo,9.)
00467         - 2.*(dlap(1)%dlcnf(1) + dlap(2)%dlcnf(2) + dlap(3)%dlcnf(3)) ;
00468 
00469       source_volm.std_spectral_base() ;
00470       source_volm.annule_domain(0) ;
00471 
00472       integ_v = source_volm.integrale() ;
00473 
00474       // Komar mass
00475       // ----------
00476       mkom = integ_s / qpig + integ_v / qpig ;
00477 
00478       // Another Komar mass
00479       double mmm = (mp_aff.integrale_surface_infini(lldlap)) / qpig ;
00480 
00481       cout << "Another Komar mass : " << mmm / msol << endl ;
00482 
00483     }
00484 
00485     p_mass_kom = new double( mkom ) ;
00486 
00487     }
00488 
00489     return *p_mass_kom ;
00490 
00491 }
00492 
00493 
00494                //------------------------------------//
00495                //          Apparent horizon          //
00496                //------------------------------------//
00497 
00498 double Black_hole::rad_ah() const {
00499 
00500     if (p_rad_ah == 0x0) {   // a new computation is required
00501 
00502         Scalar rr(mp) ;
00503     rr = mp.r ;
00504     rr.std_spectral_base() ;
00505 
00506     double rad = rr.val_grid_point(1,0,0,0) ;
00507 
00508     p_rad_ah = new double( rad ) ;
00509 
00510     }
00511 
00512     return *p_rad_ah ;
00513 
00514 }
00515 
00516 
00517           //-------------------------------------------//
00518           //     Quasi-local spin angular momentum     //
00519           //-------------------------------------------//
00520 
00521 double Black_hole::spin_am_bh(bool bclapconf_nd, bool bclapconf_fs,
00522                   const Tbl& xi_i, const double& phi_i,
00523                   const double& theta_i, const int& nrk_phi,
00524                   const int& nrk_theta) const {
00525 
00526     // Fundamental constants and units
00527     // -------------------------------
00528     using namespace Unites ;
00529 
00530     if (p_spin_am_bh == 0x0) {   // a new computation is required
00531 
00532     Scalar st(mp) ;
00533     st = mp.sint ;
00534     st.std_spectral_base() ;
00535     Scalar ct(mp) ;
00536     ct = mp.cost ;
00537     ct.std_spectral_base() ;
00538     Scalar sp(mp) ;
00539     sp = mp.sinp ;
00540     sp.std_spectral_base() ;
00541     Scalar cp(mp) ;
00542     cp = mp.cosp ;
00543     cp.std_spectral_base() ;
00544 
00545     Vector ll(mp, CON, mp.get_bvect_cart()) ;
00546     ll.set_etat_qcq() ;
00547     ll.set(1) = st % cp ;
00548     ll.set(2) = st % sp ;
00549     ll.set(3) = ct ;
00550     ll.std_spectral_base() ;
00551 
00552     double radius_ah = mp.val_r(1,-1.,M_PI/2.,0.) ;
00553 
00554     if (kerrschild) {
00555 
00556       cout << "Not yet prepared!!!" << endl ;
00557       abort() ;
00558 
00559     }
00560     else {  // Isotropic coordinates
00561 
00562       // Killing vector of the spherical components
00563       Vector killing_spher(mp, COV, mp.get_bvect_spher()) ;
00564       killing_spher.set_etat_qcq() ;
00565       killing_spher = killing_vect_bh(xi_i, phi_i, theta_i,
00566                       nrk_phi, nrk_theta) ;
00567       killing_spher.std_spectral_base() ;
00568 
00569       killing_spher.set(2) = confo * confo * radius_ah * killing_spher(2) ;
00570       killing_spher.set(3) = confo * confo * radius_ah * killing_spher(3) ;
00571       // killing_spher(3) is already divided by sin(theta)
00572       killing_spher.std_spectral_base() ;
00573 
00574       // Killing vector of the Cartesian components
00575       Vector killing(mp, COV, mp.get_bvect_cart()) ;
00576       killing.set_etat_qcq() ;
00577 
00578       killing.set(1) = (killing_spher(2) * ct * cp - killing_spher(3) * sp)
00579         / radius_ah  ;
00580       killing.set(2) = (killing_spher(2) * ct * sp + killing_spher(3) * cp)
00581         / radius_ah ;
00582       killing.set(3) = - killing_spher(2) * st / radius_ah ;
00583       killing.std_spectral_base() ;
00584 
00585       // Surface integral <- dzpuis should be 0
00586       // --------------------------------------
00587       // Source terms in the surface integral
00588       Scalar source_1(mp) ;
00589       source_1 = (ll(1) * (taij(1,1) * killing(1)
00590                    + taij(1,2) * killing(2)
00591                    + taij(1,3) * killing(3))
00592               + ll(2) * (taij(2,1) * killing(1)
00593                  + taij(2,2) * killing(2)
00594                  + taij(2,3) * killing(3))
00595               + ll(3) * (taij(3,1) * killing(1)
00596                  + taij(3,2) * killing(2)
00597                  + taij(3,3) * killing(3)))
00598         / pow(confo, 4.) ;
00599       source_1.std_spectral_base() ;
00600       source_1.dec_dzpuis(2) ;  // dzpuis : 2 -> 0
00601 
00602       Scalar source_surf(mp) ;
00603       source_surf = source_1 ;
00604       source_surf.std_spectral_base() ;
00605       source_surf.annule_domain(0) ;
00606       source_surf.raccord(1) ;
00607 
00608       Map_af mp_aff(mp) ;
00609 
00610       double spin = mp_aff.integrale_surface(source_surf, radius_ah) ;
00611       double spin_angmom = 0.5 * spin / qpig ;
00612 
00613       p_spin_am_bh = new double( spin_angmom ) ;
00614 
00615     }
00616 
00617     }
00618 
00619     return *p_spin_am_bh ;
00620 
00621 }
00622 
00623           //------------------------------------------//
00624           //          Total angular momentum          //
00625           //------------------------------------------//
00626 
00627 const Tbl& Black_hole::angu_mom_bh() const {
00628 
00629     // Fundamental constants and units
00630     // -------------------------------
00631     using namespace Unites ;
00632 
00633     if (p_angu_mom_bh == 0x0) {   // a new computation is required
00634 
00635         p_angu_mom_bh = new Tbl(3) ;
00636     p_angu_mom_bh->annule_hard() ;  // fills the double array with zeros
00637 
00638     double integ_bh_s_x ;
00639     double integ_bh_s_y ;
00640     double integ_bh_s_z ;
00641 
00642     double radius_ah = mp.val_r(1,-1.,M_PI/2.,0.) ;
00643     Map_af mp_aff(mp) ;
00644 
00645     Scalar xx(mp) ;
00646     xx = mp.x ;
00647     xx.std_spectral_base() ;
00648     Scalar yy(mp) ;
00649     yy = mp.y ;
00650     yy.std_spectral_base() ;
00651     Scalar zz(mp) ;
00652     zz = mp.z ;
00653     zz.std_spectral_base() ;
00654 
00655     Scalar st(mp) ;
00656     st = mp.sint ;
00657     st.std_spectral_base() ;
00658     Scalar ct(mp) ;
00659     ct = mp.cost ;
00660     ct.std_spectral_base() ;
00661     Scalar sp(mp) ;
00662     sp = mp.sinp ;
00663     sp.std_spectral_base() ;
00664     Scalar cp(mp) ;
00665     cp = mp.cosp ;
00666     cp.std_spectral_base() ;
00667 
00668     Vector ll(mp, CON, mp.get_bvect_cart()) ;
00669     ll.set_etat_qcq() ;
00670     ll.set(1) = st % cp ;
00671     ll.set(2) = st % sp ;
00672     ll.set(3) = ct ;
00673     ll.std_spectral_base() ;
00674 
00675     Vector jbh_x(mp, CON, mp.get_bvect_cart()) ;
00676     jbh_x.set_etat_qcq() ;
00677     for (int i=1; i<=3; i++)
00678       jbh_x.set(i) = yy * taij(3,i) - zz * taij(2,i) ;
00679 
00680     jbh_x.std_spectral_base() ;
00681 
00682     Vector jbh_y(mp, CON, mp.get_bvect_cart()) ;
00683     jbh_y.set_etat_qcq() ;
00684     for (int i=1; i<=3; i++)
00685       jbh_y.set(i) = zz * taij(1,i) - xx * taij(3,i) ;
00686 
00687     jbh_y.std_spectral_base() ;
00688 
00689     Vector jbh_z(mp, CON, mp.get_bvect_cart()) ;
00690     jbh_z.set_etat_qcq() ;
00691     for (int i=1; i<=3; i++)
00692       jbh_z.set(i) = xx * taij(2,i) - yy * taij(1,i) ;
00693 
00694     jbh_z.std_spectral_base() ;
00695 
00696     /*
00697     if (kerrschild) {
00698 
00699       cout << "Not yet prepared!!!" << endl ;
00700       abort() ;
00701 
00702     }
00703     else {  // Isotropic coordinates
00704 
00705       // Sets C/M^2 for each case of the lapse boundary condition
00706       // --------------------------------------------------------
00707       double cc ;
00708 
00709       if (bclapconf_nd) {  // Neumann boundary condition
00710         if (bclapconf_fs) {  // First condition
00711           // d(\alpha \psi)/dr = 0
00712           // ---------------------
00713           cc = 2. * (sqrt(13.) - 1.) / 3. ;
00714         }
00715         else {  // Second condition
00716           // d(\alpha \psi)/dr = (\alpha \psi)/(2 rah)
00717           // -----------------------------------------
00718           cc = 4. / 3. ;
00719         }
00720       }
00721       else {  // Dirichlet boundary condition
00722         if (bclapconf_fs) {  // First condition
00723           // (\alpha \psi) = 1/2
00724           // -------------------
00725           cout << "!!!!! WARNING: Not yet prepared !!!!!" << endl ;
00726           abort() ;
00727         }
00728         else {  // Second condition
00729           // (\alpha \psi) = 1/sqrt(2.) \psi_KS
00730           // ----------------------------------
00731           cout << "!!!!! WARNING: Not yet prepared !!!!!" << endl ;
00732           abort() ;
00733         }
00734       }
00735 
00736       Scalar r_are(mp) ;
00737       r_are = r_coord(bclapconf_nd, bclapconf_fs) ;
00738       r_are.std_spectral_base() ;
00739 
00740     }
00741     */
00742 
00743     //-------------//
00744     // X component //
00745     //-------------//
00746 
00747     //-------------------------------------
00748     //     Integration over the BH map
00749     //-------------------------------------
00750 
00751     // Surface integral <- dzpuis should be 0
00752     // --------------------------------------
00753     Scalar sou_bh_sx(mp) ;
00754     sou_bh_sx = jbh_x(1)%ll(1) + jbh_x(2)%ll(2) + jbh_x(3)%ll(3) ;
00755     sou_bh_sx.std_spectral_base() ;
00756     sou_bh_sx.dec_dzpuis(2) ;  // dzpuis : 2 -> 0
00757     sou_bh_sx.annule_domain(0) ;
00758     sou_bh_sx.raccord(1) ;
00759 
00760     integ_bh_s_x = mp_aff.integrale_surface(sou_bh_sx, radius_ah) ;
00761 
00762     p_angu_mom_bh->set(0) = 0.5 * integ_bh_s_x / qpig ;
00763 
00764     //-------------//
00765     // Y component //
00766     //-------------//
00767 
00768     //-------------------------------------
00769     //     Integration over the BH map
00770     //-------------------------------------
00771 
00772     // Surface integral <- dzpuis should be 0
00773     // --------------------------------------
00774     Scalar sou_bh_sy(mp) ;
00775     sou_bh_sy = jbh_y(1)%ll(1) + jbh_y(2)%ll(2) + jbh_y(3)%ll(3) ;
00776     sou_bh_sy.std_spectral_base() ;
00777     sou_bh_sy.dec_dzpuis(2) ;  // dzpuis : 2 -> 0
00778     sou_bh_sy.annule_domain(0) ;
00779     sou_bh_sy.raccord(1) ;
00780 
00781     integ_bh_s_y = mp_aff.integrale_surface(sou_bh_sy, radius_ah) ;
00782 
00783     p_angu_mom_bh->set(1) = 0.5 * integ_bh_s_y / qpig ;
00784 
00785     //-------------//
00786     // Z component //
00787     //-------------//
00788 
00789     //-------------------------------------
00790     //     Integration over the BH map
00791     //-------------------------------------
00792 
00793     // Surface integral <- dzpuis should be 0
00794     // --------------------------------------
00795     Scalar sou_bh_sz(mp) ;
00796     sou_bh_sz = jbh_z(1)%ll(1) + jbh_z(2)%ll(2) + jbh_z(3)%ll(3) ;
00797     sou_bh_sz.std_spectral_base() ;
00798     sou_bh_sz.dec_dzpuis(2) ;  // dzpuis : 2 -> 0
00799     sou_bh_sz.annule_domain(0) ;
00800     sou_bh_sz.raccord(1) ;
00801 
00802     integ_bh_s_z = mp_aff.integrale_surface(sou_bh_sz, radius_ah) ;
00803 
00804     p_angu_mom_bh->set(2) = 0.5 * integ_bh_s_z / qpig ;
00805 
00806     }
00807 
00808     return *p_angu_mom_bh ;
00809 
00810 }

Generated on Tue Feb 7 01:35:15 2012 for LORENE by  doxygen 1.4.6