LORENE
strot_dirac_upmetr.C
1 /*
2  * Function Star_rot_Dirac::update_metric
3  *
4  * (see file star_rot_dirac.h for documentation).
5  *
6  */
7 
8 /*
9  * Copyright (c) 2005 Lap-Ming Lin & Jerome Novak
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: strot_dirac_upmetr.C,v 1.5 2016/12/05 16:18:16 j_novak Exp $
32  * $Log: strot_dirac_upmetr.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 2005/03/25 13:47:26 j_novak
40  * Added the update of log(Q).
41  *
42  * Revision 1.2 2005/02/17 17:30:55 f_limousin
43  * Change the name of some quantities to be consistent with other classes
44  * (for instance nnn is changed to nn, shift to beta, beta to lnq...)
45  *
46  * Revision 1.1 2005/01/31 08:51:48 j_novak
47  * New files for rotating stars in Dirac gauge (still under developement).
48  *
49  *
50  * $Header: /cvsroot/Lorene/C++/Source/Star/strot_dirac_upmetr.C,v 1.5 2016/12/05 16:18:16 j_novak Exp $
51  *
52  */
53 
54 
55 // Lorene headers
56 #include "star_rot_dirac.h"
57 
58 #include "utilitaires.h"
59 #include "unites.h"
60 
61 namespace Lorene {
63 
64  // Lapse function
65  // ---------------
66 
67  nn = exp( logn ) ;
68 
69  nn.std_spectral_base() ; // set the bases for spectral expansions
70 
71 
72  // Quantity log(Q)
73  //----------------
74 
75  lnq = log(qqq) ;
76  lnq.std_spectral_base() ;
77 
78  // Comformal factor $\Psi^4$
79  // -------------------------
80 
81  psi4 = (qqq * qqq) / (nn * nn) ;
82 
84 
85  // Factor $\Psi^2$
86  // ----------------
87 
88  psi2 = sqrt( psi4 ) ;
89 
91 
92  // Quantity $ln( \Psi )$
93  // ---------------------
94 
95  ln_psi = 0.5*log( psi2 ) ;
96 
98 
99  // Conformal metric $\tilde{\gamma}$
100  // --------------------------------------
101 
102  tgamma = flat.con() + hh ; // contravariant representation
103  // $\tilde{\gamma}^{ij}$
104 
105  // Physical metric $\gamma$
106  // -----------------------------
107 
108  gamma = tgamma.con() / psi4 ; // contravariant representation
109  // $\gamma^{ij}$
110 
111 
112  // Quantities $A^{ij}$, $\tilde{A}_{ij}, and $\tilde{A}_{ij} A^{ij}$
113  // -----------------------------------------------------------------
114 
116  / ( 2*nn ) ;
117 
118  taa = aa.up_down(tgamma) ;
119 
120  aa_quad = contract(taa, 0, 1, aa, 0, 1) ;
121 
123 
124 
125  // The derived quantities are no longer up to date :
126  // ------------------------------------------------
127 
128  del_deriv() ;
129 
130 }
131 
132 
133 
134 }
Cmp log(const Cmp &)
Neperian logarithm.
Definition: cmp_math.C:299
virtual const Sym_tensor & con() const
Read-only access to the contravariant representation.
Definition: metric.C:293
Cmp exp(const Cmp &)
Exponential.
Definition: cmp_math.C:273
Cmp sqrt(const Cmp &)
Square root.
Definition: cmp_math.C:223
Metric gamma
3-metric
Definition: star.h:235
Lorene prototypes.
Definition: app_hor.h:67
Sym_tensor_trans hh
is defined by .
Tensor up_down(const Metric &gam) const
Computes a new tensor by raising or lowering all the indices of *this .
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
virtual void del_deriv() const
Deletes all the derived quantities.
Vector beta
Shift vector.
Definition: star.h:228
void update_metric()
Computes metric quantities from known potentials.
Sym_tensor ope_killing_conf(const Metric &gam) const
Computes the conformal Killing operator associated with a given metric.
Definition: vector.C:465
Scalar psi4
Conformal factor .
virtual const Sym_tensor & con() const
Read-only access to the contravariant representation.
Definition: metric_flat.C:156
Tenseur contract(const Tenseur &, int id1, int id2)
Self contraction of two indices of a Tenseur .
Scalar logn
Logarithm of the lapse N .
Definition: star.h:222
Scalar nn
Lapse function N .
Definition: star.h:225
const Metric_flat & flat
flat metric (spherical components)
Sym_tensor derive_lie(const Vector &v) const
Computes the Lie derivative of this with respect to some vector field v.
Definition: sym_tensor.C:363