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.6 2023/12/20 10:16:19 j_novak Exp $
32  * $Log: strot_dirac_upmetr.C,v $
33  * Revision 1.6 2023/12/20 10:16:19 j_novak
34  * New options in Star_rot_Dirac/rotstar_dirac: a flag to choose between GR, CFC and CFC+ A^{ij}_{TT}=0 (as described n Cordero_Carrion et al. 2009).
35  *
36  * Revision 1.5 2016/12/05 16:18:16 j_novak
37  * Suppression of some global variables (file names, loch, ...) to prevent redefinitions
38  *
39  * Revision 1.4 2014/10/13 08:53:40 j_novak
40  * Lorene classes and functions now belong to the namespace Lorene.
41  *
42  * Revision 1.3 2005/03/25 13:47:26 j_novak
43  * Added the update of log(Q).
44  *
45  * Revision 1.2 2005/02/17 17:30:55 f_limousin
46  * Change the name of some quantities to be consistent with other classes
47  * (for instance nnn is changed to nn, shift to beta, beta to lnq...)
48  *
49  * Revision 1.1 2005/01/31 08:51:48 j_novak
50  * New files for rotating stars in Dirac gauge (still under developement).
51  *
52  *
53  * $Header: /cvsroot/Lorene/C++/Source/Star/strot_dirac_upmetr.C,v 1.6 2023/12/20 10:16:19 j_novak Exp $
54  *
55  */
56 
57 
58 // Lorene headers
59 #include "star_rot_dirac.h"
60 
61 #include "utilitaires.h"
62 #include "unites.h"
63 
64 namespace Lorene {
66 
67  // Lapse function
68  // ---------------
69 
70  nn = exp( logn ) ;
71 
72  nn.std_spectral_base() ; // set the bases for spectral expansions
73 
74 
75  // Quantity log(Q)
76  //----------------
77 
78  lnq = log(qqq) ;
79  lnq.std_spectral_base() ;
80 
81  // Comformal factor $\Psi^4$
82  // -------------------------
83 
84  psi4 = (qqq * qqq) / (nn * nn) ;
85 
87 
88  // Factor $\Psi^2$
89  // ----------------
90 
91  psi2 = sqrt( psi4 ) ;
92 
94 
95  // Quantity $ln( \Psi )$
96  // ---------------------
97 
98  ln_psi = 0.5*log( psi2 ) ;
99 
101 
102  // Conformal metric $\tilde{\gamma}$
103  // --------------------------------------
104 
105  tgamma = flat.con() + hh ; // contravariant representation
106  // $\tilde{\gamma}^{ij}$
107 
108  // Physical metric $\gamma$
109  // -----------------------------
110 
111  gamma = tgamma.con() / psi4 ; // contravariant representation
112  // $\gamma^{ij}$
113 
114 
115  // Quantities $A^{ij}$, $\tilde{A}_{ij}, and $\tilde{A}_{ij} A^{ij}$
116  // -----------------------------------------------------------------
117 
119  / ( 2*nn ) ;
120 
121  if (relat_type == 3) {
122  // Computation of \hat{A}^{ij}
123  Sym_tensor aa_tmp = psi4*psi2*aa ; // \hat{A}^{ij} = \psi^6 A^{ij}
124  aa_tmp.inc_dzpuis() ;
125 
126  // We take only the longitudinal part to set \hat{A}^{ij}_{TT} = 0
127  Vector xi = aa_tmp.longit_pot(flat) ;
128  aa = xi.ope_killing_conf(flat)/(psi4*psi2) ;
129  }
130  taa = aa.up_down(tgamma) ;
131 
132  aa_quad = contract(taa, 0, 1, aa, 0, 1) ;
133 
135 
136 
137  // The derived quantities are no longer up to date :
138  // ------------------------------------------------
139 
140  del_deriv() ;
141 
142 }
143 
144 
145 
146 }
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 .
int relat_type
Relativistic flag.
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
Tensor field of valence 1.
Definition: vector.h:188
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:468
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
virtual void inc_dzpuis(int inc=1)
Increases by inc units the value of dzpuis and changes accordingly the values in the compactified ext...
Definition: tensor.C:825
Scalar nn
Lapse function N .
Definition: star.h:225
const Vector & longit_pot(const Metric &gam, Param *par=0x0, int method_poisson=6) const
Computes the vector potential of longitudinal part of the tensor (see documentation of method transv...
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
Class intended to describe valence-2 symmetric tensors.
Definition: sym_tensor.h:226