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
61namespace 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
83 psi4.std_spectral_base() ;
84
85 // Factor $\Psi^2$
86 // ----------------
87
88 psi2 = sqrt( psi4 ) ;
89
90 psi2.std_spectral_base() ;
91
92 // Quantity $ln( \Psi )$
93 // ---------------------
94
95 ln_psi = 0.5*log( psi2 ) ;
96
97 ln_psi.std_spectral_base() ;
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
115 aa = ( beta.ope_killing_conf(flat) - hh.derive_lie(beta))
116 / ( 2*nn ) ;
117
118 taa = aa.up_down(tgamma) ;
119
120 aa_quad = contract(taa, 0, 1, aa, 0, 1) ;
121
122 aa_quad.std_spectral_base() ;
123
124
125 // The derived quantities are no longer up to date :
126 // ------------------------------------------------
127
128 del_deriv() ;
129
130}
131
132
133
134}
Sym_tensor_trans hh
is defined by .
virtual void del_deriv() const
Deletes all the derived quantities.
const Metric_flat & flat
flat metric (spherical components)
void update_metric()
Computes metric quantities from known potentials.
Scalar psi4
Conformal factor .
Scalar logn
Logarithm of the lapse N .
Definition star.h:222
Scalar nn
Lapse function N .
Definition star.h:225
Metric gamma
3-metric
Definition star.h:235
Vector beta
Shift vector.
Definition star.h:228
Cmp sqrt(const Cmp &)
Square root.
Definition cmp_math.C:223
Cmp exp(const Cmp &)
Exponential.
Definition cmp_math.C:273
Cmp log(const Cmp &)
Neperian logarithm.
Definition cmp_math.C:299
Tenseur contract(const Tenseur &, int id1, int id2)
Self contraction of two indices of a Tenseur .
Lorene prototypes.
Definition app_hor.h:67