29char star_bin_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Star/star_bin.C,v 1.19 2014/10/13 08:53:37 j_novak Exp $" ;
107Cmp raccord_c1(
const Cmp& uu,
int l1) ;
120 d_psi(
mpi, COV,
mpi.get_bvect_cart()),
121 wit_w(
mpi, CON,
mpi.get_bvect_cart()),
123 bsn(
mpi, CON,
mpi.get_bvect_cart()),
127 dcov_logn(
mpi, COV,
mpi.get_bvect_cart()),
128 dcon_logn(
mpi, CON,
mpi.get_bvect_cart()),
132 dcov_phi(
mpi, COV,
mpi.get_bvect_cart()),
133 dcon_phi(
mpi, CON,
mpi.get_bvect_cart()),
134 flat(
mpi,
mpi.get_bvect_cart()),
136 beta_auto(
mpi, CON,
mpi.get_bvect_cart()),
137 beta_comp(
mpi, CON,
mpi.get_bvect_cart()),
138 hij(
mpi, CON,
mpi.get_bvect_cart()),
139 hij_auto(
mpi, CON,
mpi.get_bvect_cart()),
140 hij_comp(
mpi, CON,
mpi.get_bvect_cart()),
141 tkij_auto(
mpi, CON,
mpi.get_bvect_cart()),
142 tkij_comp(
mpi, CON,
mpi.get_bvect_cart()),
148 ssjm1_wbeta(
mpi, CON,
mpi.get_bvect_cart()),
212 irrotational(star.irrotational),
218 pot_centri(star.pot_centri),
219 logn_auto(star.logn_auto),
220 logn_comp(star.logn_comp),
221 dcov_logn(star.dcov_logn),
222 dcon_logn(star.dcon_logn),
223 lnq_auto(star.lnq_auto),
224 lnq_comp(star.lnq_comp),
226 dcov_phi(star.dcov_phi),
227 dcon_phi(star.dcon_phi),
230 beta_auto(star.beta_auto),
231 beta_comp(star.beta_comp),
233 hij_auto(star.hij_auto),
234 hij_comp(star.hij_comp),
235 tkij_auto(star.tkij_auto),
236 tkij_comp(star.tkij_comp),
237 kcar_auto(star.kcar_auto),
238 kcar_comp(star.kcar_comp),
239 ssjm1_logn(star.ssjm1_logn),
240 ssjm1_lnq(star.ssjm1_lnq),
241 ssjm1_khi(star.ssjm1_khi),
242 ssjm1_wbeta(star.ssjm1_wbeta),
243 ssjm1_h11(star.ssjm1_h11),
244 ssjm1_h21(star.ssjm1_h21),
245 ssjm1_h31(star.ssjm1_h31),
246 ssjm1_h22(star.ssjm1_h22),
247 ssjm1_h32(star.ssjm1_h32),
248 ssjm1_h33(star.ssjm1_h33),
249 decouple(star.decouple),
250 conf_flat(star.conf_flat)
261 d_psi(
mpi, COV,
mpi.get_bvect_cart()),
262 wit_w(
mpi, CON,
mpi.get_bvect_cart()),
264 bsn(
mpi, CON,
mpi.get_bvect_cart()),
268 dcov_logn(
mpi, COV,
mpi.get_bvect_cart()),
269 dcon_logn(
mpi, CON,
mpi.get_bvect_cart()),
273 dcov_phi(
mpi, COV,
mpi.get_bvect_cart()),
274 dcon_phi(
mpi, CON,
mpi.get_bvect_cart()),
275 flat(
mpi,
mpi.get_bvect_cart()),
278 beta_comp(
mpi, CON,
mpi.get_bvect_cart()),
279 hij(
mpi, CON,
mpi.get_bvect_cart()),
281 hij_comp(
mpi, CON,
mpi.get_bvect_cart()),
282 tkij_auto(
mpi, CON,
mpi.get_bvect_cart()),
283 tkij_comp(
mpi, CON,
mpi.get_bvect_cart()),
440 ssjm1_wbeta = star.ssjm1_wbeta ;
529 ost <<
"Star in a binary system" <<
endl ;
530 ost <<
"-----------------------" <<
endl ;
533 ost <<
"irrotational configuration" <<
endl ;
536 ost <<
"corotating configuration" <<
endl ;
539 ost <<
"Absolute abscidia of the stellar center: " <<
542 ost <<
"Absolute abscidia of the barycenter of the baryon density : " <<
551 ost <<
"Central value of gam_euler : "
554 ost <<
"Central u_euler (U^r, U^t, U^p) [c] : "
555 <<
u_euler(1).val_grid_point(0, 0, 0, 0) <<
" "
556 <<
u_euler(2).val_grid_point(0, 0, 0, 0) <<
" "
560 ost <<
"Central d_psi (r, t, p) [c] : "
561 <<
d_psi(1).val_grid_point(0, 0, 0, 0) <<
" "
562 <<
d_psi(2).val_grid_point(0, 0, 0, 0) <<
" "
563 <<
d_psi(3).val_grid_point(0, 0, 0, 0) <<
endl ;
565 ost <<
"Central vel. / co-orb. (W^r, W^t, W^p) [c] : "
566 <<
wit_w(1).val_grid_point(0, 0, 0, 0) <<
" "
567 <<
wit_w(2).val_grid_point(0, 0, 0, 0) <<
" "
568 <<
wit_w(3).val_grid_point(0, 0, 0, 0) <<
endl ;
570 ost <<
"Max vel. / co-orb. (W^r, W^t, W^p) [c] : "
575 ost <<
"Min vel. / co-orb. (W^r, W^t, W^p) [c] : "
582 ost <<
"Velocity at (r_surf,pi/4,pi/4) / co-orb. [c] : "
587 ost <<
"Central value of loggam : "
592 ost <<
"Central value of log(N) auto, comp : "
596 ost <<
"Central value of beta (N^r, N^t, N^p) [c] : "
597 <<
beta(1).val_grid_point(0, 0, 0, 0) <<
" "
598 <<
beta(2).val_grid_point(0, 0, 0, 0) <<
" "
599 <<
beta(3).val_grid_point(0, 0, 0, 0) <<
endl ;
601 ost <<
" ... beta_auto part of it [c] : "
602 <<
beta_auto(1).val_grid_point(0, 0, 0, 0) <<
" "
603 <<
beta_auto(2).val_grid_point(0, 0, 0, 0) <<
" "
606 ost <<
endl <<
"Central value of (B^r, B^t, B^p)/N [c] : "
607 <<
bsn(1).val_grid_point(0, 0, 0, 0) <<
" "
608 <<
bsn(2).val_grid_point(0, 0, 0, 0) <<
" "
609 <<
bsn(3).val_grid_point(0, 0, 0, 0) <<
endl ;
612 ost <<
endl <<
"Central A^{ij} [c/km] : " <<
endl ;
613 ost <<
" A^{xx} auto, comp : "
614 <<
tkij_auto(1, 1).val_grid_point(0, 0, 0, 0) * km <<
" "
616 ost <<
" A^{xy} auto, comp : "
617 <<
tkij_auto(1, 2).val_grid_point(0, 0, 0, 0) * km <<
" "
619 ost <<
" A^{xz} auto, comp : "
620 <<
tkij_auto(1, 3).val_grid_point(0, 0, 0, 0) * km <<
" "
622 ost <<
" A^{yy} auto, comp : "
623 <<
tkij_auto(2, 2).val_grid_point(0, 0, 0, 0) * km <<
" "
625 ost <<
" A^{yz} auto, comp : "
626 <<
tkij_auto(2, 3).val_grid_point(0, 0, 0, 0) * km <<
" "
628 ost <<
" A^{zz} auto, comp : "
629 <<
tkij_auto(3, 3).val_grid_point(0, 0, 0, 0) * km <<
" "
632 ost <<
endl <<
"Central A_{ij} A^{ij} [c^2/km^2] : " <<
endl ;
633 ost <<
" A_{ij} A^{ij} auto, comp : "
667 for (
int i=1;
i<=3;
i++) {
668 v_orb.set(
i) = www(
i).val_grid_point(0, 0, 0, 0) ;
677 d_psi0.std_spectral_base() ;
680 for (
int i=1;
i<=3;
i++) {
681 if (
d_psi(
i).get_etat() == ETATZERO)
691 for (
int i=1;
i<=3;
i++) {
733 cout <<
"La jauge de Dirac est elle bien satisfaite ??" <<
endl ;
735 for (
int i=1;
i<=3;
i++)
737 .divergence(
flat))(
i)/(nr*nt*np)) <<
endl ;
740 cout <<
"Pour comparaison valeur de D_i(g^1i)" <<
endl ;
741 for (
int i=1;
i<=3;
i++)
743 (1,
i,
i)/(nr*nt*np)) <<
endl ;
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
Equation of state base class.
Time evolution with partial storage (*** under development ***).
Base class for coordinate mappings.
const Base_vect_cart & get_bvect_cart() const
Returns the Cartesian basis associated with the coordinates (x,y,z) of the mapping,...
const Metric_flat & flat_met_cart() const
Returns the flat metric associated with the Cartesian coordinates and with components expressed in th...
double get_ori_x() const
Returns the x coordinate of the origin.
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 Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
Metric for tensor calculation.
virtual const Sym_tensor & con() const
Read-only access to the contravariant representation.
Tensor field of valence 0 (or component of a tensorial field).
virtual void sauve(FILE *) const
Save in a file.
const Vector & derive_cov(const Metric &gam) const
Returns the gradient (1-form = covariant vector) of *this
double val_grid_point(int l, int k, int j, int i) const
Returns the value of the field at a specified grid point.
void annule_hard()
Sets the Scalar to zero in a hard way.
Class for stars in binary system.
Scalar loggam
Logarithm of the Lorentz factor between the fluid and the co-orbiting observer.
Scalar decouple
Function used to construct the part generated by the star from the total .
Scalar lnq_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.
Vector bsn
3-vector shift, divided by N, of the rotating coordinates, .
Vector dcon_logn
Contravariant derivative of the total logarithm of the lapse.
Vector d_psi
Gradient of (in the irrotational case) (Spherical components with respect to the mapping of the star...
Vector dcon_phi
Contravariant derivative of the logarithm of the conformal factor.
Sym_tensor hij_comp
Deviation of the inverse conformal metric from the inverse flat metric generated principally by the ...
double * p_xa_barycenter
Absolute coordinate X of the barycenter of the baryon density.
virtual void del_deriv() const
Deletes all the derived quantities.
Scalar ssjm1_h11
Effective source at the previous step for the resolution of the Poisson equation for h00_auto.
Vector beta_comp
Part of the shift vector generated principally by the star (Spherical components with respect to the ...
Scalar ssjm1_logn
Effective source at the previous step for the resolution of the Poisson equation for logn_auto.
Vector dcov_logn
Covariant derivative of the total logarithm of the lapse.
virtual ostream & operator>>(ostream &) const
Operator >> (virtual function called by the operator <<).
Scalar logn_auto
Part of the lapse logarithm (gravitational potential at the Newtonian limit) generated principally by...
Scalar psi0
Scalar potential of the non-translational part of fluid 4-velocity (in the irrotational case)
bool irrotational
true for an irrotational star, false for a corotating one
virtual double xa_barycenter() const
Absolute coordinate X of the barycenter of the baryon density,.
Scalar kcar_comp
Part of the scalar generated by beta_auto and beta_comp, i.e.
Scalar logn_comp
Part of the lapse logarithm (gravitational potential at the Newtonian limit) generated principally by...
Scalar ssjm1_h21
Effective source at the previous step for the resolution of the Poisson equation for h10_auto.
void fait_d_psi()
Computes the gradient of the total velocity potential .
Sym_tensor tkij_comp
Part of the extrinsic curvature tensor generated by beta_comp.
Scalar ssjm1_h33
Effective source at the previous step for the resolution of the Poisson equation for h22_auto.
void test_K_Hi() const
Test if the gauge conditions we impose are well satisfied.
Scalar lnq_comp
Scalar field generated principally by the companion star.
Scalar kcar_auto
Part of the scalar generated by beta_auto, i.e.
Vector beta_auto
Part of the shift vector generated principally by the star (Spherical components with respect to the ...
Star_bin(Map &mp_i, int nzet_i, const Eos &eos_i, bool irrot, bool conf_flat)
Standard constructor.
Sym_tensor hij
Total deviation of the inverse conformal metric from the inverse flat metric.
virtual void set_der_0x0() const
Sets to 0x0 all the pointers on derived quantities.
Sym_tensor hij_auto
Deviation of the inverse conformal metric from the inverse flat metric generated principally by the ...
Scalar & set_logn_comp()
Read/write of the logarithm of the lapse generated principally by the companion.
Scalar psi4
Conformal factor .
Scalar ssjm1_h31
Effective source at the previous step for the resolution of the Poisson equation for h20_auto.
void operator=(const Star_bin &)
Assignment to another Star_bin.
virtual void del_hydro_euler()
Sets to ETATNONDEF (undefined state) the hydrodynamical quantities relative to the Eulerian observer.
Vector & set_beta()
Read/write of .
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.
Sym_tensor tkij_auto
Part of the extrinsic curvature tensor generated by beta_auto.
Vector dcov_phi
Covariant derivative of the logarithm of the conformal factor.
Metric_flat flat
Flat metric defined on the mapping (Spherical components with respect to the mapping of the star) .
Scalar ssjm1_h22
Effective source at the previous step for the resolution of the Poisson equation for h11_auto.
Vector wit_w
Spatial projection of the fluid 3-velocity with respect to the co-orbiting observer.
Scalar ssjm1_h32
Effective source at the previous step for the resolution of the Poisson equation for h21_auto.
Metric gtilde
Conformal metric .
Scalar pot_centri
Centrifugal potential.
Scalar & set_pot_centri()
Read/write the centrifugal potential.
virtual ~Star_bin()
Destructor.
Vector & set_beta_auto()
Read/write of .
virtual void sauve(FILE *) const
Save in a file.
Scalar ssjm1_lnq
Effective source at the previous step for the resolution of the Poisson equation for lnq_auto.
bool conf_flat
true if the 3-metric is conformally flat, false for a more general metric.
virtual void del_hydro_euler()
Sets to ETATNONDEF (undefined state) the hydrodynamical quantities relative to the Eulerian observer.
void equation_of_state()
Computes the proper baryon and energy density, as well as pressure from the enthalpy.
virtual void del_deriv() const
Deletes all the derived quantities.
Scalar gam_euler
Lorentz factor between the fluid and Eulerian observers.
virtual ostream & operator>>(ostream &) const
Operator >> (virtual function called by the operator <<).
virtual void set_der_0x0() const
Sets to 0x0 all the pointers on derived quantities.
double ray_eq() const
Coordinate radius at , [r_unit].
virtual void sauve(FILE *) const
Save in a file.
Sym_tensor stress_euler
Spatial part of the stress-energy tensor with respect to the Eulerian observer.
double ray_eq_pi() const
Coordinate radius at , [r_unit].
Vector u_euler
Fluid 3-velocity with respect to the Eulerian observer.
Map & mp
Mapping associated with the star.
void operator=(const Star &)
Assignment to another Star.
int nzet
Number of domains of *mp occupied by the star.
Tensor field of valence 1.
virtual void change_triad(const Base_vect &)
Sets a new vectorial basis (triad) of decomposition and modifies the components accordingly.
Scalar & set(int)
Read/write access to a component.
Cmp exp(const Cmp &)
Exponential.
Tbl norme(const Cmp &)
Sums of the absolute values of all the values of the Cmp in each domain.
Tbl min(const Cmp &)
Minimum values of a Cmp in each domain.
Tbl max(const Cmp &)
Maximum values of a Cmp in each domain.
virtual void sauve(FILE *) const
Save in a binary file.
virtual void sauve(FILE *) const
Save in a binary file.
virtual void change_triad(const Base_vect &new_triad)
Sets a new vectorial basis (triad) of decomposition and modifies the components accordingly.
virtual void set_etat_nondef()
Sets the logical state of all components to ETATNONDEF (undefined state).
virtual void annule(int l_min, int l_max)
Sets the Tensor to zero in several domains.
virtual void set_etat_zero()
Sets the logical state of all components to ETATZERO (zero state).
Standard units of space, time and mass.