LORENE
star_bhns_extr_curv.C
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 
29 
30 /*
31  * $Id: star_bhns_extr_curv.C,v 1.5 2016/12/05 16:18:16 j_novak Exp $
32  * $Log: star_bhns_extr_curv.C,v $
33  * Revision 1.5 2016/12/05 16:18:16 j_novak
34  * Suppression of some global variables (file names, loch, ...) to prevent redefinitions
35  *
36  * Revision 1.4 2014/10/13 08:53:40 j_novak
37  * Lorene classes and functions now belong to the namespace Lorene.
38  *
39  * Revision 1.3 2014/10/06 15:13:16 j_novak
40  * Modified #include directives to use c++ syntax.
41  *
42  * Revision 1.2 2008/05/15 19:14:24 k_taniguchi
43  * Change of some parameters.
44  *
45  * Revision 1.1 2007/06/22 01:31:05 k_taniguchi
46  * *** empty log message ***
47  *
48  *
49  * $Header: /cvsroot/Lorene/C++/Source/Star_bhns/star_bhns_extr_curv.C,v 1.5 2016/12/05 16:18:16 j_novak Exp $
50  *
51  */
52 
53 // C++ headers
54 //#include <>
55 
56 // C headers
57 #include <cmath>
58 
59 // Lorene headers
60 #include "star_bhns.h"
61 
62 namespace Lorene {
64 
65  // Computation of \tilde{A}_{NS}^{ij}
66  // ----------------------------------
67 
68  Scalar divshift(mp) ;
69  divshift = d_shift_auto(1,1) + d_shift_auto(2,2)
70  + d_shift_auto(3,3) ;
71  divshift.std_spectral_base() ;
72 
73  Sym_tensor flat_taij(mp, CON, mp.get_bvect_cart()) ;
74  flat_taij.set_etat_qcq() ;
75 
76  for (int i=1; i<=3; i++) {
77  for (int j=1; j<=3; j++) {
78  flat_taij.set(i,j) = d_shift_auto(i,j)
79  + d_shift_auto(j,i)
80  - 2. * divshift * flat.con()(i,j) / 3. ;
81  }
82  }
83  flat_taij.std_spectral_base() ;
84 
85  taij_auto = 0.5 * pow(confo_auto+0.5, 7.) * flat_taij
86  / (lapconf_auto+0.5) ;
88 
89 
90  // Computation of \tilde{A}_{NS}^{ij} \tilde{A}^{NS}_{ij}
91  // ------------------------------------------------------
92 
93  Sym_tensor flat_dshift(mp, COV, mp.get_bvect_cart()) ;
94  flat_dshift.set_etat_qcq() ;
95 
96  for (int i=1; i<=3; i++) {
97  for (int j=1; j<=3; j++) {
98  flat_dshift.set(i,j) =
99  flat.cov()(j,1) % d_shift_auto(i,1)
100  + flat.cov()(j,2) % d_shift_auto(i,2)
101  + flat.cov()(j,3) % d_shift_auto(i,3)
102  + flat.cov()(i,1) % d_shift_auto(j,1)
103  + flat.cov()(i,2) % d_shift_auto(j,2)
104  + flat.cov()(i,3) % d_shift_auto(j,3)
105  - 2. * divshift % flat.cov()(i,j) / 3. ;
106  }
107  }
108  flat_dshift.std_spectral_base() ;
109 
110  Sym_tensor taij_down(mp, COV, mp.get_bvect_cart()) ;
111  taij_down.set_etat_qcq() ;
112 
113  taij_down = 0.5 * pow(confo_auto+0.5, 7.) * flat_dshift
114  / (lapconf_auto+0.5) ;
115  taij_down.std_spectral_base() ;
116 
117  taij_quad_auto = 0. ;
118 
119  for (int i=1; i<=3; i++) {
120  for (int j=1; j<=3; j++) {
121  taij_quad_auto += taij_down(i,j) % taij_auto(i,j) ;
122  }
123  }
124 
126 
127 }
128 }
virtual void set_etat_qcq()
Sets the logical state of all components to ETATQCQ (ordinary state).
Definition: tensor.C:490
Map & mp
Mapping associated with the star.
Definition: star.h:180
Lorene prototypes.
Definition: app_hor.h:67
Tensor field of valence 0 (or component of a tensorial field).
Definition: scalar.h:393
virtual void std_spectral_base()
Sets the spectral bases of the Valeur va to the standard ones for a scalar field. ...
Definition: scalar.C:790
Tensor d_shift_auto
Derivative of the shift vector generated by the star .
Definition: star_bhns.h:149
void extr_curv_bhns()
Computes taij_auto , taij_quad_auto from shift_auto , lapse_auto , confo_auto .
Metric_flat flat
Flat metric defined on the mapping (Spherical components with respect to the mapping of the star )...
Definition: star_bhns.h:192
virtual const Sym_tensor & con() const
Read-only access to the contravariant representation.
Definition: metric_flat.C:156
Scalar taij_quad_auto
Part of the scalar generated by .
Definition: star_bhns.h:187
Cmp pow(const Cmp &, int)
Power .
Definition: cmp_math.C:351
Scalar lapconf_auto
Lapconf function generated by the star.
Definition: star_bhns.h:113
virtual const Sym_tensor & cov() const
Read-only access to the covariant representation.
Definition: metric_flat.C:137
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:803
Scalar confo_auto
Conformal factor generated by the star.
Definition: star_bhns.h:157
Sym_tensor taij_auto
Part of the extrinsic curvature tensor generated by shift_auto , lapse_auto , and confo_auto ...
Definition: star_bhns.h:182
virtual void std_spectral_base()
Sets the standard spectal bases of decomposition for each component.
Definition: tensor.C:935
Class intended to describe valence-2 symmetric tensors.
Definition: sym_tensor.h:226