76 Cmp raccord_c1(
const Cmp& uu,
int l1) ;
88 :
Star(mpi, nzet_i, eos_i),
91 d_psi(mpi, COV, mpi.get_bvect_cart()),
92 wit_w(mpi, CON, mpi.get_bvect_cart()),
94 bsn(mpi, CON, mpi.get_bvect_cart()),
103 w_beta(mpi, CON, mpi.get_bvect_cart()),
105 dcov_Psi(mpi, COV, mpi.get_bvect_cart()),
106 dcov_chi(mpi, COV, mpi.get_bvect_cart()),
107 flat(mpi, mpi.get_bvect_cart()),
108 beta_auto(mpi, CON, mpi.get_bvect_cart()),
109 beta_comp(mpi, CON, mpi.get_bvect_cart()),
110 haij_auto(mpi, CON, mpi.get_bvect_cart()),
111 haij_comp(mpi, CON, mpi.get_bvect_cart()),
117 ssjm1_wbeta(mpi, CON, mpi.get_bvect_cart()) {
170 irrotational(star.irrotational),
176 pot_centri(star.pot_centri),
177 chi_auto(star.chi_auto),
178 chi_comp(star.chi_comp),
179 Psi_auto(star.Psi_auto),
180 Psi_comp(star.Psi_comp),
186 dcov_Psi(star.dcov_Psi),
187 dcov_chi(star.dcov_chi),
189 beta_auto(star.beta_auto),
190 beta_comp(star.beta_comp),
191 haij_auto(star.haij_auto),
192 haij_comp(star.haij_comp),
193 hacar_auto(star.hacar_auto),
194 hacar_comp(star.hacar_comp),
195 ssjm1_chi(star.ssjm1_chi),
196 ssjm1_psi(star.ssjm1_psi),
197 ssjm1_khi(star.ssjm1_khi),
198 ssjm1_wbeta(star.ssjm1_wbeta) {
209 :
Star(mpi, eos_i, fich),
211 d_psi(mpi, COV, mpi.get_bvect_cart()),
212 wit_w(mpi, CON, mpi.get_bvect_cart()),
214 bsn(mpi, CON, mpi.get_bvect_cart()),
216 chi_auto(mpi, *(mpi.get_mg()), fich),
218 Psi_auto(mpi, *(mpi.get_mg()), fich),
223 w_beta(mpi, mpi.get_bvect_cart(), fich),
224 khi(mpi, *(mpi.get_mg()), fich),
225 dcov_Psi(mpi, COV, mpi.get_bvect_cart()),
226 dcov_chi(mpi, COV, mpi.get_bvect_cart()),
227 flat(mpi, mpi.get_bvect_cart()),
228 beta_auto(mpi, mpi.get_bvect_cart(), fich),
229 beta_comp(mpi, CON, mpi.get_bvect_cart()),
230 haij_auto(mpi, CON, mpi.get_bvect_cart()),
231 haij_comp(mpi, CON, mpi.get_bvect_cart()),
234 ssjm1_chi(mpi, *(mpi.get_mg()), fich),
235 ssjm1_psi(mpi, *(mpi.get_mg()), fich),
236 ssjm1_khi(mpi, *(mpi.get_mg()), fich),
237 ssjm1_wbeta(mpi, mpi.get_bvect_cart(), fich) {
243 bool status = fread(&
irrotational,
sizeof(
bool), 1, fich) ;
245 cout <<
"Star_bin_xcts::Constructor from a file: Problem with reading ! " << endl ;
474 ost <<
"Number of domains occupied by the star : " <<
nzet << endl ;
476 ost <<
"Equation of state : " << endl ;
479 ost << endl <<
"Central enthalpy : " <<
ent.
val_grid_point(0,0,0,0) <<
" c^2" << endl ;
481 <<
" x 0.1 fm^-3" << endl ;
483 <<
" rho_nuc c^2" << endl ;
485 <<
" rho_nuc c^2" << endl ;
493 ost <<
"Central value of Psi^4 : " << psi4_local.
val_grid_point(0,0,0,0) << endl ;
496 <<
"Coordinate equatorial radius (phi=0) a1 = " 497 <<
ray_eq()/km <<
" km" << endl ;
498 ost <<
"Coordinate equatorial radius (phi=pi/2) a2 = " 500 ost <<
"Coordinate equatorial radius (phi=pi): " 502 ost <<
"Coordinate polar radius a3 = " 509 double mass_shedd_chi = fabs( dent_eq / dent_pole ) ;
511 ost <<
"Mass-shedding estimator = " << mass_shedd_chi << endl ;
513 ost << endl <<
"Baryon mass : " <<
mass_b() / msol <<
" M_sol" << endl ;
514 ost <<
"Gravitational mass : " <<
mass_g() / msol <<
" M_sol" << endl ;
519 ost <<
"Star in a binary system" << endl ;
520 ost <<
"-----------------------" << endl ;
523 ost <<
"irrotational configuration" << endl ;
526 ost <<
"corotating configuration" << endl ;
529 ost <<
"Absolute abscidia of the stellar center: " <<
532 ost <<
"Absolute abscidia of the barycenter of the baryon density : " <<
537 double d_tilde = 2 * d_ns / r_0 ;
539 ost <<
"d_tilde : " << d_tilde << endl ;
541 ost <<
"Central value of gam_euler : " 544 ost <<
"Central u_euler (U^r, U^t, U^p) [c] : " 545 <<
u_euler(1).val_grid_point(0, 0, 0, 0) <<
" " 546 <<
u_euler(2).val_grid_point(0, 0, 0, 0) <<
" " 547 <<
u_euler(3).val_grid_point(0, 0, 0, 0) << endl ;
550 ost <<
"Central d_psi (r, t, p) [c] : " 551 <<
d_psi(1).val_grid_point(0, 0, 0, 0) <<
" " 552 <<
d_psi(2).val_grid_point(0, 0, 0, 0) <<
" " 553 <<
d_psi(3).val_grid_point(0, 0, 0, 0) << endl ;
555 ost <<
"Central vel. / co-orb. (W^r, W^t, W^p) [c] : " 556 <<
wit_w(1).val_grid_point(0, 0, 0, 0) <<
" " 557 <<
wit_w(2).val_grid_point(0, 0, 0, 0) <<
" " 558 <<
wit_w(3).val_grid_point(0, 0, 0, 0) << endl ;
560 ost <<
"Max vel. / co-orb. (W^r, W^t, W^p) [c] : " 565 ost <<
"Min vel. / co-orb. (W^r, W^t, W^p) [c] : " 570 double r_surf =
mp.
val_r(0,1.,M_PI/4,M_PI/4) ;
572 ost <<
"Velocity at (r_surf,pi/4,pi/4) / co-orb. [c] : " 573 <<
wit_w(1).val_point(r_surf,M_PI/4,M_PI/4) <<
" " 574 <<
wit_w(2).val_point(r_surf,M_PI/4,M_PI/4) <<
" " 575 <<
wit_w(3).val_point(r_surf,M_PI/4,M_PI/4) << endl ;
577 ost <<
"Central value of loggam : " 581 ost <<
"Central value of Psi auto, comp : " 585 ost <<
"Central value of beta (N^r, N^t, N^p) [c] : " 586 <<
beta(1).val_grid_point(0, 0, 0, 0) <<
" " 587 <<
beta(2).val_grid_point(0, 0, 0, 0) <<
" " 588 <<
beta(3).val_grid_point(0, 0, 0, 0) << endl ;
590 ost <<
" ... beta_auto part of it [c] : " 591 <<
beta_auto(1).val_grid_point(0, 0, 0, 0) <<
" " 592 <<
beta_auto(2).val_grid_point(0, 0, 0, 0) <<
" " 593 <<
beta_auto(3).val_grid_point(0, 0, 0, 0) << endl ;
595 ost << endl <<
"Central value of (B^r, B^t, B^p)/N [c] : " 596 <<
bsn(1).val_grid_point(0, 0, 0, 0) <<
" " 597 <<
bsn(2).val_grid_point(0, 0, 0, 0) <<
" " 598 <<
bsn(3).val_grid_point(0, 0, 0, 0) << endl ;
601 ost << endl <<
"Central \\hat{A}^{ij} [c/km] : " << endl ;
602 ost <<
" \\hat{A}^{xx} auto, comp : " 603 <<
haij_auto(1, 1).val_grid_point(0, 0, 0, 0) * km <<
" " 604 <<
haij_comp(1, 1).val_grid_point(0, 0, 0, 0) * km << endl ;
605 ost <<
" A^{xy} auto, comp : " 606 <<
haij_auto(1, 2).val_grid_point(0, 0, 0, 0) * km <<
" " 607 <<
haij_comp(1, 2).val_grid_point(0, 0, 0, 0) * km << endl ;
608 ost <<
" A^{xz} auto, comp : " 609 <<
haij_auto(1, 3).val_grid_point(0, 0, 0, 0) * km <<
" " 610 <<
haij_comp(1, 3).val_grid_point(0, 0, 0, 0) * km << endl ;
611 ost <<
" A^{yy} auto, comp : " 612 <<
haij_auto(2, 2).val_grid_point(0, 0, 0, 0) * km <<
" " 613 <<
haij_comp(2, 2).val_grid_point(0, 0, 0, 0) * km << endl ;
614 ost <<
" A^{yz} auto, comp : " 615 <<
haij_auto(2, 3).val_grid_point(0, 0, 0, 0) * km <<
" " 616 <<
haij_comp(2, 3).val_grid_point(0, 0, 0, 0) * km << endl ;
617 ost <<
" A^{zz} auto, comp : " 618 <<
haij_auto(3, 3).val_grid_point(0, 0, 0, 0) * km <<
" " 619 <<
haij_comp(3, 3).val_grid_point(0, 0, 0, 0) * km << endl ;
621 ost << endl <<
"Central \\hat{A}_{ij}\\hat{A}^{ij} [c^2/km^2] : " 623 ost <<
" \\hat{A}_{ij}\\hat{A}^{ij} auto, comp : " 656 for (
int i=1; i<=3; i++)
657 v_orb.
set(i) = www(i).val_grid_point(0, 0, 0, 0) ;
667 d_psi = d_psi0 + v_orb ;
669 for (
int i=1; i<=3; i++) {
670 if (
d_psi(i).get_etat() == ETATZERO)
681 for (
int i=1; i<=3; i++) {
683 d_psi_i.
va.
set_base( d_psi0(i).get_spectral_va().base ) ;
684 d_psi_i = raccord_c1(d_psi_i,
nzet) ;
698 double relax_ent_jm1 = 1. - relax_ent ;
699 double relax_met_jm1 = 1. - relax_met ;
701 ent = relax_ent *
ent + relax_ent_jm1 * star_jm1.
ent ;
703 if ( (mer != 0) && (mer % fmer_met == 0)) {
706 + relax_met_jm1 * star_jm1.
Psi_auto ;
709 + relax_met_jm1 * star_jm1.
chi_auto ;
Scalar chi
Total function .
Metric for tensor calculation.
Vector bsn
3-vector shift, divided by N, of the rotating coordinates, .
virtual void set_der_0x0() const
Sets to 0x0 all the pointers on derived quantities.
Vector dcov_chi
Covariant derivative of the function .
virtual ~Star_bin_xcts()
Destructor.
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
Cmp exp(const Cmp &)
Exponential.
Vector wit_w
Spatial projection of the fluid 3-velocity with respect to the co-orbiting observer.
Map & mp
Mapping associated with the star.
void operator=(const Star_bin_xcts &)
Assignment to another Star_bin_xcts.
Scalar & set_Psi_auto()
Read/write the conformal factor .
const Eos & eos
Equation of state of the stellar matter.
Standard units of space, time and mass.
Equation of state base class.
Sym_tensor stress_euler
Spatial part of the stress-energy tensor with respect to the Eulerian observer.
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
Tensor field of valence 0 (or component of a tensorial field).
virtual void set_etat_nondef()
Sets the logical state of all components to ETATNONDEF (undefined state).
Base class for coordinate mappings.
double get_ori_x() const
Returns the x coordinate of the origin.
Vector & set_beta()
Read/write of .
Star_bin_xcts(Map &mp_i, int nzet_i, const Eos &eos_i, bool irrot)
Standard constructor.
bool irrotational
true for an irrotational star, false for a corotating one
virtual ostream & operator>>(ostream &) const
Operator >> (virtual function called by the operator <<).
Vector dcov_Psi
Covariant derivative of the conformal factor .
virtual void set_der_0x0() const
Sets to 0x0 all the pointers on derived quantities.
virtual void std_spectral_base()
Sets the spectral bases of the Valeur va to the standard ones for a scalar field. ...
virtual void sauve(FILE *) const
Save in a binary file.
Scalar & set_chi_comp()
Read/write the conformal factor .
Class for stars in binary system in eXtended Conformal Thin Sandwich formulation. ...
Scalar nbar
Baryon density in the fluid frame.
virtual void change_triad(const Base_vect &)
Sets a new vectorial basis (triad) of decomposition and modifies the components accordingly.
Tbl min(const Cmp &)
Minimum values of a Cmp in each domain.
Tensor field of valence 1.
Sym_tensor haij_auto
Part of the extrinsic curvature tensor generated by beta_auto.
void set_base(const Base_val &)
Sets the bases for spectral expansions (member base )
const Metric_flat & flat_met_cart() const
Returns the flat metric associated with the Cartesian coordinates and with components expressed in th...
Scalar ssjm1_chi
Effective source at the previous step for the resolution of the Poisson equation for ...
double val_grid_point(int l, int k, int j, int i) const
Returns the value of the field at a specified grid point.
virtual void std_spectral_base()
Sets the standard spectal bases of decomposition for each component.
Vector & set_beta_auto()
Read/write of .
void annule_hard()
Sets the Scalar to zero in a hard way.
void operator=(const Star &)
Assignment to another Star.
int nzet
Number of domains of *mp occupied by the star.
virtual void sauve(FILE *) const
Save in a file.
Scalar gam_euler
Lorentz factor between the fluid and Eulerian observers.
virtual void sauve(FILE *) const
Save in a file.
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.
Scalar loggam
Logarithm of the Lorentz factor between the fluid and the co-orbiting observer.
Scalar ener
Total energy density in the fluid frame.
Scalar pot_centri
Centrifugal potential.
Sym_tensor haij_comp
Part of the extrinsic curvature tensor generated by beta_comp.
Vector ssjm1_wbeta
Effective source at the previous step for wbeta of the vector Poisson equation for wbeta (needed for ...
Scalar Psi_auto
Scalar field generated principally by the star.
Vector d_psi
Gradient of (in the irrotational case) (Spherical components with respect to the mapping of the star...
Scalar press
Fluid pressure.
Vector w_beta
Solution for the vector part of the vector Poisson equation for .
Scalar chi_comp
Scalar field generated principally by the companion star.
double ray_eq_pis2() const
Coordinate radius at , [r_unit].
Scalar & set_chi_auto()
Read/write the conformal factor .
Vector beta_comp
Part of the shift vector generated principally by the star (Spherical components with respect to the ...
virtual double mass_g() const
Gravitational mass.
int get_nzone() const
Returns the number of domains.
Tbl max(const Cmp &)
Maximum values of a Cmp in each domain.
Vector u_euler
Fluid 3-velocity with respect to the Eulerian observer.
double ray_eq_pi() const
Coordinate radius at , [r_unit].
Cmp pow(const Cmp &, int)
Power .
Scalar chi_auto
Scalar field generated principally by the star.
Scalar ssjm1_khi
Effective source at the previous step for the resolution of the Poisson equation for khi...
double val_point(double r, double theta, double phi) const
Computes the value of the field at an arbitrary point , by means of the spectral expansion.
Scalar psi4
Conformal factor .
Scalar psi0
Scalar potential of the non-translational part of fluid 4-velocity (in the irrotational case) ...
double ray_pole() const
Coordinate radius at [r_unit].
Metric_flat flat
Flat metric defined on the mapping (Spherical components with respect to the mapping of the star) ...
Scalar Psi
Total conformal factor .
Scalar & set_pot_centri()
Read/write the centrifugal potential.
Scalar hacar_auto
Part of the scalar generated by beta_auto, i.e.
virtual void del_deriv() const
Deletes all the derived quantities.
virtual void del_hydro_euler()
Sets to ETATNONDEF (undefined state) the hydrodynamical quantities relative to the Eulerian observer...
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 nn
Lapse function N .
Vector beta_auto
Part of the shift vector generated principally by the star (Spherical components with respect to the ...
double * p_xa_barycenter
Absolute coordinate X of the barycenter of the baryon density.
virtual void del_hydro_euler()
Sets to ETATNONDEF (undefined state) the hydrodynamical quantities relative to the Eulerian observer...
void fait_d_psi()
Computes the gradient of the total velocity potential .
double ray_eq() const
Coordinate radius at , [r_unit].
virtual double xa_barycenter() const
Absolute coordinate X of the barycenter of the baryon density,.
const Scalar & dsdr() const
Returns of *this .
virtual void del_deriv() const
Deletes all the derived quantities.
Scalar Psi_comp
Scalar field generated principally by the companion star.
virtual double mass_b() const
Baryon mass.
virtual void change_triad(const Base_vect &new_triad)
Sets a new vectorial basis (triad) of decomposition and modifies the components accordingly.
Scalar hacar_comp
Part of the scalar generated by beta_auto and beta_comp, i.e.
virtual void sauve(FILE *) const
Save in a file.
virtual void set_etat_zero()
Sets the logical state of all components to ETATZERO (zero state).
Scalar & set(int)
Read/write access to a component.
void equation_of_state()
Computes the proper baryon and energy density, as well as pressure from the enthalpy.
const Vector & derive_cov(const Metric &gam) const
Returns the gradient (1-form = covariant vector) of *this
virtual void annule(int l_min, int l_max)
Sets the Tensor to zero in several domains.
Scalar khi
Solution for the scalar part of the vector Poisson equation for .
Scalar ssjm1_psi
Effective source at the previous step for the resolution of the Poisson equation for ...
Valeur va
The numerical value of the Cmp.
Scalar & set_Psi_comp()
Read/write the conformal factor .
void relaxation(const Star_bin_xcts &star_prev, double relax_ent, double relax_met, int mer, int fmer_met)
Performs a relaxation on ent, Psi_auto, chi_auto and beta_auto.