31char bin_hor_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Bin_hor/bin_hor.C,v 1.12 2014/10/13 08:52:42 j_novak Exp $" ;
90#include "utilitaires.h"
179 int bound_psi,
int bound_beta,
double alpha)
const {
181 double distance =
hole1.get_mp().get_ori_x() -
hole2.get_mp().get_ori_x() ;
184 double mass_area =
sqrt(
hole1.area_hor()/16/M_PI) +
188 double j1 =
hole1.ang_mom_hor() ;
189 double j2 =
hole2.ang_mom_hor() ;
190 double mass_ih1 =
hole1.mass_hor() ;
191 double mass_ih2 =
hole2.mass_hor() ;
192 double mass_ih = mass_ih1 + mass_ih2 ;
193 double omega1 =
hole1.omega_hor() ;
194 double omega2 =
hole2.omega_hor() ;
200 double orientation1 =
hole1.mp.get_rot_phi() ;
201 assert ((orientation1 == 0) || (orientation1 == M_PI)) ;
202 int aligne1 = (orientation1 == 0) ? 1 : -1 ;
210 angular1.
set(1) = aligne1 *
omega * yya1 ;
211 angular1.
set(2) = - aligne1 *
omega * xxa1 ;
224 double orientation2 =
hole2.mp.get_rot_phi() ;
225 assert ((orientation2 == 0) || (orientation2 == M_PI)) ;
226 int aligne2 = (orientation2 == 0) ? 1 : -1 ;
234 angular2.
set(1) = aligne2 *
omega * yya2 ;
235 angular2.
set(2) = - aligne2 *
omega * xxa2 ;
268 double horizon =
hole1.mp.integrale_surface(integrand_un(1),
270 hole2.mp.integrale_surface(integrand_deux(1),
hole2.get_radius()) ;
274 double J_smarr = (mass_komar - horizon) / 2. /
omega ;
277 ost <<
"# Grid : " <<
hole1.mp.get_mg()->get_nr(1) <<
"x"
278 <<
hole1.mp.get_mg()->get_nt(1) <<
"x"
279 <<
hole1.mp.get_mg()->get_np(1) <<
" R_out(l) : " ;
281 for (
int ll=0; ll<
hole1.mp.get_mg()->get_nzone(); ll++) {
282 ost <<
" " <<
hole1.mp.val_r(ll, 1., M_PI/2, 0) ;
285 ost <<
"# bound N, lim N : " << bound_nn <<
" " << lim_nn
286 <<
" - bound Psi : " << bound_psi <<
" - bound shift : " << bound_beta
287 <<
" alpha = " << alpha << endl ;
289 ost <<
"# distance omega Mass_ADM Mass_K M_area J_ADM J_hor" << endl ;
290 ost << distance <<
" " ;
291 ost <<
omega <<
" " ;
292 ost << mass_adm <<
" " ;
293 ost << mass_komar <<
" " ;
294 ost << mass_area <<
" " ;
295 ost << J_adm <<
" " ;
296 ost << J_hor << endl ;
297 ost <<
"# mass_ih1 mass_ih2 mass_ih j1 J2 omega1 omega2" << endl ;
298 ost << mass_ih1 <<
" " ;
299 ost << mass_ih2 <<
" " ;
300 ost << mass_ih <<
" " ;
303 ost << omega1 <<
" " ;
304 ost << omega2 << endl ;
305 ost <<
"# ADM_mass/M_area J/M_area2 omega*M_area" << endl ;
306 ost << mass_adm / mass_area <<
" " ;
307 ost << J_adm /mass_area / mass_area <<
" " ;
308 ost <<
omega * mass_area << endl ;
309 ost <<
"# Diff J_hor/J_ADM Diff J_ADM/J_Smarr Diff J_hor/J_smarr"
311 ost << fabs(J_adm - J_hor) / J_adm <<
" " << fabs(J_adm - J_smarr) / J_adm
312 <<
" " << fabs(J_hor - J_smarr) / J_hor << endl ;
double omega
Angular velocity.
Single_hor hole1
Black hole one.
Single_hor * holes[2]
Array on the black holes.
Single_hor hole2
Black hole two.
double ang_mom_hor() const
Calculates the angular momentum of the black hole using the formula at the horizon.
void init_bin_hor()
Initialisation of the system.
double adm_mass() const
Calculates the ADM mass of the system.
double ang_mom_adm() const
Calculates the angular momentum of the black hole.
void sauve(FILE *fich) const
Total or partial saves in a binary file.
double komar_mass() const
Calculates the Komar mass of the system using : .
void decouple()
Calculates decouple which is used to obtain tkij_auto and tkij_comp.
void operator=(const Bin_hor &)
Affectation operator.
Bin_hor(Map_af &mp1, Map_af &mp2)
Standard constructor.
virtual ~Bin_hor()
Destructor.
void set_omega(double ome)
Sets the orbital velocity to ome.
void write_global(ostream &, double lim_nn, int bound_nn, int bound_psi, int bound_beta, double alpha) const
Write global quantities in a formatted file.
void extrinsic_curvature()
Calculation of the extrinsic curvature tensor.
Tensor field of valence 0 (or component of a tensorial field).
Valeur & set_spectral_va()
Returns va (read/write version).
void annule_hard()
Sets the Scalar to zero in a hard way.
void set_base(const Base_val &)
Sets the bases for spectral expansions (member base ).
Tensor field of valence 1.
virtual void std_spectral_base()
Sets the standard spectal bases of decomposition for each component.
virtual void change_triad(const Base_vect &)
Sets a new vectorial basis (triad) of decomposition and modifies the components accordingly.
Scalar & set(int)
Read/write access to a component.
Cmp sqrt(const Cmp &)
Square root.
Cmp pow(const Cmp &, int)
Power .
int fread_be(int *aa, int size, int nb, FILE *fich)
Reads integer(s) from a binary file according to the big endian convention.
int fwrite_be(const int *aa, int size, int nb, FILE *fich)
Writes integer(s) into a binary file according to the big endian convention.
Tenseur contract(const Tenseur &, int id1, int id2)
Self contraction of two indices of a Tenseur .