Debian Codegraph @

C++/Source/Etoile/et_bin_nsbh_upmetr.C

raw
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 ) {
71 n_comp.set_etat_zero() ;
72 }
73 else{
74 n_comp.set_etat_qcq() ;
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 ) {
82 confpsi_comp.set_etat_zero() ;
83 }
84 else{
85 confpsi_comp.set_etat_qcq() ;
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 ) {
93 shift_comp.set_etat_zero() ;
94 }
95 else{
96 shift_comp.set_etat_qcq() ;
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
113 confpsi = confpsi_auto + confpsi_comp ;
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
126 shift = shift_auto + shift_comp ;
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 }