#include <binary.h>
Public Member Functions | |
Binary (Map &mp1, int nzet1, const Eos &eos1, int irrot1, Map &mp2, int nzet2, const Eos &eos2, int irrot2, int conf_flat) | |
Standard constructor. | |
Binary (const Binary &) | |
Copy constructor. | |
Binary (Map &mp1, const Eos &eos1, Map &mp2, const Eos &eos2, FILE *fich) | |
Constructor from a file (see sauve(FILE* ) ). | |
~Binary () | |
Destructor. | |
void | operator= (const Binary &) |
Assignment to another Binary . | |
Star_bin & | set (int i) |
Read/write of the star no. i. | |
double & | set_omega () |
Sets the orbital angular velocity [f_unit ]. | |
double & | set_x_axe () |
Sets the absolute coordinate X of the rotation axis [r_unit ]. | |
const Star_bin & | operator() (int i) const |
Returns a reference to the star no. i. | |
double | get_omega () const |
Returns the orbital angular velocity [f_unit ]. | |
double | get_x_axe () const |
Returns the absolute coordinate X of the rotation axis [r_unit ]. | |
double | separation () const |
Returns the coordinate separation of the two stellar centers [r_unit ]. | |
void | sauve (FILE *) const |
Save in a file. | |
void | display_poly (ostream &) const |
Display in polytropic units. | |
void | write_global (ostream &) const |
Write global quantities in a formatted file. | |
double | mass_adm () const |
Total ADM mass. | |
double | mass_adm_vol () const |
Total ADM mass (computed by a volume integral). | |
double | mass_kom () const |
Total Komar mass. | |
double | mass_kom_vol () const |
Total Komar mass (computed by a volume integral). | |
const Tbl & | angu_mom () const |
Total angular momentum. | |
double | total_ener () const |
Total energy (excluding the rest mass energy). | |
double | virial () const |
Estimates the relative error on the virial theorem. | |
double | ham_constr () const |
Estimates the relative error on the Hamiltonian constraint. | |
const Tbl & | mom_constr () const |
Estimates the relative error on the momentum constraint. | |
void | orbit (double fact_omeg_min, double fact_omeg_max, double &xgg1, double &xgg2) |
Computes the orbital angular velocity omega and the position of the rotation axis x_axe . | |
void | analytical_omega () |
Sets the orbital angular velocity to some 2-PN analytical value (Keplerian value in the Newtonian case). | |
void | analytical_shift () |
Sets some analytical template for the shift vector (via the members w_shift and khi_shift of the two Star_bin . | |
void | fait_decouple () |
Calculates decouple which is used to obtain qq_auto by the formula : qq_auto = decouple * qq . | |
void | dirac_gauge () |
Function used to impose Dirac gauge during an iteration. | |
void | helical () |
Function testing the helical symmetry. | |
Protected Member Functions | |
void | del_deriv () const |
Deletes all the derived quantities. | |
void | set_der_0x0 () const |
Sets to 0x0 all the pointers on derived quantities. | |
Protected Attributes | |
Star_bin | star1 |
First star of the system. | |
Star_bin | star2 |
Second star of the system. | |
Star_bin * | et [2] |
Array of the two stars (to perform loops on the stars): et [0] contains the address of star1 and et [1] that of star2 . | |
double | omega |
Angular velocity with respect to an asymptotically inertial observer. | |
double | x_axe |
Absolute X coordinate of the rotation axis. | |
double * | p_mass_adm |
Total ADM mass of the system. | |
double * | p_mass_kom |
Total Komar mass of the system. | |
Tbl * | p_angu_mom |
Total angular momentum of the system. | |
double * | p_total_ener |
Total energy of the system. | |
double * | p_virial |
Virial theorem error. | |
double * | p_ham_constr |
Relative error on the Hamiltonian constraint. | |
Tbl * | p_mom_constr |
Relative error on the momentum constraint. | |
Private Member Functions | |
ostream & | operator>> (ostream &) const |
Operator >> (function called by the operator <<). | |
Friends | |
ostream & | operator<< (ostream &, const Binary &) |
Display. |
Binary systems.
*** UNDER DEVELOPMENT *** ()
Definition at line 69 of file binary.h.
Binary::Binary | ( | Map & | mp1, | |
int | nzet1, | |||
const Eos & | eos1, | |||
int | irrot1, | |||
Map & | mp2, | |||
int | nzet2, | |||
const Eos & | eos2, | |||
int | irrot2, | |||
int | conf_flat | |||
) |
Standard constructor.
mp1 | Mapping on which star1 will be defined | |
nzet1 | Number of domains occupied by star1 | |
eos1 | Equation of state of star1 | |
irrot1 | should be true if star1 is irrotational, false if star1 is corotating | |
mp2 | Mapping on which star2 will be defined | |
nzet2 | Number of domains occupied by star2 | |
eos2 | Equation of state of star2 | |
irrot2 | should be true if star2 is irrotational, false if star2 is corotating | |
conf_flat | should be true for a 3-metric conformally flat and false for a more general one. |
Definition at line 92 of file binary.C.
References et, omega, set_der_0x0(), star1, star2, and x_axe.
Binary::Binary | ( | const Binary & | bibi | ) |
Constructor from a file (see sauve(FILE* )
).
mp1 | Mapping on which star1 will be defined | |
eos1 | Equation of state of star1 | |
mp2 | Mapping on which star2 will be defined | |
eos2 | Equation of state of star2 | |
fich | input file (must have been created by the function sauve ) |
Definition at line 126 of file binary.C.
References et, fread_be(), omega, set_der_0x0(), star1, star2, and x_axe.
Binary::~Binary | ( | ) |
void Binary::analytical_omega | ( | ) |
Sets the orbital angular velocity to some 2-PN analytical value (Keplerian value in the Newtonian case).
Definition at line 52 of file binary_omegaana.C.
References del_deriv(), Star_bin::is_irrotational(), Star_bin::mass_g(), omega, pow(), Star::ray_eq(), separation(), sqrt(), star1, and star2.
void Binary::analytical_shift | ( | ) |
Sets some analytical template for the shift vector (via the members w_shift
and khi_shift
of the two Star_bin
.
Definition at line 67 of file binary_anashift.C.
References Scalar::annule(), Tensor::dec_dzpuis(), Tenseur::dec_dzpuis(), et, Map::get_bvect_cart(), Star_bin::get_flat(), Map::get_mg(), Star::get_mp(), Star::get_nzet(), Mg3d::get_nzone(), Star_bin::mass_g(), omega, Map::r, Star::ray_eq(), separation(), Vector::set(), Tenseur::set(), Tensor::set(), Star_bin::set_beta_auto(), Tenseur::set_etat_qcq(), Map::sinp, Map::sint, skxk(), Vector::std_spectral_base(), Scalar::std_spectral_base(), and Map::y.
const Tbl & Binary::angu_mom | ( | ) | const |
Total angular momentum.
Tbl
of size 3, according to angu_mom()
(0) = angu_mom()
(1) = angu_mom()
(2) = Definition at line 281 of file binary_global.C.
References Tbl::annule_hard(), Vector::change_triad(), contract(), et, exp(), Map::flat_met_cart(), Map::get_bvect_cart(), Connection::get_delta(), Star::get_ener_euler(), Star_bin::get_gtilde(), Map::get_mg(), Star::get_mp(), Mg3d::get_nzone(), Star::get_press(), Star_bin::get_psi4(), Star_bin::get_tkij_auto(), Star::get_u_euler(), Scalar::integrale(), p_angu_mom, pow(), Map::r, Itbl::set(), Tbl::set(), Vector::set(), Scalar::set_domain(), Scalar::set_outer_boundary(), Vector::std_spectral_base(), Scalar::std_spectral_base(), Tensor::up_down(), Map::val_r(), Map::xa, and Map::ya.
void Binary::del_deriv | ( | ) | const [protected] |
Deletes all the derived quantities.
Definition at line 157 of file binary.C.
References p_angu_mom, p_ham_constr, p_mass_adm, p_mass_kom, p_mom_constr, p_total_ener, p_virial, and set_der_0x0().
void Binary::dirac_gauge | ( | ) |
Function used to impose Dirac gauge during an iteration.
Definition at line 55 of file binary_dirac.C.
References Param::add_cmp_mod(), Param::add_double(), Param::add_int(), Param::add_int_mod(), Tensor::change_triad(), Metric_flat::con(), Metric::con(), Tensor::dec_dzpuis(), Star_bin::decouple, Sym_tensor::derive_lie(), Metric::determinant(), diffrel(), diffrelmax(), Sym_tensor::divergence(), exp(), Star_bin::flat, Star::gamma, Map::get_bvect_cart(), Map::get_mg(), Mg3d::get_np(), Mg3d::get_nr(), Mg3d::get_nt(), Mg3d::get_nzone(), Tensor::get_triad(), Star_bin::gtilde, Star_bin::hij, Star_bin::hij_auto, Star_bin::hij_comp, Scalar::import(), Star::mp, norme(), pow(), Star_bin::psi4, Map::r, Cmp::set(), Coord::set(), Tensor::set(), Scalar::set_domain(), Cmp::set_etat_qcq(), Scalar::set_etat_qcq(), Scalar::set_outer_boundary(), Tensor::set_triad(), star1, star2, Scalar::std_spectral_base(), Tensor::std_spectral_base(), and Map::val_r().
void Binary::display_poly | ( | ostream & | ost | ) | const |
Display in polytropic units.
Definition at line 256 of file binary.C.
References angu_mom(), Star::get_eos(), Eos_poly::get_gam(), Eos_poly::get_kap(), mass_adm(), Star_bin::mass_b(), mass_kom(), omega, pow(), Star::ray_eq(), Star::ray_eq_pi(), separation(), sqrt(), star1, star2, and Star_bin::xa_barycenter().
void Binary::fait_decouple | ( | ) |
Calculates decouple
which is used to obtain qq_auto
by the formula : qq_auto
= decouple
* qq
.
(see the membre Scalar
decouple
for more precisions about its value).
Definition at line 308 of file binary.C.
References Map::convert_absolute(), cos(), Star_bin::decouple, Map::get_mg(), Star::get_mp(), Mg3d::get_np(), Mg3d::get_nr(), Mg3d::get_nt(), Mg3d::get_nzone(), Map::get_ori_x(), norme(), pow(), Map::r, sin(), star1, star2, Map::xa, Map::ya, and Map::za.
double Binary::get_omega | ( | ) | const [inline] |
double Binary::get_x_axe | ( | ) | const [inline] |
double Binary::ham_constr | ( | ) | const |
Estimates the relative error on the Hamiltonian constraint.
void Binary::helical | ( | ) |
Function testing the helical symmetry.
Definition at line 72 of file binary_helical.C.
References Tbl::annule_hard(), Scalar::annule_hard(), Star::beta, Star_bin::beta_auto, Star_bin::beta_comp, Metric_flat::con(), Metric::con(), contract(), Metric::cov(), Star_bin::dcon_logn, Star_bin::dcon_phi, Star_bin::dcov_logn, Star_bin::dcov_phi, Scalar::dec_dzpuis(), Scalar::derive_con(), Tensor::derive_con(), Tensor_sym::derive_con(), Tensor_sym::derive_cov(), Tensor::derive_cov(), Scalar::derive_cov(), Sym_tensor::derive_lie(), Metric::determinant(), Vector::divergence(), Sym_tensor::divergence(), Star::ener_euler, et, exp(), Star_bin::flat, Star::gamma, Map::get_bvect_cart(), Star::get_gamma(), Map::get_mg(), Star::get_mp(), Mg3d::get_nzone(), Map::get_ori_x(), Map::get_rot_phi(), Star_bin::gtilde, Star_bin::hij, Star_bin::hij_auto, Star_bin::hij_comp, Scalar::inc_dzpuis(), Tenseur::inc_dzpuis(), Tensor::inc_dzpuis(), Scalar::integrale_domains(), Scalar::laplacian(), Star_bin::lnq_auto, Star::logn, Star_bin::logn_auto, mass_adm(), Star::mp, Star::nn, omega, pow(), Star_bin::psi4, Map::r, Star::s_euler, Tbl::set(), Itbl::set(), Tensor::set(), Coord::set(), Scalar::set_domain(), Scalar::set_outer_boundary(), sqrt(), star1, star2, Scalar::std_spectral_base(), Star::stress_euler, Star_bin::tkij_auto, Star_bin::tkij_comp, Tensor::up_down(), Map::val_r(), Map::xa, Map::ya, and Map::za.
double Binary::mass_adm | ( | ) | const |
Total ADM mass.
Definition at line 99 of file binary_global.C.
References Vector::change_triad(), contract(), et, Map::get_bvect_spher(), Star_bin::get_flat(), Map_af::integrale_surface_infini(), and p_mass_adm.
double Binary::mass_adm_vol | ( | ) | const |
Total ADM mass (computed by a volume integral).
Definition at line 131 of file binary_global.C.
References Metric::con(), contract(), Metric::cov(), Tensor::derive_cov(), Scalar::derive_cov(), Tensor_sym::derive_cov(), et, Star_bin::get_dcov_logn(), Star_bin::get_dcov_phi(), Star::get_ener_euler(), Star_bin::get_flat(), Star_bin::get_gtilde(), Star_bin::get_hij(), Star_bin::get_hij_auto(), Star_bin::get_kcar_auto(), Star_bin::get_kcar_comp(), Star_bin::get_lnq_auto(), Star_bin::get_logn_auto(), Star_bin::get_psi4(), Tensor::inc_dzpuis(), Scalar::integrale(), pow(), and Scalar::std_spectral_base().
double Binary::mass_kom | ( | ) | const |
Total Komar mass.
Definition at line 197 of file binary_global.C.
References Vector::change_triad(), contract(), Tensor::derive_con(), Tensor::derive_cov(), et, Map::get_bvect_spher(), Star_bin::get_flat(), Star_bin::get_hij(), Star::get_logn(), Map_af::integrale_surface_infini(), and p_mass_kom.
double Binary::mass_kom_vol | ( | ) | const |
Total Komar mass (computed by a volume integral).
Definition at line 225 of file binary_global.C.
References Metric::con(), contract(), Scalar::derive_cov(), et, exp(), Star_bin::get_dcon_logn(), Star_bin::get_dcov_logn(), Star_bin::get_dcov_phi(), Star::get_ener_euler(), Star_bin::get_flat(), Star_bin::get_gtilde(), Star_bin::get_hij(), Star_bin::get_kcar_auto(), Star_bin::get_kcar_comp(), Star_bin::get_logn_auto(), Star_bin::get_logn_comp(), Star_bin::get_psi4(), Star::get_s_euler(), Tensor::inc_dzpuis(), Scalar::integrale(), and Scalar::std_spectral_base().
const Tbl& Binary::mom_constr | ( | ) | const |
Estimates the relative error on the momentum constraint.
const Star_bin& Binary::operator() | ( | int | i | ) | const [inline] |
void Binary::operator= | ( | const Binary & | bibi | ) |
ostream & Binary::operator>> | ( | ostream & | ost | ) | const [private] |
void Binary::orbit | ( | double | fact_omeg_min, | |
double | fact_omeg_max, | |||
double & | xgg1, | |||
double & | xgg2 | |||
) |
Computes the orbital angular velocity omega
and the position of the rotation axis x_axe
.
fact_omeg_min | [input] : determines the lower bound of the interval [omega_min, omega_max] in which omega is searched by omega_min = fact_omeg_min * omega, where omega is the previous value of the angular velocity (typical value : fact_omeg_min = 0.5) | |
fact_omeg_max | [input] : determines the higher bound of the interval [omega_min, omega_max] in which omega is searched by omega_max = fact_omeg_max * omega, where omega is the previous value of the angular velocity. (typical value : fact_omeg_max = 1.5) | |
xgg1 | [output] : x coordinate (relative to star 1 mapping) of the ``center of mass'' of star 1 | |
xgg2 | [output] : x coordinate (relative to star 2 mapping) of the ``center of mass'' of star 2 |
Definition at line 80 of file binary_orbite.C.
References Param::add_double(), Tensor::change_triad(), Vector::change_triad(), Metric::cov(), Scalar::dsdx(), et, Star::get_beta(), Star::get_ent(), Star::get_eos(), Star::get_gamma(), Star_bin::get_loggam(), Star_bin::get_logn_auto(), Star_bin::get_logn_comp(), Star::get_mp(), Star::get_nn(), Tbl::get_taille(), norme(), omega, Scalar::val_grid_point(), x_axe, Star_bin::xa_barycenter(), zero_list(), zerosec(), and zerosec_b().
void Binary::sauve | ( | FILE * | fich | ) | const |
Save in a file.
Definition at line 211 of file binary.C.
References fwrite_be(), omega, Star_bin::sauve(), star1, star2, and x_axe.
double Binary::separation | ( | ) | const |
Returns the coordinate separation of the two stellar centers [r_unit
].
Definition at line 600 of file binary.C.
References Map::get_ori_x(), Map::get_ori_y(), Map::get_ori_z(), Star::mp, sqrt(), star1, and star2.
Star_bin& Binary::set | ( | int | i | ) | [inline] |
Read/write of the star no. i.
Definition at line 182 of file binary.h.
References del_deriv(), and et.
void Binary::set_der_0x0 | ( | ) | const [protected] |
Sets to 0x0
all the pointers on derived quantities.
Definition at line 173 of file binary.C.
References p_angu_mom, p_ham_constr, p_mass_adm, p_mass_kom, p_mom_constr, p_total_ener, and p_virial.
double& Binary::set_omega | ( | ) | [inline] |
double& Binary::set_x_axe | ( | ) | [inline] |
double Binary::total_ener | ( | ) | const |
Total energy (excluding the rest mass energy).
In the Newtonian case, it is defined as the sum of kinetic, internal, and gravitational potential energies.
In the relativistic case, it is defined as .
Definition at line 603 of file binary_global.C.
References p_total_ener.
double Binary::virial | ( | ) | const |
Estimates the relative error on the virial theorem.
Definition at line 623 of file binary_global.C.
References mass_adm(), mass_kom(), and p_virial.
void Binary::write_global | ( | ostream & | ost | ) | const |
Write global quantities in a formatted file.
This file can be read by an external program.
Definition at line 474 of file binary.C.
References angu_mom(), Star::get_ener(), Star::get_ent(), Star::get_eos(), Eos_poly::get_gam(), Eos_poly::get_kap(), Map::get_mg(), Star::get_mp(), Mg3d::get_np(), Mg3d::get_nr(), Mg3d::get_nt(), Mg3d::get_nzone(), mass_adm(), mass_adm_vol(), Star_bin::mass_b(), mass_kom(), mass_kom_vol(), omega, pow(), Star::ray_eq(), Star::ray_eq_pis2(), Star::ray_pole(), separation(), sqrt(), star1, star2, Scalar::val_grid_point(), Map::val_r(), virial(), and Star_bin::xa_barycenter().
ostream& operator<< | ( | ostream & | , | |
const Binary & | ||||
) | [friend] |
Display.
Star_bin* Binary::et[2] [protected] |
double Binary::omega [protected] |
Tbl* Binary::p_angu_mom [mutable, protected] |
double* Binary::p_ham_constr [mutable, protected] |
double* Binary::p_mass_adm [mutable, protected] |
double* Binary::p_mass_kom [mutable, protected] |
Tbl* Binary::p_mom_constr [mutable, protected] |
double* Binary::p_total_ener [mutable, protected] |
double* Binary::p_virial [mutable, protected] |
Star_bin Binary::star1 [protected] |
Star_bin Binary::star2 [protected] |
double Binary::x_axe [protected] |