74 int i_b = mg->
get_nr(l_b) - 1 ;
75 int j_b = mg->
get_nt(l_b) - 1 ;
116 double diff_ent = 1 ;
126 for(
int mer=0 ; (diff_ent > precis) && (mer<mermax) ; mer++ ) {
128 cout <<
"-----------------------------------------------" << endl ;
129 cout <<
"step: " << mer << endl ;
130 cout <<
"alpha_r: " << alpha_r << endl ;
131 cout <<
"diff_ent = " << diff_ent << endl ;
146 (source.
set()).set_dzpuis(4) ;
152 mpaff.poisson_falloff(source(), par_nul,
logn_auto.
set(), k_falloff) ;
161 mpaff.
dsdr(logn(), dlogn) ;
164 source = - dlogn * dbeta ;
168 mpaff.poisson_falloff(source(), par_nul, logn_quad.
set(),
180 double nu_mat0_b =
logn_auto()(l_b, k_b, j_b, i_b) ;
181 double nu_mat0_c =
logn_auto()(0, 0, 0, 0) ;
183 double nu_quad0_b = logn_quad()(l_b, k_b, j_b, i_b) ;
184 double nu_quad0_c = logn_quad()(0, 0, 0, 0) ;
186 double alpha_r2 = ( ent_c - ent_b - nu_quad0_b + nu_quad0_c )
187 / ( qpig*(nu_mat0_b - nu_mat0_c) ) ;
189 alpha_r =
sqrt(alpha_r2) ;
203 double logn_c = logn()(0, 0, 0, 0) ;
204 ent = ent_c - logn() + logn_c ;
218 mpaff.
dsdr(logn(), dlogn) ;
224 - 0.5 * ( dlogn * dlogn + dbeta * dbeta ) ;
230 mpaff.poisson_falloff(source(), par_nul,
beta_auto.
set(),
284 <<
"Characteristics of the star obtained by Etoile::equil_spher_falloff : " 286 <<
"-------------------------------------------------------------------" 289 double ray =
mp.
val_r(l_b, 1., M_PI/2., 0) ;
290 cout <<
"Coordinate radius : " << ray / km <<
" km" << endl ;
292 double rcirc = ray *
sqrt(
a_car()(l_b, k_b, j_b, i_b) ) ;
294 double compact = qpig/(4.*M_PI) *
mass_g() / rcirc ;
296 cout <<
"Circumferential radius R : " << rcirc/km <<
" km" << endl ;
297 cout <<
"Baryon mass : " <<
mass_b()/msol <<
" Mo" << endl ;
298 cout <<
"Gravitational mass M : " <<
mass_g()/msol <<
" Mo" << endl ;
299 cout <<
"Compacity parameter GM/(c^2 R) : " << compact << endl ;
310 double vir_mat = source().integrale() ;
316 source = - ( logn().dsdr() * logn().dsdr()
322 double vir_grav = source().integrale() ;
326 double grv3 = ( vir_mat + vir_grav ) / vir_mat ;
328 cout <<
"Virial theorem GRV3 : " << endl ;
329 cout <<
" 3P term : " << vir_mat << endl ;
330 cout <<
" grav. term : " << vir_grav << endl ;
331 cout <<
" relative error : " << grv3 << endl ;
const Cmp & dsdr() const
Returns of *this .
void annule(int l)
Sets the Tenseur to zero in a given domain.
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
Cmp exp(const Cmp &)
Exponential.
Cmp sqrt(const Cmp &)
Square root.
virtual void homothetie(double lambda)
Sets a new radial scale.
void set_std_base()
Set the standard spectal basis of decomposition for each component.
virtual double mass_g() const
Gravitational mass.
Standard units of space, time and mass.
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
Tenseur nnn
Total lapse function.
Tenseur s_euler
Trace of the stress tensor in the Eulerian frame.
double unsurc2
: unsurc2=1 for a relativistic star, 0 for a Newtonian one.
Tenseur press
Fluid pressure.
Tenseur shift
Total shift vector.
Tbl diffrel(const Cmp &a, const Cmp &b)
Relative difference between two Cmp (norme version).
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.
Cmp & set()
Read/write for a scalar (see also operator=(const Cmp&) ).
Tenseur u_euler
Fluid 3-velocity with respect to the Eulerian observer.
Tbl norme(const Cmp &)
Sums of the absolute values of all the values of the Cmp in each domain.
Tenseur nbar
Baryon density in the fluid frame.
Tenseur gam_euler
Lorentz factor between the fluid and Eulerian observers.
virtual double mass_b() const
Baryon mass.
Map & mp
Mapping associated with the star.
int get_nzone() const
Returns the number of domains.
virtual void equation_of_state()
Computes the proper baryon and energy density, as well as pressure from the enthalpy.
int nzet
Number of domains of *mp occupied by the star.
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. ...
Tenseur ener
Total energy density in the fluid frame.
Tenseur logn_auto
Total of the logarithm of the part of the lapse N generated principaly by the star.
Tenseur ent
Log-enthalpy (relativistic case) or specific enthalpy (Newtonian case)
int get_nt(int l) const
Returns the number of points in the co-latitude direction ( ) in domain no. l.
virtual void equil_spher_falloff(double ent_c, double precis=1.e-14)
Computes a spherical static configuration with the outer boundary condition at a finite radius...
Tenseur beta_auto
Logarithm of the part of the product AN generated principaly by by the star.
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
Tenseur ener_euler
Total energy density in the Eulerian frame.
virtual void dsdr(const Cmp &ci, Cmp &resu) const
Computes of a Cmp.
Tensor handling *** DEPRECATED : use class Tensor instead ***.