23char et_bfrot_global_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Etoile/et_bfrot_global.C,v 1.17 2015/06/10 14:39:17 a_sourie Exp $" ;
108#include "et_rot_bifluid.h"
178 p_mass_g =
new double( source().integrale() ) ;
515 Cmp aa = alpha() - 0.5 * beta() ;
521 cout <<
"Et_rot_bifluid::grv3: the mapping does not belong"
522 <<
" to the class Map_radial !" << endl ;
529 vdaadt = vdaadt.
ssint() ;
542 vtemp = (mpr->
xsr) * vtemp ;
550 source =
bbb() * source() + 0.5 * temp ;
559 double int_grav = source().integrale() ;
569 double int_mat = source().integrale() ;
574 *ost <<
"Et_rot_bifluid::grv3 : gravitational term : " << int_grav
576 *ost <<
"Et_rot_bifluid::grv3 : matter term : " << int_mat
580 p_grv3 =
new double( (int_grav + int_mat) / int_mat ) ;
601 int i_b = mg->
get_nr(l_b) - 1 ;
602 int j_b = mg->
get_nt(l_b) - 1 ;
645 assert(mp_rad != 0x0) ;
652 for (
int k=0; k<np; k++) {
653 for (
int j=0; j<nt; j++) {
654 int l_star2 = lsurf2(k, j) ;
655 double xi_star2 = xisurf2(k, j) ;
657 va_r.
set(0, k, j, 0) = mp_rad->
val_r_jk(l_star2, xi_star2, j, k) ;
664 integ =
sqrt(va_r*va_r + dr*dr) ;
669 for (
int k=0; k<np; k++) {
670 for (
int j=0; j<nt; j++) {
672 * b.
val_point_jk(lsurf2(k, j), xisurf2(k, j), j, k) * va_r(0, k, j, 0) ;
677 double surftot = 0. ;
678 for (
int j=0; j<nt; j++) {
679 surftot += (*integ2.
c_cf)(0, 0, j, 0) / double(2*j+1) ;
682 p_area2 =
new double( 4*M_PI*surftot) ;
771 Cmp& csource = source.
set() ;
793 source = 0.5 * source() - 1.5 * temp ;
824 double precis = 1.e-15 ;
831 surf = -0.2*
nbar()(0,0,0,0) ;
834 surf = prolonge_c1(surf,
nzet) ;
857 double precis = 1.e-15 ;
864 surf2 = -0.2*
nbar2()(0,0,0,0) ;
867 surf2 = prolonge_c1(surf2,
nzet) ;
905 if ( type_t == SYM ) {
911 double theta = M_PI / 2 ;
918 cout <<
"Et_rot_bifluid::ray_eq2 : the case type_t = " << type_t
919 <<
" is not contemplated yet !" << endl ;
941 if ( type_t == SYM ) {
944 double theta = M_PI / 2 ;
945 double phi = M_PI / 2 ;
958 assert( np % 4 == 0 ) ;
967 cout <<
"Et_rot_bifluid::ray_eq2_pis2 : the case type_p = "
968 << type_p <<
" is not contemplated yet !" << endl ;
975 cout <<
"Et_rot_bifluid::ray_eq2_pis2 : the case type_t = " << type_t
976 <<
" is not contemplated yet !" << endl ;
998 if ( type_t == SYM ) {
1012 double theta = M_PI / 2 ;
1021 cout <<
"Et_rot_bifluid::ray_eq2_pi : the case type_t = " << type_t
1022 <<
" and type_p = " << type_p << endl ;
1023 cout <<
" is not contemplated yet !" << endl ;
1040 assert( ((
mp.
get_mg())->get_type_t() == SYM)
1041 || ((
mp.
get_mg())->get_type_t() == NONSYM) ) ;
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
void mult_rsint()
Multiplication by .
int get_etat() const
Returns the logical state.
Valeur va
The numerical value of the Cmp
void std_base_scal()
Sets the spectral bases of the Valeur va to the standard ones for a scalar.
void annule(int l)
Sets the Cmp to zero in a given domain.
int get_dzpuis() const
Returns dzpuis.
void mult_r()
Multiplication by r everywhere.
void inc2_dzpuis()
Increases by 2 the value of dzpuis and changes accordingly the values of the Cmp in the external comp...
void set_dzpuis(int)
Set a value to dzpuis.
double integrale() const
Computes the integral over all space of *this .
const Cmp & srdsdt() const
Returns of *this .
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 Cmp & dsdr() const
Returns of *this .
double get_m1() const
Return the individual particule mass
double get_m2() const
Return the individual particule mass
double * p_angu_mom_1_part2_2
To compute Xn (2nd version)
Tenseur gam_euler2
Lorentz factor between the fluid 2 and Eulerian observers
Tenseur enerps_euler
the combination : useful because in the Newtonian limit .
double * p_mass_b1
Baryon mass of fluid 1.
virtual double angu_mom_1_part1_1() const
To compute In (1st version)
double * p_mass_b2
Baryon mass of fluid 2.
virtual double grv3(ostream *ost=0x0) const
Error on the virial identity GRV3.
virtual const Itbl & l_surf() const
Description of the surface of fluid 1: returns a 2-D Itbl containing the values of the domain index...
Tenseur j_euler12_1
To compute Ip (1st version)
virtual double mom_quad_Bo() const
Part of the quadrupole moment.
double * p_angu_mom_1_part1_2
To compute In (2nd version)
Tenseur j_euler2
To compute Jp.
Tenseur sphph_euler
The component of the stress tensor .
double * p_angu_mom_2_part2_1
To compute Xp (1st version)
virtual double area2() const
Surface area for fluid 2.
virtual double angu_mom_2_part1_2() const
To compute Ip (2nd version)
Tbl * p_xi_surf2
Description of the surface of fluid 2: 2-D Tbl containing the values of the radial coordinate on the...
virtual double angu_mom_2_part1_1() const
To compute Ip (1st version)
double * p_angu_mom_1
Angular momentum of fluid 1.
virtual double angu_mom_2() const
Angular momentum of fluid 2.
Tenseur j_euler11_1
To compute In (1st version)
virtual double angu_mom_2_part2_2() const
To compute Xp (2nd version)
double * p_ray_eq2
Coordinate radius at , .
double * p_angu_mom_1_part2_1
To compute Xn (1st version)
double ray_pole2() const
Coordinate radius for fluid 2 at [r_unit].
virtual double mass_b() const
Total Baryon mass.
Tenseur j_euler1
To compute Jn.
Tenseur j_euler
Total angular momentum (flat-space!) 3-vector , which is related to of the "3+1" decomposition,...
const Tbl & xi_surf2() const
Description of the surface of fluid 2: returns a 2-D Tbl containing the values of the radial coordi...
double * p_ray_pole2
Coordinate radius at .
virtual double mass_g() const
Gravitational mass.
virtual double angu_mom_2_part2_1() const
To compute Xp (1st version)
double * p_aplat2
Flatening r_pole/r_eq of fluid no.2.
double * p_angu_mom_2_part2_2
To compute Xp (2nd version)
double * p_area2
Surface area of fluid no.2.
double * p_angu_mom_2
Angular momentum of fluid 2.
const Itbl & l_surf2() const
Description of the surface of fluid 2: returns a 2-D Itbl containing the values of the domain index...
const Eos_bifluid & eos
Equation of state for two-fluids model.
double * p_angu_mom_2_part1_2
To compute Ip (2nd version)
double mass_b1() const
Baryon mass of fluid 1.
virtual double angu_mom_1_part1_2() const
To compute In (2nd version)
virtual double angu_mom_1_part2_1() const
To compute Xn (1st version)
double ray_eq2() const
Coordinate radius for fluid 2 at , [r_unit].
virtual double r_circ2() const
Circumferential radius for fluid 2.
double mass_b2() const
Baryon mass of fluid 2.
virtual double mom_quad() const
Quadrupole moment.
virtual double aplat2() const
Flatening r_pole/r_eq for fluid 2.
virtual double grv2() const
Error on the virial identity GRV2.
double * p_angu_mom_1_part1_1
To compute In (1st version)
double * p_r_circ2
Circumferential radius of fluid no.2.
double * p_ray_eq2_pi
Coordinate radius at , .
virtual double angu_mom_1_part2_2() const
To compute Xn (2nd version)
double * p_angu_mom_2_part1_1
To compute Ip (1st version)
Itbl * p_l_surf2
Description of the surface of fluid 2: 2-D Itbl containing the values of the domain index l on the su...
Tenseur nbar2
Baryon density in the fluid frame, for fluid 2.
virtual double angu_mom_1() const
Angular momentum of fluid 1.
virtual double angu_mom() const
Angular momentum.
double * p_ray_eq2_pis2
Coordinate radius at , .
double ray_eq2_pis2() const
Coordinate radius for fluid 2 at , [r_unit].
double ray_eq2_pi() const
Coordinate radius for fluid 2 at , [r_unit].
virtual double mean_radius2() const
Mean radius for fluid 2.
virtual double mom_quad_old() const
Part of the quadrupole moment.
Tenseur & logn
Metric potential = logn_auto.
double * p_mom_quad_old
Part of the quadrupole moment.
const Tenseur & get_bbb() const
Returns the metric factor B.
static double lambda_grv2(const Cmp &sou_m, const Cmp &sou_q)
Computes the coefficient which ensures that the GRV2 virial identity is satisfied.
Tenseur bbb
Metric factor B.
Tenseur & dzeta
Metric potential = beta_auto.
double * p_grv3
Error on the virial identity GRV3.
double * p_grv2
Error on the virial identity GRV2.
double * p_mom_quad_Bo
Part of the quadrupole moment.
double * p_mom_quad
Quadrupole moment.
double * p_angu_mom
Angular momentum.
Tenseur b_car
Square of the metric factor B.
Tenseur tnphi
Component of the shift vector.
int nzet
Number of domains of *mp occupied by the star.
double * p_mass_b
Baryon mass.
double * p_mass_g
Gravitational mass.
Tbl * p_xi_surf
Description of the stellar surface: 2-D Tbl containing the values of the radial coordinate on the su...
Tenseur nnn
Total lapse function.
Tenseur nbar
Baryon density in the fluid frame.
Itbl * p_l_surf
Description of the stellar surface: 2-D Itbl containing the values of the domain index l on the surfa...
Tenseur gam_euler
Lorentz factor between the fluid and Eulerian observers.
Map & mp
Mapping associated with the star.
const Tenseur & get_a_car() const
Returns the total conformal factor .
Tenseur press
Fluid pressure.
bool relativistic
Indicator of relativity: true for a relativistic star, false for a Newtonian one.
Tenseur s_euler
Trace of the stress tensor in the Eulerian frame.
Tenseur a_car
Total conformal factor .
Basic integer array class.
Base class for pure radial mappings.
Coord xsr
in the nucleus; \ 1/R in the non-compactified shells; \ in the compactified outer domain.
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 Base_vect_spher & get_bvect_spher() const
Returns the orthonormal vectorial basis associated with the coordinates of the mapping.
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.
const Mg3d * get_angu() const
Returns the pointer on the associated angular grid.
int get_type_t() const
Returns the type of sampling in the direction: SYM : : symmetry with respect to the equatorial pl...
int get_np(int l) const
Returns the number of points in the azimuthal direction ( ) in domain no. l.
int get_type_p() const
Returns the type of sampling in the direction: SYM : : symmetry with respect to the transformatio...
int get_nt(int l) const
Returns the number of points in the co-latitude direction ( ) in domain no. l.
int get_nr(int l) const
Returns the number of points in the radial direction ( ) in domain no. l.
Tensor handling *** DEPRECATED : use class Tensor instead ***.
Cmp & set()
Read/write for a scalar (see also operator=(const Cmp&) ).
void set_std_base()
Set the standard spectal basis of decomposition for each component.
const Tenseur & gradient_spher() const
Returns the gradient of *this (Spherical coordinates) (scalar field only).
void change_triad(const Base_vect &new_triad)
Sets a new vectorial basis (triad) of decomposition and modifies the components accordingly.
int get_etat() const
Returns the logical state.
Values and coefficients of a (real-value) function.
const Valeur & mult_ct() const
Returns applied to *this.
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...
const Valeur & sx() const
Returns (r -sampling = RARE ) \ Id (r sampling = FIN ) \ (r -sampling = UNSURR )
const Valeur & dsdt() const
Returns of *this.
Tbl & set(int l)
Read/write of the value in a given domain (configuration space).
const Valeur & ssint() const
Returns of *this.
Mtbl_cf * c_cf
Coefficients of the spectral expansion of the function.
const Valeur & mult_st() const
Returns applied to *this.
void std_base_scal()
Sets the bases for spectral expansions (member base ) to the standard ones for a scalar.
void annule_hard()
Sets the Valeur to zero in a hard way.
Cmp sqrt(const Cmp &)
Square root.
Cmp pow(const Cmp &, int)
Power .
Cmp log(const Cmp &)
Neperian logarithm.
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...
Standard units of space, time and mass.