| 1 |
/* |
| 2 |
* Method of class Star_bhns to compute metric quantities from |
| 3 |
* the companion black-hole and total metric quantities |
| 4 |
* |
| 5 |
* (see file star_bhns.h for documentation). |
| 6 |
* |
| 7 |
*/ |
| 8 |
|
| 9 |
/* |
| 10 |
* Copyright (c) 2005,2007 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 star_bhns_upmetr_C[] = "$Header: /cvsroot/Lorene/C++/Source/Star_bhns/star_bhns_upmetr.C,v 1.3 2014/10/13 08:53:41 j_novak Exp $" ; |
| 30 |
|
| 31 |
/* |
| 32 |
* $Id: star_bhns_upmetr.C,v 1.3 2014/10/13 08:53:41 j_novak Exp $ |
| 33 |
* $Log: star_bhns_upmetr.C,v $ |
| 34 |
* Revision 1.3 2014/10/13 08:53:41 j_novak |
| 35 |
* Lorene classes and functions now belong to the namespace Lorene. |
| 36 |
* |
| 37 |
* Revision 1.2 2008/05/15 19:17:39 k_taniguchi |
| 38 |
* Change of some parameters. |
| 39 |
* |
| 40 |
* Revision 1.1 2007/06/22 01:32:37 k_taniguchi |
| 41 |
* *** empty log message *** |
| 42 |
* |
| 43 |
* |
| 44 |
* $Header: /cvsroot/Lorene/C++/Source/Star_bhns/star_bhns_upmetr.C,v 1.3 2014/10/13 08:53:41 j_novak Exp $ |
| 45 |
* |
| 46 |
*/ |
| 47 |
|
| 48 |
// C++ headers |
| 49 |
//#include <> |
| 50 |
|
| 51 |
// C headers |
| 52 |
//#include <> |
| 53 |
|
| 54 |
// Lorene headers |
| 55 |
#include "star_bhns.h" |
| 56 |
#include "hole_bhns.h" |
| 57 |
#include "utilitaires.h" |
| 58 |
|
| 59 |
namespace Lorene { |
| 60 |
void Star_bhns::update_metric_bhns(const Hole_bhns& hole, |
| 61 |
const Star_bhns& star_prev, |
| 62 |
double relax_met_comp) { |
| 63 |
|
| 64 |
//----------------------------------------------------- |
| 65 |
// Computation of quantities coming from the companion |
| 66 |
//----------------------------------------------------- |
| 67 |
|
| 68 |
const Map& mp_bh (hole.get_mp()) ; |
| 69 |
|
| 70 |
// Lapconf function |
| 71 |
// ---------------- |
| 72 |
|
| 73 |
if ( (hole.get_lapconf_auto()).get_etat() == ETATZERO ) { |
| 74 |
lapconf_comp.set_etat_zero() ; |
| 75 |
} |
| 76 |
else { |
| 77 |
lapconf_comp.set_etat_qcq() ; |
| 78 |
lapconf_comp.import( hole.get_lapconf_auto() ) ; |
| 79 |
lapconf_comp.std_spectral_base() ; |
| 80 |
} |
| 81 |
|
| 82 |
// Shift vector |
| 83 |
// ------------ |
| 84 |
|
| 85 |
if ( (hole.get_shift_auto())(2).get_etat() == ETATZERO ) { |
| 86 |
assert( (hole.get_shift_auto())(1).get_etat() == ETATZERO ) ; |
| 87 |
assert( (hole.get_shift_auto())(3).get_etat() == ETATZERO ) ; |
| 88 |
|
| 89 |
shift_comp.set_etat_zero() ; |
| 90 |
} |
| 91 |
else { |
| 92 |
shift_comp.set_etat_qcq() ; |
| 93 |
shift_comp.set_triad(mp.get_bvect_cart()) ; |
| 94 |
|
| 95 |
Vector comp_shift(hole.get_shift_auto()) ; |
| 96 |
comp_shift.change_triad(mp_bh.get_bvect_cart()) ; |
| 97 |
comp_shift.change_triad(mp.get_bvect_cart()) ; |
| 98 |
|
| 99 |
assert( *(shift_comp.get_triad()) == *(comp_shift.get_triad()) ) ; |
| 100 |
|
| 101 |
(shift_comp.set(1)).import( comp_shift(1) ) ; |
| 102 |
(shift_comp.set(2)).import( comp_shift(2) ) ; |
| 103 |
(shift_comp.set(3)).import( comp_shift(3) ) ; |
| 104 |
|
| 105 |
shift_comp.std_spectral_base() ; |
| 106 |
} |
| 107 |
|
| 108 |
// Conformal factor |
| 109 |
// ---------------- |
| 110 |
|
| 111 |
if ( (hole.get_confo_auto()).get_etat() == ETATZERO ) { |
| 112 |
confo_comp.set_etat_zero() ; |
| 113 |
} |
| 114 |
else { |
| 115 |
confo_comp.set_etat_qcq() ; |
| 116 |
confo_comp.import( hole.get_confo_auto() ) ; |
| 117 |
confo_comp.std_spectral_base() ; |
| 118 |
} |
| 119 |
|
| 120 |
//---------------------------------------------------- |
| 121 |
// Relaxation on lapconf_comp, shift_comp, confo_comp |
| 122 |
//---------------------------------------------------- |
| 123 |
|
| 124 |
double relax_met_comp_jm1 = 1. - relax_met_comp ; |
| 125 |
|
| 126 |
lapconf_comp = relax_met_comp * lapconf_comp |
| 127 |
+ relax_met_comp_jm1 * (star_prev.lapconf_comp) ; |
| 128 |
|
| 129 |
shift_comp = relax_met_comp * shift_comp |
| 130 |
+ relax_met_comp_jm1 * (star_prev.shift_comp) ; |
| 131 |
|
| 132 |
confo_comp = relax_met_comp * confo_comp |
| 133 |
+ relax_met_comp_jm1 * (star_prev.confo_comp) ; |
| 134 |
|
| 135 |
//------------------------- |
| 136 |
// Total metric quantities |
| 137 |
//------------------------- |
| 138 |
|
| 139 |
lapconf_tot = lapconf_auto + lapconf_comp ; |
| 140 |
lapconf_tot.std_spectral_base() ; |
| 141 |
|
| 142 |
shift_tot = shift_auto + shift_comp ; |
| 143 |
shift_tot.std_spectral_base() ; |
| 144 |
|
| 145 |
confo_tot = confo_auto + confo_comp ; |
| 146 |
confo_tot.std_spectral_base() ; |
| 147 |
|
| 148 |
psi4 = pow(confo_tot, 4.) ; |
| 149 |
psi4.std_spectral_base() ; |
| 150 |
|
| 151 |
lapse_auto = lapconf_auto / confo_tot ; |
| 152 |
lapse_auto.std_spectral_base() ; |
| 153 |
|
| 154 |
lapse_tot = lapconf_tot / confo_tot ; |
| 155 |
lapse_tot.std_spectral_base() ; |
| 156 |
|
| 157 |
//--------------------------------- |
| 158 |
// Derivative of metric quantities |
| 159 |
//--------------------------------- |
| 160 |
|
| 161 |
d_lapconf_auto.set_etat_qcq() ; |
| 162 |
for (int i=1; i<=3; i++) |
| 163 |
d_lapconf_auto.set(i) = lapconf_auto.deriv(i) ; |
| 164 |
|
| 165 |
d_lapconf_auto.std_spectral_base() ; |
| 166 |
|
| 167 |
d_shift_auto.set_etat_qcq() ; |
| 168 |
for (int i=1; i<=3; i++) { |
| 169 |
for (int j=1; j<=3; j++) { |
| 170 |
d_shift_auto.set(i,j) = shift_auto(j).deriv(i) ; |
| 171 |
} |
| 172 |
} |
| 173 |
|
| 174 |
d_shift_auto.std_spectral_base() ; |
| 175 |
|
| 176 |
d_confo_auto.set_etat_qcq() ; |
| 177 |
for (int i=1; i<=3; i++) |
| 178 |
d_confo_auto.set(i) = confo_auto.deriv(i) ; |
| 179 |
|
| 180 |
d_confo_auto.std_spectral_base() ; |
| 181 |
|
| 182 |
// ... extrinsic curvature (taij_auto and taij_quad_auto) |
| 183 |
// extr_curv_bhns() ; |
| 184 |
|
| 185 |
// The derived quantities are obsolete |
| 186 |
// ----------------------------------- |
| 187 |
|
| 188 |
del_deriv() ; |
| 189 |
|
| 190 |
} |
| 191 |
} |