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 char et_bin_extr_curv_C[] = "$Header: /cvsroot/Lorene/C++/Source/Etoile/et_bin_extr_curv.C,v 1.6 2014/10/13 08:52:55 j_novak Exp $" ;
29 
30 /*
31  * $Id: et_bin_extr_curv.C,v 1.6 2014/10/13 08:52:55 j_novak Exp $
32  * $Log: et_bin_extr_curv.C,v $
33  * Revision 1.6 2014/10/13 08:52:55 j_novak
34  * Lorene classes and functions now belong to the namespace Lorene.
35  *
36  * Revision 1.5 2005/08/29 15:21:37 p_grandclement
37  * Suppression of Etoile_bion::fait_taij_auto, that was not used (I think)
38  *
39  * Revision 1.4 2003/02/13 16:40:25 p_grandclement
40  * Addition of various things for the Bin_ns_bh project, non of them being
41  * completely tested
42  *
43  * Revision 1.3 2003/01/17 13:33:35 f_limousin
44  * Add comments
45  *
46  * Revision 1.2 2002/12/10 14:20:43 k_taniguchi
47  * Change the multiplication "*" to "%".
48  *
49  * Revision 1.1.1.1 2001/11/20 15:19:28 e_gourgoulhon
50  * LORENE
51  *
52  * Revision 2.0 2000/03/07 14:51:49 eric
53  * *** empty log message ***
54  *
55  *
56  * $Header: /cvsroot/Lorene/C++/Source/Etoile/et_bin_extr_curv.C,v 1.6 2014/10/13 08:52:55 j_novak Exp $
57  *
58  */
59 
60 // Headers Lorene
61 #include "etoile.h"
62 
63 namespace Lorene {
65 
66  // Components of shift_auto with respect to the Cartesian triad
67  // (d/dx, d/dy, d/dz) of the mapping :
68  Tenseur shift_auto_local = shift_auto ;
69  shift_auto_local.change_triad( mp.get_bvect_cart() ) ;
70 
71  // Gradient (partial derivatives with respect to the Cartesian coordinates
72  // of the mapping)
73  // D_j N^i
74 
75  Tenseur dn = shift_auto_local.gradient() ;
76 
77  // Return to the absolute reference frame
78  dn.change_triad(ref_triad) ;
79 
80  // Trace of D_j N^i = divergence of N^i :
81  Tenseur divn = contract(dn, 0, 1) ;
82 
83  // Computation of A^2 K^{ij}
84  // See Eq (49) from Gourgoulhon et al. (2001)
85  // -----------------------------------------
87  for (int i=0; i<3; i++) {
88  for (int j=i; j<3; j++) {
89  tkij_auto.set(i, j) = dn(i, j) + dn(j, i) ;
90  }
91  tkij_auto.set(i, i) -= double(2) /double(3) * divn() ;
92  }
93 
94  tkij_auto = - 0.5 * tkij_auto / nnn ;
95 
97 
98  // Computation of A^2 K_{ij} K^{ij}
99  // --------------------------------
100 
102 
103  akcar_auto.set() = 0 ;
104 
106 
107  for (int i=0; i<3; i++) {
108  for (int j=0; j<3; j++) {
109 
110  akcar_auto.set() += tkij_auto(i, j) % tkij_auto(i, j) ;
111 
112  }
113  }
114 
117 
118 
119 }
120 
121 }
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:828
void set_std_base()
Set the standard spectal basis of decomposition for each component.
Definition: tenseur.C:1170
Lorene prototypes.
Definition: app_hor.h:64
Tenseur nnn
Total lapse function.
Definition: etoile.h:509
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:889
Cmp & set()
Read/write for a scalar (see also operator=(const Cmp&) ).
Definition: tenseur.C:824
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
Map & mp
Mapping associated with the star.
Definition: etoile.h:429
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:925
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, i.e.
Definition: map.h:791
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
Definition: tenseur.C:636
Tenseur akcar_auto
Part of the scalar generated by shift_auto , i.e.
Definition: etoile.h:938
Tensor handling *** DEPRECATED : use class Tensor instead ***.
Definition: tenseur.h:301
const Tenseur & gradient() const
Returns the gradient of *this (Cartesian coordinates)
Definition: tenseur.C:1542