110 Cmp raccord_c1(
const Cmp& uu,
int l1) ;
119 bool irrot,
bool conf_flat0)
120 :
Star(mpi, nzet_i, eos_i),
123 d_psi(mpi, COV, mpi.get_bvect_cart()),
124 wit_w(mpi, CON, mpi.get_bvect_cart()),
126 bsn(mpi, CON, mpi.get_bvect_cart()),
130 dcov_logn(mpi, COV, mpi.get_bvect_cart()),
131 dcon_logn(mpi, CON, mpi.get_bvect_cart()),
135 dcov_phi(mpi, COV, mpi.get_bvect_cart()),
136 dcon_phi(mpi, CON, mpi.get_bvect_cart()),
137 flat(mpi, mpi.get_bvect_cart()),
139 beta_auto(mpi, CON, mpi.get_bvect_cart()),
140 beta_comp(mpi, CON, mpi.get_bvect_cart()),
141 hij(mpi, CON, mpi.get_bvect_cart()),
142 hij_auto(mpi, CON, mpi.get_bvect_cart()),
143 hij_comp(mpi, CON, mpi.get_bvect_cart()),
144 tkij_auto(mpi, CON, mpi.get_bvect_cart()),
145 tkij_comp(mpi, CON, mpi.get_bvect_cart()),
151 ssjm1_wbeta(mpi, CON, mpi.get_bvect_cart()),
159 conf_flat(conf_flat0){
215 irrotational(star.irrotational),
221 pot_centri(star.pot_centri),
222 logn_auto(star.logn_auto),
223 logn_comp(star.logn_comp),
224 dcov_logn(star.dcov_logn),
225 dcon_logn(star.dcon_logn),
226 lnq_auto(star.lnq_auto),
227 lnq_comp(star.lnq_comp),
229 dcov_phi(star.dcov_phi),
230 dcon_phi(star.dcon_phi),
233 beta_auto(star.beta_auto),
234 beta_comp(star.beta_comp),
236 hij_auto(star.hij_auto),
237 hij_comp(star.hij_comp),
238 tkij_auto(star.tkij_auto),
239 tkij_comp(star.tkij_comp),
240 kcar_auto(star.kcar_auto),
241 kcar_comp(star.kcar_comp),
242 ssjm1_logn(star.ssjm1_logn),
243 ssjm1_lnq(star.ssjm1_lnq),
244 ssjm1_khi(star.ssjm1_khi),
245 ssjm1_wbeta(star.ssjm1_wbeta),
246 ssjm1_h11(star.ssjm1_h11),
247 ssjm1_h21(star.ssjm1_h21),
248 ssjm1_h31(star.ssjm1_h31),
249 ssjm1_h22(star.ssjm1_h22),
250 ssjm1_h32(star.ssjm1_h32),
251 ssjm1_h33(star.ssjm1_h33),
252 decouple(star.decouple),
253 conf_flat(star.conf_flat)
262 :
Star(mpi, eos_i, fich),
264 d_psi(mpi, COV, mpi.get_bvect_cart()),
265 wit_w(mpi, CON, mpi.get_bvect_cart()),
267 bsn(mpi, CON, mpi.get_bvect_cart()),
269 logn_auto(mpi, *(mpi.get_mg()), fich),
271 dcov_logn(mpi, COV, mpi.get_bvect_cart()),
272 dcon_logn(mpi, CON, mpi.get_bvect_cart()),
273 lnq_auto(mpi, *(mpi.get_mg()), fich),
276 dcov_phi(mpi, COV, mpi.get_bvect_cart()),
277 dcon_phi(mpi, CON, mpi.get_bvect_cart()),
278 flat(mpi, mpi.get_bvect_cart()),
280 beta_auto(mpi, mpi.get_bvect_cart(), fich),
281 beta_comp(mpi, CON, mpi.get_bvect_cart()),
282 hij(mpi, CON, mpi.get_bvect_cart()),
283 hij_auto(mpi, mpi.get_bvect_cart(), fich),
284 hij_comp(mpi, CON, mpi.get_bvect_cart()),
285 tkij_auto(mpi, CON, mpi.get_bvect_cart()),
286 tkij_comp(mpi, CON, mpi.get_bvect_cart()),
289 ssjm1_logn(mpi, *(mpi.get_mg()), fich),
290 ssjm1_lnq(mpi, *(mpi.get_mg()), fich),
291 ssjm1_khi(mpi, *(mpi.get_mg()), fich),
292 ssjm1_wbeta(mpi, mpi.get_bvect_cart(), fich),
293 ssjm1_h11(mpi, *(mpi.get_mg()), fich),
294 ssjm1_h21(mpi, *(mpi.get_mg()), fich),
295 ssjm1_h31(mpi, *(mpi.get_mg()), fich),
296 ssjm1_h22(mpi, *(mpi.get_mg()), fich),
297 ssjm1_h32(mpi, *(mpi.get_mg()), fich),
298 ssjm1_h33(mpi, *(mpi.get_mg()), fich),
306 fread(&
conf_flat,
sizeof(
bool), 1, fich) ;
443 ssjm1_wbeta = star.ssjm1_wbeta ;
504 ssjm1_wbeta.
sauve(fich) ;
513 fwrite(&
conf_flat,
sizeof(
bool), 1, fich) ;
532 ost <<
"Star in a binary system" << endl ;
533 ost <<
"-----------------------" << endl ;
536 ost <<
"irrotational configuration" << endl ;
539 ost <<
"corotating configuration" << endl ;
542 ost <<
"Absolute abscidia of the stellar center: " <<
545 ost <<
"Absolute abscidia of the barycenter of the baryon density : " <<
550 double d_tilde = 2 * d_ns / r_0 ;
552 ost <<
"d_tilde : " << d_tilde << endl ;
554 ost <<
"Central value of gam_euler : " 557 ost <<
"Central u_euler (U^r, U^t, U^p) [c] : " 558 <<
u_euler(1).val_grid_point(0, 0, 0, 0) <<
" " 559 <<
u_euler(2).val_grid_point(0, 0, 0, 0) <<
" " 560 <<
u_euler(3).val_grid_point(0, 0, 0, 0) << endl ;
563 ost <<
"Central d_psi (r, t, p) [c] : " 564 <<
d_psi(1).val_grid_point(0, 0, 0, 0) <<
" " 565 <<
d_psi(2).val_grid_point(0, 0, 0, 0) <<
" " 566 <<
d_psi(3).val_grid_point(0, 0, 0, 0) << endl ;
568 ost <<
"Central vel. / co-orb. (W^r, W^t, W^p) [c] : " 569 <<
wit_w(1).val_grid_point(0, 0, 0, 0) <<
" " 570 <<
wit_w(2).val_grid_point(0, 0, 0, 0) <<
" " 571 <<
wit_w(3).val_grid_point(0, 0, 0, 0) << endl ;
573 ost <<
"Max vel. / co-orb. (W^r, W^t, W^p) [c] : " 578 ost <<
"Min vel. / co-orb. (W^r, W^t, W^p) [c] : " 583 double r_surf =
mp.
val_r(0,1.,M_PI/4,M_PI/4) ;
585 ost <<
"Velocity at (r_surf,pi/4,pi/4) / co-orb. [c] : " 586 <<
wit_w(1).val_point(r_surf,M_PI/4,M_PI/4) <<
" " 587 <<
wit_w(2).val_point(r_surf,M_PI/4,M_PI/4) <<
" " 588 <<
wit_w(3).val_point(r_surf,M_PI/4,M_PI/4) << endl ;
590 ost <<
"Central value of loggam : " 595 ost <<
"Central value of log(N) auto, comp : " 599 ost <<
"Central value of beta (N^r, N^t, N^p) [c] : " 600 <<
beta(1).val_grid_point(0, 0, 0, 0) <<
" " 601 <<
beta(2).val_grid_point(0, 0, 0, 0) <<
" " 602 <<
beta(3).val_grid_point(0, 0, 0, 0) << endl ;
604 ost <<
" ... beta_auto part of it [c] : " 605 <<
beta_auto(1).val_grid_point(0, 0, 0, 0) <<
" " 606 <<
beta_auto(2).val_grid_point(0, 0, 0, 0) <<
" " 607 <<
beta_auto(3).val_grid_point(0, 0, 0, 0) << endl ;
609 ost << endl <<
"Central value of (B^r, B^t, B^p)/N [c] : " 610 <<
bsn(1).val_grid_point(0, 0, 0, 0) <<
" " 611 <<
bsn(2).val_grid_point(0, 0, 0, 0) <<
" " 612 <<
bsn(3).val_grid_point(0, 0, 0, 0) << endl ;
615 ost << endl <<
"Central A^{ij} [c/km] : " << endl ;
616 ost <<
" A^{xx} auto, comp : " 617 <<
tkij_auto(1, 1).val_grid_point(0, 0, 0, 0) * km <<
" " 618 <<
tkij_comp(1, 1).val_grid_point(0, 0, 0, 0) * km << endl ;
619 ost <<
" A^{xy} auto, comp : " 620 <<
tkij_auto(1, 2).val_grid_point(0, 0, 0, 0) * km <<
" " 621 <<
tkij_comp(1, 2).val_grid_point(0, 0, 0, 0) * km << endl ;
622 ost <<
" A^{xz} auto, comp : " 623 <<
tkij_auto(1, 3).val_grid_point(0, 0, 0, 0) * km <<
" " 624 <<
tkij_comp(1, 3).val_grid_point(0, 0, 0, 0) * km << endl ;
625 ost <<
" A^{yy} auto, comp : " 626 <<
tkij_auto(2, 2).val_grid_point(0, 0, 0, 0) * km <<
" " 627 <<
tkij_comp(2, 2).val_grid_point(0, 0, 0, 0) * km << endl ;
628 ost <<
" A^{yz} auto, comp : " 629 <<
tkij_auto(2, 3).val_grid_point(0, 0, 0, 0) * km <<
" " 630 <<
tkij_comp(2, 3).val_grid_point(0, 0, 0, 0) * km << endl ;
631 ost <<
" A^{zz} auto, comp : " 632 <<
tkij_auto(3, 3).val_grid_point(0, 0, 0, 0) * km <<
" " 633 <<
tkij_comp(3, 3).val_grid_point(0, 0, 0, 0) * km << endl ;
635 ost << endl <<
"Central A_{ij} A^{ij} [c^2/km^2] : " << endl ;
636 ost <<
" A_{ij} A^{ij} auto, comp : " 670 for (
int i=1; i<=3; i++) {
671 v_orb.
set(i) = www(i).val_grid_point(0, 0, 0, 0) ;
682 d_psi = d_psi0 + v_orb ;
683 for (
int i=1; i<=3; i++) {
684 if (
d_psi(i).get_etat() == ETATZERO)
694 for (
int i=1; i<=3; i++) {
696 d_psi_i.
va.
set_base( d_psi0(i).get_spectral_va().base ) ;
697 d_psi_i = raccord_c1(d_psi_i,
nzet) ;
705 double relax_met,
int mer,
int fmer_met) {
707 double relax_ent_jm1 = 1. - relax_ent ;
708 double relax_met_jm1 = 1. - relax_met ;
710 ent = relax_ent *
ent + relax_ent_jm1 * star_jm1.
ent ;
712 if ( (mer != 0) && (mer % fmer_met == 0)) {
736 cout <<
"La jauge de Dirac est elle bien satisfaite ??" << endl ;
737 cout <<
"Vector Hi" << endl ;
738 for (
int i=1; i<=3; i++)
743 cout <<
"Pour comparaison valeur de D_i(g^1i)" << endl ;
744 for (
int i=1; i<=3; i++)
746 (1, i, i)/(nr*nt*np)) << endl ;
Sym_tensor hij_comp
Deviation of the inverse conformal metric from the inverse flat metric generated principally by the ...
Vector dcov_phi
Covariant derivative of the logarithm of the conformal factor.
bool irrotational
true for an irrotational star, false for a corotating one
Metric for tensor calculation.
virtual void sauve(FILE *) const
Save in a binary file.
virtual const Sym_tensor & con() const
Read-only access to the contravariant representation.
virtual void set_der_0x0() const
Sets to 0x0 all the pointers on derived quantities.
void operator=(const Star_bin &)
Assignment to another Star_bin.
Scalar psi0
Scalar potential of the non-translational part of fluid 4-velocity (in the irrotational case) ...
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.
Scalar ssjm1_lnq
Effective source at the previous step for the resolution of the Poisson equation for lnq_auto...
Sym_tensor hij_auto
Deviation of the inverse conformal metric from the inverse flat metric generated principally by the ...
int get_np(int l) const
Returns the number of points in the azimuthal direction ( ) in domain no. l.
Vector d_psi
Gradient of (in the irrotational case) (Spherical components with respect to the mapping of the star...
Scalar ssjm1_h31
Effective source at the previous step for the resolution of the Poisson equation for h20_auto...
Scalar ssjm1_h11
Effective source at the previous step for the resolution of the Poisson equation for h00_auto...
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).
Scalar & set_logn_comp()
Read/write of the logarithm of the lapse generated principally by the companion.
Base class for coordinate mappings.
double get_ori_x() const
Returns the x coordinate of the origin.
Scalar ssjm1_h33
Effective source at the previous step for the resolution of the Poisson equation for h22_auto...
Scalar logn_comp
Part of the lapse logarithm (gravitational potential at the Newtonian limit) generated principally by...
Scalar loggam
Logarithm of the Lorentz factor between the fluid and the co-orbiting observer.
virtual void set_der_0x0() const
Sets to 0x0 all the pointers on derived quantities.
Scalar kcar_auto
Part of the scalar generated by beta_auto, i.e.
virtual void sauve(FILE *) const
Save in a binary file.
virtual void change_triad(const Base_vect &)
Sets a new vectorial basis (triad) of decomposition and modifies the components accordingly.
double * p_xa_barycenter
Absolute coordinate X of the barycenter of the baryon density.
Tbl min(const Cmp &)
Minimum values of a Cmp in each domain.
Tensor field of valence 1.
Scalar logn_auto
Part of the lapse logarithm (gravitational potential at the Newtonian limit) generated principally by...
const Tensor_sym & derive_cov(const Metric &gam) const
Returns the covariant derivative of this with respect to some metric .
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_h21
Effective source at the previous step for the resolution of the Poisson equation for h10_auto...
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.
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.
void test_K_Hi() const
Test if the gauge conditions we impose are well satisfied.
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 decouple
Function used to construct the part generated by the star from the total .
const Vector & divergence(const Metric &) const
Returns the divergence of this with respect to a Metric .
Star_bin(Map &mp_i, int nzet_i, const Eos &eos_i, bool irrot, bool conf_flat)
Standard constructor.
Tbl norme(const Cmp &)
Sums of the absolute values of all the values of the Cmp in each domain.
Sym_tensor hij
Total deviation of the inverse conformal metric from the inverse flat metric.
Scalar pot_centri
Centrifugal potential.
virtual void del_hydro_euler()
Sets to ETATNONDEF (undefined state) the hydrodynamical quantities relative to the Eulerian observer...
virtual ~Star_bin()
Destructor.
Metric_flat flat
Flat metric defined on the mapping (Spherical components with respect to the mapping of the star) ...
Scalar lnq_auto
Scalar field generated principally by the star.
Scalar lnq_comp
Scalar field generated principally by the companion star.
int get_nzone() const
Returns the number of domains.
virtual void del_deriv() const
Deletes all the derived quantities.
Tbl max(const Cmp &)
Maximum values of a Cmp in each domain.
Vector u_euler
Fluid 3-velocity with respect to the Eulerian observer.
Sym_tensor tkij_comp
Part of the extrinsic curvature tensor generated by beta_comp.
double ray_eq_pi() const
Coordinate radius at , [r_unit].
virtual void sauve(FILE *) const
Save in a file.
void fait_d_psi()
Computes the gradient of the total velocity potential .
Vector dcov_logn
Covariant derivative of the total logarithm of the lapse.
Class for stars in binary system.
Metric gtilde
Conformal metric .
Vector dcon_logn
Contravariant derivative of the total logarithm of the lapse.
int get_nr(int l) const
Returns the number of points in the radial direction ( ) in domain no. l.
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 ssjm1_h22
Effective source at the previous step for the resolution of the Poisson equation for h11_auto...
Vector beta_comp
Part of the shift vector generated principally by the star (Spherical components with respect to the ...
Sym_tensor tkij_auto
Part of the extrinsic curvature tensor generated by beta_auto.
bool conf_flat
true if the 3-metric is conformally flat, false for a more general metric.
double ray_eq() const
Coordinate radius at , [r_unit].
Scalar ssjm1_h32
Effective source at the previous step for the resolution of the Poisson equation for h21_auto...
Vector beta_auto
Part of the shift vector generated principally by the star (Spherical components with respect to the ...
Scalar kcar_comp
Part of the scalar generated by beta_auto and beta_comp, i.e.
virtual ostream & operator>>(ostream &) const
Operator >> (virtual function called by the operator <<).
virtual void change_triad(const Base_vect &new_triad)
Sets a new vectorial basis (triad) of decomposition and modifies the components accordingly.
virtual ostream & operator>>(ostream &) const
Operator >> (virtual function called by the operator <<).
Scalar & set_pot_centri()
Read/write the centrifugal potential.
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).
int get_nt(int l) const
Returns the number of points in the co-latitude direction ( ) in domain no. l.
void relaxation(const Star_bin &star_prev, double relax_ent, double relax_met, int mer, int fmer_met)
Performs a relaxation on ent, logn_auto, lnq_auto, beta_auto and hij_auto.
Scalar ssjm1_khi
Effective source at the previous step for the resolution of the Poisson equation for khi...
Scalar & set(int)
Read/write access to a component.
Vector & set_beta()
Read/write of .
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.
Vector bsn
3-vector shift, divided by N, of the rotating coordinates, .
Valeur va
The numerical value of the Cmp.
Scalar psi4
Conformal factor .
Vector dcon_phi
Contravariant derivative of the logarithm of the conformal factor.
Vector & set_beta_auto()
Read/write of .
virtual double xa_barycenter() const
Absolute coordinate X of the barycenter of the baryon density,.
Scalar ssjm1_logn
Effective source at the previous step for the resolution of the Poisson equation for logn_auto...