LORENE
et_bin_upmetr_der.C
1/*
2 * Methods Etoile_bin::update_metric_der_comp
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_der_C[] = "$Header: /cvsroot/Lorene/C++/Source/Etoile/et_bin_upmetr_der.C,v 1.7 2014/10/13 08:52:56 j_novak Exp $" ;
31
32/*
33 * $Id: et_bin_upmetr_der.C,v 1.7 2014/10/13 08:52:56 j_novak Exp $
34 * $Log: et_bin_upmetr_der.C,v $
35 * Revision 1.7 2014/10/13 08:52:56 j_novak
36 * Lorene classes and functions now belong to the namespace Lorene.
37 *
38 * Revision 1.6 2003/10/24 12:27:16 k_taniguchi
39 * Suppress the method of update metric for NS-BH
40 *
41 * Revision 1.5 2003/10/24 11:47:02 k_taniguchi
42 * Change some notations
43 *
44 * Revision 1.4 2002/12/19 14:53:38 e_gourgoulhon
45 * Added the new function
46 * void update_metric_der_comp(const Bhole& comp)
47 * to treat the case where the companion is a black hole
48 *
49 * Revision 1.3 2002/12/10 15:12:07 k_taniguchi
50 * Change the multiplication "*" to "%".
51 *
52 * Revision 1.2 2001/12/14 15:15:30 k_taniguchi
53 * Change of the method to calculate derivatives with respect to the companion star
54 *
55 * Revision 1.1.1.1 2001/11/20 15:19:28 e_gourgoulhon
56 * LORENE
57 *
58 * Revision 2.4 2000/03/13 14:03:38 eric
59 * Modif commentaires.
60 *
61 * Revision 2.3 2000/03/07 14:54:54 eric
62 * Ajout du calcul de akcar_comp.
63 *
64 * Revision 2.2 2000/03/07 08:34:04 eric
65 * Appel de Cmp::import_sym / asym (pour tenir compte de la symetrie /
66 * plan y=0).
67 *
68 * Revision 2.1 2000/02/10 18:56:38 eric
69 * Traitement du cas ETATZERO.
70 *
71 * Revision 2.0 2000/02/04 16:38:11 eric
72 * *** empty log message ***
73 *
74 *
75 * $Header: /cvsroot/Lorene/C++/Source/Etoile/et_bin_upmetr_der.C,v 1.7 2014/10/13 08:52:56 j_novak Exp $
76 *
77 */
78
79// Headers Lorene
80#include "etoile.h"
81#include "bhole.h"
82
83namespace Lorene {
85
86 // Computation of d_logn_comp
87 // --------------------------
88
89 if ( (comp.d_logn_auto).get_etat() == ETATZERO ) {
91 }
92 else{
94 }
95
97
98 // Computation of d_beta_comp
99 // --------------------------
100
101 if ( (comp.d_beta_auto).get_etat() == ETATZERO ) {
103 }
104 else {
106 }
107
109
110 // Computation of tkij_comp
111 // ------------------------
112
113 if ( (comp.tkij_auto).get_etat() == ETATZERO ) {
115 }
116 else{
117
118 // Components of shift_comp with respect to the Cartesian triad
119 // (d/dx, d/dy, d/dz) of the mapping :
120 Tenseur shift_comp_local = shift_comp ;
121 shift_comp_local.change_triad( mp.get_bvect_cart() ) ;
122
123 // Gradient (partial derivatives with respect to
124 // the Cartesian coordinates of the mapping)
125 // D_j N^i
126
127 Tenseur dn_comp = shift_comp_local.gradient() ;
128
129 // Return to the absolute reference frame
130 dn_comp.change_triad(ref_triad) ;
131
132 // Trace of D_j N^i = divergence of N^i :
133 Tenseur divn_comp = contract(dn_comp, 0, 1) ;
134
135 // Computation of A^2 K^{ij}
136 // -------------------------
138
139 for (int i=0; i<3; i++) {
140 for (int j=i; j<3; j++) {
141 tkij_comp.set(i, j) = dn_comp(i, j) + dn_comp(j, i) ;
142 }
143 tkij_comp.set(i, i) -= double(2)/double(3) * divn_comp() ;
144 }
145
146 tkij_comp = - 0.5 * tkij_comp / nnn ;
147
148 }
149
150 tkij_comp.set_triad( *((comp.tkij_auto).get_triad()) ) ;
152
153 if (relativistic) {
154 // Computation of akcar_comp
155 // -------------------------
156
158
159 akcar_comp.set() = 0 ;
160
161 for (int i=0; i<3; i++) {
162 for (int j=0; j<3; j++) {
163
164 akcar_comp.set() += tkij_auto(i, j) % tkij_comp(i, j) ;
165
166 }
167 }
168
171
172 }
173
174 // The derived quantities are obsolete
175 // -----------------------------------
176
177 del_deriv() ;
178
179
180 //-----------------------------------------------------
181 // The previous way to calculate d_logn_comp and so on
182 // which we do not use
183 //-----------------------------------------------------
184
185 //#################################
186 /*
187 int nz = mp.get_mg()->get_nzone() ;
188 int nzm1 = nz - 1 ;
189
190 // Computation of d_logn_comp
191 // --------------------------
192
193 if ( (comp.d_logn_auto).get_etat() == ETATZERO ) {
194 d_logn_comp.set_etat_zero() ;
195 }
196 else{
197
198 // 1/ Division by r^2 of comp.d_logn_auto in the ZEC
199 Tenseur vecttmp = comp.d_logn_auto ;
200 vecttmp.dec2_dzpuis() ;
201
202 // 2/ Interpolation of the result
203 //## OUTSIDE THE ZEC
204
205 d_logn_comp.set_etat_qcq() ;
206 (d_logn_comp.set(0)).import_symy(nzm1, vecttmp(0) ) ; // d/dx sym.
207 (d_logn_comp.set(1)).import_asymy(nzm1, vecttmp(1) ) ; // d/dy antisym.
208 (d_logn_comp.set(2)).import_symy(nzm1, vecttmp(2) ) ; // d/dz sym.
209
210 }
211
212 d_logn_comp.set_triad( *((comp.d_logn_auto).get_triad()) ) ;
213
214
215 // Computation of d_beta_comp
216 // --------------------------
217
218 if ( (comp.d_beta_auto).get_etat() == ETATZERO ) {
219 d_beta_comp.set_etat_zero() ;
220 }
221 else {
222 // 1/ Division by r^2 of comp.d_logn_auto in the ZEC
223 Tenseur vecttmp = comp.d_beta_auto ;
224 vecttmp.dec2_dzpuis() ;
225
226 // 2/ Interpolation of the result
227 //## OUTSIDE THE ZEC
228
229 d_beta_comp.set_etat_qcq() ;
230
231 (d_beta_comp.set(0)).import_symy(nzm1, vecttmp(0) ) ; // d/dx sym.
232 (d_beta_comp.set(1)).import_asymy(nzm1, vecttmp(1) ) ; // d/dy antisym.
233 (d_beta_comp.set(2)).import_symy(nzm1, vecttmp(2) ) ; // d/dz sym.
234
235 }
236
237 d_beta_comp.set_triad( *((comp.d_beta_auto).get_triad()) ) ;
238
239 // Computation of tkij_comp
240 // ------------------------
241
242 if ( (comp.tkij_auto).get_etat() == ETATZERO ) {
243 tkij_comp.set_etat_zero() ;
244 }
245 else{
246
247 // 1/ Division by r^2 of comp.d_logn_auto in the ZEC
248 Tenseur_sym tenstmp = comp.tkij_auto ;
249 tenstmp.dec2_dzpuis() ;
250
251 // 2/ Interpolation of the result
252 //## OUTSIDE THE ZEC
253
254 tkij_comp.set_etat_qcq() ;
255
256 (tkij_comp.set(0, 0)).import_asymy(nzm1, tenstmp(0, 0) ) ; // K_xx antisym
257 (tkij_comp.set(0, 1)).import_symy(nzm1, tenstmp(0, 1) ) ; // K_xy sym.
258 (tkij_comp.set(0, 2)).import_asymy(nzm1, tenstmp(0, 2) ) ; // K_xz antisym
259 (tkij_comp.set(1, 1)).import_asymy(nzm1, tenstmp(1, 1) ) ; // K_yy antisym.
260 (tkij_comp.set(1, 2)).import_symy(nzm1, tenstmp(1, 2) ) ; // K_yz sym
261 (tkij_comp.set(2, 2)).import_asymy(nzm1, tenstmp(2, 2) ) ; // K_zz antisym.
262
263 }
264
265 tkij_comp.set_triad( *((comp.tkij_auto).get_triad()) ) ;
266
267 if (relativistic) {
268 // Computation of akcar_comp
269 // -------------------------
270
271 akcar_comp.set_etat_qcq() ;
272
273 akcar_comp.set() = 0 ;
274
275 for (int i=0; i<3; i++) {
276 for (int j=0; j<3; j++) {
277
278 akcar_comp.set() += tkij_auto(i, j) * tkij_comp(i, j) ;
279
280 }
281 }
282
283 akcar_comp = a_car * akcar_comp ;
284 }
285
286
287 // The derived quantities are obsolete
288 // -----------------------------------
289
290 del_deriv() ;
291 */
292 //#################################
293
294}
295}
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
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
Tenseur akcar_comp
Part of the scalar generated by shift_auto and shift_comp , i.e.
Definition etoile.h:944
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
void update_metric_der_comp(const Etoile_bin &comp)
Computes the derivative of metric functions related to the companion star.
Tenseur logn_comp
Part of the lapse logarithm (gravitational potential at the Newtonian limit) generated principaly by ...
Definition etoile.h:854
Tenseur d_logn_comp
Gradient of logn_comp (Cartesian components with respect to ref_triad )
Definition etoile.h:869
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
Tenseur_sym tkij_auto
Part of the extrinsic curvature tensor generated by shift_auto .
Definition etoile.h:925
Tenseur_sym tkij_comp
Part of the extrinsic curvature tensor generated by shift_comp .
Definition etoile.h:932
Tenseur d_beta_comp
Gradient of beta_comp (Cartesian components with respect to ref_triad )
Definition etoile.h:884
Tenseur nnn
Total lapse function.
Definition etoile.h:509
Map & mp
Mapping associated with the star.
Definition etoile.h:429
bool relativistic
Indicator of relativity: true for a relativistic star, false for a Newtonian one.
Definition etoile.h:437
Tenseur a_car
Total conformal factor .
Definition etoile.h:515
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
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
Tenseur contract(const Tenseur &, int id1, int id2)
Self contraction of two indices of a Tenseur .
Lorene prototypes.
Definition app_hor.h:64