Debian Codegraph @

C++/Source/Star_bhns/star_bhns_extr_curv.C

raw
1 /*
2 * Method of class Star_bhns to compute the extrinsic curvature tensor
3 *
4 * (see file star_bhns.h for documentation).
5 *
6 */
7
8 /*
9 * Copyright (c) 2005-2007 Keisuke Taniguchi
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 version 2
15 * as published by the Free Software Foundation.
16 *
17 * LORENE is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with LORENE; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 *
26 */
27
28 char star_bhns_extr_curv_C[] = "$Header: /cvsroot/Lorene/C++/Source/Star_bhns/star_bhns_extr_curv.C,v 1.4 2014/10/13 08:53:40 j_novak Exp $" ;
29
30 /*
31 * $Id: star_bhns_extr_curv.C,v 1.4 2014/10/13 08:53:40 j_novak Exp $
32 * $Log: star_bhns_extr_curv.C,v $
33 * Revision 1.4 2014/10/13 08:53:40 j_novak
34 * Lorene classes and functions now belong to the namespace Lorene.
35 *
36 * Revision 1.3 2014/10/06 15:13:16 j_novak
37 * Modified #include directives to use c++ syntax.
38 *
39 * Revision 1.2 2008/05/15 19:14:24 k_taniguchi
40 * Change of some parameters.
41 *
42 * Revision 1.1 2007/06/22 01:31:05 k_taniguchi
43 * *** empty log message ***
44 *
45 *
46 * $Header: /cvsroot/Lorene/C++/Source/Star_bhns/star_bhns_extr_curv.C,v 1.4 2014/10/13 08:53:40 j_novak Exp $
47 *
48 */
49
50 // C++ headers
51 //#include <>
52
53 // C headers
54 #include <cmath>
55
56 // Lorene headers
57 #include "star_bhns.h"
58
59 namespace Lorene {
60 void Star_bhns::extr_curv_bhns() {
61
62 // Computation of \tilde{A}_{NS}^{ij}
63 // ----------------------------------
64
65 Scalar divshift(mp) ;
66 divshift = d_shift_auto(1,1) + d_shift_auto(2,2)
67 + d_shift_auto(3,3) ;
68 divshift.std_spectral_base() ;
69
70 Sym_tensor flat_taij(mp, CON, mp.get_bvect_cart()) ;
71 flat_taij.set_etat_qcq() ;
72
73 for (int i=1; i<=3; i++) {
74 for (int j=1; j<=3; j++) {
75 flat_taij.set(i,j) = d_shift_auto(i,j)
76 + d_shift_auto(j,i)
77 - 2. * divshift * flat.con()(i,j) / 3. ;
78 }
79 }
80 flat_taij.std_spectral_base() ;
81
82 taij_auto = 0.5 * pow(confo_auto+0.5, 7.) * flat_taij
83 / (lapconf_auto+0.5) ;
84 taij_auto.std_spectral_base() ;
85
86
87 // Computation of \tilde{A}_{NS}^{ij} \tilde{A}^{NS}_{ij}
88 // ------------------------------------------------------
89
90 Sym_tensor flat_dshift(mp, COV, mp.get_bvect_cart()) ;
91 flat_dshift.set_etat_qcq() ;
92
93 for (int i=1; i<=3; i++) {
94 for (int j=1; j<=3; j++) {
95 flat_dshift.set(i,j) =
96 flat.cov()(j,1) % d_shift_auto(i,1)
97 + flat.cov()(j,2) % d_shift_auto(i,2)
98 + flat.cov()(j,3) % d_shift_auto(i,3)
99 + flat.cov()(i,1) % d_shift_auto(j,1)
100 + flat.cov()(i,2) % d_shift_auto(j,2)
101 + flat.cov()(i,3) % d_shift_auto(j,3)
102 - 2. * divshift % flat.cov()(i,j) / 3. ;
103 }
104 }
105 flat_dshift.std_spectral_base() ;
106
107 Sym_tensor taij_down(mp, COV, mp.get_bvect_cart()) ;
108 taij_down.set_etat_qcq() ;
109
110 taij_down = 0.5 * pow(confo_auto+0.5, 7.) * flat_dshift
111 / (lapconf_auto+0.5) ;
112 taij_down.std_spectral_base() ;
113
114 taij_quad_auto = 0. ;
115
116 for (int i=1; i<=3; i++) {
117 for (int j=1; j<=3; j++) {
118 taij_quad_auto += taij_down(i,j) % taij_auto(i,j) ;
119 }
120 }
121
122 taij_quad_auto.std_spectral_base() ;
123
124 }
125 }