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 char strot_dirac_upmetr_C[] = "$Header: /cvsroot/Lorene/C++/Source/Star/strot_dirac_upmetr.C,v 1.4 2014/10/13 08:53:40 j_novak Exp $" ;
29 
30 /*
31  * $Id: strot_dirac_upmetr.C,v 1.4 2014/10/13 08:53:40 j_novak Exp $
32  * $Log: strot_dirac_upmetr.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 2005/03/25 13:47:26 j_novak
37  * Added the update of log(Q).
38  *
39  * Revision 1.2 2005/02/17 17:30:55 f_limousin
40  * Change the name of some quantities to be consistent with other classes
41  * (for instance nnn is changed to nn, shift to beta, beta to lnq...)
42  *
43  * Revision 1.1 2005/01/31 08:51:48 j_novak
44  * New files for rotating stars in Dirac gauge (still under developement).
45  *
46  *
47  * $Header: /cvsroot/Lorene/C++/Source/Star/strot_dirac_upmetr.C,v 1.4 2014/10/13 08:53:40 j_novak Exp $
48  *
49  */
50 
51 
52 // Lorene headers
53 #include "star_rot_dirac.h"
54 
55 #include "utilitaires.h"
56 #include "unites.h"
57 
58 namespace Lorene {
60 
61  // Lapse function
62  // ---------------
63 
64  nn = exp( logn ) ;
65 
66  nn.std_spectral_base() ; // set the bases for spectral expansions
67 
68 
69  // Quantity log(Q)
70  //----------------
71 
72  lnq = log(qqq) ;
73  lnq.std_spectral_base() ;
74 
75  // Comformal factor $\Psi^4$
76  // -------------------------
77 
78  psi4 = (qqq * qqq) / (nn * nn) ;
79 
81 
82  // Factor $\Psi^2$
83  // ----------------
84 
85  psi2 = sqrt( psi4 ) ;
86 
88 
89  // Quantity $ln( \Psi )$
90  // ---------------------
91 
92  ln_psi = 0.5*log( psi2 ) ;
93 
95 
96  // Conformal metric $\tilde{\gamma}$
97  // --------------------------------------
98 
99  tgamma = flat.con() + hh ; // contravariant representation
100  // $\tilde{\gamma}^{ij}$
101 
102  // Physical metric $\gamma$
103  // -----------------------------
104 
105  gamma = tgamma.con() / psi4 ; // contravariant representation
106  // $\gamma^{ij}$
107 
108 
109  // Quantities $A^{ij}$, $\tilde{A}_{ij}, and $\tilde{A}_{ij} A^{ij}$
110  // -----------------------------------------------------------------
111 
113  / ( 2*nn ) ;
114 
115  taa = aa.up_down(tgamma) ;
116 
117  aa_quad = contract(taa, 0, 1, aa, 0, 1) ;
118 
120 
121 
122  // The derived quantities are no longer up to date :
123  // ------------------------------------------------
124 
125  del_deriv() ;
126 
127 }
128 
129 
130 
131 }
Cmp log(const Cmp &)
Neperian logarithm.
Definition: cmp_math.C:296
virtual const Sym_tensor & con() const
Read-only access to the contravariant representation.
Definition: metric.C:290
Cmp exp(const Cmp &)
Exponential.
Definition: cmp_math.C:270
Cmp sqrt(const Cmp &)
Square root.
Definition: cmp_math.C:220
Metric gamma
3-metric
Definition: star.h:235
Lorene prototypes.
Definition: app_hor.h:64
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:784
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:462
Scalar psi4
Conformal factor .
virtual const Sym_tensor & con() const
Read-only access to the contravariant representation.
Definition: metric_flat.C:153
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:360