| 1 |
/* |
| 2 |
* Methods Et_bin_nsbh::update_metric_der_comp |
| 3 |
* |
| 4 |
* (see file et_bin_nsbh.h for documentation). |
| 5 |
* |
| 6 |
*/ |
| 7 |
|
| 8 |
/* |
| 9 |
* Copyright (c) 2003 Philippe Grandclement |
| 10 |
* 2003 Keisuke Taniguchi |
| 11 |
* |
| 12 |
* This file is part of LORENE. |
| 13 |
* |
| 14 |
* LORENE is free software; you can redistribute it and/or modify |
| 15 |
* it under the terms of the GNU General Public License version 2 |
| 16 |
* as published by the Free Software Foundation. |
| 17 |
* |
| 18 |
* LORENE is distributed in the hope that it will be useful, |
| 19 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 20 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 21 |
* GNU General Public License for more details. |
| 22 |
* |
| 23 |
* You should have received a copy of the GNU General Public License |
| 24 |
* along with LORENE; if not, write to the Free Software |
| 25 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 26 |
* |
| 27 |
*/ |
| 28 |
|
| 29 |
char et_bin_nsbh_upmetr_der_C[] = "$Header: /cvsroot/Lorene/C++/Source/Etoile/et_bin_nsbh_upmetr_der.C,v 1.6 2014/10/13 08:52:56 j_novak Exp $" ; |
| 30 |
|
| 31 |
/* |
| 32 |
* $Id: et_bin_nsbh_upmetr_der.C,v 1.6 2014/10/13 08:52:56 j_novak Exp $ |
| 33 |
* $Log: et_bin_nsbh_upmetr_der.C,v $ |
| 34 |
* Revision 1.6 2014/10/13 08:52:56 j_novak |
| 35 |
* Lorene classes and functions now belong to the namespace Lorene. |
| 36 |
* |
| 37 |
* Revision 1.5 2007/04/24 20:14:45 f_limousin |
| 38 |
* Implementation of Dirichlet and Neumann BC for the lapse |
| 39 |
* |
| 40 |
* Revision 1.4 2005/10/18 13:12:33 p_grandclement |
| 41 |
* update of the mixted binary codes |
| 42 |
* |
| 43 |
* Revision 1.3 2005/08/29 15:10:17 p_grandclement |
| 44 |
* Addition of things needed : |
| 45 |
* 1) For BBH with different masses |
| 46 |
* 2) Provisory files for the mixted binaries (Bh and NS) : THIS IS NOT |
| 47 |
* WORKING YET !!! |
| 48 |
* |
| 49 |
* Revision 1.2 2004/06/07 11:08:31 k_taniguchi |
| 50 |
* A minor change. |
| 51 |
* |
| 52 |
* Revision 1.1 2003/10/24 12:29:21 k_taniguchi |
| 53 |
* Method of update metric for the BH companion |
| 54 |
* |
| 55 |
* |
| 56 |
* |
| 57 |
* $Header: /cvsroot/Lorene/C++/Source/Etoile/et_bin_nsbh_upmetr_der.C,v 1.6 2014/10/13 08:52:56 j_novak Exp $ |
| 58 |
* |
| 59 |
*/ |
| 60 |
|
| 61 |
// Lorene headers |
| 62 |
#include "et_bin_nsbh.h" |
| 63 |
#include "bhole.h" |
| 64 |
|
| 65 |
//---------------------------------------// |
| 66 |
// Version with BH companion // |
| 67 |
//---------------------------------------// |
| 68 |
|
| 69 |
|
| 70 |
namespace Lorene { |
| 71 |
void Et_bin_nsbh::update_metric_der_comp(const Bhole& comp) { |
| 72 |
|
| 73 |
// Computation of Grad(N) ---> stored in d_n_comp |
| 74 |
// ------------------------------------------------- |
| 75 |
|
| 76 |
Tenseur dncomp = ( comp.get_n_auto() ).gradient() ; |
| 77 |
|
| 78 |
if ( dncomp.get_etat() == ETATZERO ) { |
| 79 |
d_n_comp.set_etat_zero() ; |
| 80 |
} |
| 81 |
else{ |
| 82 |
|
| 83 |
// 1/ Division by r^2 of comp.d_n_auto in the ZEC |
| 84 |
dncomp.dec2_dzpuis() ; |
| 85 |
|
| 86 |
// 2/ Interpolation of the result |
| 87 |
|
| 88 |
d_n_comp.set_etat_qcq() ; |
| 89 |
(d_n_comp.set(0)).import( dncomp(0) ) ; // d/dx sym. |
| 90 |
(d_n_comp.set(1)).import( dncomp(1) ) ; // d/dy antisym. |
| 91 |
(d_n_comp.set(2)).import( dncomp(2) ) ; // d/dz sym. |
| 92 |
|
| 93 |
} |
| 94 |
d_n_comp.set_std_base() ; |
| 95 |
d_n_comp.inc2_dzpuis() ; |
| 96 |
d_n_comp.set_triad( *(dncomp.get_triad()) ) ; |
| 97 |
d_n_comp.change_triad(ref_triad) ; |
| 98 |
|
| 99 |
|
| 100 |
// Computation of Grad(Psi) ---> stored in d_confpsi_comp |
| 101 |
// ------------------------------------------------------ |
| 102 |
|
| 103 |
Tenseur dpsicomp = ( comp.get_psi_auto() ).gradient() ; |
| 104 |
|
| 105 |
if ( dpsicomp.get_etat() == ETATZERO ) { |
| 106 |
d_confpsi_comp.set_etat_zero() ; |
| 107 |
} |
| 108 |
else { |
| 109 |
// 1/ Division by r^2 of comp.d_confpsi_auto in the ZEC |
| 110 |
dpsicomp.dec2_dzpuis() ; |
| 111 |
|
| 112 |
// 2/ Interpolation of the result |
| 113 |
|
| 114 |
d_confpsi_comp.set_etat_qcq() ; |
| 115 |
|
| 116 |
(d_confpsi_comp.set(0)).import(dpsicomp(0) ) ; // d/dx sym. |
| 117 |
(d_confpsi_comp.set(1)).import(dpsicomp(1) ) ; // d/dy antisym. |
| 118 |
(d_confpsi_comp.set(2)).import(dpsicomp(2) ) ; // d/dz sym. |
| 119 |
|
| 120 |
} |
| 121 |
|
| 122 |
d_confpsi_comp.set_std_base() ; |
| 123 |
d_confpsi_comp.inc2_dzpuis() ; |
| 124 |
d_confpsi_comp.set_triad( *(dpsicomp.get_triad()) ) ; |
| 125 |
d_confpsi_comp.change_triad(ref_triad) ; |
| 126 |
|
| 127 |
// The derived quantities are obsolete |
| 128 |
// ----------------------------------- |
| 129 |
del_deriv() ; |
| 130 |
} |
| 131 |
} |