117 double precis = 1.e-15 ;
179 p_mass_g =
new double( source().integrale() ) ;
204 dens.
va = (dens.
va).mult_st() ;
211 dens =
nbar() * dens ;
241 p_tsw =
new double( tcin / ( mass_p + tcin -
mass_g() ) ) ;
248 p_tsw =
new double( tcin / fabs(wgrav) ) ;
316 Cmp aa = alpha() - 0.5 * beta() ;
322 cout <<
"Etoile_rot::grv3: the mapping does not belong" 323 <<
" to the class Map_radial !" << endl ;
330 vdaadt = vdaadt.
ssint() ;
343 vtemp = (mpr->
xsr) * vtemp ;
351 source =
bbb() * source() + 0.5 * temp ;
361 double int_grav = source().integrale() ;
375 double int_mat = source().integrale() ;
380 *ost <<
"Etoile_rot::grv3 : gravitational term : " << int_grav
382 *ost <<
"Etoile_rot::grv3 : matter term : " << int_mat
386 p_grv3 =
new double( (int_grav + int_mat) / int_mat ) ;
408 int i_b = mg->
get_nr(l_b) - 1 ;
411 j_b = mg->
get_nt(l_b) - 1 ;
413 j_b = (mg->
get_nt(l_b) - 1)/2 ;
434 assert(mp_rad != 0x0) ;
440 for (
int k=0; k<np; k++) {
441 for (
int j=0; j<nt; j++) {
442 int l_star = lsurf(k, j) ;
443 double xi_star = xisurf(k, j) ;
444 va_r.set(0, k, j, 0) = mp_rad->
val_r_jk(l_star, xi_star, j, k) ;
447 va_r.std_base_scal() ;
451 integ =
sqrt(va_r*va_r + dr*dr) ;
455 for (
int j=0; j<nt; j++) {
456 integ.set(0, k, j, 0)
461 double surftot = (*integ.c_cf)(0, k, 0, 0) ;
485 assert(mp_rad != 0x0) ;
492 for (
int k=0; k<np; k++) {
493 for (
int j=0; j<nt; j++) {
494 int l_star = lsurf(k, j) ;
495 double xi_star = xisurf(k, j) ;
497 va_r.set(0, k, j, 0) = mp_rad->
val_r_jk(l_star, xi_star, j, k) ;
500 va_r.std_base_scal() ;
504 integ =
sqrt(va_r*va_r + dr*dr) ;
509 for (
int k=0; k<np; k++) {
510 for (
int j=0; j<nt; j++) {
511 integ.set(0, k, j, 0) *=
sqrt(a2.
val_point_jk(lsurf(k, j), xisurf(k, j), j, k))
512 * b.
val_point_jk(lsurf(k, j), xisurf(k, j), j, k) * va_r(0, k, j, 0) ;
515 integ.std_base_scal() ;
517 double surftot = 0. ;
518 for (
int j=0; j<nt; j++) {
519 surftot += (*integ2.
c_cf)(0, 0, j, 0) / double(2*j+1) ;
522 p_area =
new double( 4*M_PI*surftot) ;
578 int i_b = mg->
get_nr(l_b) - 1 ;
581 j_b = mg->
get_nt(l_b) - 1 ;
583 j_b = (mg->
get_nt(l_b) - 1)/2 ;
587 double u_eq =
uuu()(l_b, k_b, j_b, i_b) ;
588 double n_eq =
nnn()(l_b, k_b, j_b, i_b) ;
589 double nphi_eq =
nphi()(l_b, k_b, j_b, i_b) ;
592 / (n_eq + nphi_eq *
r_circ() )
610 int i_b = mg->
get_nr(l_b) - 1 ;
613 j_b = mg->
get_nt(l_b) - 1 ;
615 j_b = (mg->
get_nt(l_b) - 1) / 2 ;
619 double u_eq =
uuu()(l_b, k_b, j_b, i_b) ;
620 double n_eq =
nnn()(l_b, k_b, j_b, i_b) ;
621 double nphi_eq =
nphi()(l_b, k_b, j_b, i_b) ;
624 / (n_eq - nphi_eq *
r_circ() )
642 double n_pole =
nnn().val_point(
ray_pole(), 0., 0.) ;
644 p_z_pole =
new double( 1. / n_pole - 1. ) ;
718 source = qpig *
nbar ;
728 Cmp& csource = source.
set() ;
740 assert( dynamic_cast<const Map_radial*>(&
mp) != 0x0 ) ;
750 source = 0.5 * source() - 1.5 * temp ;
double * p_z_eqb
Backward redshift factor at equator.
virtual double z_eqf() const
Forward redshift factor at equator.
const Cmp & dsdr() const
Returns of *this .
double * p_z_pole
Redshift factor at North pole.
virtual double mom_quad_Bo() const
Part of the quadrupole moment.
virtual double r_circ() const
Circumferential equatorial radius.
const Tbl & xi_surf() const
Description of the stellar surface: returns a 2-D Tbl containing the values of the radial coordinate...
double * p_mom_quad_old
Part of the quadrupole moment.
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.
double * p_r_circ
Circumferential equatorial radius.
double * p_mom_quad_Bo
Part of the quadrupole moment.
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
Tenseur tnphi
Component of the shift vector.
const Tenseur & get_a_car() const
Returns the total conformal factor .
const Tenseur & gradient_spher() const
Returns the gradient of *this (Spherical coordinates) (scalar field only).
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.
void set_std_base()
Set the standard spectal basis of decomposition for each component.
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.
int get_etat() const
Returns the logical state.
Tenseur nnn
Total lapse function.
double * p_z_eqf
Forward redshift factor at equator.
Tenseur nphi
Metric coefficient .
Tenseur s_euler
Trace of the stress tensor in the Eulerian frame.
double ray_eq() const
Coordinate radius at , [r_unit].
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...
double * p_mom_quad
Quadrupole moment.
const Cmp & srdsdt() const
Returns of *this .
Tenseur b_car
Square of the metric factor B.
virtual double mom_quad_old() const
Part of the quadrupole moment.
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 ) ...
Values and coefficients of a (real-value) function.
Tenseur press
Fluid pressure.
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...
virtual double mean_radius() const
Mean radius.
void std_base_scal()
Sets the bases for spectral expansions (member base ) to the standard ones for a scalar.
double * p_aplat
Flatening r_pole/r_eq.
virtual double r_circ_merid() const
Circumferential meridional radius.
void mult_r()
Multiplication by r everywhere.
Cmp & set()
Read/write for a scalar (see also operator=(const Cmp&) ).
double * p_r_circ_merid
Circumferential meridional radius.
double * p_grv3
Error on the virial identity GRV3.
virtual double angu_mom() const
Angular momentum.
const Valeur & ssint() const
Returns of *this.
virtual double z_pole() const
Redshift factor at North pole.
Tenseur nbar
Baryon density in the fluid frame.
const Mg3d * get_angu() const
Returns the pointer on the associated angular grid.
virtual double grv3(ostream *ost=0x0) const
Error on the virial identity GRV3.
Tenseur gam_euler
Lorentz factor between the fluid and Eulerian observers.
virtual double grv2() const
Error on the virial identity GRV2.
virtual double mass_b() const
Baryon mass.
double * p_area
Surface area.
Base class for pure radial mappings.
void mult_rsint()
Multiplication by .
Map & mp
Mapping associated with the star.
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...
double integrale() const
Computes the integral over all space of *this .
Tbl * p_xi_surf
Description of the stellar surface: 2-D Tbl containing the values of the radial coordinate on the su...
virtual double z_eqb() const
Backward redshift factor at equator.
int get_etat() const
Returns the logical state.
static double lambda_grv2(const Cmp &sou_m, const Cmp &sou_q)
Computes the coefficient which ensures that the GRV2 virial identity is satisfied.
virtual double tsw() const
Ratio T/W.
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...
Tenseur bbb
Metric factor B.
Cmp pow(const Cmp &, int)
Power .
void inc2_dzpuis()
Increases by 2 the value of dzpuis and changes accordingly the values of the Cmp in the external comp...
Tenseur uuu
Norm of u_euler.
double * p_mass_g
Gravitational mass.
double omega
Rotation angular velocity ([f_unit] )
void std_base_scal()
Sets the spectral bases of the Valeur va to the standard ones for a scalar.
int nzet
Number of domains of *mp occupied by the star.
virtual double mom_quad() const
Quadrupole moment.
int get_nr(int l) const
Returns the number of points in the radial direction ( ) in domain no. l.
Tenseur a_car
Total conformal factor .
bool relativistic
Indicator of relativity: true for a relativistic star, false for a Newtonian one. ...
double ray_pole() const
Coordinate radius at [r_unit].
Tenseur ener
Total energy density in the fluid frame.
int get_dzpuis() const
Returns dzpuis.
Tenseur ent
Log-enthalpy (relativistic case) or specific enthalpy (Newtonian case)
virtual double area() const
Surface area.
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...
const Valeur & mult_ct() const
Returns applied to *this.
Tenseur & logn
Metric potential = logn_auto.
void set_dzpuis(int)
Set a value to dzpuis.
int get_nt(int l) const
Returns the number of points in the co-latitude direction ( ) in domain no. l.
virtual double mass_g() const
Gravitational mass.
double * p_grv2
Error on the virial identity GRV2.
const Tenseur & get_bbb() const
Returns the metric factor B.
Tenseur ener_euler
Total energy density in the Eulerian frame.
Tenseur & dzeta
Metric potential = beta_auto.
Valeur va
The numerical value of the Cmp.
double * p_mass_b
Baryon mass.
Tensor handling *** DEPRECATED : use class Tensor instead ***.
double * p_angu_mom
Angular momentum.
virtual double aplat() const
Flatening r_pole/r_eq.
Itbl * p_l_surf
Description of the stellar surface: 2-D Itbl containing the values of the domain index l on the surfa...