LORENE
|
#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. More... | |
Binary (const Binary &) | |
Copy constructor. More... | |
Binary (Map &mp1, const Eos &eos1, Map &mp2, const Eos &eos2, FILE *fich) | |
Constructor from a file (see sauve(FILE* ) ). More... | |
~Binary () | |
Destructor. More... | |
void | operator= (const Binary &) |
Assignment to another Binary . More... | |
Star_bin & | set (int i) |
Read/write of the star no. i. More... | |
double & | set_omega () |
Sets the orbital angular velocity [f_unit ]. More... | |
double & | set_x_axe () |
Sets the absolute coordinate X of the rotation axis [r_unit ]. More... | |
const Star_bin & | operator() (int i) const |
Returns a reference to the star no. i. More... | |
double | get_omega () const |
Returns the orbital angular velocity [f_unit ]. More... | |
double | get_x_axe () const |
Returns the absolute coordinate X of the rotation axis [r_unit ]. More... | |
double | separation () const |
Returns the coordinate separation of the two stellar centers [r_unit ]. More... | |
void | sauve (FILE *) const |
Save in a file. More... | |
void | display_poly (ostream &) const |
Display in polytropic units. More... | |
void | write_global (ostream &) const |
Write global quantities in a formatted file. More... | |
double | mass_adm () const |
Total ADM mass. More... | |
double | mass_adm_vol () const |
Total ADM mass (computed by a volume integral) More... | |
double | mass_kom () const |
Total Komar mass. More... | |
double | mass_kom_vol () const |
Total Komar mass (computed by a volume integral) More... | |
const Tbl & | angu_mom () const |
Total angular momentum. More... | |
double | total_ener () const |
Total energy (excluding the rest mass energy). More... | |
double | virial () const |
Estimates the relative error on the virial theorem. More... | |
double | ham_constr () const |
Estimates the relative error on the Hamiltonian constraint. More... | |
const Tbl & | mom_constr () const |
Estimates the relative error on the momentum constraint. More... | |
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 . More... | |
void | analytical_omega () |
Sets the orbital angular velocity to some 2-PN analytical value (Keplerian value in the Newtonian case) More... | |
void | analytical_shift () |
Sets some analytical template for the shift vector (via the members w_shift and khi_shift of the two Star_bin . More... | |
void | fait_decouple () |
Calculates decouple which is used to obtain qq_auto by the formula : qq_auto = decouple * qq . More... | |
void | dirac_gauge () |
Function used to impose Dirac gauge during an iteration. More... | |
void | helical () |
Function testing the helical symmetry. More... | |
Protected Member Functions | |
void | del_deriv () const |
Deletes all the derived quantities. More... | |
void | set_der_0x0 () const |
Sets to 0x0 all the pointers on derived quantities. More... | |
Protected Attributes | |
Star_bin | star1 |
First star of the system. More... | |
Star_bin | star2 |
Second star of the system. More... | |
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 . More... | |
double | omega |
Angular velocity with respect to an asymptotically inertial observer. More... | |
double | x_axe |
Absolute X coordinate of the rotation axis. More... | |
double * | p_mass_adm |
Total ADM mass of the system. More... | |
double * | p_mass_kom |
Total Komar mass of the system. More... | |
Tbl * | p_angu_mom |
Total angular momentum of the system. More... | |
double * | p_total_ener |
Total energy of the system. More... | |
double * | p_virial |
Virial theorem error. More... | |
double * | p_ham_constr |
Relative error on the Hamiltonian constraint. More... | |
Tbl * | p_mom_constr |
Relative error on the momentum constraint. More... | |
Private Member Functions | |
ostream & | operator>> (ostream &) const |
Operator >> (function called by the operator <<). More... | |
Friends | |
ostream & | operator<< (ostream &, const Binary &) |
Display. More... | |
Binary systems.
*** UNDER DEVELOPMENT ***()
Lorene::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 102 of file binary.C.
References et, omega, set_der_0x0(), star1, star2, and x_axe.
Lorene::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 136 of file binary.C.
References et, Lorene::fread_be(), omega, set_der_0x0(), star1, star2, and x_axe.
Lorene::Binary::~Binary | ( | ) |
void Lorene::Binary::analytical_omega | ( | ) |
Sets the orbital angular velocity to some 2-PN analytical value (Keplerian value in the Newtonian case)
Definition at line 59 of file binary_omegaana.C.
References del_deriv(), Lorene::Star_bin::is_irrotational(), Lorene::Star_bin::mass_g(), omega, Lorene::pow(), Lorene::Star::ray_eq(), separation(), Lorene::sqrt(), star1, and star2.
void Lorene::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 74 of file binary_anashift.C.
References Lorene::Scalar::annule(), Lorene::Tenseur::dec_dzpuis(), Lorene::Tensor::dec_dzpuis(), Lorene::Tensor::derive_con(), et, Lorene::Map::get_bvect_cart(), Lorene::Star_bin::get_flat(), Lorene::Map::get_mg(), Lorene::Star::get_mp(), Lorene::Star::get_nzet(), Lorene::Mg3d::get_nzone(), Lorene::Star_bin::mass_g(), omega, Lorene::Map::r, Lorene::Star::ray_eq(), separation(), Lorene::Vector::set(), Lorene::Tensor::set(), Lorene::Tenseur::set(), Lorene::Star_bin::set_beta_auto(), Lorene::Tenseur::set_etat_qcq(), Lorene::Map::sinp, Lorene::Map::sint, Lorene::skxk(), Lorene::Vector::std_spectral_base(), Lorene::Scalar::std_spectral_base(), and Lorene::Map::y.
const Tbl & Lorene::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 288 of file binary_global.C.
References Lorene::Tbl::annule_hard(), Lorene::Vector::change_triad(), Lorene::contract(), et, Lorene::exp(), Lorene::Map::flat_met_cart(), Lorene::Map::get_bvect_cart(), Lorene::Connection::get_delta(), Lorene::Star::get_ener_euler(), Lorene::Star_bin::get_gtilde(), Lorene::Map::get_mg(), Lorene::Star::get_mp(), Lorene::Mg3d::get_nzone(), Lorene::Star::get_press(), Lorene::Star_bin::get_psi4(), Lorene::Star_bin::get_tkij_auto(), Lorene::Star::get_u_euler(), Lorene::Scalar::integrale(), p_angu_mom, Lorene::pow(), Lorene::Map::r, Lorene::Itbl::set(), Lorene::Tbl::set(), Lorene::Vector::set(), Lorene::Tensor::set(), Lorene::Scalar::set_outer_boundary(), Lorene::Vector::std_spectral_base(), Lorene::Scalar::std_spectral_base(), Lorene::Tensor::up_down(), Lorene::Map::val_r(), Lorene::Map::xa, and Lorene::Map::ya.
|
protected |
Deletes all the derived quantities.
Definition at line 167 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 Lorene::Binary::dirac_gauge | ( | ) |
Function used to impose Dirac gauge during an iteration.
Definition at line 62 of file binary_dirac.C.
References Lorene::Param::add_cmp_mod(), Lorene::Param::add_double(), Lorene::Param::add_int(), Lorene::Param::add_int_mod(), Lorene::Tensor::change_triad(), Lorene::Metric::con(), Lorene::Metric_flat::con(), Lorene::Tensor::dec_dzpuis(), Lorene::Star_bin::decouple, Lorene::Scalar::derive_con(), Lorene::Sym_tensor::derive_lie(), Lorene::Metric::determinant(), Lorene::diffrel(), Lorene::diffrelmax(), Lorene::Sym_tensor::divergence(), Lorene::Vector::divergence(), Lorene::exp(), Lorene::Star_bin::flat, Lorene::Star::gamma, Lorene::Map::get_bvect_cart(), Lorene::Map::get_mg(), Lorene::Mg3d::get_np(), Lorene::Mg3d::get_nr(), Lorene::Mg3d::get_nt(), Lorene::Mg3d::get_nzone(), Lorene::Tensor::get_triad(), Lorene::Star_bin::gtilde, Lorene::Star_bin::hij, Lorene::Star_bin::hij_auto, Lorene::Star_bin::hij_comp, Lorene::Scalar::import(), Lorene::Tensor::inc_dzpuis(), Lorene::Star::mp, Lorene::norme(), Lorene::pow(), Lorene::Star_bin::psi4, Lorene::Map::r, Lorene::Vector::set(), Lorene::Tensor::set(), Lorene::Cmp::set(), Lorene::Scalar::set_domain(), Lorene::Scalar::set_etat_qcq(), Lorene::Cmp::set_etat_qcq(), Lorene::Scalar::set_outer_boundary(), Lorene::Tensor::set_triad(), star1, star2, Lorene::Tensor::std_spectral_base(), Lorene::Scalar::std_spectral_base(), and Lorene::Map::val_r().
void Lorene::Binary::display_poly | ( | ostream & | ost | ) | const |
Display in polytropic units.
Definition at line 266 of file binary.C.
References angu_mom(), Lorene::Star::get_eos(), Lorene::Eos_poly::get_gam(), Lorene::Eos_poly::get_kap(), mass_adm(), Lorene::Star_bin::mass_b(), mass_kom(), omega, Lorene::pow(), Lorene::Star::ray_eq(), Lorene::Star::ray_eq_pi(), separation(), Lorene::sqrt(), star1, star2, and Lorene::Star_bin::xa_barycenter().
void Lorene::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 318 of file binary.C.
References Lorene::Scalar::allocate_all(), Lorene::Map::convert_absolute(), Lorene::cos(), Lorene::Star_bin::decouple, Lorene::Map::get_mg(), Lorene::Star::get_mp(), Lorene::Mg3d::get_np(), Lorene::Mg3d::get_nr(), Lorene::Mg3d::get_nt(), Lorene::Mg3d::get_nzone(), Lorene::Map::get_ori_x(), Lorene::norme(), Lorene::pow(), Lorene::Map::r, Lorene::sin(), star1, star2, Lorene::Map::xa, Lorene::Map::ya, and Lorene::Map::za.
|
inline |
|
inline |
double Lorene::Binary::ham_constr | ( | ) | const |
Estimates the relative error on the Hamiltonian constraint.
void Lorene::Binary::helical | ( | ) |
Function testing the helical symmetry.
Definition at line 79 of file binary_helical.C.
References Lorene::Tbl::annule_hard(), Lorene::Star::beta, Lorene::Star_bin::beta_auto, Lorene::Star_bin::beta_comp, Lorene::Metric::con(), Lorene::Metric_flat::con(), Lorene::contract(), Lorene::Metric::cov(), Lorene::Star_bin::dcon_logn, Lorene::Star_bin::dcon_phi, Lorene::Star_bin::dcov_logn, Lorene::Star_bin::dcov_phi, Lorene::Scalar::dec_dzpuis(), Lorene::Tensor::derive_con(), Lorene::Scalar::derive_con(), Lorene::Tensor_sym::derive_con(), Lorene::Tensor::derive_cov(), Lorene::Scalar::derive_cov(), Lorene::Tensor_sym::derive_cov(), Lorene::Sym_tensor::derive_lie(), Lorene::Metric::determinant(), Lorene::Sym_tensor::divergence(), Lorene::Vector::divergence(), Lorene::Star::ener_euler, et, Lorene::exp(), Lorene::Star_bin::flat, Lorene::Star::gamma, Lorene::Map::get_bvect_cart(), Lorene::Star::get_gamma(), Lorene::Map::get_mg(), Lorene::Star::get_mp(), Lorene::Mg3d::get_nzone(), Lorene::Map::get_ori_x(), Lorene::Map::get_rot_phi(), Lorene::Star_bin::gtilde, Lorene::Star_bin::hij, Lorene::Star_bin::hij_auto, Lorene::Star_bin::hij_comp, Lorene::Tenseur::inc_dzpuis(), Lorene::Tensor::inc_dzpuis(), Lorene::Scalar::inc_dzpuis(), Lorene::Scalar::integrale_domains(), Lorene::Scalar::laplacian(), Lorene::Star_bin::lnq_auto, Lorene::Star::logn, Lorene::Star_bin::logn_auto, mass_adm(), Lorene::Star::mp, Lorene::Star::nn, omega, Lorene::pow(), Lorene::Star_bin::psi4, Lorene::Map::r, Lorene::Star::s_euler, Lorene::Coord::set(), Lorene::Itbl::set(), Lorene::Tbl::set(), Lorene::Tensor::set(), Lorene::sqrt(), star1, star2, Lorene::Scalar::std_spectral_base(), Lorene::Star::stress_euler, Lorene::Star_bin::tkij_auto, Lorene::Star_bin::tkij_comp, Lorene::Tensor::up_down(), Lorene::Map::val_r(), Lorene::Map::xa, Lorene::Map::ya, and Lorene::Map::za.
double Lorene::Binary::mass_adm | ( | ) | const |
Total ADM mass.
Definition at line 106 of file binary_global.C.
References Lorene::Vector::change_triad(), Lorene::contract(), et, Lorene::Map::get_bvect_spher(), Lorene::Star_bin::get_flat(), Lorene::Map_af::integrale_surface_infini(), and p_mass_adm.
double Lorene::Binary::mass_adm_vol | ( | ) | const |
Total ADM mass (computed by a volume integral)
Definition at line 138 of file binary_global.C.
References Lorene::Metric::con(), Lorene::contract(), Lorene::Metric::cov(), Lorene::Tensor::derive_cov(), Lorene::Scalar::derive_cov(), Lorene::Tensor_sym::derive_cov(), et, Lorene::Star_bin::get_dcov_logn(), Lorene::Star_bin::get_dcov_phi(), Lorene::Star::get_ener_euler(), Lorene::Star_bin::get_flat(), Lorene::Star_bin::get_gtilde(), Lorene::Star_bin::get_hij(), Lorene::Star_bin::get_hij_auto(), Lorene::Star_bin::get_kcar_auto(), Lorene::Star_bin::get_kcar_comp(), Lorene::Star_bin::get_lnq_auto(), Lorene::Star_bin::get_logn_auto(), Lorene::Star_bin::get_psi4(), Lorene::Tensor::inc_dzpuis(), Lorene::Scalar::integrale(), Lorene::pow(), and Lorene::Scalar::std_spectral_base().
double Lorene::Binary::mass_kom | ( | ) | const |
Total Komar mass.
Definition at line 204 of file binary_global.C.
References Lorene::Vector::change_triad(), Lorene::contract(), Lorene::Tensor::derive_con(), Lorene::Tensor::derive_cov(), et, Lorene::Map::get_bvect_spher(), Lorene::Star_bin::get_flat(), Lorene::Star_bin::get_hij(), Lorene::Star::get_logn(), Lorene::Map_af::integrale_surface_infini(), and p_mass_kom.
double Lorene::Binary::mass_kom_vol | ( | ) | const |
Total Komar mass (computed by a volume integral)
Definition at line 232 of file binary_global.C.
References Lorene::Metric::con(), Lorene::contract(), Lorene::Scalar::derive_cov(), et, Lorene::exp(), Lorene::Star_bin::get_dcon_logn(), Lorene::Star_bin::get_dcov_logn(), Lorene::Star_bin::get_dcov_phi(), Lorene::Star::get_ener_euler(), Lorene::Star_bin::get_flat(), Lorene::Star_bin::get_gtilde(), Lorene::Star_bin::get_hij(), Lorene::Star_bin::get_kcar_auto(), Lorene::Star_bin::get_kcar_comp(), Lorene::Star_bin::get_logn_auto(), Lorene::Star_bin::get_logn_comp(), Lorene::Star_bin::get_psi4(), Lorene::Star::get_s_euler(), Lorene::Tensor::inc_dzpuis(), Lorene::Scalar::integrale(), and Lorene::Scalar::std_spectral_base().
const Tbl& Lorene::Binary::mom_constr | ( | ) | const |
Estimates the relative error on the momentum constraint.
|
inline |
void Lorene::Binary::operator= | ( | const Binary & | bibi | ) |
|
private |
void Lorene::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 90 of file binary_orbite.C.
References Lorene::Param::add_double(), Lorene::Vector::change_triad(), Lorene::Tensor::change_triad(), Lorene::Metric::cov(), Lorene::Scalar::dsdx(), et, Lorene::Star::get_beta(), Lorene::Star::get_ent(), Lorene::Star::get_eos(), Lorene::Star::get_gamma(), Lorene::Star_bin::get_loggam(), Lorene::Star_bin::get_logn_auto(), Lorene::Star_bin::get_logn_comp(), Lorene::Star::get_mp(), Lorene::Star::get_nn(), Lorene::Tbl::get_taille(), Lorene::norme(), omega, Lorene::Scalar::val_grid_point(), x_axe, Lorene::Star_bin::xa_barycenter(), Lorene::zero_list(), Lorene::zerosec(), and Lorene::zerosec_b().
void Lorene::Binary::sauve | ( | FILE * | fich | ) | const |
Save in a file.
Definition at line 221 of file binary.C.
References Lorene::fwrite_be(), omega, Lorene::Star_bin::sauve(), star1, star2, and x_axe.
double Lorene::Binary::separation | ( | ) | const |
Returns the coordinate separation of the two stellar centers [r_unit
].
Definition at line 610 of file binary.C.
References Lorene::Map::get_ori_x(), Lorene::Map::get_ori_y(), Lorene::Map::get_ori_z(), Lorene::Star::mp, Lorene::sqrt(), star1, and star2.
|
inline |
Read/write of the star no. i.
Definition at line 186 of file binary.h.
References del_deriv(), and et.
|
protected |
Sets to 0x0
all the pointers on derived quantities.
Definition at line 183 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.
|
inline |
|
inline |
double Lorene::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 610 of file binary_global.C.
References p_total_ener.
double Lorene::Binary::virial | ( | ) | const |
Estimates the relative error on the virial theorem.
Definition at line 630 of file binary_global.C.
References mass_adm(), mass_kom(), and p_virial.
void Lorene::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 484 of file binary.C.
References angu_mom(), Lorene::Star::get_ener(), Lorene::Star::get_ent(), Lorene::Star::get_eos(), Lorene::Eos_poly::get_gam(), Lorene::Eos_poly::get_kap(), Lorene::Map::get_mg(), Lorene::Star::get_mp(), Lorene::Mg3d::get_np(), Lorene::Mg3d::get_nr(), Lorene::Mg3d::get_nt(), Lorene::Mg3d::get_nzone(), mass_adm(), mass_adm_vol(), Lorene::Star_bin::mass_b(), mass_kom(), mass_kom_vol(), omega, Lorene::pow(), Lorene::Star::ray_eq(), Lorene::Star::ray_eq_pis2(), Lorene::Star::ray_pole(), separation(), Lorene::sqrt(), star1, star2, Lorene::Scalar::val_grid_point(), Lorene::Map::val_r(), virial(), and Lorene::Star_bin::xa_barycenter().
|
friend |
|
protected |
|
protected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
protected |
|
protected |
|
protected |