Debian Codegraph @

C++/Source/Etoile/et_bin_extr_curv.C

raw
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 {
64 void Etoile_bin::extrinsic_curvature(){
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 // -----------------------------------------
86 tkij_auto.set_etat_qcq() ;
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
96 tkij_auto.set_std_base() ;
97
98 // Computation of A^2 K_{ij} K^{ij}
99 // --------------------------------
100
101 akcar_auto.set_etat_qcq() ;
102
103 akcar_auto.set() = 0 ;
104
105 akcar_auto.set_std_base() ;
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
115 akcar_auto.set_std_base() ;
116 akcar_auto = a_car % akcar_auto ;
117
118
119 }
120
121 }