26char binary_global_xcts_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Binary_xcts/binary_global_xcts.C,v 1.11 2014/10/13 08:52:45 j_novak Exp $" ;
73#include "binary_xcts.h"
91 const Map_af map0 (
et[0]->get_mp()) ;
92 const Metric& flat = (
et[0]->get_flat()) ;
94 Vector dpsi((
et[0]->get_Psi()).derive_cov(flat)) ;
98 Scalar integrand ( dpsi(1) ) ;
117 double massadm = 0. ;
119 for (
int i=0; i<=1; i++) {
123 const Scalar& psi(
et[i]->get_Psi()) ;
130 const Scalar& ener_euler =
et[i]->get_ener_euler() ;
131 const Scalar& hacar_auto =
et[i]->get_hacar_auto() ;
132 const Scalar& hacar_comp =
et[i]->get_hacar_comp() ;
134 Scalar source = psi5 % ener_euler
135 + spsi7 % (hacar_auto + hacar_comp)/(4.*qpig) ;
158 const Scalar& logn =
et[0]->get_logn() ;
159 const Metric& flat =
et[0]->get_flat() ;
166 Scalar integrant (vect(1)) ;
182 for (
int i=0; i<=1; i++) {
184 const Scalar& Psi =
et[i]->get_Psi() ;
185 const Scalar& psi4 =
et[i]->get_psi4() ;
186 const Scalar& chi =
et[i]->get_chi() ;
188 const Scalar& ener_euler =
et[i]->get_ener_euler() ;
189 const Scalar& s_euler =
et[i]->get_s_euler() ;
190 const Scalar& hacar_auto =
et[i]->get_hacar_auto() ;
191 const Scalar& hacar_comp =
et[i]->get_hacar_comp() ;
193 Scalar psi4chi = psi4 % chi ;
196 Scalar source = 0.5 * ener_euler * (psi4chi + psi4 % Psi)
197 + psi4chi * s_euler +
pow(Psi, -7.) * (7.*chi/Psi + 1.)
198 * (hacar_auto + hacar_comp) / (8.*qpig) ;
225 for (
int i=0; i<=1; i++) {
227 const Map& mp =
et[i]->get_mp() ;
230 Vector vphi(mp, CON, bvect_ref) ;
231 Scalar yya (mp) ; yya = mp.ya ;
232 Scalar xxa (mp) ; xxa = mp.xa ;
233 vphi.
set(1) = - yya ;
242 const Scalar& ee =
et[i]->get_ener_euler() ;
243 const Scalar& pp =
et[i]->get_press() ;
245 Vector jmom =
pow(
et[i]->get_Psi(), 10) * (ee + pp)
246 * (
et[i]->get_u_euler()) ;
249 const Metric& flat =
et[i]->get_flat() ;
280 for (
int i=0; i<=1; i++) {
282 const Scalar& ee =
et[i]->get_ener_euler() ;
283 const Scalar& pp =
et[i]->get_press() ;
284 Vector lmom =
pow(
et[i]->get_Psi(), 10) * (ee + pp)
285 * (
et[i]->get_u_euler() ) ;
291 for (
int j=1; j<=2; j++)
292 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.