| 1 |
/* |
| 2 |
* Solution of the shift equation for rotating stars |
| 3 |
* in Dirac gauge. |
| 4 |
* |
| 5 |
* (see file star_rot_dirac.h for documentation). |
| 6 |
* |
| 7 |
*/ |
| 8 |
|
| 9 |
/* |
| 10 |
* Copyright (c) 2005 Lap-Ming Lin & Jerome Novak |
| 11 |
* |
| 12 |
* This file is part of LORENE. |
| 13 |
* |
| 14 |
* LORENE is free software; you can redistribute it and/or modify |
| 15 |
* it under the terms of the GNU General Public License version 2 |
| 16 |
* as published by the Free Software Foundation. |
| 17 |
* |
| 18 |
* LORENE is distributed in the hope that it will be useful, |
| 19 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 20 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 21 |
* GNU General Public License for more details. |
| 22 |
* |
| 23 |
* You should have received a copy of the GNU General Public License |
| 24 |
* along with LORENE; if not, write to the Free Software |
| 25 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 26 |
* |
| 27 |
*/ |
| 28 |
|
| 29 |
char strot_dirac_solveshift_C[] = "$Header: /cvsroot/Lorene/C++/Source/Star/strot_dirac_solveshift.C,v 1.3 2014/10/13 08:53:40 j_novak Exp $" ; |
| 30 |
|
| 31 |
/* |
| 32 |
* $Id: strot_dirac_solveshift.C,v 1.3 2014/10/13 08:53:40 j_novak Exp $ |
| 33 |
* $Log: strot_dirac_solveshift.C,v $ |
| 34 |
* Revision 1.3 2014/10/13 08:53:40 j_novak |
| 35 |
* Lorene classes and functions now belong to the namespace Lorene. |
| 36 |
* |
| 37 |
* Revision 1.2 2005/02/17 17:31:12 f_limousin |
| 38 |
* Change the name of some quantities to be consistent with other classes |
| 39 |
* (for instance nnn is changed to nn, shift to beta, beta to lnq...) |
| 40 |
* |
| 41 |
* Revision 1.1 2005/01/31 08:51:48 j_novak |
| 42 |
* New files for rotating stars in Dirac gauge (still under developement). |
| 43 |
* |
| 44 |
* |
| 45 |
* $Header: /cvsroot/Lorene/C++/Source/Star/strot_dirac_solveshift.C,v 1.3 2014/10/13 08:53:40 j_novak Exp $ |
| 46 |
* |
| 47 |
*/ |
| 48 |
|
| 49 |
// Lorene headers |
| 50 |
#include "star_rot_dirac.h" |
| 51 |
#include "unites.h" |
| 52 |
|
| 53 |
namespace Lorene { |
| 54 |
void Star_rot_Dirac::solve_shift(Vector& beta_new) const { |
| 55 |
|
| 56 |
using namespace Unites ; |
| 57 |
|
| 58 |
const Metric_flat& mets = mp.flat_met_spher() ; |
| 59 |
|
| 60 |
const Vector& dln_psi = ln_psi.derive_cov(mets) ; // D_i ln(Psi) |
| 61 |
const Vector& dnn = nn.derive_cov(mets) ; // D_i N |
| 62 |
|
| 63 |
Vector source_beta = 2.* contract(aa, 1, |
| 64 |
dnn - 6.*nn * dln_psi, 0) ; |
| 65 |
|
| 66 |
source_beta += 2.* nn * ( 2.*qpig* psi4 * j_euler |
| 67 |
- contract(tgamma.connect().get_delta(), 1, 2, |
| 68 |
aa, 0, 1) ) ; |
| 69 |
|
| 70 |
Vector vtmp = contract(hh, 0, 1, |
| 71 |
beta.derive_cov(mets).derive_cov(mets), 1, 2) |
| 72 |
+ 0.3333333333333333* |
| 73 |
contract(hh, 1, beta.divergence(mets).derive_cov(mets), 0) ; |
| 74 |
vtmp.inc_dzpuis() ; // dzpuis: 3 -> 4 |
| 75 |
|
| 76 |
source_beta -= vtmp ; |
| 77 |
source_beta.set(1).set_dzpuis(4) ; //## these components are null |
| 78 |
source_beta.set(2).set_dzpuis(4) ; //## in axial symmetry |
| 79 |
|
| 80 |
Vector_divfree sou_beta_df = source_beta.div_free(mets) ; |
| 81 |
|
| 82 |
beta_new = sou_beta_df.poisson() ; |
| 83 |
beta_new.set(1) = 0 ; //## these components are null |
| 84 |
|
| 85 |
beta_new.set(2) = 0 ; //## in axial symmetry |
| 86 |
|
| 87 |
|
| 88 |
|
| 89 |
} |
| 90 |
} |