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()) ;
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++) {
157 const Vector& dcov_lnq = 2*dcov_phi + dcov_logn ;
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 ;
219 Scalar integrant (vect(1)) ;
236 for (
int i=0; i<=1; i++) {
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++) {
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 ;
540 Scalar rho =
pow(psi4,
double(2.5)) * (ee+pp) ;
558 rho =
pow(psi4,
double(1.5)) ;
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. ;
583 kill_phi =
contract(gtilde.cov(), 1, dcov_vphi +
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.
Base class for coordinate mappings.
const Base_vect_cart & get_bvect_cart() const
Returns the Cartesian basis associated with the coordinates (x,y,z) of the mapping,...
Coord ya
Absolute y coordinate.
Coord r
r coordinate centered on the grid
const Base_vect_spher & get_bvect_spher() const
Returns the orthonormal vectorial basis associated with the coordinates of the mapping.
const Metric_flat & flat_met_cart() const
Returns the flat metric associated with the Cartesian coordinates and with components expressed in th...
Coord xa
Absolute x coordinate.
virtual double val_r(int l, double xi, double theta, double pphi) const =0
Returns the value of the radial coordinate r for a given in a given domain.
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
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.
int get_nzone() const
Returns the number of domains.
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.
const Scalar & get_logn_auto() const
Returns the part of the lapse logarithm (gravitational potential at the Newtonian limit) generated pr...
const Scalar & get_lnq_auto() const
Returns the part of the vector field generated principally by the star.
const Vector & get_dcov_logn() const
Returns the covariant derivative of .
const Vector & get_dcov_phi() const
Returns the covariant derivative of (logarithm of the conformal factor).
const Metric & get_flat() const
Return the flat metric defined on the mapping (Spherical components with respect to the mapping of th...
const Sym_tensor & get_hij() const
Return the total deviation of the inverse conformal metric from the inverse flat metric.
const Scalar & get_kcar_auto() const
Returns the part of generated by beta_auto.
const Vector & get_dcon_logn() const
Returns the contravariant derivative of .
const Scalar & get_psi4() const
Return the conformal factor .
const Scalar & get_kcar_comp() const
Returns the part of generated by beta_comp.
const Sym_tensor & get_hij_auto() const
Return the deviation of the inverse conformal metric from the inverse flat metric principally genera...
const Sym_tensor & get_tkij_auto() const
Returns the part of the extrinsic curvature tensor generated by beta_auto.
const Metric & get_gtilde() const
Return the conformal 3-metric .
const Scalar & get_logn_comp() const
Returns the part of the lapse logarithm (gravitational potential at the Newtonian limit) generated pr...
const Vector & get_u_euler() const
Returns the fluid 3-velocity with respect to the Eulerian observer.
const Map & get_mp() const
Returns the mapping.
const Scalar & get_logn() const
Returns the logarithm of the lapse N.
const Scalar & get_ener_euler() const
Returns the total energy density with respect to the Eulerian observer.
const Scalar & get_s_euler() const
Returns the trace of the stress tensor in the Eulerian frame.
const Scalar & get_press() const
Returns the fluid pressure.
Class intended to describe valence-2 symmetric tensors.
void annule_hard()
Sets the Tbl to zero in a hard way.
double & set(int i)
Read/write of a particular element (index i) (1D case)
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 .
Standard units of space, time and mass.