LORENE
et_bin_nsbh_upmetr.C
1 /*
2  * Methods Et_bin_nsbh::update_metric
3  *
4  * (see file et_bin_nsbh.h for documentation).
5  *
6  */
7 
8 /*
9  * Copyright (c) 2003 Philippe Grandclement
10  * 2003 Keisuke Taniguchi
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 et_bin_nsbh_upmetr_C[] = "$Header: /cvsroot/Lorene/C++/Source/Etoile/et_bin_nsbh_upmetr.C,v 1.4 2014/10/13 08:52:56 j_novak Exp $" ;
30 
31 /*
32  * $Id: et_bin_nsbh_upmetr.C,v 1.4 2014/10/13 08:52:56 j_novak Exp $
33  * $Log: et_bin_nsbh_upmetr.C,v $
34  * Revision 1.4 2014/10/13 08:52:56 j_novak
35  * Lorene classes and functions now belong to the namespace Lorene.
36  *
37  * Revision 1.3 2007/04/24 20:14:45 f_limousin
38  * Implementation of Dirichlet and Neumann BC for the lapse
39  *
40  * Revision 1.2 2005/08/29 15:10:17 p_grandclement
41  * Addition of things needed :
42  * 1) For BBH with different masses
43  * 2) Provisory files for the mixted binaries (Bh and NS) : THIS IS NOT
44  * WORKING YET !!!
45  *
46  * Revision 1.1 2003/10/24 12:28:39 k_taniguchi
47  * Method of update metric for the BH companion
48  *
49  *
50  *
51  * $Header: /cvsroot/Lorene/C++/Source/Etoile/et_bin_nsbh_upmetr.C,v 1.4 2014/10/13 08:52:56 j_novak Exp $
52  *
53  */
54 
55 // Lorene headers
56 #include "et_bin_nsbh.h"
57 #include "bhole.h"
58 
59  //----------------------------------//
60  // Version a BH companion //
61  //----------------------------------//
62 
63 namespace Lorene {
64 void Et_bin_nsbh::update_metric(const Bhole& comp) {
65 
66  // Computation of quantities coming from the companion
67  // ---------------------------------------------------
68 
69  // Computes N_comp ---> stored in logn_comp
70  if ( (comp.get_n_auto()).get_etat() == ETATZERO ) {
72  }
73  else{
75  (n_comp.set()).import( comp.get_n_auto()() ) ;
76  n_comp.set_std_base() ; // set the bases for spectral expansions
77  }
78 
79 
80  // Computes Psi_comp ---> stored in beta_comp
81  if ( (comp.get_psi_auto()).get_etat() == ETATZERO ) {
83  }
84  else{
86  (confpsi_comp.set()).import( comp.get_psi_auto()() ) ;
87  confpsi_comp.set_std_base() ; // set the bases for spectral expansions
88  }
89 
90 
91  // Computes N^i_comp ---> stored in shift_comp
92  if ( (comp.get_shift_auto()).get_etat() == ETATZERO ) {
94  }
95  else{
97 
98  (shift_comp.set(0)).import( comp.get_shift_auto()(0) ) ; // N^x antisym
99  (shift_comp.set(1)).import( comp.get_shift_auto()(1) ) ; // N^y sym.
100  (shift_comp.set(2)).import( comp.get_shift_auto()(2) ) ; // N^z anisym
101 
102  shift_comp.set_std_base() ; // set the bases for spectral expansions
103  }
104 
105  // Lapse function N
106  // ----------------
107 
108  nnn = n_auto + n_comp ;
109 
110  // Conformal factor confpsi
111  // ------------------------
112 
114 
115  confpsi.set_std_base() ; // set the bases for spectral expansions
116 
117  // Conformal factor A^2
118  // ---------------------
119 
120  a_car = pow(confpsi, 4.);
121  a_car.set_std_base() ; // set the bases for spectral expansions
122 
123  // Shift vector N^i
124  // ----------------
125 
127 
128  // Derivatives of metric coefficients
129  // ----------------------------------
130 
131  // ... (d/dX,d/dY,d/dZ)(n_auto) :
132  d_n_auto = n_auto.gradient() ; // (d/dx, d/dy, d/dz)
133  d_n_auto.change_triad(ref_triad) ; // --> (d/dX, d/dY, d/dZ)
134 
135  // ... (d/dX,d/dY,d/dZ)(confpsi_auto) :
136  d_confpsi_auto = confpsi_auto.gradient() ; // (d/dx, d/dy, d/dz)
137  d_confpsi_auto.change_triad(ref_triad) ; // --> (d/dX, d/dY, d/dZ)
138 
139  // The derived quantities are obsolete
140  // -----------------------------------
141 
142  del_deriv() ;
143 }
144 }
Lorene::Etoile::a_car
Tenseur a_car
Total conformal factor .
Definition: etoile.h:515
Lorene::Tenseur::set_etat_zero
void set_etat_zero()
Sets the logical state to ETATZERO (zero state).
Definition: tenseur.C:645
Lorene::Etoile_bin::shift_auto
Tenseur shift_auto
Part of the shift vector generated principaly by the star.
Definition: etoile.h:889
Lorene::Et_bin_nsbh::confpsi
Tenseur confpsi
Total conformal factor $\Psi$.
Definition: et_bin_nsbh.h:101
Lorene::Tenseur::set
Cmp & set()
Read/write for a scalar (see also operator=(const Cmp&) ).
Definition: tenseur.C:824
Lorene::Et_bin_nsbh::d_confpsi_auto
Tenseur d_confpsi_auto
Gradient of {\tt confpsi_auto} (Cartesian components with respect to {\tt ref_triad})
Definition: et_bin_nsbh.h:114
Lorene
Lorene prototypes.
Definition: app_hor.h:64
Lorene::Tenseur::gradient
const Tenseur & gradient() const
Returns the gradient of *this (Cartesian coordinates)
Definition: tenseur.C:1542
Lorene::Bhole
Black hole.
Definition: bhole.h:268
Lorene::Et_bin_nsbh::n_auto
Tenseur n_auto
Part of the lapse {\it N} generated principaly by the star.
Definition: et_bin_nsbh.h:85
Lorene::pow
Cmp pow(const Cmp &, int)
Power .
Definition: cmp_math.C:348
Lorene::Etoile_bin::ref_triad
const Base_vect & ref_triad
Reference triad ("absolute frame"), with respect to which the components of all the member Tenseur 's...
Definition: etoile.h:828
Lorene::Etoile::nnn
Tenseur nnn
Total lapse function.
Definition: etoile.h:509
Lorene::Bhole::get_shift_auto
const Tenseur & get_shift_auto() const
Returns the part of generated by the hole.
Definition: bhole.h:440
Lorene::Et_bin_nsbh::confpsi_comp
Tenseur confpsi_comp
Part of the conformal factor $\Psi$ generated principaly by the companion star.
Definition: et_bin_nsbh.h:109
Lorene::Et_bin_nsbh::confpsi_auto
Tenseur confpsi_auto
Part of the conformal factor $\Psi$ generated principaly by the star.
Definition: et_bin_nsbh.h:104
Lorene::Tenseur::change_triad
void change_triad(const Base_vect &new_triad)
Sets a new vectorial basis (triad) of decomposition and modifies the components accordingly.
Definition: tenseur.C:668
Lorene::Et_bin_nsbh::update_metric
void update_metric(const Bhole &comp)
Computes metric coefficients from known potentials, when the companion is a black hole.
Definition: et_bin_nsbh_upmetr.C:64
Lorene::Etoile::shift
Tenseur shift
Total shift vector.
Definition: etoile.h:512
Lorene::Et_bin_nsbh::n_comp
Tenseur n_comp
Part of the lapse {\it N} generated principaly by the companion star.
Definition: et_bin_nsbh.h:88
Lorene::Tenseur::set_etat_qcq
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
Definition: tenseur.C:636
Lorene::Bhole::get_psi_auto
const Tenseur & get_psi_auto() const
Returns the part of generated by the hole.
Definition: bhole.h:412
Lorene::Et_bin_nsbh::d_n_auto
Tenseur d_n_auto
Gradient of {\tt n_auto} (Cartesian components with respect to {\tt ref_triad})
Definition: et_bin_nsbh.h:93
Lorene::Bhole::get_n_auto
const Tenseur & get_n_auto() const
Returns the part of N generated by the hole.
Definition: bhole.h:395
Lorene::Etoile_bin::del_deriv
virtual void del_deriv() const
Deletes all the derived quantities.
Definition: etoile_bin.C:447
Lorene::Tenseur::set_std_base
void set_std_base()
Set the standard spectal basis of decomposition for each component.
Definition: tenseur.C:1170
Lorene::Etoile_bin::shift_comp
Tenseur shift_comp
Part of the shift vector generated principaly by the companion star.
Definition: etoile.h:895