| 1 |
/* |
| 2 |
* Methods Etoile_bin::update_metric |
| 3 |
* |
| 4 |
* (see file etoile.h for documentation) |
| 5 |
* |
| 6 |
*/ |
| 7 |
|
| 8 |
/* |
| 9 |
* Copyright (c) 2000-2001 Eric Gourgoulhon |
| 10 |
* |
| 11 |
* This file is part of LORENE. |
| 12 |
* |
| 13 |
* LORENE is free software; you can redistribute it and/or modify |
| 14 |
* it under the terms of the GNU General Public License as published by |
| 15 |
* the Free Software Foundation; either version 2 of the License, or |
| 16 |
* (at your option) any later version. |
| 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 |
|
| 30 |
char et_bin_upmetr_C[] = "$Header: /cvsroot/Lorene/C++/Source/Etoile/et_bin_upmetr.C,v 1.5 2014/10/13 08:52:56 j_novak Exp $" ; |
| 31 |
|
| 32 |
/* |
| 33 |
* $Id: et_bin_upmetr.C,v 1.5 2014/10/13 08:52:56 j_novak Exp $ |
| 34 |
* $Log: et_bin_upmetr.C,v $ |
| 35 |
* Revision 1.5 2014/10/13 08:52:56 j_novak |
| 36 |
* Lorene classes and functions now belong to the namespace Lorene. |
| 37 |
* |
| 38 |
* Revision 1.4 2003/10/24 12:26:38 k_taniguchi |
| 39 |
* Suppress the method of update metric for NS-BH |
| 40 |
* |
| 41 |
* Revision 1.3 2003/10/24 11:46:07 k_taniguchi |
| 42 |
* Change some notations |
| 43 |
* |
| 44 |
* Revision 1.2 2002/12/19 14:52:42 e_gourgoulhon |
| 45 |
* Added the new function |
| 46 |
* void update_metric(const Bhole& comp) |
| 47 |
* to treat the case where the companion is a black hole |
| 48 |
* |
| 49 |
* Revision 1.1.1.1 2001/11/20 15:19:28 e_gourgoulhon |
| 50 |
* LORENE |
| 51 |
* |
| 52 |
* Revision 2.9 2000/09/27 12:49:57 keisuke |
| 53 |
* Utilisation de d_logn_auto_div dans le calcul de d_logn_auto dans |
| 54 |
* la version avec relaxation. |
| 55 |
* |
| 56 |
* Revision 2.8 2000/09/22 15:53:06 keisuke |
| 57 |
* Calcul de d_logn_auto prenant en compte d_logn_auto_div. |
| 58 |
* |
| 59 |
* Revision 2.7 2000/03/07 14:55:08 eric |
| 60 |
* Ajout de l'appel a extrinsic_curvature. |
| 61 |
* |
| 62 |
* Revision 2.6 2000/03/07 08:33:24 eric |
| 63 |
* Appel de Cmp::import_sym / asym (pour tenir compte de la symetrie / |
| 64 |
* plan y=0). |
| 65 |
* |
| 66 |
* Revision 2.5 2000/02/12 18:38:11 eric |
| 67 |
* Ajout de la version avec relaxation. |
| 68 |
* Appel de set_std_base() sur nnn et a_car. |
| 69 |
* |
| 70 |
* Revision 2.4 2000/02/12 11:42:49 eric |
| 71 |
* Appel de Tenseur::set_std_base() sur les Tenseurs importes du |
| 72 |
* compagnon. |
| 73 |
* |
| 74 |
* Revision 2.3 2000/02/10 18:54:41 eric |
| 75 |
* Traitement du cas ETATZERO. |
| 76 |
* |
| 77 |
* Revision 2.2 2000/02/10 16:55:10 eric |
| 78 |
* Appel de change_triad sur d_logn_auto et d_beta_auto. |
| 79 |
* |
| 80 |
* Revision 2.1 2000/02/04 17:14:32 eric |
| 81 |
* *** empty log message *** |
| 82 |
* |
| 83 |
* Revision 2.0 2000/02/04 16:38:00 eric |
| 84 |
* *** empty log message *** |
| 85 |
* |
| 86 |
* |
| 87 |
* $Header: /cvsroot/Lorene/C++/Source/Etoile/et_bin_upmetr.C,v 1.5 2014/10/13 08:52:56 j_novak Exp $ |
| 88 |
* |
| 89 |
*/ |
| 90 |
|
| 91 |
// Headers Lorene |
| 92 |
#include "etoile.h" |
| 93 |
#include "bhole.h" |
| 94 |
|
| 95 |
//----------------------------------// |
| 96 |
// Version without relaxation // |
| 97 |
//----------------------------------// |
| 98 |
|
| 99 |
namespace Lorene { |
| 100 |
void Etoile_bin::update_metric(const Etoile_bin& comp) { |
| 101 |
|
| 102 |
// Computation of quantities coming from the companion |
| 103 |
// --------------------------------------------------- |
| 104 |
|
| 105 |
if ( (comp.logn_auto).get_etat() == ETATZERO ) { |
| 106 |
logn_comp.set_etat_zero() ; |
| 107 |
} |
| 108 |
else{ |
| 109 |
logn_comp.set_etat_qcq() ; |
| 110 |
(logn_comp.set()).import_symy( comp.logn_auto() ) ; |
| 111 |
logn_comp.set_std_base() ; // set the bases for spectral expansions |
| 112 |
} |
| 113 |
|
| 114 |
|
| 115 |
if ( (comp.beta_auto).get_etat() == ETATZERO ) { |
| 116 |
beta_comp.set_etat_zero() ; |
| 117 |
} |
| 118 |
else{ |
| 119 |
beta_comp.set_etat_qcq() ; |
| 120 |
(beta_comp.set()).import_symy( comp.beta_auto() ) ; |
| 121 |
beta_comp.set_std_base() ; // set the bases for spectral expansions |
| 122 |
} |
| 123 |
|
| 124 |
|
| 125 |
if ( (comp.shift_auto).get_etat() == ETATZERO ) { |
| 126 |
shift_comp.set_etat_zero() ; |
| 127 |
} |
| 128 |
else{ |
| 129 |
shift_comp.set_etat_qcq() ; |
| 130 |
|
| 131 |
(shift_comp.set(0)).import_asymy( comp.shift_auto(0) ) ; // N^x antisym |
| 132 |
(shift_comp.set(1)).import_symy( comp.shift_auto(1) ) ; // N^y sym. |
| 133 |
(shift_comp.set(2)).import_asymy( comp.shift_auto(2) ) ; // N^z anisym |
| 134 |
|
| 135 |
shift_comp.set_std_base() ; // set the bases for spectral expansions |
| 136 |
} |
| 137 |
shift_comp.set_triad( *((comp.shift_auto).get_triad()) ) ; |
| 138 |
|
| 139 |
|
| 140 |
|
| 141 |
// Lapse function N |
| 142 |
// ---------------- |
| 143 |
|
| 144 |
Tenseur logn_total = logn_auto + logn_comp ; |
| 145 |
|
| 146 |
nnn = exp( unsurc2 * logn_total ) ; |
| 147 |
|
| 148 |
nnn.set_std_base() ; // set the bases for spectral expansions |
| 149 |
|
| 150 |
// Conformal factor A^2 |
| 151 |
// --------------------- |
| 152 |
|
| 153 |
a_car = exp( 2*unsurc2*( beta_auto + beta_comp - logn_total ) ) ; |
| 154 |
|
| 155 |
a_car.set_std_base() ; // set the bases for spectral expansions |
| 156 |
|
| 157 |
// Shift vector N^i |
| 158 |
// ---------------- |
| 159 |
|
| 160 |
shift = shift_auto + shift_comp ; |
| 161 |
|
| 162 |
// Derivatives of metric coefficients |
| 163 |
// ---------------------------------- |
| 164 |
|
| 165 |
// ... (d/dX,d/dY,d/dZ)(logn_auto) : |
| 166 |
d_logn_auto_regu = logn_auto_regu.gradient() ; // (d/dx, d/dy, d/dz) |
| 167 |
d_logn_auto_regu.change_triad(ref_triad) ; // --> (d/dX, d/dY, d/dZ) |
| 168 |
|
| 169 |
if ( *(d_logn_auto_div.get_triad()) != ref_triad ) { |
| 170 |
|
| 171 |
// Change the basis from spherical coordinate to Cartesian one |
| 172 |
d_logn_auto_div.change_triad( mp.get_bvect_cart() ) ; |
| 173 |
|
| 174 |
// Change the basis from mapping coordinate to absolute one |
| 175 |
d_logn_auto_div.change_triad( ref_triad ) ; |
| 176 |
|
| 177 |
} |
| 178 |
|
| 179 |
d_logn_auto = d_logn_auto_regu + d_logn_auto_div ; |
| 180 |
|
| 181 |
// ... (d/dX,d/dY,d/dZ)(beta_auto) : |
| 182 |
d_beta_auto = beta_auto.gradient() ; // (d/dx, d/dy, d/dz) |
| 183 |
d_beta_auto.change_triad(ref_triad) ; // --> (d/dX, d/dY, d/dZ) |
| 184 |
|
| 185 |
if (relativistic) { |
| 186 |
// ... extrinsic curvature (tkij_auto and akcar_auto) |
| 187 |
extrinsic_curvature() ; |
| 188 |
} |
| 189 |
|
| 190 |
// The derived quantities are obsolete |
| 191 |
// ----------------------------------- |
| 192 |
|
| 193 |
del_deriv() ; |
| 194 |
|
| 195 |
|
| 196 |
} |
| 197 |
|
| 198 |
|
| 199 |
|
| 200 |
//----------------------------------// |
| 201 |
// Version with relaxation // |
| 202 |
//----------------------------------// |
| 203 |
|
| 204 |
void Etoile_bin::update_metric(const Etoile_bin& comp, |
| 205 |
const Etoile_bin& star_jm1, double relax) { |
| 206 |
|
| 207 |
|
| 208 |
// Computation of quantities coming from the companion |
| 209 |
// --------------------------------------------------- |
| 210 |
|
| 211 |
if ( (comp.logn_auto).get_etat() == ETATZERO ) { |
| 212 |
logn_comp.set_etat_zero() ; |
| 213 |
} |
| 214 |
else{ |
| 215 |
logn_comp.set_etat_qcq() ; |
| 216 |
(logn_comp.set()).import_symy( comp.logn_auto() ) ; |
| 217 |
logn_comp.set_std_base() ; // set the bases for spectral expansions |
| 218 |
} |
| 219 |
|
| 220 |
|
| 221 |
if ( (comp.beta_auto).get_etat() == ETATZERO ) { |
| 222 |
beta_comp.set_etat_zero() ; |
| 223 |
} |
| 224 |
else{ |
| 225 |
beta_comp.set_etat_qcq() ; |
| 226 |
(beta_comp.set()).import_symy( comp.beta_auto() ) ; |
| 227 |
beta_comp.set_std_base() ; // set the bases for spectral expansions |
| 228 |
} |
| 229 |
|
| 230 |
|
| 231 |
if ( (comp.shift_auto).get_etat() == ETATZERO ) { |
| 232 |
shift_comp.set_etat_zero() ; |
| 233 |
} |
| 234 |
else{ |
| 235 |
shift_comp.set_etat_qcq() ; |
| 236 |
|
| 237 |
(shift_comp.set(0)).import_asymy( comp.shift_auto(0) ) ; // N^x antisym |
| 238 |
(shift_comp.set(1)).import_symy( comp.shift_auto(1) ) ; // N^y sym. |
| 239 |
(shift_comp.set(2)).import_asymy( comp.shift_auto(2) ) ; // N^z anisym |
| 240 |
|
| 241 |
shift_comp.set_std_base() ; // set the bases for spectral expansions |
| 242 |
} |
| 243 |
shift_comp.set_triad( *((comp.shift_auto).get_triad()) ) ; |
| 244 |
|
| 245 |
// Relaxation on logn_comp, beta_comp, shift_comp |
| 246 |
// ---------------------------------------------- |
| 247 |
double relaxjm1 = 1. - relax ; |
| 248 |
|
| 249 |
logn_comp = relax * logn_comp + relaxjm1 * (star_jm1.get_logn_comp()) ; |
| 250 |
|
| 251 |
beta_comp = relax * beta_comp + relaxjm1 * (star_jm1.get_beta_comp()) ; |
| 252 |
|
| 253 |
shift_comp = relax * shift_comp + relaxjm1 * (star_jm1.get_shift_comp()) ; |
| 254 |
|
| 255 |
// Lapse function N |
| 256 |
// ---------------- |
| 257 |
|
| 258 |
Tenseur logn_total = logn_auto + logn_comp ; |
| 259 |
|
| 260 |
nnn = exp( unsurc2 * logn_total ) ; |
| 261 |
|
| 262 |
nnn.set_std_base() ; // set the bases for spectral expansions |
| 263 |
|
| 264 |
// Conformal factor A^2 |
| 265 |
// --------------------- |
| 266 |
|
| 267 |
a_car = exp( 2*unsurc2*( beta_auto + beta_comp - logn_total ) ) ; |
| 268 |
|
| 269 |
a_car.set_std_base() ; // set the bases for spectral expansions |
| 270 |
|
| 271 |
// Shift vector N^i |
| 272 |
// ---------------- |
| 273 |
|
| 274 |
shift = shift_auto + shift_comp ; |
| 275 |
|
| 276 |
// Derivatives of metric coefficients |
| 277 |
// ---------------------------------- |
| 278 |
|
| 279 |
// ... (d/dX,d/dY,d/dZ)(logn_auto) : |
| 280 |
d_logn_auto_regu = logn_auto_regu.gradient() ; // (d/dx, d/dy, d/dz) |
| 281 |
d_logn_auto_regu.change_triad(ref_triad) ; // --> (d/dX, d/dY, d/dZ) |
| 282 |
|
| 283 |
if ( *(d_logn_auto_div.get_triad()) != ref_triad ) { |
| 284 |
|
| 285 |
// Change the basis from spherical coordinate to Cartesian one |
| 286 |
d_logn_auto_div.change_triad( mp.get_bvect_cart() ) ; |
| 287 |
|
| 288 |
// Change the basis from mapping coordinate to absolute one |
| 289 |
d_logn_auto_div.change_triad( ref_triad ) ; |
| 290 |
|
| 291 |
} |
| 292 |
|
| 293 |
d_logn_auto = d_logn_auto_regu + d_logn_auto_div ; |
| 294 |
|
| 295 |
// ... (d/dX,d/dY,d/dZ)(beta_auto) : |
| 296 |
d_beta_auto = beta_auto.gradient() ; // (d/dx, d/dy, d/dz) |
| 297 |
d_beta_auto.change_triad(ref_triad) ; // --> (d/dX, d/dY, d/dZ) |
| 298 |
|
| 299 |
// ... extrinsic curvature (tkij_auto and akcar_auto) |
| 300 |
extrinsic_curvature() ; |
| 301 |
|
| 302 |
// The derived quantities are obsolete |
| 303 |
// ----------------------------------- |
| 304 |
|
| 305 |
del_deriv() ; |
| 306 |
|
| 307 |
|
| 308 |
} |
| 309 |
} |