120 double precis = 1.e-15 ;
182 p_mass_g =
new double( source().integrale() ) ;
207 dens.
va = (dens.
va).mult_st() ;
214 dens =
nbar() * dens ;
244 p_tsw =
new double( tcin / ( mass_p + tcin -
mass_g() ) ) ;
251 p_tsw =
new double( tcin / fabs(wgrav) ) ;
319 Cmp aa = alpha() - 0.5 * beta() ;
325 cout <<
"Etoile_rot::grv3: the mapping does not belong" 326 <<
" to the class Map_radial !" << endl ;
333 vdaadt = vdaadt.
ssint() ;
346 vtemp = (mpr->
xsr) * vtemp ;
354 source =
bbb() * source() + 0.5 * temp ;
364 double int_grav = source().integrale() ;
378 double int_mat = source().integrale() ;
383 *ost <<
"Etoile_rot::grv3 : gravitational term : " << int_grav
385 *ost <<
"Etoile_rot::grv3 : matter term : " << int_mat
389 p_grv3 =
new double( (int_grav + int_mat) / int_mat ) ;
411 int i_b = mg->
get_nr(l_b) - 1 ;
414 j_b = mg->
get_nt(l_b) - 1 ;
416 j_b = (mg->
get_nt(l_b) - 1)/2 ;
437 assert(mp_rad != 0x0) ;
443 for (
int k=0; k<np; k++) {
444 for (
int j=0; j<nt; j++) {
445 int l_star = lsurf(k, j) ;
446 double xi_star = xisurf(k, j) ;
447 va_r.set(0, k, j, 0) = mp_rad->
val_r_jk(l_star, xi_star, j, k) ;
450 va_r.std_base_scal() ;
454 integ =
sqrt(va_r*va_r + dr*dr) ;
458 for (
int j=0; j<nt; j++) {
459 integ.set(0, k, j, 0)
464 double surftot = (*integ.c_cf)(0, k, 0, 0) ;
488 assert(mp_rad != 0x0) ;
495 for (
int k=0; k<np; k++) {
496 for (
int j=0; j<nt; j++) {
497 int l_star = lsurf(k, j) ;
498 double xi_star = xisurf(k, j) ;
500 va_r.set(0, k, j, 0) = mp_rad->
val_r_jk(l_star, xi_star, j, k) ;
503 va_r.std_base_scal() ;
507 integ =
sqrt(va_r*va_r + dr*dr) ;
512 for (
int k=0; k<np; k++) {
513 for (
int j=0; j<nt; j++) {
514 integ.set(0, k, j, 0) *=
sqrt(a2.
val_point_jk(lsurf(k, j), xisurf(k, j), j, k))
515 * b.
val_point_jk(lsurf(k, j), xisurf(k, j), j, k) * va_r(0, k, j, 0) ;
518 integ.std_base_scal() ;
520 double surftot = 0. ;
521 for (
int j=0; j<nt; j++) {
522 surftot += (*integ2.
c_cf)(0, 0, j, 0) / double(2*j+1) ;
525 p_area =
new double( 4*M_PI*surftot) ;
581 int i_b = mg->
get_nr(l_b) - 1 ;
584 j_b = mg->
get_nt(l_b) - 1 ;
586 j_b = (mg->
get_nt(l_b) - 1)/2 ;
590 double u_eq =
uuu()(l_b, k_b, j_b, i_b) ;
591 double n_eq =
nnn()(l_b, k_b, j_b, i_b) ;
592 double nphi_eq =
nphi()(l_b, k_b, j_b, i_b) ;
595 / (n_eq + nphi_eq *
r_circ() )
613 int i_b = mg->
get_nr(l_b) - 1 ;
616 j_b = mg->
get_nt(l_b) - 1 ;
618 j_b = (mg->
get_nt(l_b) - 1) / 2 ;
622 double u_eq =
uuu()(l_b, k_b, j_b, i_b) ;
623 double n_eq =
nnn()(l_b, k_b, j_b, i_b) ;
624 double nphi_eq =
nphi()(l_b, k_b, j_b, i_b) ;
627 / (n_eq - nphi_eq *
r_circ() )
645 double n_pole =
nnn().val_point(
ray_pole(), 0., 0.) ;
647 p_z_pole =
new double( 1. / n_pole - 1. ) ;
721 source = qpig *
nbar ;
731 Cmp& csource = source.
set() ;
743 assert( dynamic_cast<const Map_radial*>(&
mp) != 0x0 ) ;
753 source = 0.5 * source() - 1.5 * temp ;
783 for(
int j = 0; j < nt; j++) {
784 int l_b =
l_surf()(0, j) ;
785 double xi_b =
xi_surf()(0, j) ;
787 =
bbb().va.val_point_jk(l_b, xi_b, j, 0)
788 * mp_rad->
val_r_jk(l_b, xi_b, j, 0) ;
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.
Tbl * p_radius_Morsink
Physical radius close to the definition of Morsink et al. (2007)
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.
double & set(int i)
Read/write of a particular element (index i) (1D case)
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 set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
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...
virtual const Tbl & radius_Morsink() const
Physical radius following Morsink et al.
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...