134 #include "metrique.h" 138 #include "et_bin_nsbh.h" 139 #include "utilitaires.h" 143 Cmp raccord_c1(
const Cmp& uu,
int l1) ;
181 for (
int i=0; i<3; i++) {
182 v_orb.set(i) = www(i)(0, 0, 0, 0) ;
185 v_orb.
annule(nzm1, nzm1) ;
189 v_orb.set_std_base() ;
200 for (
int l=
nzet; l <= nzm1; l++) {
201 dndh_log.
set(l) = 1 ;
209 Scalar zeta_h_scalar (zeta_h()) ;
211 for (
int l=1; l<=nzm1; l++)
214 Cmp zeta_h_cmp (zeta_h_scalar) ;
215 zeta_h.
set() = zeta_h_cmp ;
249 for (
int l=1; l<=nzm1; l++)
274 cout <<
"nr = " << nr <<
" nt = " << nt <<
" np = " << np << endl ;
276 cout <<
"psi0" << endl <<
norme(
psi0()/(nr*nt*np)) << endl ;
277 cout <<
"d(psi)/dr" << endl <<
norme(
psi0.
set().
dsdr()/(nr*nt*np)) << endl ;
285 normal2.set_etat_qcq() ;
295 for (
int i=0; i<3; i++) {
296 for (
int j=0; j<i; j++) {
301 plat.set_std_base() ;
303 Metrique flat(plat,
true) ;
307 for (
int i=0; i<3; i++) {
308 normal.
set(i) = dcov_r(i) ;
309 normal2.set(i) = dcov_r(i) ;
328 limite = ( - dcov_psi(1) * normal(1) - dcov_psi(2) * normal(2)
332 for (
int j=0; j<nt; j++)
333 for (
int k=0; k<np; k++)
334 lim.set(0, k, j, 0) = limite(0, k, j, nr-1) ;
338 lim.std_base_scal() ;
340 source().poisson_neumann_interne(lim, par, resu) ;
354 for (
int l=1; l<=nzm1; l++)
362 Cmp laplacien_psi0 =
psi0().laplacien() ;
364 erreur =
diffrel(laplacien_psi0, source())(0) ;
366 cout <<
"Check of the resolution of the continuity equation for strange stars: " 368 cout <<
"norme(source) : " <<
norme(source())(0) << endl
369 <<
"Error in the solution : " << erreur << endl ;
380 for (
int i=0; i<3; i++) {
391 for (
int i=0; i<3; i++) {
434 for (
int i=0; i<3; i++) {
435 v_orb.set(i) = www(i)(0, 0, 0, 0) ;
439 v_orb.set_std_base() ;
449 for (
int l=0; l<
nzet; l++) {
462 for (
int l=
nzet; l <= nzm1; l++) {
463 dndh_log.
set(l) = 1 ;
524 Cmp oper = zeta_h() *
psi0().laplacien() + bb_dpsi0() ;
528 cout <<
"Check of the resolution of the continuity equation : " << endl ;
531 for (
int l=0; l<
nzet; l++) {
532 double err = terr(l) ;
533 cout <<
" domain " << l <<
" : norme(source) : " <<
norme(source())(l)
534 <<
" relative error : " << err << endl ;
535 if (err > erreur) erreur = err ;
548 for (
int i=0; i<3; i++) {
559 for (
int i=0; i<3; i++) {
const Cmp & dsdr() const
Returns of *this .
Cmp log(const Cmp &)
Neperian logarithm.
void annule(int l)
Sets the Tenseur to zero in a given domain.
const Base_vect & ref_triad
Reference triad ("absolute frame"), with respect to which the components of all the member Tenseur 's...
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
Cmp exp(const Cmp &)
Exponential.
void add_int(const int &n, int position=0)
Adds the address of a new int to the list.
const Tenseur & gradient_spher() const
Returns the gradient of *this (Spherical coordinates) (scalar field only).
void ylm_i()
Inverse of ylm()
void set_triad(const Base_vect &new_triad)
Assigns a new vectorial basis (triad) of decomposition.
int get_np(int l) const
Returns the number of points in the azimuthal direction ( ) in domain no. l.
Cmp der_nbar_ent(const Cmp &ent, int nzet, int l_min=0, Param *par=0x0) const
Computes the logarithmic derivative from the log-enthalpy and extra parameters.
Cmp sqrt(const Cmp &)
Square root.
void annule(int l)
Sets the Cmp to zero in a given domain.
void set_std_base()
Set the standard spectal basis of decomposition for each component.
Class intended to describe tensors with a symmetry on the two last indices *** DEPRECATED : use class...
const Base_vect_spher & get_bvect_spher() const
Returns the orthonormal vectorial basis associated with the coordinates of the mapping.
void ylm()
Computes the coefficients of *this.
void annule_hard()
Sets the Valeur to zero in a hard way.
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
Tenseur nnn
Total lapse function.
virtual int identify() const =0
Returns a number to identify the sub-classe of Eos the object belongs to.
Tensor field of valence 0 (or component of a tensorial field).
Tenseur flat_scalar_prod(const Tenseur &t1, const Tenseur &t2)
Scalar product of two Tenseur when the metric is : performs the contraction of the last index of t1 w...
virtual void poisson_compact(const Cmp &source, const Cmp &aa, const Tenseur &bb, const Param &par, Cmp &psi) const =0
Resolution of the elliptic equation in the case where the stellar interior is covered by a single do...
double unsurc2
: unsurc2=1 for a relativistic star, 0 for a Newtonian one.
Values and coefficients of a (real-value) function.
Tbl & set_domain(int l)
Read/write of the value in a given domain.
Tbl diffrel(const Cmp &a, const Cmp &b)
Relative difference between two Cmp (norme version).
Tenseur psi0
Scalar potential of the non-translational part of fluid 4-velocity (in the irrotational case) ...
Cmp & set()
Read/write for a scalar (see also operator=(const Cmp&) ).
void change_triad(const Base_vect &new_triad)
Sets a new vectorial basis (triad) of decomposition and modifies the components accordingly.
Tbl norme(const Cmp &)
Sums of the absolute values of all the values of the Cmp in each domain.
Tenseur bsn
3-vector shift, divided by N , of the rotating coordinates, .
const Mg3d * get_angu() const
Returns the pointer on the associated angular grid.
const Base_vect * get_triad() const
Returns the vectorial basis (triad) on which the components are defined.
Tenseur gam_euler
Lorentz factor between the fluid and Eulerian observers.
void set_outer_boundary(int l, double x)
Sets the value of the Scalar at the outer boundary of a given domain.
Tenseur beta_comp
Part of the logarithm of AN generated principaly by the companion star.
Map & mp
Mapping associated with the star.
int get_nzone() const
Returns the number of domains.
const Eos & eos
Equation of state of the stellar matter.
int get_etat() const
Returns the logical state.
Tenseur contract(const Tenseur &, int id1, int id2)
Self contraction of two indices of a Tenseur .
Active physical coordinates and mapping derivatives.
int nzet
Number of domains of *mp occupied by the star.
int get_nr(int l) const
Returns the number of points in the radial direction ( ) in domain no. l.
Tenseur a_car
Total conformal factor .
Tbl & set(int l)
Read/write of the value in a given domain.
const Base_vect_cart & get_bvect_cart() const
Returns the Cartesian basis associated with the coordinates (x,y,z) of the mapping, i.e.
Class for a star in a NS-BH binary system.
Tenseur ent
Log-enthalpy (relativistic case) or specific enthalpy (Newtonian case)
Cmp ssjm1_psi
Effective source at the previous step for the resolution of the Poisson equation for the scalar by m...
void add_double(const double &x, int position=0)
Adds the the address of a new double to the list.
double velocity_potential(int mermax, double precis, double relax)
Computes the non-translational part of the velocity scalar potential by solving the continuity equat...
int get_nt(int l) const
Returns the number of points in the co-latitude direction ( ) in domain no. l.
Tenseur beta_auto
Logarithm of the part of the product AN generated principaly by by the star.
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
void add_cmp_mod(Cmp &ti, int position=0)
Adds the address of a new modifiable Cmp to the list.
const Tenseur & derive_cov(const Metrique &met) const
Returns the covariant derivative of *this , with respect to met .
Valeur va
The numerical value of the Cmp.
Tensor handling *** DEPRECATED : use class Tensor instead ***.
void add_int_mod(int &n, int position=0)
Adds the address of a new modifiable int to the list.
const Tenseur & gradient() const
Returns the gradient of *this (Cartesian coordinates)
Coord r
r coordinate centered on the grid
Tenseur d_psi
Gradient of (in the irrotational case) (Cartesian components with respect to ref_triad ) ...