27 #ifndef __EOS_COMPOSE_FIT_H_ 28 #define __EOS_COMPOSE_FIT_H_ 206 Tbl*& lognb,
Tbl*& gam1) ;
212 const Tbl& logp_read,
const Tbl& loge_read,
213 const Tbl& lognb_read,
const Tbl& gam1_read) ;
227 virtual void sauve(FILE* )
const ;
234 virtual ostream&
operator>>(ostream &)
const ;
242 double get_nbmin()
const {
return nb_min ;} ;
virtual double nbar_ent_p(double ent, const Param *par=0x0) const
Higher bound in density.
void read_compose_data(int &nbp, Tbl *&logh, Tbl *&logp, Tbl *&loge, Tbl *&lognb, Tbl *&gam1)
Reads Compose data and stores the values of thermodynamic quantities.
Eos_compose_fit(const string ¶m_file)
Constructor from a parameter file.
virtual double der_press_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the log-enthalpy.
virtual void sauve(FILE *) const
Save in a file.
const Mg3d * mg
Multi-grid defining the number of domains and spectral coefficients.
Equation of state base class.
Tensor field of valence 0 (or component of a tensorial field).
virtual double der_nbar_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the log-enthalpy.
virtual bool operator!=(const Eos &) const
Comparison operator (difference)
string tablename
Name of the file containing the tabulated data.
virtual double press_ent_p(double ent, const Param *par=0x0) const
Computes the pressure from the log-enthalpy.
virtual double der_press_nbar_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the log-enthalpy.
virtual double csound_square_ent_p(double, const Param *par=0x0) const
Computes the sound speed squared from the enthapy with extra parameters (virtual function implemente...
void read_and_compute(ifstream &)
Reads the Compose data and makes the fit.
virtual double ener_ent_p(double ent, const Param *par=0x0) const
Computes the total energy density from the log-enthalpy.
double get_nbmax() const
Lower bound in density.
void adiabatic_index_fit(int i_min, int i_max, const Tbl &logh_read, const Tbl &logp_read, const Tbl &loge_read, const Tbl &lognb_read, const Tbl &gam1_read)
From the read values, makes the fit on the adiabatic index and deduces the other quantities from ther...
Scalar * log_cs2
Table of .
double integrate_equations(double kappa, double mean_gam, const Scalar &gamma1, const Scalar &log_ent, const Scalar &ent, Scalar &YYY)
Integrates the differential system giving all thermo quantities from the adiabatic index...
static Eos * eos_from_file(FILE *)
Construction of an EOS from a binary file.
virtual ostream & operator>>(ostream &) const
Operator >>
Scalar * log_nb
Table of .
int n_coefs
Number of coeficients for polynomial regression.
const Map_af * mp
Mapping in .
double nb_max
Higher bound on the density, above which the EoS is assumed to be a polytrope.
Polytropic equation of state (relativistic case).
const Eos_poly * p_eos_low
Pointer on a polytropic EoS for the description of low densities (nb<nb_min)
const Eos_poly * p_eos_high
Pointer on a polytropic EoS for the description of high densities (nb>nb_max)
virtual double der_ener_ent_p(double ent, const Param *par=0x0) const
Computes the logarithmic derivative from the log-enthalpy.
double nb_min
Lower bound in baryon density, below which the EoS is assumed to be a polytrope.
const string & get_tablename() const
Returns the name (given in the parameter file, see the introduction of the class).
double hmin
Values of enthalpy corresponding to nb_min and nb_max.
double nb_mid
Middle bound in baryon density, above which which the EoS is determined from the polynomial fit to th...
void write_lorene_table(const string &, int nlines=200) const
Save into a table in Lorene format.
virtual bool operator==(const Eos &) const
Comparison operator (egality)
Equation of state for fitting the 1-parameter EoSs from the CompOSE database.
virtual int identify() const
Returns a number to identify the sub-classe of Eos the object belongs to.
virtual ~Eos_compose_fit()
Destructor.