LORENE
strot_dirac_solveshift.C
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 }
const Tensor_sym & get_delta() const
Returns the tensor which defines the connection with respect to the flat one: is the difference bet...
Definition: connection.h:271
const Metric_flat & flat_met_spher() const
Returns the flat metric associated with the spherical coordinates and with components expressed in th...
Definition: map.C:321
Flat metric for tensor calculation.
Definition: metric.h:261
virtual const Connection & connect() const
Returns the connection.
Definition: metric.C:301
const Vector & derive_cov(const Metric &gam) const
Returns the gradient (1-form = covariant vector) of *this
Definition: scalar_deriv.C:390
void set_dzpuis(int)
Modifies the dzpuis flag.
Definition: scalar.C:808
Sym_tensor_trans hh
is defined by .
Vector j_euler
Momentum density 3-vector with respect to the Eulerian observer.
Scalar psi4
Conformal factor .
void solve_shift(Vector &shift_new) const
Solution of the shift equation for rotating stars in Dirac gauge.
Scalar nn
Lapse function N .
Definition: star.h:225
Map & mp
Mapping associated with the star.
Definition: star.h:180
Vector beta
Shift vector.
Definition: star.h:228
Divergence-free vectors.
Definition: vector.h:724
Vector_divfree poisson() const
Computes the solution of a vectorial Poisson equation with *this as a source:
Tensor field of valence 1.
Definition: vector.h:188
const Scalar & divergence(const Metric &) const
The divergence of this with respect to a Metric .
Definition: vector.C:381
const Vector_divfree & div_free(const Metric &) const
Returns the div-free vector in the Helmholtz decomposition.
Definition: vector.C:504
Scalar & set(int)
Read/write access to a component.
Definition: vector.C:296
const Tensor & derive_cov(const Metric &gam) const
Returns the covariant derivative of this with respect to some metric .
Definition: tensor.C:1002
Tenseur contract(const Tenseur &, int id1, int id2)
Self contraction of two indices of a Tenseur .
Lorene prototypes.
Definition: app_hor.h:64
Standard units of space, time and mass.