62 #include "star_bhns.h" 68 Cmp raccord_c1(
const Cmp& uu,
int l1) ;
77 :
Star(mp_i, nzet_i, eos_i),
79 irrotational(irrot_i),
81 d_psi(mp_i, COV, mp_i.get_bvect_cart()),
82 wit_w(mp_i, CON, mp_i.get_bvect_cart()),
84 bsn(mp_i, CON, mp_i.get_bvect_cart()),
93 d_lapconf_auto(mp_i, COV, mp_i.get_bvect_cart()),
94 d_lapconf_comp(mp_i, COV, mp_i.get_bvect_cart()),
95 shift_auto(mp_i, CON, mp_i.get_bvect_cart()),
96 shift_comp(mp_i, CON, mp_i.get_bvect_cart()),
97 shift_tot(mp_i, CON, mp_i.get_bvect_cart()),
98 d_shift_auto(mp_i, 2, CON, mp_i.get_bvect_cart()),
99 d_shift_comp(mp_i, 2, CON, mp_i.get_bvect_cart()),
103 d_confo_auto(mp_i, COV, mp_i.get_bvect_cart()),
104 d_confo_comp(mp_i, COV, mp_i.get_bvect_cart()),
106 taij_auto(mp_i, CON, mp_i.get_bvect_cart()),
107 taij_quad_auto(mp_i),
108 flat(mp_i, mp_i.get_bvect_cart()),
112 ssjm1_wshift(mp_i, CON, mp_i.get_bvect_cart())
184 irrotational(star.irrotational),
192 pot_centri(star.pot_centri),
193 lapconf_auto(star.lapconf_auto),
194 lapconf_comp(star.lapconf_comp),
195 lapconf_tot(star.lapconf_tot),
196 lapse_auto(star.lapse_auto),
197 lapse_tot(star.lapse_tot),
198 d_lapconf_auto(star.d_lapconf_auto),
199 d_lapconf_comp(star.d_lapconf_comp),
200 shift_auto(star.shift_auto),
201 shift_comp(star.shift_comp),
202 shift_tot(star.shift_tot),
203 d_shift_auto(star.d_shift_auto),
204 d_shift_comp(star.d_shift_comp),
205 confo_auto(star.confo_auto),
206 confo_comp(star.confo_comp),
207 confo_tot(star.confo_tot),
208 d_confo_auto(star.d_confo_auto),
209 d_confo_comp(star.d_confo_comp),
211 taij_auto(star.taij_auto),
212 taij_quad_auto(star.taij_quad_auto),
214 ssjm1_lapconf(star.ssjm1_lapconf),
215 ssjm1_confo(star.ssjm1_confo),
216 ssjm1_khi(star.ssjm1_khi),
217 ssjm1_wshift(star.ssjm1_wshift)
225 :
Star(mp_i, eos_i, fich),
228 d_psi(mp_i, COV, mp_i.get_bvect_cart()),
229 wit_w(mp_i, CON, mp_i.get_bvect_cart()),
231 bsn(mp_i, CON, mp_i.get_bvect_cart()),
235 lapconf_auto(mp_i, *(mp_i.get_mg()), fich),
240 d_lapconf_auto(mp_i, COV, mp_i.get_bvect_cart()),
241 d_lapconf_comp(mp_i, COV, mp_i.get_bvect_cart()),
242 shift_auto(mp_i, mp_i.get_bvect_cart(), fich),
243 shift_comp(mp_i, CON, mp_i.get_bvect_cart()),
244 shift_tot(mp_i, CON, mp_i.get_bvect_cart()),
245 d_shift_auto(mp_i, 2, CON, mp_i.get_bvect_cart()),
246 d_shift_comp(mp_i, 2, CON, mp_i.get_bvect_cart()),
247 confo_auto(mp_i, *(mp_i.get_mg()), fich),
250 d_confo_auto(mp_i, COV, mp_i.get_bvect_cart()),
251 d_confo_comp(mp_i, COV, mp_i.get_bvect_cart()),
253 taij_auto(mp_i, CON, mp_i.get_bvect_cart()),
254 taij_quad_auto(mp_i),
255 flat(mp_i, mp_i.get_bvect_cart()),
256 ssjm1_lapconf(mp_i, *(mp_i.get_mg()), fich),
257 ssjm1_confo(mp_i, *(mp_i.get_mg()), fich),
258 ssjm1_khi(mp_i, *(mp_i.get_mg()), fich),
259 ssjm1_wshift(mp_i, mp_i.get_bvect_cart(), fich)
505 ost <<
"Neutron star in a BHNS binary" << endl ;
506 ost <<
"-----------------------------" << endl ;
508 ost <<
"Coordinate radius R_eq_tow : " 510 ost <<
"Coordinate radius R_eq_opp : " 511 <<
ray_eq() / km <<
" [km]" << endl ;
512 ost <<
"Coordinate radius R_eq_orb : " 514 ost <<
"Coordinate radius R_pole : " 515 <<
ray_pole() / km <<
" [km]" << endl ;
516 ost <<
"Central enthalph H_ent : " 518 ost <<
"Lapse function at the center of NS : " 520 ost <<
"Conformal factor at the center of NS : " 522 ost <<
"shift(1) at the center of NS : " 523 <<
shift_tot(1).val_grid_point(0,0,0,0) << endl ;
524 ost <<
"shift(2) at the center of NS : " 525 <<
shift_tot(2).val_grid_point(0,0,0,0) << endl ;
526 ost <<
"shift(3) at the center of NS : " 527 <<
shift_tot(3).val_grid_point(0,0,0,0) << endl ;
560 for (
int i=1; i<=3; i++) {
561 v_orb.
set(i) = www(i).val_grid_point(0,0,0,0) ;
569 for (
int i=1; i<=3; i++)
574 d_psi = d_psi0 + v_orb ;
576 for (
int i=1; i<=3; i++) {
577 if (
d_psi(i).get_etat() == ETATZERO)
587 for (
int i=1; i<=3; i++) {
589 d_psi_i.
va.
set_base( d_psi0(i).get_spectral_va().base ) ;
590 d_psi_i = raccord_c1(d_psi_i,
nzet) ;
598 double relax_met,
int mer,
int fmer_met) {
600 double relax_ent_jm1 = 1. - relax_ent ;
601 double relax_met_jm1 = 1. - relax_met ;
603 ent = relax_ent *
ent + relax_ent_jm1 * star_prev.
ent ;
605 if ( (mer != 0) && (mer % fmer_met == 0)) {
Scalar psi4
Fourth power of the total conformal factor.
void fait_d_psi_bhns()
Computes the gradient of the total velocity potential .
Vector d_lapconf_auto
Derivative of the lapconf function generated by the star .
Vector shift_tot
Total shift vector.
Scalar lapconf_tot
Total lapconf function.
Class for stars in black hole-neutron star binaries.
virtual void set_etat_qcq()
Sets the logical state of all components to ETATQCQ (ordinary state).
virtual void set_der_0x0() const
Sets to 0x0 all the pointers on derived quantities.
double * p_mass_g_bhns
Gravitational mass.
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
Cmp exp(const Cmp &)
Exponential.
virtual ostream & operator>>(ostream &) const
Operator >> (virtual function called by the operator <<).
Map & mp
Mapping associated with the star.
Scalar ssjm1_khi
Effective source at the previous step for the resolution of the Poisson equation for the scalar by m...
virtual void del_deriv() const
Deletes all the derived quantities.
Vector bsn
3-vector shift, divided by N , of the rotating coordinates, .
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.
Vector d_lapconf_comp
Derivative of the lapconf function generated by the companion black hole.
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).
Vector wit_w
Spatial projection of the fluid 3-velocity with respect to the co-orbiting observer.
Base class for coordinate mappings.
Scalar loggam
Logarithm of the Lorentz factor between the fluid and the co-orbiting observer.
double * p_mass_b_bhns
Baryon mass.
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.
virtual void change_triad(const Base_vect &)
Sets a new vectorial basis (triad) of decomposition and modifies the components accordingly.
Scalar & set_pot_centri()
Read/write the centrifugal potential.
Vector shift_auto
Shift vector generated by the star.
Tensor d_shift_auto
Derivative of the shift vector generated by the star .
Tensor field of valence 1.
void set_base(const Base_val &)
Sets the bases for spectral expansions (member base )
Scalar lapse_tot
Total lapse function.
Scalar gam
Lorentz factor between the fluid and the co-orbiting observer.
double val_grid_point(int l, int k, int j, int i) const
Returns the value of the field at a specified grid point.
Map_af mp_aff
Affine mapping for solving poisson's equations of metric quantities.
Vector d_psi
Gradient of (in the irrotational case) (Spherical components with respect to the mapping of the star...
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.
Metric_flat flat
Flat metric defined on the mapping (Spherical components with respect to the mapping of the star )...
void operator=(const Star_bhns &)
Assignment to another Star_bhns.
Scalar confo_tot
Total conformal factor.
Scalar gam_euler
Lorentz factor between the fluid and Eulerian observers.
virtual void sauve(FILE *) const
Save in a file.
virtual ~Star_bhns()
Destructor.
double ray_eq_pis2() const
Coordinate radius at , [r_unit].
Vector d_confo_comp
Derivative of the conformal factor generated by the companion black hole.
Vector & set_shift_comp()
Read/write of the shift vector generated by the companion black hole.
int get_nzone() const
Returns the number of domains.
void relax_bhns(const Star_bhns &star_prev, double relax_ent, double relax_met, int mer, int fmer_met)
Performs a relaxation on ent , lapse_auto , shift_auto , confo_auto .
Star_bhns(Map &mp_i, int nzet_i, const Eos &eos_i, bool irrot_i)
Standard constructor.
Scalar & set_confo_auto()
Read/write of the conformal factor generated by the neutron star.
Scalar lapconf_comp
Lapconf function generated by the companion black hole.
Vector & set_shift_auto()
Read/write of the shift vector generated by the neutron star.
Vector u_euler
Fluid 3-velocity with respect to the Eulerian observer.
const Scalar & deriv(int i) const
Returns of *this , where .
double ray_eq_pi() const
Coordinate radius at , [r_unit].
Scalar taij_quad_auto
Part of the scalar generated by .
Vector shift_comp
Shift vector generated by the companion black hole.
Scalar gam0
Lorentz factor between the co-orbiting observer and the Eulerian one.
Vector ssjm1_wshift
Effective source at the previous step for the resolution of the vector Poisson equation for by means...
Scalar pot_centri
Centrifugal potential.
double ray_pole() const
Coordinate radius at [r_unit].
Scalar lapconf_auto
Lapconf function generated by the star.
bool irrotational
true for an irrotational star, false for a corotating one
virtual void del_deriv() const
Deletes all the derived quantities.
Scalar & set_lapconf_comp()
Read/write of the lapconf function generated by the companion black hole.
const Base_vect_cart & get_bvect_cart() const
Returns the Cartesian basis associated with the coordinates (x,y,z) of the mapping, i.e.
Vector d_confo_auto
Derivative of the conformal factor generated by the star .
Scalar confo_auto
Conformal factor generated by the star.
Scalar confo_comp
Conformal factor generated by the companion black hole.
double ray_eq() const
Coordinate radius at , [r_unit].
Sym_tensor taij_auto
Part of the extrinsic curvature tensor generated by shift_auto , lapse_auto , and confo_auto ...
Scalar ssjm1_lapconf
Effective source at the previous step for the resolution of the Poisson equation for lapconf_auto ...
Scalar & set_confo_comp()
Read/write of the conformal factor generated by the companion black hole.
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).
void set_der_0x0() const
Sets to 0x0 all the pointers on derived quantities.
Scalar & set_lapconf_auto()
Read/write of the lapconf function generated by the neutron star.
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.
Scalar ssjm1_confo
Effective source at the previous step for the resolution of the Poisson equation for confo_auto ...
virtual void sauve(FILE *) const
Save in a file.
virtual void annule(int l_min, int l_max)
Sets the Tensor to zero in several domains.
Scalar lapse_auto
Lapse function generated by the "star".
Scalar psi0
Scalar potential of the non-translational part of fluid 4-velocity (in the irrotational case) ...
Valeur va
The numerical value of the Cmp.
Tensor d_shift_comp
Derivative of the shift vector generated by the companion black hole.