et_bin_bhns_extr_excurv.C

00001 /*
00002  *  Method of class Et_bin_bhns_extr to compute the extrinsic curvature tensor
00003  *  in the Kerr-Schild background metric or in the conformally flat one
00004  *  with extreme mass ratio
00005  *
00006  *    (see file et_bin_bhns_extr.h for documentation).
00007  *
00008  */
00009 
00010 /*
00011  *   Copyright (c) 2004-2005 Keisuke Taniguchi
00012  *
00013  *   This file is part of LORENE.
00014  *
00015  *   LORENE is free software; you can redistribute it and/or modify
00016  *   it under the terms of the GNU General Public License version 2
00017  *   as published by the Free Software Foundation.
00018  *
00019  *   LORENE is distributed in the hope that it will be useful,
00020  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00021  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00022  *   GNU General Public License for more details.
00023  *
00024  *   You should have received a copy of the GNU General Public License
00025  *   along with LORENE; if not, write to the Free Software
00026  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00027  *
00028  */
00029 
00030 char et_bin_bhns_extr_excurv_C[] = "$Header: /cvsroot/Lorene/C++/Source/Etoile/et_bin_bhns_extr_excurv.C,v 1.2 2005/02/28 23:13:25 k_taniguchi Exp $" ;
00031 
00032 /*
00033  * $Id: et_bin_bhns_extr_excurv.C,v 1.2 2005/02/28 23:13:25 k_taniguchi Exp $
00034  * $Log: et_bin_bhns_extr_excurv.C,v $
00035  * Revision 1.2  2005/02/28 23:13:25  k_taniguchi
00036  * Modification to include the case of the conformally flat background metric
00037  *
00038  * Revision 1.1  2004/11/30 20:49:13  k_taniguchi
00039  * *** empty log message ***
00040  *
00041  *
00042  * $Header: /cvsroot/Lorene/C++/Source/Etoile/et_bin_bhns_extr_excurv.C,v 1.2 2005/02/28 23:13:25 k_taniguchi Exp $
00043  *
00044  */
00045 
00046 // C headers
00047 #include <math.h>
00048 
00049 // Lorene headers
00050 #include "et_bin_bhns_extr.h"
00051 #include "etoile.h"
00052 #include "coord.h"
00053 #include "unites.h"
00054 
00055 void Et_bin_bhns_extr::extrinsic_curv_extr(const double& mass,
00056                        const double& sepa) {
00057 
00058   using namespace Unites ;
00059 
00060     if (kerrschild) {
00061 
00070         // Components of shift_auto with respect to the Cartesian triad
00071         //  (d/dx, d/dy, d/dz) of the mapping :
00072 
00073         Tenseur shift_auto_local = shift_auto ;
00074     shift_auto_local.change_triad( mp.get_bvect_cart() ) ;
00075 
00076     // Gradient (partial derivatives with respect to the Cartesian
00077     //           coordinates of the mapping)
00078     // dn(i, j) = D_i N^j
00079 
00080     Tenseur dn = shift_auto_local.gradient() ;
00081 
00082     // Return to the absolute reference frame
00083     dn.change_triad(ref_triad) ;
00084 
00085     // Trace of D_i N^j = divergence of N^j :
00086     Tenseur divn = contract(dn, 0, 1) ;
00087 
00088     // Computation of quantities coming from the companion (K-S BH)
00089     // ------------------------------------------------------------
00090 
00091     const Coord& xx = mp.x ;
00092     const Coord& yy = mp.y ;
00093     const Coord& zz = mp.z ;
00094 
00095     Tenseur r_bh(mp) ;
00096     r_bh.set_etat_qcq() ;
00097     r_bh.set() = pow( (xx+sepa)*(xx+sepa) + yy*yy + zz*zz, 0.5) ;
00098     r_bh.set_std_base() ;
00099 
00100     Tenseur xx_con(mp, 1, CON, ref_triad) ;
00101     xx_con.set_etat_qcq() ;
00102     xx_con.set(0) = xx + sepa ;
00103     xx_con.set(1) = yy ;
00104     xx_con.set(2) = zz ;
00105     xx_con.set_std_base() ;
00106 
00107     Tenseur xsr_con(mp, 1, CON, ref_triad) ;
00108     xsr_con = xx_con / r_bh ;
00109     xsr_con.set_std_base() ;
00110 
00111     Tenseur msr(mp) ;
00112     msr = ggrav * mass / r_bh ;
00113     msr.set_std_base() ;
00114 
00115     Tenseur lapse_bh2(mp) ;  // lapse_bh * lapse_bh
00116     lapse_bh2 = 1. / (1.+2.*msr) ;
00117     lapse_bh2.set_std_base() ;
00118 
00119     // Computation of some auxiliary functions
00120     // ---------------------------------------
00121 
00122     shift_auto_local.change_triad( ref_triad ) ;
00123 
00124     Tenseur tmp1(mp, 2, CON, ref_triad) ;
00125     Tenseur tmp2(mp, 2, CON, ref_triad) ;
00126     Tenseur tmp3(mp, 2, CON, ref_triad) ;
00127     tmp1.set_etat_qcq() ;
00128     tmp2.set_etat_qcq() ;
00129     tmp3.set_etat_qcq() ;
00130 
00131     for (int i=0; i<3; i++) {
00132         for (int j=0; j<3; j++) {
00133             tmp1.set(i, j) = -2.*lapse_bh2()%msr()%xsr_con(i)%xsr_con(j) ;
00134 
00135         tmp2.set(i, j) = -3.*lapse_bh2()%xsr_con(i)%xsr_con(j)
00136           -4.*lapse_bh2()*msr()%xsr_con(i)%xsr_con(j) ;
00137 
00138         tmp3.set(i, j) = xsr_con(i)%shift_auto_local(j) ;
00139         }
00140     }
00141 
00142     tmp1.set_std_base() ;
00143     tmp2.set_std_base() ;
00144     tmp3.set_std_base() ;
00145 
00146     Tenseur tmp4(mp) ;
00147     tmp4.set_etat_qcq() ;
00148     tmp4.set() = 0 ;
00149     tmp4.set_std_base() ;
00150 
00151     for (int i=0; i<3; i++)
00152         tmp4.set() += xsr_con(i) % shift_auto_local(i) ;
00153 
00154     tmp4.set_std_base() ;
00155 
00156     // Computation of contraction
00157     // --------------------------
00158 
00159     Tenseur tmp1dn = contract(tmp1, 1, dn, 0) ;
00160 
00161     // Computation of A^2 A^{ij}
00162     // -------------------------
00163     tkij_auto.set_etat_qcq() ;
00164 
00165     for (int i=0; i<3; i++) {
00166         for (int j=i; j<3; j++) {
00167             tkij_auto.set(i, j) = dn(i, j) + dn(j, i)
00168           + tmp1dn(i, j) + tmp1dn(j, i)
00169           + 2.*lapse_bh2()%msr()/r_bh()%( tmp3(i, j) + tmp3(j, i)
00170                           + tmp4() % tmp2(i, j) )
00171           - double(2)/double(3) * tmp1(i, j)
00172           * (divn() - lapse_bh2() % msr() / r_bh() % tmp4()) ;
00173         }
00174         tkij_auto.set(i, i) -= double(2) /double(3)
00175           * (divn() - lapse_bh2() % msr() / r_bh() % tmp4()) ;
00176     }
00177 
00178     tkij_auto = - 0.5 * tkij_auto / nnn ;
00179 
00180     tkij_auto.set_std_base() ;
00181 
00182     // Computation of A^2 A_{ij} A^{ij}
00183     // --------------------------------
00184 
00185     Tenseur xx_cov(mp, 1, COV, ref_triad) ;
00186     xx_cov.set_etat_qcq() ;
00187     xx_cov.set(0) = xx + sepa ;
00188     xx_cov.set(1) = yy ;
00189     xx_cov.set(2) = zz ;
00190     xx_cov.set_std_base() ;
00191 
00192     Tenseur xsr_cov(mp, 1, COV, ref_triad) ;
00193     xsr_cov = xx_cov / r_bh ;
00194     xsr_cov.set_std_base() ;
00195 
00196     Tenseur tmp5(mp, 2, COV, ref_triad) ;
00197     Tenseur tmp6(mp, 2, CON, ref_triad) ;
00198     tmp5.set_etat_qcq() ;
00199     tmp6.set_etat_qcq() ;
00200 
00201     for (int i=0; i<3; i++) {
00202         for (int j=0; j<3; j++) {
00203             tmp6.set(i, j) = 0 ;
00204         }
00205     }
00206     tmp6.set_std_base() ;
00207 
00208     for (int i=0; i<3; i++) {
00209         for (int j=0; j<3; j++) {
00210             tmp5.set(i, j) = 2.*msr()%xsr_cov(i)%xsr_cov(j) ;
00211         }
00212     }
00213 
00214     for (int i=0; i<3; i++) {
00215         for (int j=0; j<3; j++) {
00216             for (int k=0; k<3; k++) {
00217             tmp6.set(i, j) += tkij_auto(i,k) % tkij_auto(j,k) ;
00218         }
00219         }
00220     }
00221 
00222     tmp5.set_std_base() ;
00223     tmp6.set_std_base() ;
00224 
00225     Tenseur tmp7(mp) ;
00226     tmp7.set_etat_qcq() ;
00227     tmp7.set() = 0 ;
00228     tmp7.set_std_base() ;
00229 
00230     for (int i=0; i<3; i++) {
00231         for (int j=0; j<3; j++) {
00232             tmp7.set() += tmp5(i,j) % tmp6(i,j) ;
00233         }
00234     }
00235     tmp7.set_std_base() ;
00236 
00237     Tenseur tmp8(mp) ;
00238     tmp8.set_etat_qcq() ;
00239     tmp8.set() = 0 ;
00240     tmp8.set_std_base() ;
00241 
00242     for (int i=0; i<3; i++) {
00243         for (int j=0; j<3; j++) {
00244             tmp8.set() += tmp5(i,j) % tkij_auto(i,j) ;
00245         }
00246     }
00247     tmp8.set_std_base() ;
00248 
00249     akcar_auto.set_etat_qcq() ;
00250     akcar_auto.set() = 2.*tmp7() + tmp8() % tmp8() ;
00251     akcar_auto.set_std_base() ;
00252 
00253     for (int i=0; i<3; i++) {
00254         for (int j=0; j<3; j++) {
00255             akcar_auto.set() += tkij_auto(i, j) % tkij_auto(i, j) ;
00256         }
00257     }
00258 
00259     akcar_auto.set_std_base() ;
00260 
00261     akcar_auto = a_car % akcar_auto ;
00262 
00263     }
00264     else {
00265 
00275         // Components of shift_auto with respect to the Cartesian triad
00276         //  (d/dx, d/dy, d/dz) of the mapping :
00277 
00278         Tenseur shift_auto_local = shift_auto ;
00279     shift_auto_local.change_triad( mp.get_bvect_cart() ) ;
00280 
00281     // Gradient (partial derivatives with respect to the Cartesian
00282     //           coordinates of the mapping)
00283     // dn(i, j) = D_i N^j
00284 
00285     Tenseur dn = shift_auto_local.gradient() ;
00286 
00287     // Return to the absolute reference frame
00288     dn.change_triad(ref_triad) ;
00289 
00290     // Trace of D_i N^j = divergence of N^j :
00291     Tenseur divn = contract(dn, 0, 1) ;
00292 
00293     // Computation of A^2 A^{ij}
00294     // -------------------------
00295     tkij_auto.set_etat_qcq() ;
00296 
00297     for (int i=0; i<3; i++) {
00298         for (int j=i; j<3; j++) {
00299             tkij_auto.set(i, j) = dn(i, j) + dn(j, i) ;
00300         }
00301         tkij_auto.set(i, i) -= double(2) /double(3) * divn() ;
00302     }
00303 
00304     tkij_auto = - 0.5 * tkij_auto / nnn ;
00305 
00306     tkij_auto.set_std_base() ;
00307 
00308     // Computation of A^2 A_{ij} A^{ij}
00309     // --------------------------------
00310 
00311     akcar_auto.set_etat_qcq() ;
00312     akcar_auto.set() = 0. ;
00313     akcar_auto.set_std_base() ;
00314 
00315     for (int i=0; i<3; i++) {
00316         for (int j=0; j<3; j++) {
00317             akcar_auto.set() += tkij_auto(i, j) % tkij_auto(i, j) ;
00318         }
00319     }
00320 
00321     akcar_auto.set_std_base() ;
00322 
00323     akcar_auto = a_car % akcar_auto ;
00324 
00325     }
00326 
00327 }

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