76#include "binary_xcts.h"
94 const Map_af map0 (
et[0]->get_mp()) ;
95 const Metric& flat = (
et[0]->get_flat()) ;
97 Vector dpsi((
et[0]->get_Psi()).derive_cov(flat)) ;
101 Scalar integrand ( dpsi(1) ) ;
120 double massadm = 0. ;
122 for (
int i=0; i<=1; i++) {
126 const Scalar& psi(
et[i]->get_Psi()) ;
133 const Scalar& ener_euler =
et[i]->get_ener_euler() ;
134 const Scalar& hacar_auto =
et[i]->get_hacar_auto() ;
135 const Scalar& hacar_comp =
et[i]->get_hacar_comp() ;
137 Scalar source = psi5 % ener_euler
138 + spsi7 % (hacar_auto + hacar_comp)/(4.*qpig) ;
161 const Scalar& logn =
et[0]->get_logn() ;
162 const Metric& flat =
et[0]->get_flat() ;
169 Scalar integrant (vect(1)) ;
185 for (
int i=0; i<=1; i++) {
187 const Scalar& Psi =
et[i]->get_Psi() ;
188 const Scalar& psi4 =
et[i]->get_psi4() ;
189 const Scalar& chi =
et[i]->get_chi() ;
191 const Scalar& ener_euler =
et[i]->get_ener_euler() ;
192 const Scalar& s_euler =
et[i]->get_s_euler() ;
193 const Scalar& hacar_auto =
et[i]->get_hacar_auto() ;
194 const Scalar& hacar_comp =
et[i]->get_hacar_comp() ;
196 Scalar psi4chi = psi4 % chi ;
199 Scalar source = 0.5 * ener_euler * (psi4chi + psi4 % Psi)
200 + psi4chi * s_euler +
pow(Psi, -7.) * (7.*chi/Psi + 1.)
201 * (hacar_auto + hacar_comp) / (8.*qpig) ;
228 for (
int i=0; i<=1; i++) {
230 const Map& mp =
et[i]->get_mp() ;
233 Vector vphi(mp, CON, bvect_ref) ;
234 Scalar yya (mp) ; yya = mp.ya ;
235 Scalar xxa (mp) ; xxa = mp.xa ;
236 vphi.
set(1) = - yya ;
245 const Scalar& ee =
et[i]->get_ener_euler() ;
246 const Scalar& pp =
et[i]->get_press() ;
248 Vector jmom =
pow(
et[i]->get_Psi(), 10) * (ee + pp)
249 * (
et[i]->get_u_euler()) ;
252 const Metric& flat =
et[i]->get_flat() ;
283 for (
int i=0; i<=1; i++) {
285 const Scalar& ee =
et[i]->get_ener_euler() ;
286 const Scalar& pp =
et[i]->get_press() ;
287 Vector lmom =
pow(
et[i]->get_Psi(), 10) * (ee + pp)
288 * (
et[i]->get_u_euler() ) ;
294 for (
int j=1; j<=2; j++)
295 p_lin_mom->set(j-1) += lmom(j).integrale() ;
Cartesian vectorial bases (triads).
const Tbl & lin_mom() const
Total linear momentum.
double total_ener() const
Total energy (excluding the rest mass energy).
double virial_vol() const
Estimates the relative error on the virial theorem (volume version).
double * p_mass_kom
Total Komar mass of the system.
Star_bin_xcts star2
Second star of the system.
double mass_adm_vol() const
Total ADM mass (computed by a volume integral).
double * p_virial_vol
Virial theorem error (volume version).
Tbl * p_lin_mom
Total linear momentum of the system.
double mass_kom_vol() const
Total Komar mass (computed by a volume integral).
Star_bin_xcts star1
First star of the system.
double mass_adm() const
Total ADM mass.
double * p_mass_adm
Total ADM mass of the system.
double * p_total_ener
Total energy of the system.
double mass_kom() const
Total Komar mass.
double virial() const
Estimates the relative error on the virial theorem.
Tbl * p_angu_mom
Total angular momentum 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]...
double * p_virial
Virial theorem error.
const Tbl & angu_mom() const
Total angular momentum.
double integrale_surface_infini(const Cmp &ci) const
Performs the surface integration of ci at infinity.
Metric for tensor calculation.
Tensor field of valence 0 (or component of a tensorial field).
double integrale() const
Computes the integral over all space of *this .
virtual void std_spectral_base()
Sets the spectral bases of the Valeur va to the standard ones for a scalar field.
const Vector & derive_con(const Metric &gam) const
Returns the "contravariant" derivative of *this with respect to some metric , by raising the index of...
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 pow(const Cmp &, int)
Power .
Tensor up_down(const Metric &gam) const
Computes a new tensor by raising or lowering all the indices of *this .
Tenseur contract(const Tenseur &, int id1, int id2)
Self contraction of two indices of a Tenseur .
Map(const Mg3d &)
Constructor from a multi-domain 3D grid.
Standard units of space, time and mass.