LORENE
et_bin_upmetr.C
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
30char 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
99namespace Lorene {
101
102 // Computation of quantities coming from the companion
103 // ---------------------------------------------------
104
105 if ( (comp.logn_auto).get_etat() == ETATZERO ) {
107 }
108 else{
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 ) {
117 }
118 else{
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 ) {
127 }
128 else{
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
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
173
174 // Change the basis from mapping coordinate to absolute one
176
177 }
178
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)
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
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 ) {
213 }
214 else{
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 ) {
223 }
224 else{
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 ) {
233 }
234 else{
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
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
287
288 // Change the basis from mapping coordinate to absolute one
290
291 }
292
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)
301
302 // The derived quantities are obsolete
303 // -----------------------------------
304
305 del_deriv() ;
306
307
308}
309}
Class for stars in binary system.
Definition etoile.h:814
Tenseur shift_comp
Part of the shift vector generated principaly by the companion star.
Definition etoile.h:895
void update_metric(const Etoile_bin &comp)
Computes metric coefficients from known potentials, when the companion is another star.
Tenseur d_beta_auto
Gradient of beta_auto (Cartesian components with respect to ref_triad )
Definition etoile.h:879
Tenseur d_logn_auto
Gradient of logn_auto (Cartesian components with respect to ref_triad )
Definition etoile.h:859
const Base_vect & ref_triad
Reference triad ("absolute frame"), with respect to which the components of all the member Tenseur 's...
Definition etoile.h:828
const Tenseur & get_logn_comp() const
Returns the part of the lapse logarithm (gravitational potential at the Newtonian limit) generated pr...
Definition etoile.h:1116
Tenseur logn_comp
Part of the lapse logarithm (gravitational potential at the Newtonian limit) generated principaly by ...
Definition etoile.h:854
Tenseur beta_comp
Part of the logarithm of AN generated principaly by the companion star.
Definition etoile.h:874
virtual void del_deriv() const
Deletes all the derived quantities.
Definition etoile_bin.C:447
const Tenseur & get_shift_comp() const
Returns the part of the shift vector generated principaly by the companion star.
Definition etoile.h:1158
Tenseur shift_auto
Part of the shift vector generated principaly by the star.
Definition etoile.h:889
virtual void extrinsic_curvature()
Computes tkij_auto and akcar_auto from shift_auto , nnn and a_car .
Tenseur d_logn_auto_regu
Gradient of logn_auto_regu (Cartesian components with respect to ref_triad )
Definition etoile.h:864
const Tenseur & get_beta_comp() const
Returns the part of the logarithm of AN generated principaly by the companion star.
Definition etoile.h:1136
Tenseur logn_auto_regu
Regular part of the logarithm of the part of the lapse N generated principaly by the star.
Definition etoile.h:491
Tenseur nnn
Total lapse function.
Definition etoile.h:509
Tenseur logn_auto
Total of the logarithm of the part of the lapse N generated principaly by the star.
Definition etoile.h:484
Map & mp
Mapping associated with the star.
Definition etoile.h:429
Tenseur d_logn_auto_div
Gradient of logn_auto_div (if k_div!=0 )
Definition etoile.h:501
bool relativistic
Indicator of relativity: true for a relativistic star, false for a Newtonian one.
Definition etoile.h:437
Tenseur shift
Total shift vector.
Definition etoile.h:512
Tenseur beta_auto
Logarithm of the part of the product AN generated principaly by by the star.
Definition etoile.h:506
Tenseur a_car
Total conformal factor .
Definition etoile.h:515
double unsurc2
: unsurc2=1 for a relativistic star, 0 for a Newtonian one.
Definition etoile.h:442
const Base_vect_cart & get_bvect_cart() const
Returns the Cartesian basis associated with the coordinates (x,y,z) of the mapping,...
Definition map.h:791
Tensor handling *** DEPRECATED : use class Tensor instead ***.
Definition tenseur.h:301
const Base_vect * get_triad() const
Returns the vectorial basis (triad) on which the components are defined.
Definition tenseur.h:704
Cmp & set()
Read/write for a scalar (see also operator=(const Cmp&) ).
Definition tenseur.C:824
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
Definition tenseur.C:636
const Tenseur & gradient() const
Returns the gradient of *this (Cartesian coordinates)
Definition tenseur.C:1542
void set_std_base()
Set the standard spectal basis of decomposition for each component.
Definition tenseur.C:1170
void set_etat_zero()
Sets the logical state to ETATZERO (zero state).
Definition tenseur.C:645
void change_triad(const Base_vect &new_triad)
Sets a new vectorial basis (triad) of decomposition and modifies the components accordingly.
Definition tenseur.C:668
void set_triad(const Base_vect &new_triad)
Assigns a new vectorial basis (triad) of decomposition.
Definition tenseur.C:674
Cmp exp(const Cmp &)
Exponential.
Definition cmp_math.C:270
Lorene prototypes.
Definition app_hor.h:64