| 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 { |
| 59 |
void Star_rot_Dirac::update_metric(){ |
| 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 |
|
| 80 |
psi4.std_spectral_base() ; |
| 81 |
|
| 82 |
// Factor $\Psi^2$ |
| 83 |
// ---------------- |
| 84 |
|
| 85 |
psi2 = sqrt( psi4 ) ; |
| 86 |
|
| 87 |
psi2.std_spectral_base() ; |
| 88 |
|
| 89 |
// Quantity $ln( \Psi )$ |
| 90 |
// --------------------- |
| 91 |
|
| 92 |
ln_psi = 0.5*log( psi2 ) ; |
| 93 |
|
| 94 |
ln_psi.std_spectral_base() ; |
| 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 |
|
| 112 |
aa = ( beta.ope_killing_conf(flat) - hh.derive_lie(beta)) |
| 113 |
/ ( 2*nn ) ; |
| 114 |
|
| 115 |
taa = aa.up_down(tgamma) ; |
| 116 |
|
| 117 |
aa_quad = contract(taa, 0, 1, aa, 0, 1) ; |
| 118 |
|
| 119 |
aa_quad.std_spectral_base() ; |
| 120 |
|
| 121 |
|
| 122 |
// The derived quantities are no longer up to date : |
| 123 |
// ------------------------------------------------ |
| 124 |
|
| 125 |
del_deriv() ; |
| 126 |
|
| 127 |
} |
| 128 |
|
| 129 |
|
| 130 |
|
| 131 |
} |