Lorene::Binary_xcts Class Reference
Stars and black holes

Binary systems in eXtended Conformal Thin Sandwich formulation. More...

`#include <binary_xcts.h>`

## Public Member Functions

| Binary_xcts (Map &mp1, int nzet1, const Eos &eos1, int irrot1, Map &mp2, int nzet2, const Eos &eos2, int irrot2)
| Standard constructor.
| Binary_xcts (const Binary_xcts &)
| Copy constructor.
| Binary_xcts (Map &mp1, const Eos &eos1, Map &mp2, const Eos &eos2, FILE *fich)
| Constructor from a file (see `sauve(FILE* )`).
| ~Binary_xcts ()
| Destructor.
void | operator= (const Binary_xcts &)
| Assignment to another `Binary_xcts`.
Star_bin_xcts & | 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_xcts & | 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.
const Tbl & | lin_mom () const
| Total linear momentum.
double | total_ener () const
| Total energy (excluding the rest mass energy).
double | virial () const
| Estimates the relative error on the virial theorem.
double | virial_vol () const
| Estimates the relative error on the virial theorem (volume version).
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`.

## 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_xcts | star1
| First star of the system.
Star_bin_xcts | star2
| Second star of the system.
Star_bin_xcts * | 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.
Tbl * | p_lin_mom
| Total linear momentum of the system.
double * | p_total_ener
| Total energy of the system.
double * | p_virial
| Virial theorem error.
double * | p_virial_vol
| Virial theorem error (volume version).

## Private Member Functions

ostream & | operator>> (ostream &) const
| Operator >> (function called by the operator <<).

## Friends

ostream & | operator<< (ostream &ost, const Binary_xcts &bibi)
| Display.

## Detailed Description

Binary systems in eXtended Conformal Thin Sandwich formulation.

*** UNDER DEVELOPMENT ***()

Definition at line 59 of file binary_xcts.h.

## Constructor & Destructor Documentation

## Binary_xcts() [1/3]

Lorene::Binary_xcts::Binary_xcts | ( | Map & | mp1,
|  | int | nzet1,
|  | const Eos & | eos1,
|  | int | irrot1,
|  | Map & | mp2,
|  | int | nzet2,
|  | const Eos & | eos2,
|  | int | irrot2 )

Standard constructor.

Parameters

  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

Definition at line 72 of file binary_xcts.C.

References et, Lorene::Map(), omega, set_der_0x0(), star1, star2, and x_axe.

## Binary_xcts() [2/3]

Lorene::Binary_xcts::Binary_xcts | ( | const Binary_xcts & | bibi | ) |

Copy constructor.

Definition at line 96 of file binary_xcts.C.

References Binary_xcts(), et, omega, set_der_0x0(), star1, star2, and x_axe.

## Binary_xcts() [3/3]

Lorene::Binary_xcts::Binary_xcts | ( | Map & | mp1,
|  | const Eos & | eos1,
|  | Map & | mp2,
|  | const Eos & | eos2,
|  | FILE * | fich )

Constructor from a file (see `sauve(FILE* )`).

Parameters

  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 111 of file binary_xcts.C.

References et, Lorene::fread_be(), Lorene::Map(), omega, set_der_0x0(), star1, star2, and x_axe.

## ~Binary_xcts()

Lorene::Binary_xcts::~Binary_xcts | ( |  | ) |

Destructor.

Definition at line 136 of file binary_xcts.C.

References del_deriv().

## Member Function Documentation

## analytical_omega()

void Lorene::Binary_xcts::analytical_omega | ( |  | ) |

Sets the orbital angular velocity to some 2-PN analytical value (Keplerian value in the Newtonian case).

Definition at line 50 of file binary_omega_ana_xcts.C.

References del_deriv(), omega, Lorene::pow(), separation(), Lorene::sqrt(), star1, and star2.

## analytical_shift()

void Lorene::Binary_xcts::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 53 of file binary_anashift_xcts.C.

References Lorene::Scalar::annule(), Lorene::Tenseur::dec_dzpuis(), Lorene::Tensor::dec_dzpuis(), Lorene::Scalar::derive_con(), Lorene::Tensor::derive_con(), et, Lorene::get_bvect_cart(), Lorene::Map(), omega, separation(), Lorene::Tenseur::set(), Lorene::Vector::set(), Lorene::Tenseur::set_etat_qcq(), Lorene::skxk(), Lorene::Scalar::std_spectral_base(), and Lorene::Vector::std_spectral_base().

## angu_mom()

const Tbl & Lorene::Binary_xcts::angu_mom | ( |  | ) | const

Total angular momentum.

Returns
  1-D `Tbl` of size 3, according to
  - `angu_mom()`(0) = ,
  - `angu_mom()`(1) = ,
  - `angu_mom()`(2) = .

Definition at line 213 of file binary_global_xcts.C.

References Lorene::Vector::change_triad(), Lorene::contract(), et, Lorene::Scalar::integrale(), Lorene::Map(), p_angu_mom, Lorene::pow(), Lorene::Vector::set(), Lorene::Vector::std_spectral_base(), and Lorene::Tensor::up_down().

## del_deriv()

void Lorene::Binary_xcts::del_deriv | ( |  | ) | const

protected

Deletes all the derived quantities.

Definition at line 146 of file binary_xcts.C.

References p_angu_mom, p_lin_mom, p_mass_adm, p_mass_kom, p_total_ener, p_virial, p_virial_vol, and set_der_0x0().

## display_poly()

void Lorene::Binary_xcts::display_poly | ( | ostream & | ost | ) | const

Display in polytropic units.

Definition at line 246 of file binary_xcts.C.

References angu_mom(), Lorene::Eos_poly::get_gam(), Lorene::Eos_poly::get_kap(), mass_adm(), mass_kom(), omega, Lorene::pow(), separation(), Lorene::sqrt(), star1, and star2.

## get_omega()

double Lorene::Binary_xcts::get_omega | ( |  | ) | const

inline

Returns the orbital angular velocity [`f_unit`].

Definition at line 190 of file binary_xcts.h.

References omega.

## get_x_axe()

double Lorene::Binary_xcts::get_x_axe | ( |  | ) | const

inline

Returns the absolute coordinate X of the rotation axis [`r_unit`].

Definition at line 193 of file binary_xcts.h.

References x_axe.

## ham_constr()

double Lorene::Binary_xcts::ham_constr | ( |  | ) | const

Estimates the relative error on the Hamiltonian constraint.

## lin_mom()

const Tbl & Lorene::Binary_xcts::lin_mom | ( |  | ) | const

Total linear momentum.

Definition at line 268 of file binary_global_xcts.C.

References Lorene::Vector::change_triad(), et, p_lin_mom, Lorene::pow(), and Lorene::Vector::std_spectral_base().

## mass_adm()

double Lorene::Binary_xcts::mass_adm | ( |  | ) | const

Total ADM mass.

Definition at line 82 of file binary_global_xcts.C.

References Lorene::Vector::change_triad(), et, Lorene::Map_af::integrale_surface_infini(), and p_mass_adm.

## mass_adm_vol()

double Lorene::Binary_xcts::mass_adm_vol | ( |  | ) | const

Total ADM mass (computed by a volume integral).

Definition at line 113 of file binary_global_xcts.C.

References et, Lorene::Scalar::integrale(), Lorene::pow(), and Lorene::Scalar::std_spectral_base().

## mass_kom()

double Lorene::Binary_xcts::mass_kom | ( |  | ) | const

Total Komar mass.

Definition at line 149 of file binary_global_xcts.C.

References Lorene::Vector::change_triad(), Lorene::Scalar::derive_con(), et, Lorene::Map_af::integrale_surface_infini(), and p_mass_kom.

## mass_kom_vol()

double Lorene::Binary_xcts::mass_kom_vol | ( |  | ) | const

Total Komar mass (computed by a volume integral).

Definition at line 176 of file binary_global_xcts.C.

References et, Lorene::Scalar::integrale(), Lorene::pow(), and Lorene::Scalar::std_spectral_base().

## mom_constr()

const Tbl & Lorene::Binary_xcts::mom_constr | ( |  | ) | const

Estimates the relative error on the momentum constraint.

## operator()()

const Star_bin_xcts & Lorene::Binary_xcts::operator() | ( | int | i | ) | const

inline

Returns a reference to the star no. i.

Definition at line 185 of file binary_xcts.h.

References et.

## operator=()

void Lorene::Binary_xcts::operator= | ( | const Binary_xcts & | bibi | ) |

Assignment to another `Binary_xcts`.

Definition at line 182 of file binary_xcts.C.

References Binary_xcts(), del_deriv(), omega, star1, star2, and x_axe.

## operator>>()

ostream & Lorene::Binary_xcts::operator>> | ( | ostream & | ost | ) | const

private

Operator >> (function called by the operator <<).

Definition at line 219 of file binary_xcts.C.

References omega, separation(), star1, star2, and x_axe.

## orbit()

void Lorene::Binary_xcts::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`.

Parameters

  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 97 of file binary_orbit_xcts.C.

References Lorene::Param::add_double(), Lorene::Param::add_int(), Lorene::Vector::change_triad(), Lorene::contract(), Lorene::Scalar::dsdx(), et, Lorene::Tbl::get_taille(), Lorene::log(), Lorene::Map(), omega, Lorene::pow(), Lorene::Scalar::std_spectral_base(), Lorene::Tensor::up_down(), Lorene::Scalar::val_grid_point(), x_axe, Lorene::zero_list(), Lorene::zerosec(), and Lorene::zerosec_b().

## sauve()

void Lorene::Binary_xcts::sauve | ( | FILE * | fich | ) | const

Save in a file.

Definition at line 200 of file binary_xcts.C.

References Lorene::fwrite_be(), omega, star1, star2, and x_axe.

## separation()

double Lorene::Binary_xcts::separation | ( |  | ) | const

Returns the coordinate separation of the two stellar centers [`r_unit`].

Definition at line 434 of file binary_xcts.C.

References Lorene::sqrt(), star1, and star2.

## set()

Star_bin_xcts & Lorene::Binary_xcts::set | ( | int | i | ) |

inline

Read/write of the star no. i.

Definition at line 167 of file binary_xcts.h.

References del_deriv(), and et.

## set_der_0x0()

void Lorene::Binary_xcts::set_der_0x0 | ( |  | ) | const

protected

Sets to `0x0` all the pointers on derived quantities.

Definition at line 162 of file binary_xcts.C.

References p_angu_mom, p_lin_mom, p_mass_adm, p_mass_kom, p_total_ener, p_virial, and p_virial_vol.

## set_omega()

double & Lorene::Binary_xcts::set_omega | ( |  | ) |

inline

Sets the orbital angular velocity [`f_unit`].

Definition at line 175 of file binary_xcts.h.

References omega.

## set_x_axe()

double & Lorene::Binary_xcts::set_x_axe | ( |  | ) |

inline

Sets the absolute coordinate X of the rotation axis [`r_unit`].

Definition at line 178 of file binary_xcts.h.

References x_axe.

## total_ener()

double Lorene::Binary_xcts::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 307 of file binary_global_xcts.C.

References mass_adm(), p_total_ener, star1, and star2.

## virial()

double Lorene::Binary_xcts::virial | ( |  | ) | const

Estimates the relative error on the virial theorem.

Definition at line 326 of file binary_global_xcts.C.

References mass_adm(), mass_kom(), and p_virial.

## virial_vol()

double Lorene::Binary_xcts::virial_vol | ( |  | ) | const

Estimates the relative error on the virial theorem (volume version).

Definition at line 345 of file binary_global_xcts.C.

References mass_adm_vol(), mass_kom_vol(), and p_virial_vol.

## write_global()

void Lorene::Binary_xcts::write_global | ( | ostream & | ost | ) | const

Write global quantities in a formatted file.

This file can be read by an external program.

Definition at line 296 of file binary_xcts.C.

References angu_mom(), Lorene::dsdr(), Lorene::Eos_poly::get_gam(), Lorene::Eos_poly::get_kap(), Lorene::Mg3d::get_np(), Lorene::Mg3d::get_nr(), Lorene::Mg3d::get_nt(), Lorene::Mg3d::get_nzone(), Lorene::Map(), mass_adm(), mass_adm_vol(), mass_kom(), mass_kom_vol(), omega, Lorene::pow(), separation(), Lorene::sqrt(), star1, star2, virial(), and virial_vol().

## Friends And Related Symbol Documentation

## operator<<

ostream & operator<< | ( | ostream & | ost,
|  | const Binary_xcts & | bibi )

friend

Display.

Definition at line 212 of file binary_xcts.C.

References Binary_xcts(), and operator<<.

## Member Data Documentation

## et

Star_bin_xcts* Lorene::Binary_xcts::et[2]

protected

Array of the two stars (to perform loops on the stars): `et`[0] contains the address of `star1` and `et`[1] that of `star2`.

Definition at line 75 of file binary_xcts.h.

## omega

double Lorene::Binary_xcts::omega

protected

Angular velocity with respect to an asymptotically inertial observer.

Definition at line 80 of file binary_xcts.h.

## p_angu_mom

Tbl* Lorene::Binary_xcts::p_angu_mom

mutable protected

Total angular momentum of the system.

Definition at line 97 of file binary_xcts.h.

## p_lin_mom

Tbl* Lorene::Binary_xcts::p_lin_mom

mutable protected

Total linear momentum of the system.

Definition at line 100 of file binary_xcts.h.

## p_mass_adm

double* Lorene::Binary_xcts::p_mass_adm

mutable protected

Total ADM mass of the system.

Definition at line 91 of file binary_xcts.h.

## p_mass_kom

double* Lorene::Binary_xcts::p_mass_kom

mutable protected

Total Komar mass of the system.

Definition at line 94 of file binary_xcts.h.

## p_total_ener

double* Lorene::Binary_xcts::p_total_ener

mutable protected

Total energy of the system.

Definition at line 103 of file binary_xcts.h.

## p_virial

double* Lorene::Binary_xcts::p_virial

mutable protected

Virial theorem error.

Definition at line 106 of file binary_xcts.h.

## p_virial_vol

double* Lorene::Binary_xcts::p_virial_vol

mutable protected

Virial theorem error (volume version).

Definition at line 109 of file binary_xcts.h.

## star1

Star_bin_xcts Lorene::Binary_xcts::star1

protected

First star of the system.

Definition at line 66 of file binary_xcts.h.

## star2

Star_bin_xcts Lorene::Binary_xcts::star2

protected

Second star of the system.

Definition at line 69 of file binary_xcts.h.

## x_axe

double Lorene::Binary_xcts::x_axe

protected

Absolute X coordinate of the rotation axis.

Definition at line 84 of file binary_xcts.h.

The documentation for this class was generated from the following files:

- binary_xcts.h
- binary_anashift_xcts.C
- binary_global_xcts.C
- binary_omega_ana_xcts.C
- binary_orbit_xcts.C
- binary_xcts.C