/* * Methods for computing the extrinsic curvature tensor for a Bin_ns_bh * */ /* * Copyright (c) 2002 Philippe Grandclement, Keisuke Taniguchi, * Eric Gourgoulhon * * This file is part of LORENE. * * LORENE is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 * as published by the Free Software Foundation. * * LORENE is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with LORENE; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ char bin_ns_bh_kij_C[] = "$Header: /cvsroot/Lorene/C++/Source/Bin_ns_bh/bin_ns_bh_kij.C,v 1.11 2014/10/13 08:52:43 j_novak Exp $" ; /* * $Id: bin_ns_bh_kij.C,v 1.11 2014/10/13 08:52:43 j_novak Exp $ * $Log: bin_ns_bh_kij.C,v $ * Revision 1.11 2014/10/13 08:52:43 j_novak * Lorene classes and functions now belong to the namespace Lorene. * * Revision 1.10 2014/10/06 15:13:01 j_novak * Modified #include directives to use c++ syntax. * * Revision 1.9 2008/09/26 08:44:04 p_grandclement * Mixted binaries with non vanishing spin * * Revision 1.8 2008/08/19 06:41:59 j_novak * Minor modifications to avoid warnings with gcc 4.3. Most of them concern * cast-type operations, and constant strings that must be defined as const char* * * Revision 1.7 2007/04/26 14:14:59 f_limousin * The function fait_tkij now have default values for bound_nn and lim_nn * * Revision 1.6 2007/04/26 13:16:23 f_limousin * Correction of an error in the computation of grad_n_tot and grad_psi_tot * * Revision 1.5 2007/04/24 20:13:53 f_limousin * Implementation of Dirichlet and Neumann BC for the lapse * * Revision 1.4 2005/12/01 12:59:10 p_grandclement * Files for bin_ns_bh project * * Revision 1.3 2005/08/29 15:10:15 p_grandclement * Addition of things needed : * 1) For BBH with different masses * 2) Provisory files for the mixted binaries (Bh and NS) : THIS IS NOT * WORKING YET !!! * * Revision 1.2 2004/05/27 12:41:00 p_grandclement * correction of some shadowed variables * * Revision 1.1 2003/02/13 16:40:25 p_grandclement * Addition of various things for the Bin_ns_bh project, non of them being * completely tested * * * $Header: /cvsroot/Lorene/C++/Source/Bin_ns_bh/bin_ns_bh_kij.C,v 1.11 2014/10/13 08:52:43 j_novak Exp $ * */ // C++ headers #include "headcpp.h" // C headers #include // Lorene headers #include "bin_ns_bh.h" #include "proto.h" #include "utilitaires.h" #include "graphique.h" namespace Lorene { /** * Computes (LB)^{ij} auto. * To be used only when computing the total extrinsic curvature tensor * in the case of a Bin_ns_bh **/ void Et_bin_nsbh::fait_taij_auto() { Tenseur copie_shift (shift_auto) ; copie_shift.change_triad(mp.get_bvect_cart()) ; if (shift_auto.get_etat() == ETATZERO) taij_auto.set_etat_zero() ; else { Tenseur grad (copie_shift.gradient()) ; Tenseur trace (contract (grad,0, 1)) ; taij_auto.set_triad(mp.get_bvect_cart()) ; taij_auto.set_etat_qcq() ; for (int i=0 ; i<3 ; i++) for (int j=i ; j<3 ; j++) taij_auto.set(i, j) = grad(i, j)+grad(j, i) ; for (int i=0 ; i<3 ; i++) taij_auto.set(i, i) -= 2./3.*trace() ; } taij_auto.change_triad(ref_triad) ; } void Bin_ns_bh::fait_decouple () { int nz_bh = hole.mp.get_mg()->get_nzone() ; int nz_ns = star.mp.get_mg()->get_nzone() ; // On determine R_limite (pour le moment en tout cas...) : double distance = star.mp.get_ori_x()-hole.mp.get_ori_x() ; double lim_ns = distance/2. ; double lim_bh = distance/2. ; double int_ns = lim_ns/3. ; double int_bh = lim_bh/3. ; // Les fonctions totales : Cmp decouple_ns (star.mp) ; decouple_ns.allocate_all() ; Cmp decouple_bh (hole.mp) ; decouple_bh.allocate_all() ; Mtbl xabs_ns (star.mp.xa) ; Mtbl yabs_ns (star.mp.ya) ; Mtbl zabs_ns (star.mp.za) ; Mtbl xabs_bh (hole.mp.xa) ; Mtbl yabs_bh (hole.mp.ya) ; Mtbl zabs_bh (hole.mp.za) ; double xabs, yabs, zabs, air_ns, air_bh, theta, phi ; // On boucle sur les autres zones : for (int l=0 ; lget_nr (l) ; if (l==nz_ns-1) nr -- ; int np = star.mp.get_mg()->get_np (l) ; int nt = star.mp.get_mg()->get_nt (l) ; for (int k=0 ; kget_nr (l) ; if (l==nz_bh-1) nr -- ; int np = hole.mp.get_mg()->get_np (l) ; int nt = hole.mp.get_mg()->get_nt (l) ; for (int k=0 ; kget_nt(1) ; int nnp = hole.mp.get_mg()->get_np(1) ; for (int k=0; kget_nzone() ; Cmp ntot_ns (star.get_nnn()()) ; Cmp ntot_bh (hole.n_tot()) ; //des_coupe_z (ntot_bh, 0, -5, 0, -2.5, 2.5, "N") ; ntot_bh = division_xpun (ntot_bh, 0) ; ntot_bh.raccord(1) ; //des_coupe_z (ntot_bh, 0, -5, 0, -2.5, 2.5, "N/ (x+1)") ; // Boucle sur les composantes : for (int lig = 0 ; lig<3 ; lig++) for (int col = lig ; col<3 ; col++) { // Dans la grille du BH (pas de pb sauf pres horizon : Cmp auxi_bh (hole.taij_tot(lig, col)/2.) ; auxi_bh.dec2_dzpuis() ; auxi_bh = division_xpun (auxi_bh, 0) ; //des_coupe_z (auxi_bh, 0, -10, 20, -7, 7, "Aij/ (x+1)") ; auxi_bh = auxi_bh / ntot_bh ; auxi_bh.raccord(1) ; // Pour la NS on doit faire attention a pas etre pres du trou Cmp auxi_ns (star.mp) ; auxi_ns.allocate_all() ; // copie : Cmp copie_ns_bis (ns_taij_tot(lig, col)) ; copie_ns_bis.dec2_dzpuis() ; // Double le rayon limite : double lim_bh = hole.mp.get_alpha()[1] + hole.mp.get_beta()[1] ; Mtbl xabs_ns (star.mp.xa) ; Mtbl yabs_ns (star.mp.ya) ; Mtbl zabs_ns (star.mp.za) ; double xabs, yabs, zabs, air, theta, phi ; // On boucle sur les zones for (int l=0 ; lget_nr (l) ; if (l==nz_ns-1) nr -- ; int np = star.mp.get_mg()->get_np (l) ; int nt = star.mp.get_mg()->get_nt (l) ; for (int k=0 ; k= lim_bh) // On est loin du trou 2 : pas de pb : auxi_ns.set(l, k, j, i) = copie_ns_bis(l, k, j, i) / ntot_ns (l, k, j, i)/2. ; else // On est pres du trou (faut pas tomber dedans !) : auxi_ns.set(l, k, j, i) = auxi_bh.val_point (air, theta, phi) ; } // Cas infini : if (l==nz_ns-1) for (int k=0 ; k