LORENE
bhole_binaire.C
1 /*
2  * Methods of class Bhole_binaire
3  *
4  * (see file bhole.h for documentation)
5  *
6  */
7 
8 /*
9  * Copyright (c) 2000-2001 Philippe Grandclement
10  *
11  * This file is part of LORENE.
12  *
13  * LORENE is free software; you can redistribute it and/or modify
14  * it under the terms of the GNU General Public License as published by
15  * the Free Software Foundation; either version 2 of the License, or
16  * (at your option) any later version.
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 /*
33  * $Id: bhole_binaire.C,v 1.6 2016/12/05 16:17:45 j_novak Exp $
34  * $Log: bhole_binaire.C,v $
35  * Revision 1.6 2016/12/05 16:17:45 j_novak
36  * Suppression of some global variables (file names, loch, ...) to prevent redefinitions
37  *
38  * Revision 1.5 2014/10/13 08:52:40 j_novak
39  * Lorene classes and functions now belong to the namespace Lorene.
40  *
41  * Revision 1.4 2014/10/06 15:12:58 j_novak
42  * Modified #include directives to use c++ syntax.
43  *
44  * Revision 1.3 2005/08/29 15:10:14 p_grandclement
45  * Addition of things needed :
46  * 1) For BBH with different masses
47  * 2) Provisory files for the mixted binaries (Bh and NS) : THIS IS NOT
48  * WORKING YET !!!
49  *
50  * Revision 1.2 2002/10/16 14:36:32 j_novak
51  * Reorganization of #include instructions of standard C++, in order to
52  * use experimental version 3 of gcc.
53  *
54  * Revision 1.1.1.1 2001/11/20 15:19:28 e_gourgoulhon
55  * LORENE
56  *
57  * Revision 2.46 2001/05/07 09:11:43 phil
58  * *** empty log message ***
59  *
60  * Revision 2.45 2001/04/26 12:04:23 phil
61  * *** empty log message ***
62  *
63  * Revision 2.44 2001/04/02 12:16:32 phil
64  * *** empty log message ***
65  *
66  * Revision 2.43 2001/03/30 15:52:15 phil
67  * y
68  *
69  * Revision 2.42 2001/03/22 10:43:05 phil
70  * *** empty log message ***
71  *
72  * Revision 2.41 2001/03/01 08:17:43 phil
73  * mets les procedures ailleurs
74  *
75  * Revision 2.40 2001/02/28 15:26:44 phil
76  * correction dans construction source_deux
77  *
78  * Revision 2.39 2001/02/28 14:36:03 phil
79  * modif etat_zero dans solve_shift
80  *
81  * Revision 2.38 2001/02/28 13:22:51 phil
82  * vire kk_auto
83  *
84  * Revision 2.37 2001/02/12 15:37:29 phil
85  * ajout calcul de J infini
86  *
87  * Revision 2.36 2001/01/29 14:30:26 phil
88  * ajout type_rotation
89  *
90  * Revision 2.35 2001/01/22 09:29:23 phil
91  * vire trucs sur bare masse
92  *
93  * Revision 2.34 2001/01/10 11:03:27 phil
94  * utilisation de homothetie_interne dans fixe_bare
95  *
96  * Revision 2.33 2001/01/10 09:52:24 phil
97  * correction de fait_kk_auto
98  *
99  * Revision 2.32 2001/01/10 09:31:41 phil
100  * ajout de fait_kk_auto
101  *
102  * Revision 2.31 2001/01/09 13:38:42 phil
103  * ajout membre kk_auto
104  *
105  * Revision 2.30 2001/01/04 10:53:44 phil
106  * modification des sources pour tenir compte sommation
107  *
108  * Revision 2.29 2000/12/21 10:49:34 phil
109  * retour a la version 2.27
110  *
111  * Revision 2.27 2000/12/20 10:43:14 phil
112  * correction calcul de la distance propre
113  *
114  * Revision 2.26 2000/12/20 09:09:29 phil
115  * modification calcul de la masse ADM
116  *
117  * Revision 2.25 2000/12/18 17:43:21 phil
118  * correction homothetie
119  *
120  * Revision 2.24 2000/12/18 16:38:19 phil
121  * ajout de convergence vers une masse donnee
122  *
123  * Revision 2.23 2000/12/15 16:44:20 phil
124  * *** empty log message ***
125  *
126  * Revision 2.22 2000/12/15 16:41:17 phil
127  * ajout calcul de la separation
128  *
129  * Revision 2.21 2000/12/14 15:13:02 phil
130  * corection equation sur Psi
131  *
132  * Revision 2.20 2000/12/14 14:12:14 phil
133  * correction cl sur Psi
134  *
135  * Revision 2.19 2000/12/14 12:41:41 phil
136  * on met les bases dans les sources
137  *
138  * Revision 2.18 2000/12/14 10:53:18 phil
139  * *** empty log message ***
140  *
141  * Revision 2.17 2000/12/14 10:45:11 phil
142  * ATTENTION : PASSAGE DE PHI A PSI
143  *
144  * Revision 2.16 2000/12/13 15:35:32 phil
145  * ajout calcul de bare_masse
146  *
147  * Revision 2.15 2000/12/04 14:30:00 phil
148  * ajout de grad_n_tot
149  *
150  * Revision 2.14 2000/12/01 16:13:04 phil
151  * *** empty log message ***
152  *
153  * Revision 2.13 2000/12/01 14:27:24 phil
154  * *** empty log message ***
155  *
156  * Revision 2.12 2000/12/01 14:18:19 phil
157  * *** empty log message ***
158  *
159  * Revision 2.11 2000/12/01 14:16:29 phil
160  * ahout verifie_cl
161  *
162  * Revision 2.10 2000/11/24 11:05:16 phil
163  * calcul moment foireux
164  *
165  * Revision 2.9 2000/11/24 09:57:46 phil
166  * ajout calcul masse et moment pour systeme
167  *
168  * Revision 2.8 2000/11/15 18:26:53 phil
169  * vire recherches de minimum
170  *
171  * Revision 2.7 2000/11/15 13:03:40 phil
172  * *** empty log message ***
173  *
174  * Revision 2.6 2000/11/15 13:00:16 phil
175  * changements diverses
176  *
177  * Revision 2.5 2000/10/26 09:01:26 phil
178  * *** empty log message ***
179  *
180  * Revision 2.4 2000/10/26 08:25:24 phil
181  * *** empty log message ***
182  *
183  * Revision 2.3 2000/10/26 08:21:04 phil
184  * ajout de verifie_shift
185  *
186  * Revision 2.2 2000/10/24 13:38:36 phil
187  * on ne resout qu une fois quand omega est bloque
188  *
189  * Revision 2.1 2000/10/23 09:24:43 phil
190  * rearangement constructeurs.
191  *
192  * Revision 2.0 2000/10/20 09:19:20 phil
193  * *** empty log message ***
194  *
195  *
196  * $Header: /cvsroot/Lorene/C++/Source/Bhole_binaire/bhole_binaire.C,v 1.6 2016/12/05 16:17:45 j_novak Exp $
197  *
198  */
199 
200 //standard
201 #include <cstdlib>
202 #include <cmath>
203 
204 // Lorene
205 #include "nbr_spx.h"
206 #include "tenseur.h"
207 #include "bhole.h"
208 #include "proto.h"
209 #include "utilitaires.h"
210 #include "graphique.h"
211 
212 // Constucteur standard
213 namespace Lorene {
215  hole1(mp1), hole2(mp2), pos_axe(mp1.get_ori_x()), omega(0){
216 
217  holes[0] = &hole1 ;
218  holes[1] = &hole2 ;
219 }
220 
221 // Copy
223  hole1(source.hole1), hole2(source.hole2), pos_axe(source.pos_axe), omega(source.omega) {
224 
225  holes[0] = &hole1 ;
226  holes[1] = &hole2 ;
227  }
228 
230 }
231 
232 //Affectation
234  hole1 = source.hole1 ;
235  hole2 = source.hole2 ;
236 
237  pos_axe = source.pos_axe ;
238  omega = source.omega ;
239 }
240 
241 //Initialise : somme de deux statiques
243  set_omega (0) ;
244  hole1.init_bhole() ;
245  hole2.init_bhole() ;
246 
249 
252 
253  fait_decouple() ;
254 }
255 
256 // Bouge axe :
257 void Bhole_binaire::set_pos_axe (double new_pos) {
258 
259  double distance_tot = hole1.mp.get_ori_x() - hole2.mp.get_ori_x() ;
260  pos_axe = new_pos ;
261  hole1.mp.set_ori(pos_axe, 0, 0) ;
262  hole2.mp.set_ori(pos_axe-distance_tot, 0, 0) ;
263 }
264 
265 }
Bhole * holes[2]
Array on the black holes.
Definition: bhole.h:766
~Bhole_binaire()
Destructor.
Lorene prototypes.
Definition: app_hor.h:67
double get_ori_x() const
Returns the x coordinate of the origin.
Definition: map.h:780
void init_bhole_binaire()
Initialisation of the system.
void fait_n_comp(const Bhole &comp)
Imports the part of N due to the companion hole comp .
Definition: bhole.C:257
void set_ori(double xa0, double ya0, double za0)
Sets a new origin.
Definition: map.C:256
void operator=(const Bhole_binaire &)
Affectation operator.
Bhole_binaire(Map_af &mp1, Map_af &mp2)
Standard constructor.
double omega
Position of the axis of rotation.
Definition: bhole.h:769
Map_af & mp
Affine mapping.
Definition: bhole.h:273
Bhole hole1
Black hole one.
Definition: bhole.h:762
void fait_decouple()
Calculates {tt decouple} which is used to obtain tkij_auto by the formula : tkij_auto = decouple * tk...
Definition: bhole_kij.C:317
void set_omega(double ome)
Sets the orbital velocity to ome.
Definition: bhole.h:791
void init_bhole()
Sets the values of the fields to :
Definition: bhole.C:412
Affine radial mapping.
Definition: map.h:2042
Binary black holes system.
Definition: bhole.h:757
void fait_psi_comp(const Bhole &comp)
Imports the part of due to the companion hole comp .
Definition: bhole.C:283
Bhole hole2
Black hole two.
Definition: bhole.h:763