115 const Map_af map0 (
et[0]->get_mp()) ;
116 const Metric& flat = (
et[0]->get_flat()) ;
119 et[0]->get_logn()).derive_cov(flat)) ;
122 - (
et[0]->get_hij().trace(flat)).derive_con(flat))) ;
128 Scalar integrand (dpsi(1) + 0*ww(1)) ;
145 for (
int i=0; i<=1; i++) {
148 const Scalar& psi4 =
et[i]->get_psi4() ;
151 const Scalar& ener_euler =
et[i]->get_ener_euler() ;
152 const Scalar& kcar_auto =
et[i]->get_kcar_auto() ;
153 const Scalar& kcar_comp =
et[i]->get_kcar_comp() ;
154 const Metric& gtilde =
et[i]->get_gtilde() ;
155 const Metric& flat =
et[i]->get_flat() ;
158 const Vector& dcov_logn =
et[i]->get_dcov_logn() ;
159 const Vector& dcov_phi =
et[i]->get_dcov_phi() ;
160 const Vector& dcov_lnq = 2*dcov_phi + dcov_logn ;
161 const Scalar& lnq_auto =
et[i]->get_lnq_auto() ;
162 const Scalar& logn_auto =
et[i]->get_logn_auto() ;
163 const Scalar& phi_auto = 0.5 * (lnq_auto - logn_auto) ;
176 Scalar source = - psi4 % (qpig*ener_euler + (kcar_auto + kcar_comp)/4.)
178 0, dcov_phi_auto, 0,
true) ;
181 source += 4*
contract(hij, 0, 1, dcov_logn * dcov_phi_auto, 0, 1) +
182 2*
contract(hij, 0, 1, dcov_phi * dcov_phi_auto, 0, 1) +
184 dcov_hij_auto, 0, 1, dcov_gtilde, 0, 1), 0, 1) -
186 0, 1, dcov_gtilde, 0, 2), 0, 1) -
187 contract(hij,0,1,dcovdcov_lnq_auto + dcov_lnq_auto*dcov_lnq,0,1) +
188 contract(hij,0,1,dcovdcov_logn_auto + dcov_logn_auto*dcov_logn,0,1) ;
190 source = source * psi ;
214 const Tensor& logn =
et[0]->get_logn() ;
215 const Metric& flat = (
et[0]->get_flat()) ;
222 Scalar integrant (vect(1)) ;
239 for (
int i=0; i<=1; i++) {
242 const Scalar& psi4 =
et[i]->get_psi4() ;
243 const Scalar& ener_euler =
et[i]->get_ener_euler() ;
244 const Scalar& s_euler =
et[i]->get_s_euler() ;
245 const Scalar& kcar_auto =
et[i]->get_kcar_auto() ;
246 const Scalar& kcar_comp =
et[i]->get_kcar_comp() ;
247 const Metric& gtilde =
et[i]->get_gtilde() ;
248 const Metric& flat =
et[i]->get_flat() ;
250 const Scalar& logn =
et[i]->get_logn_auto() +
et[i]->get_logn_comp() ;
251 const Scalar& logn_auto =
et[i]->get_logn_auto() ;
256 const Vector& dcov_logn =
et[i]->get_dcov_logn() ;
257 const Vector& dcon_logn =
et[i]->get_dcon_logn() ;
258 const Vector& dcov_phi =
et[i]->get_dcov_phi() ;
263 Scalar source = qpig * psi4 % (ener_euler + s_euler) ;
264 source += psi4 % (kcar_auto + kcar_comp) ;
265 source += - 0*
contract(dcov_logn_auto, 0, dcon_logn, 0,
true)
267 dcov_logn_auto, 0,
true) ;
268 source += -
contract(hij, 0, 1, dcovdcov_logn_auto +
269 dcov_logn_auto*dcov_logn, 0, 1) ;
271 source = source / qpig * nn ;
501 for (
int i=0; i<=1; i++) {
503 const Map& mp =
et[i]->get_mp() ;
504 int nzm1 = mp.get_mg()->get_nzone() - 1 ;
509 double r0 = mp.val_r(nzm1-1, 1, 0, 0) ;
510 double sigma = 1.*r0 ;
516 ff =
exp( -(rr - r0)*(rr - r0)/sigma/sigma ) ;
517 for (
int ii=0; ii<nzm1; ii++)
518 ff.set_domain(ii) = 1. ;
519 ff.set_outer_boundary(nzm1, 0) ;
520 ff.std_spectral_base() ;
523 Vector vphi(mp, CON, bvect_ref) ;
528 vphi.
set(1) = - yya * ff ;
529 vphi.
set(2) = xxa * ff ;
540 const Scalar& ee =
et[i]->get_ener_euler() ;
541 const Scalar& pp =
et[i]->get_press() ;
542 const Scalar& psi4 =
et[i]->get_psi4() ;
543 Scalar rho =
pow(psi4,
double(2.5)) * (ee+pp) ;
546 Vector jmom = rho * (
et[i]->get_u_euler()) ;
548 const Metric& gtilde =
et[i]->get_gtilde() ;
561 rho =
pow(psi4,
double(1.5)) ;
569 Tensor dcov_vphi (mp, 2, type, mp.get_bvect_cart()) ;
570 dcov_vphi.
set(1,1) = 0. ;
571 dcov_vphi.
set(2,1) = ff ;
572 dcov_vphi.
set(3,1) = 0. ;
573 dcov_vphi.
set(2,2) = 0. ;
574 dcov_vphi.
set(3,2) = 0. ;
575 dcov_vphi.
set(3,3) = 0. ;
576 dcov_vphi.
set(1,2) = -ff ;
577 dcov_vphi.
set(1,3) = 0. ;
578 dcov_vphi.
set(2,3) = 0. ;
585 Sym_tensor kill_phi (mp, COV, mp.get_bvect_cart()) ;
587 contract(deltaijk, 2, vphi, 0), 0) +
591 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.