99 double precis = 1.e-15 ;
154 p_mass_g =
new double( source.integrale() ) ;
205 p_tsw =
new double( tcin / ( mass_p + tcin -
mass_g() ) ) ;
211 p_tsw =
new double( tcin / fabs(wgrav) ) ;
238 - dlogn(1)*dlogn(1) - dlogn(2)*dlogn(2) - dlogn(3)*dlogn(3) ;
275 - dlogn(1)*dlogn(1) - dlogn(2)*dlogn(2) - dlogn(3)*dlogn(3)
276 + 0.5 * ( dalpha(1)*dbet(1) + dalpha(2)*dbet(2) + dalpha(3)*dbet(3) ) ;
278 Scalar aa = alpha - 0.5 * bet ;
284 cout <<
"Star_rot::grv3: the mapping does not belong" 285 <<
" to the class Map_radial !" << endl ;
292 vdaadt = vdaadt.
ssint() ;
305 vtemp = (mpr->
xsr) * vtemp ;
313 source =
bbb * source + 0.5 * temp ;
317 source = - 0.5 * ( dlogn(1)*dlogn(1) + dlogn(2)*dlogn(2) + dlogn(3)*dlogn(3) ) ;
341 *ost <<
"Star_rot::grv3 : gravitational term : " << int_grav
343 *ost <<
"Star_rot::grv3 : matter term : " << int_mat
347 p_grv3 =
new double( (int_grav + int_mat) / int_mat ) ;
368 int i_b = mg->
get_nr(l_b) - 1 ;
369 int j_b = mg->
get_nt(l_b) - 1 ;
389 assert(mp_rad != 0x0) ;
395 for (
int k=0; k<np; k++) {
396 for (
int j=0; j<nt; j++) {
397 int l_star = lsurf(k, j) ;
398 double xi_star = xisurf(k, j) ;
399 va_r.set(0, k, j, 0) = mp_rad->
val_r_jk(l_star, xi_star, j, k) ;
402 va_r.std_base_scal() ;
406 integ =
sqrt(va_r*va_r + dr*dr) ;
409 for (
int j=0; j<nt; j++) {
410 integ.set(0, k, j, 0)
415 double surftot = (*integ.c_cf)(0, k, 0, 0) ;
438 assert(mp_rad != 0x0) ;
444 for (
int k=0; k<np; k++) {
445 for (
int j=0; j<nt; j++) {
446 int l_star = lsurf(k, j) ;
447 double xi_star = xisurf(k, j) ;
448 va_r.set(0, k, j, 0) = mp_rad->
val_r_jk(l_star, xi_star, j, k) ;
451 va_r.std_base_scal() ;
455 integ =
sqrt(va_r*va_r + dr*dr) ;
458 for (
int k=0; k<np; k++) {
459 for (
int j=0; j<nt; j++) {
460 integ.set(0, k, j, 0) *=
sqrt(a2.
val_point_jk(lsurf(k, j), xisurf(k, j), j, k))
461 * b.
val_point_jk(lsurf(k, j), xisurf(k, j), j, k) * va_r(0, k, j, 0) ;
464 integ.std_base_scal() ;
466 double surftot = 0. ;
467 for (
int j=0; j<nt; j++) {
468 surftot += (*integ2.
c_cf)(0, 0, j, 0) / double(2*j+1) ;
471 p_area =
new double( 4*M_PI*surftot) ;
514 int i_b = mg->
get_nr(l_b) - 1 ;
515 int j_b = mg->
get_nt(l_b) - 1 ;
523 / (n_eq + nphi_eq *
r_circ() )
542 int i_b = mg->
get_nr(l_b) - 1 ;
543 int j_b = mg->
get_nt(l_b) - 1 ;
551 / (n_eq - nphi_eq *
r_circ() )
571 p_z_pole =
new double( 1. / n_pole - 1. ) ;
604 - dlogn(1)*dlogn_bet(1) - dlogn(2)*dlogn_bet(2) - dlogn(3)*dlogn_bet(3) ;
607 source = qpig *
nbar ;
629 assert( dynamic_cast<const Map_radial*>(&
mp) != 0x0 ) ;
639 source = 0.5 * source - 1.5 * temp ;
654 double Bo = -32. * correct.
integrale() / qpig ;
681 int i_b = mg->
get_nr(l_b) - 1 ;
682 int j_b = mg->
get_nt(l_b) ;
696 for(j = 0; j < j_b; j++)
virtual double mass_g() const
Gravitational mass.
const Scalar & get_a_car() const
Returns the square of the metric factor A.
double * p_mass_b
Baryon mass.
const Valeur & dsdt() const
Returns of *this.
Cmp log(const Cmp &)
Neperian logarithm.
Mtbl_cf * c_cf
Coefficients of the spectral expansion of the function.
Scalar dzeta
Metric potential .
virtual double mean_radius() const
Mean star radius from the area .
Scalar a_car
Square of the metric factor A.
void mult_r()
Multiplication by r everywhere; dzpuis is not changed.
Map & mp
Mapping associated with the star.
static double lambda_grv2(const Scalar &sou_m, const Scalar &sou_q)
Computes the coefficient which ensures that the GRV2 virial identity is satisfied.
virtual double r_circ_merid() const
Crcumferential meridional radius.
int get_np(int l) const
Returns the number of points in the azimuthal direction ( ) in domain no. l.
Cmp sqrt(const Cmp &)
Square root.
double * p_r_circ
Circumferential radius (equator)
bool relativistic
Indicator of relativity: true for a relativistic star, false for a Newtonian one. ...
Scalar tnphi
Component of the shift vector.
double * p_mom_quad
Quadrupole moment.
Scalar bbb
Metric factor B.
Standard units of space, time and mass.
void annule_hard()
Sets the Valeur to zero in a hard way.
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
virtual double z_pole() const
Redshift factor at North pole.
double & set(int i)
Read/write of a particular element (index i) (1D case)
Tensor field of valence 0 (or component of a tensorial field).
virtual double grv2() const
Error on the virial identity GRV2.
double integrale() const
Computes the integral over all space of *this .
Tensor up_down(const Metric &gam) const
Computes a new tensor by raising or lowering all the indices of *this .
int get_type_t() const
Returns the type of sampling in the direction: SYM : : symmetry with respect to the equatorial pl...
Basic integer array class.
const Valeur & sx() const
Returns (r -sampling = RARE ) \ Id (r sampling = FIN ) \ (r -sampling = UNSURR ) ...
virtual void std_spectral_base()
Sets the spectral bases of the Valeur va to the standard ones for a scalar field. ...
Values and coefficients of a (real-value) function.
double omega
Rotation angular velocity ([f_unit] )
Scalar nbar
Baryon density in the fluid frame.
int get_etat() const
Returns the logical state ETATNONDEF (undefined), ETATZERO (null) or ETATQCQ (ordinary).
virtual const Tbl & surf_grav() const
Surface gravity (table along the theta direction)
Scalar s_euler
Trace of the stress scalar in the Eulerian frame.
Tensor field of valence 1.
void std_base_scal()
Sets the bases for spectral expansions (member base ) to the standard ones for a scalar.
virtual double area() const
Integrated surface area in .
virtual const Itbl & l_surf() const
Description of the stellar surface: returns a 2-D Itbl containing the values of the domain index l on...
void set_dzpuis(int)
Modifies the dzpuis flag.
const Tbl & xi_surf() const
Description of the stellar surface: returns a 2-D Tbl containing the values of the radial coordinate ...
double val_grid_point(int l, int k, int j, int i) const
Returns the value of the field at a specified grid point.
Tbl * p_xi_surf
Description of the stellar surface: 2-D Tbl containing the values of the radial coordinate on the su...
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
int nzet
Number of domains of *mp occupied by the star.
Scalar nphi
Metric coefficient .
double * p_z_eqf
Forward redshift factor at equator.
Scalar gam_euler
Lorentz factor between the fluid and Eulerian observers.
Scalar ener
Total energy density in the fluid frame.
double * p_grv2
Error on the virial identity GRV2.
double * p_area
Integrated surface area.
double * p_r_circ_merid
Circumferential radius (meridian)
virtual void inc_dzpuis(int inc=1)
Increases by inc units the value of dzpuis and changes accordingly the values of the Scalar in the co...
Scalar press
Fluid pressure.
virtual double mass_b() const
Baryon mass.
const Valeur & ssint() const
Returns of *this.
const Mg3d * get_angu() const
Returns the pointer on the associated angular grid.
int get_dzpuis() const
Returns dzpuis.
virtual double mom_quad() const
Quadrupole moment.
virtual double angu_mom() const
Angular momentum.
double * p_z_pole
Redshift factor at North pole.
Base class for pure radial mappings.
const Valeur & mult_st() const
Returns applied to *this.
virtual double val_r_jk(int l, double xi, int j, int k) const =0
Returns the value of the radial coordinate r for a given and a given collocation point in in a give...
const Scalar & get_bbb() const
Returns the metric factor B.
double * p_grv3
Error on the virial identity GRV3.
double val_point_jk(int l, double x, int j, int k) const
Computes the value of the field represented by *this at an arbitrary point in , but collocation point...
Coord xsr
in the nucleus; \ 1/R in the non-compactified shells; \ in the compactified outer domain...
void mult_rsint()
Multiplication by everywhere; dzpuis is not changed.
virtual double r_circ() const
Circumferential equatorial radius.
double * p_angu_mom
Angular momentum.
Cmp pow(const Cmp &, int)
Power .
Tenseur contract(const Tenseur &, int id1, int id2)
Self contraction of two indices of a Tenseur .
Scalar logn
Logarithm of the lapse N .
Scalar b_car
Square of the metric factor B.
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.
void std_base_scal()
Sets the spectral bases of the Valeur va to the standard ones for a scalar.
double ray_pole() const
Coordinate radius at [r_unit].
int get_nr(int l) const
Returns the number of points in the radial direction ( ) in domain no. l.
double * p_aplat
Flatening r_pole/r_eq.
virtual double z_eqb() const
Backward redshift factor at equator.
virtual double grv3(ostream *ost=0x0) const
Error on the virial identity GRV3.
const Scalar & srdsdt() const
Returns of *this .
Scalar nn
Lapse function N .
Scalar uuu
Norm of u_euler.
double ray_eq() const
Coordinate radius at , [r_unit].
const Scalar & dsdr() const
Returns of *this .
const Valeur & mult_ct() const
Returns applied to *this.
int get_nt(int l) const
Returns the number of points in the co-latitude direction ( ) in domain no. l.
Valeur & set_spectral_va()
Returns va (read/write version)
bool check_dzpuis(int dzi) const
Returns false if the last domain is compactified and *this is not zero in this domain and dzpuis is n...
virtual double aplat() const
Flatening r_pole/r_eq.
const Vector & derive_cov(const Metric &gam) const
Returns the gradient (1-form = covariant vector) of *this
Tbl * p_surf_grav
Surface gravity (along the theta direction)
Scalar ener_euler
Total energy density in the Eulerian frame.
Itbl * p_l_surf
Description of the stellar surface: 2-D Itbl containing the values of the domain index l on the surfa...
double * p_mass_g
Gravitational mass.
const Metric_flat & flat_met_spher() const
Returns the flat metric associated with the spherical coordinates and with components expressed in th...
virtual double z_eqf() const
Forward redshift factor at equator.
virtual double tsw() const
Ratio T/W.
const Valeur & get_spectral_va() const
Returns va (read only version)
double * p_z_eqb
Backward redshift factor at equator.