115 const Map_af map0 (
et[0]->get_mp()) ;
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++) {
160 const Vector& dcov_lnq = 2*dcov_phi + dcov_logn ;
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 ;
222 Scalar integrant (vect(1)) ;
239 for (
int i=0; i<=1; i++) {
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++) {
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 ;
543 Scalar rho =
pow(psi4,
double(2.5)) * (ee+pp) ;
561 rho =
pow(psi4,
double(1.5)) ;
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. ;
579 dcov_vphi.inc_dzpuis(2) ;
586 kill_phi =
contract(gtilde.cov(), 1, dcov_vphi +
587 contract(deltaijk, 2, vphi, 0), 0) +
591 integrand = rho *
contract(aij, 0, 1, kill_phi, 0, 1) ;
Coord xa
Absolute x coordinate.
Metric for tensor calculation.
virtual const Sym_tensor & con() const
Read-only access to the contravariant representation.
const Scalar & get_press() const
Returns the fluid pressure.
double mass_kom_vol() const
Total Komar mass (computed by a volume integral)
Cmp exp(const Cmp &)
Exponential.
int & set(int i)
Read/write of a particular element (index i ) (1D case)
const Scalar & get_ener_euler() const
Returns the total energy density with respect to the Eulerian observer.
const Vector & get_u_euler() const
Returns the fluid 3-velocity with respect to the Eulerian observer.
double integrale_surface_infini(const Cmp &ci) const
Performs the surface integration of ci at infinity.
const Base_vect_spher & get_bvect_spher() const
Returns the orthonormal vectorial basis associated with the coordinates of the mapping.
Standard units of space, time and mass.
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
double & set(int i)
Read/write of a particular element (index i) (1D case)
Flat metric for tensor calculation.
Tensor field of valence 0 (or component of a tensorial field).
Base class for coordinate mappings.
double integrale() const
Computes the integral over all space of *this .
Tensor up_down(const Metric &gam) const
Computes a new tensor by raising or lowering all the indices of *this .
const Scalar & get_logn_comp() const
Returns the part of the lapse logarithm (gravitational potential at the Newtonian limit) generated pr...
Basic integer array class.
virtual void std_spectral_base()
Sets the spectral bases of the Valeur va to the standard ones for a scalar field. ...
const Map & get_mp() const
Returns the mapping.
double mass_adm_vol() const
Total ADM mass (computed by a volume integral)
virtual void change_triad(const Base_vect &)
Sets a new vectorial basis (triad) of decomposition and modifies the components accordingly.
Tensor field of valence 1.
const Tensor_sym & derive_cov(const Metric &gam) const
Returns the covariant derivative of this with respect to some metric .
double * p_mass_adm
Total ADM mass of the system.
const Metric_flat & flat_met_cart() const
Returns the flat metric associated with the Cartesian coordinates and with components expressed in th...
const Tensor_sym & get_delta() const
Returns the tensor which defines the connection with respect to the flat one: is the difference bet...
virtual void std_spectral_base()
Sets the standard spectal bases of decomposition for each component.
double virial() const
Estimates the relative error on the virial theorem.
const Scalar & get_logn() const
Returns the logarithm of the lapse N.
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 Tbl & angu_mom() const
Total angular momentum.
const Scalar & get_kcar_auto() const
Returns the part of generated by beta_auto.
const Metric & get_gtilde() const
Return the conformal 3-metric .
void set_outer_boundary(int l, double x)
Sets the value of the Scalar at the outer boundary of a given domain.
double * p_total_ener
Total energy of the system.
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 Scalar & get_s_euler() const
Returns the trace of the stress tensor in the Eulerian frame.
const Scalar & get_lnq_auto() const
Returns the part of the vector field generated principally by the star.
int get_nzone() const
Returns the number of domains.
double * p_virial
Virial theorem error.
Cmp pow(const Cmp &, int)
Power .
Tenseur contract(const Tenseur &, int id1, int id2)
Self contraction of two indices of a Tenseur .
const Tensor & derive_cov(const Metric &gam) const
Returns the covariant derivative of this with respect to some metric .
const Sym_tensor & get_tkij_auto() const
Returns the part of the extrinsic curvature tensor generated by beta_auto.
Cartesian vectorial bases (triads).
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 Vector & get_dcov_logn() const
Returns the covariant derivative of .
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]...
virtual const Sym_tensor & cov() const
Read-only access to the covariant representation.
Coord ya
Absolute y coordinate.
const Tensor & derive_con(const Metric &gam) const
Returns the "contravariant" derivative of this with respect to some metric , by raising the last inde...
const Scalar & get_psi4() const
Return the conformal factor .
const Scalar & get_kcar_comp() const
Returns the part of generated by beta_comp.
const Base_vect_cart & get_bvect_cart() const
Returns the Cartesian basis associated with the coordinates (x,y,z) of the mapping, i.e.
Scalar & set(const Itbl &ind)
Returns the value of a component (read/write version).
Tbl * p_angu_mom
Total angular momentum of the system.
double mass_kom() const
Total Komar mass.
const Sym_tensor & get_hij() const
Return the total deviation of the inverse conformal metric from the inverse flat metric...
Scalar & set(int)
Read/write access to a component.
const Vector & derive_cov(const Metric &gam) const
Returns the gradient (1-form = covariant vector) of *this
double mass_adm() const
Total ADM mass.
void annule_hard()
Sets the Tbl to zero in a hard way.
double total_ener() const
Total energy (excluding the rest mass energy).
const Scalar & get_logn_auto() const
Returns the part of the lapse logarithm (gravitational potential at the Newtonian limit) generated pr...
Class intended to describe valence-2 symmetric tensors.
double * p_mass_kom
Total Komar mass of the system.
const Sym_tensor & get_hij_auto() const
Return the deviation of the inverse conformal metric from the inverse flat metric principally genera...
const Vector & get_dcon_logn() const
Returns the contravariant derivative of .
Coord r
r coordinate centered on the grid