LORENE
et_bin_extr_curv.C
1 /*
2  * Method of class Etoile_bin to compute the extrinsic curvature tensor
3  *
4  */
5 
6 /*
7  * Copyright (c) 2000-2001 Eric Gourgoulhon
8  *
9  * This file is part of LORENE.
10  *
11  * LORENE is free software; you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License as published by
13  * the Free Software Foundation; either version 2 of the License, or
14  * (at your option) any later version.
15  *
16  * LORENE is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with LORENE; if not, write to the Free Software
23  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24  *
25  */
26 
27 
28 
29 
30 /*
31  * $Id: et_bin_extr_curv.C,v 1.7 2016/12/05 16:17:52 j_novak Exp $
32  * $Log: et_bin_extr_curv.C,v $
33  * Revision 1.7 2016/12/05 16:17:52 j_novak
34  * Suppression of some global variables (file names, loch, ...) to prevent redefinitions
35  *
36  * Revision 1.6 2014/10/13 08:52:55 j_novak
37  * Lorene classes and functions now belong to the namespace Lorene.
38  *
39  * Revision 1.5 2005/08/29 15:21:37 p_grandclement
40  * Suppression of Etoile_bion::fait_taij_auto, that was not used (I think)
41  *
42  * Revision 1.4 2003/02/13 16:40:25 p_grandclement
43  * Addition of various things for the Bin_ns_bh project, non of them being
44  * completely tested
45  *
46  * Revision 1.3 2003/01/17 13:33:35 f_limousin
47  * Add comments
48  *
49  * Revision 1.2 2002/12/10 14:20:43 k_taniguchi
50  * Change the multiplication "*" to "%".
51  *
52  * Revision 1.1.1.1 2001/11/20 15:19:28 e_gourgoulhon
53  * LORENE
54  *
55  * Revision 2.0 2000/03/07 14:51:49 eric
56  * *** empty log message ***
57  *
58  *
59  * $Header: /cvsroot/Lorene/C++/Source/Etoile/et_bin_extr_curv.C,v 1.7 2016/12/05 16:17:52 j_novak Exp $
60  *
61  */
62 
63 // Headers Lorene
64 #include "etoile.h"
65 
66 namespace Lorene {
68 
69  // Components of shift_auto with respect to the Cartesian triad
70  // (d/dx, d/dy, d/dz) of the mapping :
71  Tenseur shift_auto_local = shift_auto ;
72  shift_auto_local.change_triad( mp.get_bvect_cart() ) ;
73 
74  // Gradient (partial derivatives with respect to the Cartesian coordinates
75  // of the mapping)
76  // D_j N^i
77 
78  Tenseur dn = shift_auto_local.gradient() ;
79 
80  // Return to the absolute reference frame
81  dn.change_triad(ref_triad) ;
82 
83  // Trace of D_j N^i = divergence of N^i :
84  Tenseur divn = contract(dn, 0, 1) ;
85 
86  // Computation of A^2 K^{ij}
87  // See Eq (49) from Gourgoulhon et al. (2001)
88  // -----------------------------------------
90  for (int i=0; i<3; i++) {
91  for (int j=i; j<3; j++) {
92  tkij_auto.set(i, j) = dn(i, j) + dn(j, i) ;
93  }
94  tkij_auto.set(i, i) -= double(2) /double(3) * divn() ;
95  }
96 
97  tkij_auto = - 0.5 * tkij_auto / nnn ;
98 
100 
101  // Computation of A^2 K_{ij} K^{ij}
102  // --------------------------------
103 
105 
106  akcar_auto.set() = 0 ;
107 
109 
110  for (int i=0; i<3; i++) {
111  for (int j=0; j<3; j++) {
112 
113  akcar_auto.set() += tkij_auto(i, j) % tkij_auto(i, j) ;
114 
115  }
116  }
117 
120 
121 
122 }
123 
124 }
const Base_vect & ref_triad
Reference triad ("absolute frame"), with respect to which the components of all the member Tenseur &#39;s...
Definition: etoile.h:831
void set_std_base()
Set the standard spectal basis of decomposition for each component.
Definition: tenseur.C:1186
Lorene prototypes.
Definition: app_hor.h:67
Tenseur nnn
Total lapse function.
Definition: etoile.h:512
virtual void extrinsic_curvature()
Computes tkij_auto and akcar_auto from shift_auto , nnn and a_car .
Tenseur shift_auto
Part of the shift vector generated principaly by the star.
Definition: etoile.h:892
Cmp & set()
Read/write for a scalar (see also operator=(const Cmp&) ).
Definition: tenseur.C:840
void change_triad(const Base_vect &new_triad)
Sets a new vectorial basis (triad) of decomposition and modifies the components accordingly.
Definition: tenseur.C:684
Map & mp
Mapping associated with the star.
Definition: etoile.h:432
Tenseur contract(const Tenseur &, int id1, int id2)
Self contraction of two indices of a Tenseur .
Tenseur_sym tkij_auto
Part of the extrinsic curvature tensor generated by shift_auto .
Definition: etoile.h:928
Tenseur a_car
Total conformal factor .
Definition: etoile.h:518
const Base_vect_cart & get_bvect_cart() const
Returns the Cartesian basis associated with the coordinates (x,y,z) of the mapping, i.e.
Definition: map.h:809
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
Definition: tenseur.C:652
Tenseur akcar_auto
Part of the scalar generated by shift_auto , i.e.
Definition: etoile.h:941
Tensor handling *** DEPRECATED : use class Tensor instead ***.
Definition: tenseur.h:304
const Tenseur & gradient() const
Returns the gradient of *this (Cartesian coordinates)
Definition: tenseur.C:1558