LORENE
et_bin_nsbh_upmetr_der.C
1 /*
2  * Methods Et_bin_nsbh::update_metric_der_comp
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 
30 
31 /*
32  * $Id: et_bin_nsbh_upmetr_der.C,v 1.7 2016/12/05 16:17:53 j_novak Exp $
33  * $Log: et_bin_nsbh_upmetr_der.C,v $
34  * Revision 1.7 2016/12/05 16:17:53 j_novak
35  * Suppression of some global variables (file names, loch, ...) to prevent redefinitions
36  *
37  * Revision 1.6 2014/10/13 08:52:56 j_novak
38  * Lorene classes and functions now belong to the namespace Lorene.
39  *
40  * Revision 1.5 2007/04/24 20:14:45 f_limousin
41  * Implementation of Dirichlet and Neumann BC for the lapse
42  *
43  * Revision 1.4 2005/10/18 13:12:33 p_grandclement
44  * update of the mixted binary codes
45  *
46  * Revision 1.3 2005/08/29 15:10:17 p_grandclement
47  * Addition of things needed :
48  * 1) For BBH with different masses
49  * 2) Provisory files for the mixted binaries (Bh and NS) : THIS IS NOT
50  * WORKING YET !!!
51  *
52  * Revision 1.2 2004/06/07 11:08:31 k_taniguchi
53  * A minor change.
54  *
55  * Revision 1.1 2003/10/24 12:29:21 k_taniguchi
56  * Method of update metric for the BH companion
57  *
58  *
59  *
60  * $Header: /cvsroot/Lorene/C++/Source/Etoile/et_bin_nsbh_upmetr_der.C,v 1.7 2016/12/05 16:17:53 j_novak Exp $
61  *
62  */
63 
64 // Lorene headers
65 #include "et_bin_nsbh.h"
66 #include "bhole.h"
67 
68  //---------------------------------------//
69  // Version with BH companion //
70  //---------------------------------------//
71 
72 
73 namespace Lorene {
75 
76  // Computation of Grad(N) ---> stored in d_n_comp
77  // -------------------------------------------------
78 
79  Tenseur dncomp = ( comp.get_n_auto() ).gradient() ;
80 
81  if ( dncomp.get_etat() == ETATZERO ) {
83  }
84  else{
85 
86  // 1/ Division by r^2 of comp.d_n_auto in the ZEC
87  dncomp.dec2_dzpuis() ;
88 
89  // 2/ Interpolation of the result
90 
92  (d_n_comp.set(0)).import( dncomp(0) ) ; // d/dx sym.
93  (d_n_comp.set(1)).import( dncomp(1) ) ; // d/dy antisym.
94  (d_n_comp.set(2)).import( dncomp(2) ) ; // d/dz sym.
95 
96  }
99  d_n_comp.set_triad( *(dncomp.get_triad()) ) ;
101 
102 
103  // Computation of Grad(Psi) ---> stored in d_confpsi_comp
104  // ------------------------------------------------------
105 
106  Tenseur dpsicomp = ( comp.get_psi_auto() ).gradient() ;
107 
108  if ( dpsicomp.get_etat() == ETATZERO ) {
110  }
111  else {
112  // 1/ Division by r^2 of comp.d_confpsi_auto in the ZEC
113  dpsicomp.dec2_dzpuis() ;
114 
115  // 2/ Interpolation of the result
116 
118 
119  (d_confpsi_comp.set(0)).import(dpsicomp(0) ) ; // d/dx sym.
120  (d_confpsi_comp.set(1)).import(dpsicomp(1) ) ; // d/dy antisym.
121  (d_confpsi_comp.set(2)).import(dpsicomp(2) ) ; // d/dz sym.
122 
123  }
124 
127  d_confpsi_comp.set_triad( *(dpsicomp.get_triad()) ) ;
129 
130  // The derived quantities are obsolete
131  // -----------------------------------
132  del_deriv() ;
133 }
134 }
const Base_vect & ref_triad
Reference triad ("absolute frame"), with respect to which the components of all the member Tenseur 's...
Definition: etoile.h:831
void dec2_dzpuis()
dzpuis -= 2 ;
Definition: tenseur.C:1146
void set_triad(const Base_vect &new_triad)
Assigns a new vectorial basis (triad) of decomposition.
Definition: tenseur.C:690
void set_std_base()
Set the standard spectal basis of decomposition for each component.
Definition: tenseur.C:1186
Lorene prototypes.
Definition: app_hor.h:67
const Tenseur & get_n_auto() const
Returns the part of N generated by the hole.
Definition: bhole.h:395
void update_metric_der_comp(const Bhole &comp)
Computes the derivative of metric functions related to the companion black hole.
Black hole.
Definition: bhole.h:268
Tenseur d_confpsi_comp
Gradient of { confpsi_comp} (Cartesian components with respect to { ref_triad})
Definition: et_bin_nsbh.h:119
void inc2_dzpuis()
dzpuis += 2 ;
Definition: tenseur.C:1159
const Tenseur & get_psi_auto() const
Returns the part of generated by the hole.
Definition: bhole.h:412
Cmp & set()
Read/write for a scalar (see also operator=(const Cmp&) ).
Definition: tenseur.C:840
void change_triad(const Base_vect &new_triad)
Sets a new vectorial basis (triad) of decomposition and modifies the components accordingly.
Definition: tenseur.C:684
virtual void del_deriv() const
Deletes all the derived quantities.
Definition: etoile_bin.C:450
const Base_vect * get_triad() const
Returns the vectorial basis (triad) on which the components are defined.
Definition: tenseur.h:707
int get_etat() const
Returns the logical state.
Definition: tenseur.h:710
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
Definition: tenseur.C:652
void set_etat_zero()
Sets the logical state to ETATZERO (zero state).
Definition: tenseur.C:661
Tenseur d_n_comp
Gradient of { n_comp} (Cartesian components with respect to { ref_triad})
Definition: et_bin_nsbh.h:98
Tensor handling *** DEPRECATED : use class Tensor instead ***.
Definition: tenseur.h:304