202 Cmp raccord_c1(
const Cmp& uu,
int l1) ;
211 bool irrot,
const Base_vect& ref_triad_i)
212 :
Etoile(mpi, nzet_i, relat, eos_i),
214 ref_triad(ref_triad_i),
216 d_psi(mpi, 1, COV, ref_triad),
217 wit_w(mpi, 1, CON, ref_triad),
220 d_logn_auto(mpi, 1, COV, ref_triad),
221 d_logn_auto_regu(mpi, 1, COV, ref_triad),
222 d_logn_comp(mpi, 1, COV, ref_triad),
224 d_beta_auto(mpi, 1, COV, ref_triad),
225 d_beta_comp(mpi, 1, COV, ref_triad),
226 shift_auto(mpi, 1, CON, ref_triad),
227 shift_comp(mpi, 1, CON, ref_triad),
228 w_shift(mpi, 1, CON, mp.get_bvect_cart()),
230 tkij_auto(mpi, 2, CON, ref_triad),
231 tkij_comp(mpi, 2, CON, ref_triad),
234 bsn(mpi, 1, CON, ref_triad),
239 ssjm1_wshift(mpi, 1, CON, mp.get_bvect_cart()),
267 for (
int i=0; i<3; i++) {
286 for (
int i=0; i<3; i++) {
296 irrotational(et.irrotational),
297 ref_triad(et.ref_triad),
302 logn_comp(et.logn_comp),
303 d_logn_auto(et.d_logn_auto),
304 d_logn_auto_regu(et.d_logn_auto_regu),
305 d_logn_comp(et.d_logn_comp),
306 beta_comp(et.beta_comp),
307 d_beta_auto(et.d_beta_auto),
308 d_beta_comp(et.d_beta_comp),
309 shift_auto(et.shift_auto),
310 shift_comp(et.shift_comp),
312 khi_shift(et.khi_shift),
313 tkij_auto(et.tkij_auto),
314 tkij_comp(et.tkij_comp),
315 akcar_auto(et.akcar_auto),
316 akcar_comp(et.akcar_comp),
318 pot_centri(et.pot_centri),
319 ssjm1_logn(et.ssjm1_logn),
320 ssjm1_beta(et.ssjm1_beta),
321 ssjm1_khi(et.ssjm1_khi),
322 ssjm1_wshift(et.ssjm1_wshift),
323 ssjm1_psi(et.ssjm1_khi),
324 decouple(et.decouple)
334 :
Etoile(mpi, eos_i, fich),
335 ref_triad(ref_triad_i),
337 d_psi(mpi, 1, COV, ref_triad),
338 wit_w(mpi, 1, CON, ref_triad),
341 d_logn_auto(mpi, 1, COV, ref_triad),
342 d_logn_auto_regu(mpi, 1, COV, ref_triad),
343 d_logn_comp(mpi, 1, COV, ref_triad),
345 d_beta_auto(mpi, 1, COV, ref_triad),
346 d_beta_comp(mpi, 1, COV, ref_triad),
347 shift_auto(mpi, 1, CON, ref_triad),
348 shift_comp(mpi, 1, CON, ref_triad),
349 w_shift(mpi, 1, CON, mp.get_bvect_cart()),
351 tkij_auto(mpi, 2, CON, ref_triad),
352 tkij_comp(mpi, 2, CON, ref_triad),
355 bsn(mpi, 1, CON, ref_triad),
360 ssjm1_wshift(mpi, 1, CON, mp.get_bvect_cart()),
592 ost <<
"Star in a binary system" << endl ;
593 ost <<
"-----------------------" << endl ;
596 ost <<
"irrotational configuration" << endl ;
599 ost <<
"corotating configuration" << endl ;
602 ost <<
"Absolute abscidia of the stellar center: " <<
605 ost <<
"Absolute abscidia of the barycenter of the baryon density : " <<
610 double d_tilde = 2 * d_ns / r_0 ;
612 ost <<
"d_tilde : " << d_tilde << endl ;
614 ost <<
"Orientation with respect to the absolute frame : " <<
617 ost <<
"Central value of gam_euler : " 620 ost <<
"Central u_euler (U^X, U^Y, U^Z) [c] : " 621 <<
u_euler(0)(0, 0, 0, 0) <<
" " 622 <<
u_euler(1)(0, 0, 0, 0) <<
" " 623 <<
u_euler(2)(0, 0, 0, 0) << endl ;
626 ost <<
"Central d_psi (X, Y, Z) [c] : " 627 <<
d_psi(0)(0, 0, 0, 0) <<
" " 628 <<
d_psi(1)(0, 0, 0, 0) <<
" " 629 <<
d_psi(2)(0, 0, 0, 0) << endl ;
631 ost <<
"Central vel. / co-orb. (W^X, W^Y, W^Z) [c] : " 632 <<
wit_w(0)(0, 0, 0, 0) <<
" " 633 <<
wit_w(1)(0, 0, 0, 0) <<
" " 634 <<
wit_w(2)(0, 0, 0, 0) << endl ;
636 ost <<
"Max vel. / co-orb. (W^X, W^Y, W^Z) [c] : " 641 ost <<
"Min vel. / co-orb. (W^X, W^Y, W^Z) [c] : " 646 double r_surf =
mp.
val_r(0,1.,M_PI/4,M_PI/4) ;
648 ost <<
"Velocity at (r_surf,pi/4,pi/4) / co-orb. [c] : " 649 <<
wit_w(0).val_point(r_surf,M_PI/4,M_PI/4) <<
" " 650 <<
wit_w(1).val_point(r_surf,M_PI/4,M_PI/4) <<
" " 651 <<
wit_w(2).val_point(r_surf,M_PI/4,M_PI/4) << endl ;
653 ost <<
"Central value of loggam : " 654 <<
loggam()(0, 0, 0, 0) << endl ;
658 ost <<
"Central value of log(N) auto, comp : " 662 ost <<
"Central value of beta=log(AN) auto, comp : " 666 ost <<
"Central value of shift (N^X, N^Y, N^Z) [c] : " 667 <<
shift(0)(0, 0, 0, 0) <<
" " 668 <<
shift(1)(0, 0, 0, 0) <<
" " 669 <<
shift(2)(0, 0, 0, 0) << endl ;
671 ost <<
" ... shift_auto part of it [c] : " 676 ost <<
" ... shift_comp part of it [c] : " 681 ost <<
" ... w_shift (NB: components in the star Cartesian frame) [c] : " 683 <<
w_shift(0)(0, 0, 0, 0) <<
" " 684 <<
w_shift(1)(0, 0, 0, 0) <<
" " 685 <<
w_shift(2)(0, 0, 0, 0) << endl ;
687 ost <<
"Central value of khi_shift [km c] : " 688 <<
khi_shift()(0, 0, 0, 0) / km << endl ;
690 ost << endl <<
"Central value of (B^X, B^Y, B^Z)/N [c] : " 691 <<
bsn(0)(0, 0, 0, 0) <<
" " 692 <<
bsn(1)(0, 0, 0, 0) <<
" " 693 <<
bsn(2)(0, 0, 0, 0) << endl ;
696 "Central (d/dX,d/dY,d/dZ)(logn_auto) [km^{-1}] : " 701 ost <<
"Central (d/dX,d/dY,d/dZ)(logn_comp) [km^{-1}] : " 707 "Central (d/dX,d/dY,d/dZ)(beta_auto) [km^{-1}] : " 712 ost <<
"Central (d/dX,d/dY,d/dZ)(beta_comp) [km^{-1}] : " 718 ost << endl <<
"Central A^2 K^{ij} [c/km] : " << endl ;
719 ost <<
" A^2 K^{xx} auto, comp : " 720 <<
tkij_auto(0, 0)(0, 0, 0, 0) * km <<
" " 721 <<
tkij_comp(0, 0)(0, 0, 0, 0) * km << endl ;
722 ost <<
" A^2 K^{xy} auto, comp : " 723 <<
tkij_auto(0, 1)(0, 0, 0, 0) * km <<
" " 724 <<
tkij_comp(0, 1)(0, 0, 0, 0) * km << endl ;
725 ost <<
" A^2 K^{xz} auto, comp : " 726 <<
tkij_auto(0, 2)(0, 0, 0, 0) * km <<
" " 727 <<
tkij_comp(0, 2)(0, 0, 0, 0) * km << endl ;
728 ost <<
" A^2 K^{yy} auto, comp : " 729 <<
tkij_auto(1, 1)(0, 0, 0, 0) * km <<
" " 730 <<
tkij_comp(1, 1)(0, 0, 0, 0) * km << endl ;
731 ost <<
" A^2 K^{yz} auto, comp : " 732 <<
tkij_auto(1, 2)(0, 0, 0, 0) * km <<
" " 733 <<
tkij_comp(1, 2)(0, 0, 0, 0) * km << endl ;
734 ost <<
" A^2 K^{zz} auto, comp : " 735 <<
tkij_auto(2, 2)(0, 0, 0, 0) * km <<
" " 736 <<
tkij_comp(2, 2)(0, 0, 0, 0) * km << endl ;
738 ost << endl <<
"Central A^2 K_{ij} K^{ij} [c^2/km^2] : " << endl ;
739 ost <<
" A^2 K_{ij} K^{ij} auto, comp : " 791 for (
int i=0; i<3; i++) {
792 v_orb.
set(i) = www(i)(0, 0, 0, 0) ;
797 for (
int l=
nzet; l<=nzm1; l++)
798 for (
int i=0; i<=2; i++)
809 d_psi = d_psi0 + v_orb ;
816 if (d_psi0.
get_etat() == ETATQCQ ) {
818 for (
int i=0; i<3; i++) {
843 double lambda = double(1) / double(3) ;
851 for (
int i=0; i<3; i++) {
853 - (lambda/2./(lambda+1)) * (d_khi(i) + x_d_w(i)) ;
867 double relax_met,
int mer,
int fmer_met) {
869 double relax_ent_jm1 = 1. - relax_ent ;
870 double relax_met_jm1 = 1. - relax_met ;
872 ent = relax_ent *
ent + relax_ent_jm1 * star_jm1.
ent ;
874 if ( (mer != 0) && (mer % fmer_met == 0)) {
virtual void set_der_0x0() const
Sets to 0x0 all the pointers on derived quantities.
Base class for stars *** DEPRECATED : use class Star instead ***.
virtual ostream & operator>>(ostream &) const
Operator >> (virtual function called by the operator <<).
int get_type_indice(int i) const
Returns the type of the index number i .
void annule(int l)
Sets the Tenseur to zero in a given domain.
Tenseur shift_comp
Part of the shift vector generated principaly by the companion star.
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.
virtual void sauve(FILE *) const
Save in a file.
void dec2_dzpuis()
dzpuis -= 2 ;
void set_triad(const Base_vect &new_triad)
Assigns a new vectorial basis (triad) of decomposition.
void fait_shift_auto()
Computes shift_auto from w_shift and khi_shift according to Shibata's prescription [Prog...
void annule(int l)
Sets the Cmp to zero in a given domain.
Tenseur pot_centri
Centrifugal potential.
virtual void sauve(FILE *) const
Save in a file.
Cmp ssjm1_logn
Effective source at the previous step for the resolution of the Poisson equation for logn_auto by mea...
void operator=(const Etoile &)
Assignment to another Etoile.
Tenseur logn_auto_regu
Regular part of the logarithm of the part of the lapse N generated principaly by the star...
Standard units of space, time and mass.
Equation of state base class.
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
double ray_eq() const
Coordinate radius at , [r_unit].
Base class for coordinate mappings.
double get_ori_x() const
Returns the x coordinate of the origin.
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...
Tenseur wit_w
Spatial projection of the fluid 3-velocity with respect to the co-orbiting observer.
virtual void del_hydro_euler()
Sets to ETATNONDEF (undefined state) the hydrodynamical quantities relative to the Eulerian observer...
double unsurc2
: unsurc2=1 for a relativistic star, 0 for a Newtonian one.
Class for stars in binary system.
virtual double xa_barycenter() const
Absolute coordinate X of the barycenter of the baryon density, defined according to the formula wher...
double get_rot_phi() const
Returns the angle between the x –axis and X –axis.
Tenseur d_beta_auto
Gradient of beta_auto (Cartesian components with respect to ref_triad )
Tbl min(const Cmp &)
Minimum values of a Cmp in each domain.
Vectorial bases (triads) with respect to which the tensorial components are defined.
void set_base(const Base_val &)
Sets the bases for spectral expansions (member base )
Tenseur shift
Total shift vector.
Tenseur shift_auto
Part of the shift vector generated principaly by the star.
void relaxation(const Etoile_bin &star_prev, double relax_ent, double relax_met, int mer, int fmer_met)
Performs a relaxation on ent , logn_auto , beta_auto and shift_auto .
int get_valence() const
Returns the valence.
Tenseur logn_auto_div
Divergent part (if k_div!=0 ) of the logarithm of the part of the lapse N generated principaly by t...
bool irrotational
true for an irrotational star, false for a corotating one
virtual void del_deriv() const
Deletes all the derived quantities.
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.
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&) ).
Tenseur w_shift
Vector used in the decomposition of shift_auto , following Shibata's prescription [Prog...
Tenseur u_euler
Fluid 3-velocity with respect to the Eulerian observer.
Tenseur d_beta_comp
Gradient of beta_comp (Cartesian components with respect to ref_triad )
void change_triad(const Base_vect &new_triad)
Sets a new vectorial basis (triad) of decomposition and modifies the components accordingly.
virtual void del_deriv() const
Deletes all the derived quantities.
virtual void set_der_0x0() const
Sets to 0x0 all the pointers on derived quantities.
void sauve(FILE *) const
Save in a file.
Tenseur logn_comp
Part of the lapse logarithm (gravitational potential at the Newtonian limit) generated principaly by ...
Tenseur skxk(const Tenseur &)
Contraction of the last index of (*this) with or , depending on the type of S .
virtual ~Etoile_bin()
Destructor.
Tenseur d_logn_auto
Gradient of logn_auto (Cartesian components with respect to ref_triad )
Tenseur bsn
3-vector shift, divided by N , of the rotating coordinates, .
void fait_d_psi()
Computes the gradient of the total velocity potential .
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.
Cmp decouple
Function used to construct the part of generated by the star from the total .
Tenseur akcar_comp
Part of the scalar generated by shift_auto and shift_comp , i.e.
Etoile_bin(Map &mp_i, int nzet_i, bool relat, const Eos &eos_i, bool irrot, const Base_vect &ref_triad_i)
Standard constructor.
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.
virtual void equation_of_state()
Computes the proper baryon and energy density, as well as pressure from the enthalpy.
Tbl max(const Cmp &)
Maximum values of a Cmp in each domain.
int get_etat() const
Returns the logical state.
Tenseur khi_shift
Scalar used in the decomposition of shift_auto , following Shibata's prescription [Prog...
Tenseur & set_w_shift()
Read/write of w_shift.
Tenseur_sym tkij_auto
Part of the extrinsic curvature tensor generated by shift_auto .
Tenseur & set_logn_comp()
Read/write the part of the lapse logarithm (gravitational potential at the Newtonian limit) generated...
void operator=(const Etoile_bin &)
Assignment to another Etoile_bin.
int nzet
Number of domains of *mp occupied by the star.
Tenseur a_car
Total conformal factor .
double * p_xa_barycenter
Absolute coordinate X of the barycenter of the baryon density.
Cmp ssjm1_beta
Effective source at the previous step for the resolution of the Poisson equation for beta_auto by mea...
const Base_vect_cart & get_bvect_cart() const
Returns the Cartesian basis associated with the coordinates (x,y,z) of the mapping, i.e.
void dec_dzpuis()
dzpuis -= 1 ;
virtual ostream & operator>>(ostream &) const
Operator >> (virtual function called by the operator <<).
double ray_eq_pi() const
Coordinate radius at , [r_unit].
Tenseur logn_auto
Total of the logarithm of the part of the lapse N generated principaly by the star.
Tenseur d_logn_auto_regu
Gradient of logn_auto_regu (Cartesian components with respect to ref_triad )
Tenseur loggam
Logarithm of the Lorentz factor between the fluid and the co-orbiting observer.
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...
virtual void del_hydro_euler()
Sets to ETATNONDEF (undefined state) the hydrodynamical quantities relative to the Eulerian observer...
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 sauve(FILE *) const
Save in a file.
Tenseur & set_pot_centri()
Read/write the centrifugal potential.
Tenseur akcar_auto
Part of the scalar generated by shift_auto , i.e.
void set_etat_zero()
Sets the logical state to ETATZERO (zero state).
Tenseur d_logn_comp
Gradient of logn_comp (Cartesian components with respect to ref_triad )
Tenseur & set_khi_shift()
Read/write of khi_shift.
Tenseur d_logn_auto_div
Gradient of logn_auto_div (if k_div!=0 )
Valeur va
The numerical value of the Cmp.
Tenseur_sym tkij_comp
Part of the extrinsic curvature tensor generated by shift_comp .
virtual Tenseur sprod(const Tenseur &t1, const Tenseur &t2) const
Performs the scalar product of two tensors by contracting the last index of t1 with the first index o...
Tensor handling *** DEPRECATED : use class Tensor instead ***.
void set_etat_nondef()
Sets the logical state to ETATNONDEF (undefined state).
const Tenseur & gradient() const
Returns the gradient of *this (Cartesian coordinates)
Cmp ssjm1_khi
Effective source at the previous step for the resolution of the Poisson equation for the scalar by m...
Tenseur d_psi
Gradient of (in the irrotational case) (Cartesian components with respect to ref_triad ) ...
Tenseur ssjm1_wshift
Effective source at the previous step for the resolution of the vector Poisson equation for by means...