29char binary_global_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Binary/binary_global.C,v 1.16 2014/10/13 08:52:45 j_novak Exp $" ;
112 const Map_af map0 (
et[0]->get_mp()) ;
113 const Metric& flat = (
et[0]->get_flat()) ;
116 et[0]->get_logn()).derive_cov(flat)) ;
119 - (
et[0]->get_hij().trace(flat)).derive_con(flat))) ;
125 Scalar integrand (dpsi(1) + 0*ww(1)) ;
142 for (
int i=0; i<=1; i++) {
145 const Scalar& psi4 =
et[i]->get_psi4() ;
148 const Scalar& ener_euler =
et[i]->get_ener_euler() ;
149 const Scalar& kcar_auto =
et[i]->get_kcar_auto() ;
150 const Scalar& kcar_comp =
et[i]->get_kcar_comp() ;
151 const Metric& gtilde =
et[i]->get_gtilde() ;
152 const Metric& flat =
et[i]->get_flat() ;
155 const Vector& dcov_logn =
et[i]->get_dcov_logn() ;
156 const Vector& dcov_phi =
et[i]->get_dcov_phi() ;
157 const Vector& dcov_lnq = 2*dcov_phi + dcov_logn ;
158 const Scalar& lnq_auto =
et[i]->get_lnq_auto() ;
159 const Scalar& logn_auto =
et[i]->get_logn_auto() ;
160 const Scalar& phi_auto = 0.5 * (lnq_auto - logn_auto) ;
173 Scalar source = - psi4 % (qpig*ener_euler + (kcar_auto + kcar_comp)/4.)
175 0, dcov_phi_auto, 0,
true) ;
178 source += 4*
contract(hij, 0, 1, dcov_logn * dcov_phi_auto, 0, 1) +
179 2*
contract(hij, 0, 1, dcov_phi * dcov_phi_auto, 0, 1) +
181 dcov_hij_auto, 0, 1, dcov_gtilde, 0, 1), 0, 1) -
183 0, 1, dcov_gtilde, 0, 2), 0, 1) -
184 contract(hij,0,1,dcovdcov_lnq_auto + dcov_lnq_auto*dcov_lnq,0,1) +
185 contract(hij,0,1,dcovdcov_logn_auto + dcov_logn_auto*dcov_logn,0,1) ;
187 source = source * psi ;
211 const Tensor& logn =
et[0]->get_logn() ;
212 const Metric& flat = (
et[0]->get_flat()) ;
219 Scalar integrant (vect(1)) ;
236 for (
int i=0; i<=1; i++) {
239 const Scalar& psi4 =
et[i]->get_psi4() ;
240 const Scalar& ener_euler =
et[i]->get_ener_euler() ;
241 const Scalar& s_euler =
et[i]->get_s_euler() ;
242 const Scalar& kcar_auto =
et[i]->get_kcar_auto() ;
243 const Scalar& kcar_comp =
et[i]->get_kcar_comp() ;
244 const Metric& gtilde =
et[i]->get_gtilde() ;
245 const Metric& flat =
et[i]->get_flat() ;
247 const Scalar& logn =
et[i]->get_logn_auto() +
et[i]->get_logn_comp() ;
248 const Scalar& logn_auto =
et[i]->get_logn_auto() ;
253 const Vector& dcov_logn =
et[i]->get_dcov_logn() ;
254 const Vector& dcon_logn =
et[i]->get_dcon_logn() ;
255 const Vector& dcov_phi =
et[i]->get_dcov_phi() ;
260 Scalar source = qpig * psi4 % (ener_euler + s_euler) ;
261 source += psi4 % (kcar_auto + kcar_comp) ;
262 source += - 0*
contract(dcov_logn_auto, 0, dcon_logn, 0,
true)
264 dcov_logn_auto, 0,
true) ;
265 source += -
contract(hij, 0, 1, dcovdcov_logn_auto +
266 dcov_logn_auto*dcov_logn, 0, 1) ;
268 source = source / qpig * nn ;
498 for (
int i=0; i<=1; i++) {
500 const Map& mp =
et[i]->get_mp() ;
501 int nzm1 = mp.get_mg()->get_nzone() - 1 ;
506 double r0 = mp.val_r(nzm1-1, 1, 0, 0) ;
507 double sigma = 1.*r0 ;
513 ff =
exp( -(rr - r0)*(rr - r0)/sigma/sigma ) ;
514 for (
int ii=0; ii<nzm1; ii++)
515 ff.set_domain(ii) = 1. ;
516 ff.set_outer_boundary(nzm1, 0) ;
517 ff.std_spectral_base() ;
520 Vector vphi(mp, CON, bvect_ref) ;
525 vphi.
set(1) = - yya * ff ;
526 vphi.
set(2) = xxa * ff ;
537 const Scalar& ee =
et[i]->get_ener_euler() ;
538 const Scalar& pp =
et[i]->get_press() ;
539 const Scalar& psi4 =
et[i]->get_psi4() ;
540 Scalar rho =
pow(psi4,
double(2.5)) * (ee+pp) ;
543 Vector jmom = rho * (
et[i]->get_u_euler()) ;
545 const Metric& gtilde =
et[i]->get_gtilde() ;
558 rho =
pow(psi4,
double(1.5)) ;
566 Tensor dcov_vphi (mp, 2, type, mp.get_bvect_cart()) ;
567 dcov_vphi.
set(1,1) = 0. ;
568 dcov_vphi.
set(2,1) = ff ;
569 dcov_vphi.
set(3,1) = 0. ;
570 dcov_vphi.
set(2,2) = 0. ;
571 dcov_vphi.
set(3,2) = 0. ;
572 dcov_vphi.
set(3,3) = 0. ;
573 dcov_vphi.
set(1,2) = -ff ;
574 dcov_vphi.
set(1,3) = 0. ;
575 dcov_vphi.
set(2,3) = 0. ;
582 Sym_tensor kill_phi (mp, COV, mp.get_bvect_cart()) ;
584 contract(deltaijk, 2, vphi, 0), 0) +
588 integrand = rho *
contract(aij, 0, 1, kill_phi, 0, 1) ;
Cartesian vectorial bases (triads).
double mass_adm_vol() const
Total ADM mass (computed by a volume integral).
double mass_kom_vol() const
Total Komar mass (computed by a volume integral).
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]...
double * p_total_ener
Total energy of the system.
Tbl * p_angu_mom
Total angular momentum of the system.
double total_ener() const
Total energy (excluding the rest mass energy).
const Tbl & angu_mom() const
Total angular momentum.
double * p_mass_adm
Total ADM mass of the system.
double * p_virial
Virial theorem error.
double mass_adm() const
Total ADM mass.
double virial() const
Estimates the relative error on the virial theorem.
double * p_mass_kom
Total Komar mass of the system.
double mass_kom() const
Total Komar mass.
const Tensor_sym & get_delta() const
Returns the tensor which defines the connection with respect to the flat one: is the difference bet...
Basic integer array class.
int & set(int i)
Read/write of a particular element (index i ) (1D case).
double integrale_surface_infini(const Cmp &ci) const
Performs the surface integration of ci at infinity.
Flat metric for tensor calculation.
Metric for tensor calculation.
virtual const Sym_tensor & con() const
Read-only access to the contravariant representation.
virtual const Sym_tensor & cov() const
Read-only access to the covariant representation.
Tensor field of valence 0 (or component of a tensorial field).
const Vector & derive_cov(const Metric &gam) const
Returns the gradient (1-form = covariant vector) of *this.
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.
void set_outer_boundary(int l, double x)
Sets the value of the Scalar at the outer boundary of a given domain.
Class intended to describe valence-2 symmetric tensors.
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 exp(const Cmp &)
Exponential.
Cmp pow(const Cmp &, int)
Power .
const Tensor_sym & derive_cov(const Metric &gam) const
Returns the covariant derivative of this with respect to some metric .
Tensor up_down(const Metric &gam) const
Computes a new tensor by raising or lowering all the indices of *this .
const Tensor & derive_con(const Metric &gam) const
Returns the "contravariant" derivative of this with respect to some metric , by raising the last inde...
virtual void inc_dzpuis(int inc=1)
Increases by inc units the value of dzpuis and changes accordingly the values in the compactified ext...
const Tensor & derive_cov(const Metric &gam) const
Returns the covariant derivative of this with respect to some metric .
Scalar & set(const Itbl &ind)
Returns the value of a component (read/write version).
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.