32char star_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Star/star.C,v 1.21 2014/10/13 08:53:37 j_novak Exp $" ;
112#include "utilitaires.h"
135 u_euler(
mpi, CON, mp.get_bvect_spher()),
136 stress_euler(
mpi, CON, mp.get_bvect_spher()),
139 beta(
mpi, CON, mp.get_bvect_spher()),
141 gamma(mp.flat_met_spher()){
206 ener_euler(et.ener_euler),
208 gam_euler(et.gam_euler),
210 stress_euler(et.stress_euler),
233 u_euler(
mpi, CON, mp.get_bvect_spher()),
234 stress_euler(
mpi, CON, mp.get_bvect_spher()),
237 beta(
mpi, CON, mp.get_bvect_spher()),
239 gamma(
mpi.flat_met_spher()){
258 "Star::Star(const Map&, const Eos&, FILE*) : the EOS given in "
260 " argument and that read in the file are different !" <<
endl ;
423 ost <<
"Number of domains occupied by the star : " <<
nzet <<
endl ;
425 ost <<
"Equation of state : " <<
endl ;
430 <<
" x 0.1 fm^-3" <<
endl ;
432 <<
" rho_nuc c^2" <<
endl ;
434 <<
" rho_nuc c^2" <<
endl ;
441 <<
"Coordinate equatorial radius (phi=0) a1 = "
443 ost <<
"Coordinate equatorial radius (phi=pi/2) a2 = "
445 ost <<
"Coordinate equatorial radius (phi=pi): "
447 ost <<
"Coordinate polar radius a3 = "
452 ost <<
"Gravitational mass : " <<
mass_g() / msol <<
" M_sol" <<
endl ;
478 for (
int l=0;
l<nz;
l++) {
495 fact_ent.set_domain(1) = 1 - 0.25 *
epsilon * (xi(1) - 1) * (xi(1) - 1) ;
504 fact_ent.set_domain(1) = 1 - 0.5 *
epsilon * (xi(1) - 0.5) * (xi(1) - 0.5) ;
505 fact_ent.set_domain(2) = 1 - 0.25 *
epsilon * (xi(2) - 1) * (xi(2) - 1) ;
510 cout <<
"Star::equation_of_state: not ready yet for nzet > 3 !"
580 "Star::hydro_euler : hydro_euler must be called via a derived class"
Equation of state base class.
static Eos * eos_from_file(FILE *)
Construction of an EOS from a binary file.
Time evolution with partial storage (*** under development ***).
Base class for coordinate mappings.
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
const Metric_flat & flat_met_spher() const
Returns the flat metric associated with the spherical coordinates and with components expressed in th...
Metric for tensor calculation.
virtual const Sym_tensor & cov() const
Read-only access to the covariant representation.
const Grille3d * get_grille3d(int l) const
Returns a pointer on the 3D mono-grid for domain no. l.
int get_np(int l) const
Returns the number of points in the azimuthal direction ( ) in domain no. l.
int get_nt(int l) const
Returns the number of points in the co-latitude direction ( ) in domain no. l.
int get_nzone() const
Returns the number of domains.
int get_nr(int l) const
Returns the number of points in the radial direction ( ) in domain no. l.
Tbl & set(int l)
Read/write of the Tbl in a given domain.
Tbl ** t
Array (size nzone ) of pointers on the Tbl 's.
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
Tensor field of valence 0 (or component of a tensorial field).
virtual void sauve(FILE *) const
Save in a file.
virtual void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
virtual void std_spectral_base()
Sets the spectral bases of the Valeur va to the standard ones for a scalar field.
double val_grid_point(int l, int k, int j, int i) const
Returns the value of the field at a specified grid point.
virtual void set_etat_nondef()
Sets the logical state to ETATNONDEF (undefined).
virtual ~Star()
Destructor.
Star(Map &mp_i, int nzet_i, const Eos &eos_i)
Standard constructor.
Scalar ener
Total energy density in the fluid frame.
virtual double mass_g() const =0
Gravitational mass.
Scalar logn
Logarithm of the lapse N .
Scalar nn
Lapse function N .
virtual void del_hydro_euler()
Sets to ETATNONDEF (undefined state) the hydrodynamical quantities relative to the Eulerian observer.
double * p_mass_b
Baryon mass.
virtual void hydro_euler()
Computes the hydrodynamical quantities relative to the Eulerian observer from those in the fluid fram...
double * p_ray_eq
Coordinate radius at , .
const Eos & eos
Equation of state of the stellar matter.
Scalar nbar
Baryon density in the fluid frame.
Scalar ener_euler
Total energy density in the Eulerian frame.
double * p_ray_eq_pi
Coordinate radius at , .
Itbl * p_l_surf
Description of the stellar surface: 2-D Itbl containing the values of the domain index l on the surfa...
void equation_of_state()
Computes the proper baryon and energy density, as well as pressure from the enthalpy.
double * p_ray_eq_pis2
Coordinate radius at , .
double * p_ray_eq_3pis2
Coordinate radius at , .
virtual void del_deriv() const
Deletes all the derived quantities.
Scalar gam_euler
Lorentz factor between the fluid and Eulerian observers.
virtual ostream & operator>>(ostream &) const
Operator >> (virtual function called by the operator <<).
virtual void set_der_0x0() const
Sets to 0x0 all the pointers on derived quantities.
double ray_eq() const
Coordinate radius at , [r_unit].
void set_enthalpy(const Scalar &)
Assignment of the enthalpy field.
Scalar s_euler
Trace of the stress scalar in the Eulerian frame.
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...
virtual void sauve(FILE *) const
Save in a file.
double ray_eq_pis2() const
Coordinate radius at , [r_unit].
Sym_tensor stress_euler
Spatial part of the stress-energy tensor with respect to the Eulerian observer.
Scalar press
Fluid pressure.
double ray_eq_pi() const
Coordinate radius at , [r_unit].
Vector u_euler
Fluid 3-velocity with respect to the Eulerian observer.
Map & mp
Mapping associated with the star.
void operator=(const Star &)
Assignment to another Star.
int nzet
Number of domains of *mp occupied by the star.
double * p_ray_pole
Coordinate radius at .
double ray_pole() const
Coordinate radius at [r_unit].
virtual double mass_b() const =0
Baryon mass.
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
int fread_be(int *aa, int size, int nb, FILE *fich)
Reads integer(s) from a binary file according to the big endian convention.
int fwrite_be(const int *aa, int size, int nb, FILE *fich)
Writes integer(s) into a binary file according to the big endian convention.
virtual void set_etat_nondef()
Sets the logical state of all components to ETATNONDEF (undefined state).
virtual void set_etat_zero()
Sets the logical state of all components to ETATZERO (zero state).
Standard units of space, time and mass.